CN110312254A - The data transmission method that a kind of server and terminal are communicated - Google Patents

The data transmission method that a kind of server and terminal are communicated Download PDF

Info

Publication number
CN110312254A
CN110312254A CN201910554657.5A CN201910554657A CN110312254A CN 110312254 A CN110312254 A CN 110312254A CN 201910554657 A CN201910554657 A CN 201910554657A CN 110312254 A CN110312254 A CN 110312254A
Authority
CN
China
Prior art keywords
data
packet
transmission method
data transmission
header part
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910554657.5A
Other languages
Chinese (zh)
Inventor
魏钦淋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN HAOKE ELECTRONICS CO Ltd
Original Assignee
SHENZHEN HAOKE ELECTRONICS CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN HAOKE ELECTRONICS CO Ltd filed Critical SHENZHEN HAOKE ELECTRONICS CO Ltd
Priority to CN201910554657.5A priority Critical patent/CN110312254A/en
Publication of CN110312254A publication Critical patent/CN110312254A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • H04W28/065Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information using assembly or disassembly of packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0625Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation with splitting of the data block into left and right halves, e.g. Feistel based algorithms, DES, FEAL, IDEA or KASUMI
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0631Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms

Abstract

The present invention provides the data transmission methods that a kind of server and terminal are communicated, it include: that message is grouped as by header part, data portion, packet tail portion, the format of header part and packet portion is fixed, and data portion can change, and data portion is enclosed between header part and packet portion;One message includes multiple data segments arranged side by side, and each data segment contents format has arranged format in the data transmission method;Each bit represents a kind of state, 8 kinds of states of a byte representation;Packet portion includes sequence number, and sequence number can indicate encrypted state, and encrypt to data segment.The beneficial effects of the present invention are: data transmission method of the invention is not only able to improve development efficiency, and efficiency of transmission is improved, and the safety of data transmission is ensured.

Description

