[Android] android communication protocol and android communication protocol

Source: Internet
Author: User

[Android] android communication protocol and android communication protocol

1. Data Differentiation

Mobile Phone: constant Storage

Server: Database Table creation and storage

 

2. Data Source

Android, ios, pc, wap

 

3. Data collection and data mining

IMEI: device ID

IMSI: SIM card number

 

4. Data Encryption

4.1RSA Algorithm

4.2 simple code processing: SimpleDateFormat + Random value (Random)

4.3 Data Digest: MD5 (know the original data before MD5), MD5 features (if the encrypted raw data is the same, the encrypted results are also the same, therefore, the time stamp is used to ensure that the tokens of each request are different)

 

Unique ID of the request

 

5. Verify data

The server needs to verify the data received by the mobile phone.

5.1 parse plaintext data

5.2 mainly compares token and token composition: Timestamp + agreed random Value

Sent by mobile phone: Timestamp, assembled token

Server receiving: Timestamp, receiving token

The server combines token and received token comparison based on the timestamp + agreed random Value

 

6. Protocol Generalization

6.1 formulation of new protocols and encapsulation of existing protocols

6.2 protocol format: xml and json

6.3 protocol compression: wbxml and massive data compression

 

New Protocol:

1. Implementation of basic functions

2. Data collection

3. scalability

4. Information Integrity Verification

5. Convenient Programming

 

Wbxml:

The xml compression maintains a corresponding relationship such:

<Message >=====> M

<Header >=======> H

Saves a lot of data space

 

Processing of large data packets:

You can splice all the data to be transmitted to save unnecessary data and retrieve the data according to certain rules.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.