1. Data Differentiation
Phone-side: constant storage
Server-side: database-built table storage
2. Data sources
Android,iOS,pc,WAP
3. Data acquisition and mining
IMEI: Device number
IMSI:SIM card number
4. Data encryption
4.1RSA Algorithm
4.2 Simple Code handling: Timestamp (simpledateformat)+ random value
4.3 data summary:MD5(Know The original data before MD5),MD5 (If the original encrypted data is the same, the result of the encryption is the same, so the timestamp is used to ensure that each request token is different)
Unique identification of the request
5. Verifying data
The server receives the data transmitted by the mobile phone and needs to verify the data
5.1 processing of plaintext data parsing
5.2 is mainly the composition of token,token : timestamp + agreed random value
Phone-side send: timestamp, assembled token
Server receive: Timestamp, receive token
Server- side tokens and token comparisons received based on timestamp + agreed random values
6. Generalization of the agreement
6.1 The development of new protocols and the encapsulation of existing agreements
format of the 6.2 protocol:XML and JSON
compression of the 6.3 protocol:wbxml and compression of large amounts of data
New agreement:
1. Implementation of basic functions
2. Data acquisition
3. Extensibility
4. Information integrity check
5. Easy to Program
Wbxml:
Compressing XML , maintaining a corresponding relationship such as:
<message>======>m
Can save a lot of data space
Processing of large packets:
All the data to be transferred can be stitched together to save unnecessary data and to be removed according to certain rules.
[Android] Android communication protocol