The data transmission method that a kind of server and terminal are communicated
Technical field
The present invention relates to the transmission side datas that internet of things field more particularly to a kind of server and terminal are communicated Method.
Background technique
As communication and the development of computer, Internet of Things have also obtained quick development, still, at present in Internet of Things, When server and terminal carry out data transmission, efficiency of transmission is relatively low, and safety cannot be guaranteed.
Summary of the invention
The present invention provides the data transmission methods that a kind of server and terminal are communicated, comprising:
Message is grouped as by header part, data portion, packet tail portion, and the format of header part and packet portion is fixed, number It can be changed according to part, data portion is enclosed between header part and packet portion;
One message includes multiple data segments arranged side by side, each data segment contents format in the data transmission method about Fix formula;
Each bit represents a kind of state, 8 kinds of states of a byte representation;
Packet portion includes sequence number, and 3 represent encrypted state before the byte of sequence number, and encrypt to data segment.
As a further improvement of the present invention, header part includes identification head, data number of segment, packet length, wraps tail portion subpackage Include sequence number, check bit and stop position.
As a further improvement of the present invention, data portion is made of one or more data segment, and multiple data segments are beaten Packet transmits in a message.
As a further improvement of the present invention, in data read process, step-by-step read ASCII, without symbol 8, have symbol Numbers 8, alternatively, reading UCS2, Unicode by double byte is used to transmit Chinese or other non-ascii characters.
As a further improvement of the present invention, the penultimate of message is check bit, is wrapped when unpacking correct Property verifying.
As a further improvement of the present invention, the multiple data segment includes logging in packet, the combination of state packet, position data Packet, device parameter and event notice, the transmitting file in line, file download, terminal.
As a further improvement of the present invention, wrapped in the position data combination packet comprising GPS location packet, the position LBS, The position WIFI packet.
The beneficial effects of the present invention are: data transmission method of the invention is not only able to improve development efficiency, and improve Efficiency of transmission, and the safety of data transmission is ensured.
Specific embodiment
The invention discloses the data transmission method that a kind of server and terminal are communicated, which is also A kind of transport protocol, comprising:
Message is grouped as by header part, data portion, packet tail portion, and the format of header part and packet portion is fixed, number It can be changed according to part, data portion is enclosed between header part and packet portion, using fixed format and changes content Mode is conducive to development efficiency.
Header part includes identification head, data number of segment, packet length, these are the essential informations of message.
Packet portion includes sequence number, check bit and stop position, is identification, the content wrong identification of message respectively And the end position of message.
Data portion can be made of one or more data segment, and multiple data segments are packaged in transmission in a message, It improves efficiency.
All messages package in the following way in the present invention:
Such as:
The present invention is considering high-mechanic in design, each bit can represent a kind of state, and a byte can To indicate 8 kinds of states.And character protocols need one byte representation one, 8 kinds of states need 8 bytes.Under specific circumstances, This agreement is 1/8 size of character protocols.
Such as:
The present invention also has the characteristics that high availability: comparing intelligence by byte transmission, ASCII can be read with step-by-step, without symbol Numbers 8, have symbol 8, UCS2, Unicode can also be read by double byte and is used to transmit Chinese or other non-ascii characters.
With ASCII protocol comparative examples:
ASCII protocol length is the location information packet of 193 bytes:
[3G*861358031672967*00A7*UD,090718,220658,C,0.000000,N,0.000000,W, 0.000,0.000,0.000,0,21,87,0,0,00000020,5,0,460,00,9771,5023,96,9771,5024,96, 9771,4043,102,9771,4041,103,9771,3921,104,0,2000.0], changing corresponding binary protocol into indicates, Length is 63, and it is long by 126 to be converted to ASCII display, actual storage length 130 byte fewer than simple ASCII protocol, almost The 1/3:d1d1003ac1018033070460008270382061898600621916071664 700d58515 of ASCII length f4f5447385f56312e3030032c2c012c03d8010000000014007800000002780d0d。
The penultimate of message is check bit, and the verification of correctness wrapped when unpacking is protected by built-in check bit Demonstrate,prove the accuracy in data transmission procedure.
It multiple data segments, each data segment contents format can about fix in this agreement side by side inside one message Formula.Such as:
Log in packet OXO1.......................
State packet OXO3.......................
Position data combination packet OXO5.........
Device parameter and event notify OXCO..
In line OXC1...................
File download OXFD...................
Transmitting file OXFB............ in terminal
Inside one position grouping packet, GPS location packet, the position LBS packet, the position WIFI packet may include.It is reported by one Text may include multiple data portions, improve efficiency of transmission.
It is which bag data sent after device power-up that sequence number, which is used to identify this bag data, can pass through the company of sequence number Continuous property analyzes the general work state of setting.Under normal circumstances, restart within equipment every 24 hours primary, the number of upload in every 20 seconds According to 24 hours 4320 bag datas of upload, the maximum value of double byte is 65535, and using low 13, maximum length is expressed as 8191. This length sends maximum data considerably beyond the odd-numbered day.3 represent encrypted state before the high byte of sequence number, this agreement supports 3- Des encryption and AES encryption, encryption only have progress to data segment.
No. 01 agreement is to log in packet, contains equipment general information logging in packet, this information and network mark after login Know SocketID to be bound, subsequent packet no longer uploading device information, achievees the purpose that reduce packet length.
In the present invention, increasing data number of segment in packet length indicates: by mass data the study found that mobile network Sending and receiving data amount list wraps limit in 1300 bytes or so, and 2Bytes maximum value is 65535, considerably beyond single packet length upper limit, So being changed to low 11 to indicate data packet length, maximum value 2048.And high 5 are used to indicate the data packet of data segment portion Number, maximum value 31 is not in so many data packet in use.
Data transmission method of the invention is not only able to improve development efficiency, and improves efficiency of transmission, and data The safety of transmission is ensured.
The above content is a further detailed description of the present invention in conjunction with specific preferred embodiments, and it cannot be said that Specific implementation of the invention is only limited to these instructions.For those of ordinary skill in the art to which the present invention belongs, exist Under the premise of not departing from present inventive concept, a number of simple deductions or replacements can also be made, all shall be regarded as belonging to of the invention Protection scope.

Claims (9)

1. the data transmission method that a kind of server and terminal are communicated characterized by comprising
Message is grouped as by header part, data portion, packet tail portion, and the format of header part and packet portion is fixed, data portion Dividing can change, and data portion is enclosed between header part and packet portion;
One message includes multiple data segments arranged side by side, and each data segment contents format about fixes in the data transmission method Formula;
Each bit represents a kind of state, 8 kinds of states of a byte representation;
Packet portion includes sequence number, and it is which bag data sent after device power-up, sequence that sequence number, which is used to identify this bag data, Row number can indicate encrypted state, and encrypt to data segment.
2. data transmission method according to claim 1, which is characterized in that header part include identification head, data number of segment, Packet length, packet portion include sequence number, check bit and stop position.
3. data transmission method according to claim 1, which is characterized in that data portion is by one or more data segment Composition, multiple data segments are packaged in transmission in a message.
4. data transmission method according to claim 1, which is characterized in that in data read process, step-by-step is read ASCII, without symbol 8, have symbol 8, alternatively, by double byte read UCS2, Unicode be used to transmit Chinese or it is other non- Ascii character.
5. data transmission method according to claim 2, which is characterized in that the penultimate of message is check bit, The verification of correctness wrapped when unpacking.
6. data transmission method according to claim 1, which is characterized in that the multiple data segment includes logging in packet, shape State packet, position data combination packet, device parameter and event notice, the transmitting file in line, file download, terminal.
7. data transmission method according to claim 6, which is characterized in that include GPS in the position data combination packet Position packet, the position LBS packet, the position WIFI packet.
8. data transmission method according to claim 1, which is characterized in that encrypted to data segment and added including 3-des Close, AES encryption.
9. data transmission method according to claim 6, which is characterized in that contain the common letter of equipment in packet logging in Breath, after login, equipment general information and network identity are bound, subsequent packet no longer uploading device information, reach reduction packet The purpose of length.
CN201910554657.5A 2019-06-25 2019-06-25 The data transmission method that a kind of server and terminal are communicated Pending CN110312254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910554657.5A CN110312254A (en) 2019-06-25 2019-06-25 The data transmission method that a kind of server and terminal are communicated

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910554657.5A CN110312254A (en) 2019-06-25 2019-06-25 The data transmission method that a kind of server and terminal are communicated

Publications (1)

Publication Number Publication Date
CN110312254A true CN110312254A (en) 2019-10-08

Family

ID=68077465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910554657.5A Pending CN110312254A (en) 2019-06-25 2019-06-25 The data transmission method that a kind of server and terminal are communicated

Country Status (1)

Country Link
CN (1) CN110312254A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113364876A (en) * 2021-06-12 2021-09-07 四川虹美智能科技有限公司 Equipment data processing system based on narrowband Internet of things
CN113507453A (en) * 2021-06-18 2021-10-15 深圳市永联科技股份有限公司 Internet of things information transmission method, embedded equipment and storage medium
CN116015620A (en) * 2022-11-11 2023-04-25 自然资源部国土卫星遥感应用中心 Satellite image data encryption and decryption method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047715A (en) * 2007-01-18 2007-10-03 宝丽雅智能系统(深圳)有限公司 Data communication coding method
CN102761391A (en) * 2012-06-29 2012-10-31 威海海特电子信息技术有限公司 Oil field Internet of things system communication method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047715A (en) * 2007-01-18 2007-10-03 宝丽雅智能系统(深圳)有限公司 Data communication coding method
CN102761391A (en) * 2012-06-29 2012-10-31 威海海特电子信息技术有限公司 Oil field Internet of things system communication method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113364876A (en) * 2021-06-12 2021-09-07 四川虹美智能科技有限公司 Equipment data processing system based on narrowband Internet of things
CN113364876B (en) * 2021-06-12 2022-04-19 四川虹美智能科技有限公司 Equipment data processing system based on narrowband Internet of things
CN113507453A (en) * 2021-06-18 2021-10-15 深圳市永联科技股份有限公司 Internet of things information transmission method, embedded equipment and storage medium
CN113507453B (en) * 2021-06-18 2023-02-14 深圳市永联科技股份有限公司 Internet of things information transmission method, embedded equipment and storage medium
CN116015620A (en) * 2022-11-11 2023-04-25 自然资源部国土卫星遥感应用中心 Satellite image data encryption and decryption method and system
CN116015620B (en) * 2022-11-11 2023-07-28 自然资源部国土卫星遥感应用中心 Satellite image data encryption and decryption method and system

Similar Documents

Publication Publication Date Title
CN110312254A (en) The data transmission method that a kind of server and terminal are communicated
CN103532668B (en) A kind of method guaranteeing that TCP communication data are complete and correct
US7356039B1 (en) Method and apparatus for describing multiple packets to hardware
CN109450852B (en) Network communication encryption and decryption method and electronic equipment
ES2426192T3 (en) Communication procedure between a device running Java ME and an airborne server with SOAP messages under APDU from / to an operator on a host, and corresponding system
CN106470238A (en) It is applied to the connection establishment method and device in server load balancing
RU2016102034A (en) INFRASTRUCTURE NETWORK
CN105978909B (en) Data transmission method, data transmission device and system based on transport-layer encapsulations
RU2010117508A (en) METHOD AND DEVICE FOR IMPLEMENTING FORMATS RLC LTE HEADER
CN106850140A (en) The method of data communication, apparatus and system
TW201029365A (en) MAC layer packet data units for wireless communications
CN106657269B (en) File transmission method
CN108306715A (en) A kind of method and system carrying out long file transmission based on Big Dipper generation satellite short message communication function
WO2016082434A1 (en) Serial data sending and receiving methods and apparatuses, and storage medium
RU2009144275A (en) METHOD AND DEVICE FOR INTERVIEW IN A WIRELESS COMMUNICATION SYSTEM
EP3185466A1 (en) Encrypted communications method and communications terminal, and computer storage medium
CN104618007B (en) A kind of synchronous satellite Transmission Control Protocol segmentation connection optimization method
CN113364512A (en) Encapsulation analysis method and device for Beidou short message
CN110620762A (en) RDMA (remote direct memory Access) -based data transmission method, network card, server and medium
CN110166489A (en) Data transmission method, system, equipment and computer media in a kind of Internet of Things
US20120011569A1 (en) System and method for protecting mac control messages
CN103607264A (en) 3G network-based in-band data transmission method
CN104796887B (en) A kind of method and apparatus of security information interaction
CN104994035A (en) Data transmission method based on Beidou short message communication
CN111083806B (en) Method and device for realizing data transmission based on DMR standard

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191008

RJ01 Rejection of invention patent application after publication