CN105471917A - Data transmission method and system - Google Patents

Data transmission method and system Download PDF

Info

Publication number
CN105471917A
CN105471917A CN201610024433.XA CN201610024433A CN105471917A CN 105471917 A CN105471917 A CN 105471917A CN 201610024433 A CN201610024433 A CN 201610024433A CN 105471917 A CN105471917 A CN 105471917A
Authority
CN
China
Prior art keywords
data
data message
gateway
content
message
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
CN201610024433.XA
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.)
Chengdu Maijiekang Technology Co Ltd
Original Assignee
Chengdu Maijiekang Technology 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 Chengdu Maijiekang Technology Co Ltd filed Critical Chengdu Maijiekang Technology Co Ltd
Priority to CN201610024433.XA priority Critical patent/CN105471917A/en
Publication of CN105471917A publication Critical patent/CN105471917A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/329Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the application layer [OSI layer 7]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a data transmission method and system, and solves the problem that the data transmission mode in the prior art can not meet the requirement of intelligent hardware efficient and safe transmission. The data transmission method comprises: a gateway receiving the data transmitted by a user side; the gateway using a binary system protocol to coding the data to obtain a data message; the data message comprising a protocol header, data contents and safe verification data; the data contents comprising data transmitted by the user side; the gateway sending the data message to a server. The data transmission method can efficiently and safely complete intelligent hardware data transmission, is convenient to enforce, and is easy to popularize and apply.

Description

Data transmission method and system
Technical field
The present invention relates to communication technical field, in particular to a kind of data transmission method and system.
Background technology
Along with the fast development of Internet of Things, a large amount of Intelligent hardware constantly occurs, the transmission demand of Intelligent hardware data is constantly increased.Conventional application layer protocol such as http protocol carries out transfer of data now, although http protocol can meet data transfer demands, because it is plain text agreement, data bandwidth is higher, transfer of data and treatment effeciency relatively low.Http protocol is resolved comparatively complicated in addition, is not suitable for the transfer of data that Intelligent hardware carries out lightweight.Have and adopt binary protocol to carry out transfer of data, but traditional binary protocol does not have safety check mode, can not meet the requirement of Intelligent hardware Security Data Transmission yet.
Summary of the invention
In view of this, the object of the embodiment of the present invention is to provide a kind of data transmission method and system, lacks a kind of problem that can meet the data transfer mode that Intelligent hardware is efficient, safe transmission requires to improve in prior art.
To achieve these goals, the technical scheme of embodiment of the present invention employing is as follows:
Embodiments provide a kind of data transmission method, described method comprises:
Gateway receives the data that user side sends;
Described gateway uses binary protocol to carry out coding to described data and obtains data message, and described data message comprises protocol header, data content and safety check data, and described data content comprises the data that user side sends;
Described data message is sent to server by described gateway.
Preferred as one, described method also comprises:
Described server receives the data message that described gateway sends;
Described server is resolved the described data message received by described binary protocol, obtains data content.
Preferred as another kind, described protocol header comprises starting character, data packet length, version number and instruction type, prestore the instruction type that different pieces of information content is respectively corresponding in described gateway, described gateway uses binary protocol to comprise the described data step obtaining data message of encoding:
Described gateway writes starting character, data packet length, version number, instruction type, data content and described safety check data that data content is corresponding successively, forms described data message;
Wherein, described starting character is fixed value, and described data packet length is the length of the data that described user side sends, and described version number is the version numerical value of binary protocol iteration, and described safety check data are the numerical value calculated by the computation rule preset.
Preferred as another, described server is resolved the described data message received by described binary protocol, and the step obtaining data content comprises:
Parse the described data message received;
Calculate the length of data content in the described data message received;
Judge that whether the length of the described data content calculated is identical with the data packet length in described protocol header, if identical, the safety check data then calculating the described data message received by described default computation rule also judge the described safety check data that calculate whether with the safety check data consistent in described data message, if consistent, then extract the data content in described data message.
Further, the described safety check data of described gateway write comprise check value and security token, and described check value adopts Cyclical Redundancy Check algorithm to calculate the starting character write, data packet length, version number, instruction type and data content by described gateway; Described security token adopts Message Digest 5 to combine the PKI prestored by described gateway and calculates the starting character write, data packet length, version number, instruction type and data content.
Preferably, the step performed by described server, the safety check data calculating the described data message received by described default computation rule also judge the described safety check data that calculate whether with the safety check data consistent in described data message, if consistent, then extract the data content in described data message, comprising:
Adopt described Cyclical Redundancy Check algorithm to the starting character in the described data message received, data packet length, version number, instruction type and data content carry out calculating check value, judge that whether the described check value calculated is consistent with the check value in described data message, if consistent, then adopt described Message Digest 5 in conjunction with described PKI to the starting character in the described data message received, data packet length, version number, instruction type and data content carry out calculating security token, judge that whether the described security token calculated is consistent with the security token in described data message, if the described security token calculated is consistent with the security token in described data message, then extract the data content in described data message.
Consider actual demand, prestore the task process that different instruction type is corresponding respectively in described server, described method also comprises:
Described whois lookup goes out the task process corresponding with the instruction type in described data message;
Data content in described data message is sent to the task process corresponding with the instruction type in described data message and carries out task process.
On the basis of the above, the embodiment of the present invention additionally provides a kind of data transmission system, and described system comprises: user side, gateway and server;
The data that described gateway sends for receiving described user side, use binary protocol to carry out coding to described data and obtain data message, described data message comprises protocol header, data content and safety check data, and described data content comprises the data that user side sends; Described gateway is also for being sent to described server by described data message.
Further, the data message that described server sends for receiving described gateway, resolves the described data message received by described binary protocol, obtains data content.
Further, described protocol header comprises starting character, data packet length, version number and instruction type, prestores the instruction type that different pieces of information content is corresponding respectively in described gateway; Described gateway is used for writing starting character, data packet length, version number, instruction type, data content and described safety check data that data content is corresponding successively, forms described data message;
Wherein, described starting character is fixed value, and described data packet length is the length of the data that described user side sends, and described version number is the version numerical value of binary protocol iteration, and described safety check data are calculate numerical value by the computation rule preset.
Compared with prior art, the data transmission method provided in the embodiment of the present invention and system, adopt binary protocol to obtain data message to the data recompile that user side sends by gateway and transmit, effectively improve data transmission efficiency.The data message obtained of encoding in the embodiment of the present invention comprises protocol header, data content and safety check data, also effectively ensure that the fail safe of transfer of data, realistic demand while guaranteeing data transmission efficiency.
For making above-mentioned purpose of the present invention, feature and advantage become apparent, preferred embodiment cited below particularly, and coordinate appended accompanying drawing, be described in detail below.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, be briefly described to the accompanying drawing used required in embodiment below, be to be understood that, the following drawings illustrate only some embodiment of the present invention, therefore the restriction to scope should be counted as, for those of ordinary skill in the art, under the prerequisite not paying creative work, other relevant accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 shows the applied environment schematic diagram of a kind of data transmission method that the embodiment of the present invention provides.
Fig. 2 shows the structured flowchart of the user side in a kind of Fig. 1 that the embodiment of the present invention provides.
Fig. 3 shows the structured flowchart of the server in a kind of Fig. 1 that the embodiment of the present invention provides.
Fig. 4 shows the flow chart of a kind of data transmission method that the embodiment of the present invention provides.
Fig. 5 shows the flow chart of the another kind of data transmission method that the embodiment of the present invention provides.
Fig. 6 shows a kind of data content process of analysis schematic diagram that the embodiment of the present invention provides.
A kind of task process that Fig. 7 shows the embodiment of the present invention to be provided selects schematic flow sheet.
Embodiment
The data transmission method that the embodiment of the present invention provides can be applicable in applied environment as shown in Figure 1.As shown in Figure 1, user side 100 and server 200 carry out data communication with mutual by gateway 300.User side 100 is for being sent to gateway 300 by data, and gateway 300 is sent to server 200 after the data received are carried out recompile by binary protocol.
In the embodiment of the present invention, user side 100 is preferably Intelligent hardware product, such as, can comprise Intelligent bracelet, intelligent glasses, intelligent watch, intelligent clothing etc.
Fig. 2 shows the structured flowchart of user terminal 100 described in a kind of embodiment.Described user terminal 100 can comprise memory 102, storage control 104, one or more (only illustrating one in figure) processor 106, Peripheral Interface 108, radio-frequency module 110, audio-frequency module 112, Touch Screen 114 etc.These assemblies are set up by one or more communication bus or holding wire 116 and are electrically connected.
Memory 102 can be used for storing data.
Memory 102 can comprise high speed random asccess memory, also can comprise nonvolatile memory, as one or more magnetic storage device, flash memory or other non-volatile solid state memories.Processor 106 and other possible assemblies can carry out the access of memory 102 under the control of storage control 104.
Various output/input device is coupled to processor 106 and memory 102 by Peripheral Interface 108.In certain embodiments, Peripheral Interface 108, processor 106 and storage control 104 can realize in one single chip.In some other example, they can respectively by independently chip realization.
Radio-frequency module 110, for receiving and sending electromagnetic wave, realizes the mutual conversion of electromagnetic wave and the signal of telecommunication, thus carries out communication with communication network or other equipment.
Audio-frequency module 112 provides audio interface to user, and it can comprise one or more microphone, one or more loud speaker and voicefrequency circuit.
Touch Screen 114 provides one simultaneously and exports and inputting interface between user side 100 and user.Particularly, Touch Screen 114 exports to user's display data transmissions information.
Be appreciated that the structure shown in Fig. 2 is only signal, user side 100 also can comprise than assembly more or less shown in Fig. 2, or has the configuration different from shown in Fig. 2.Each assembly shown in Fig. 2 can adopt hardware, software or its combination to realize.
Fig. 3 shows a kind of structured flowchart of the server 200 that can be applicable in the embodiment of the present invention.As shown in Figure 3, server 200 comprises: memory 201, processor 202 and mixed-media network modules mixed-media 203.
Memory 201 can be used for storing software program and software function module, as in the embodiment of the present invention with the program command/module corresponding to the method step to be performed by server, processor 202 is by running the software program and module that are stored in memory 201, thus perform the application of various function and data processing, namely realize the data transmission method in the embodiment of the present invention.Memory 201 can comprise high speed random asccess memory, also can comprise nonvolatile memory, as one or more magnetic storage device, flash memory or other non-volatile solid state memories.Further, the software program in above-mentioned memory 201 and module also can comprise: operating system 221 and service module 222.Wherein operating system 221, such as can be LINUX, UNIX, WINDOWS, it can comprise the various component software for management system task (such as memory management, memory device control, power management etc.) and/or driving, and can with various hardware or the mutual communication of component software, thus provide the running environment of other component softwares.Service module 222 operates on the basis of operating system 221, and monitors the request of automatic network by the network service of operating system 221, completes corresponding data processing, and return result to client according to request.That is, service module 222 is for providing services on the Internet to client.
Mixed-media network modules mixed-media 203, for being set up the communication connection between server 200 and external communications terminals by described network 300, realizes the transmitting-receiving operation of network signal and data.Above-mentioned network signal can comprise wireless signal or wire signal.
Be appreciated that the structure shown in Fig. 3 is only signal, server 200 also can comprise than assembly more or less shown in Fig. 3, or has the configuration different from shown in Fig. 3.Each assembly shown in Fig. 3 can adopt hardware, software or its combination to realize.In addition, the server in the embodiment of the present invention can also comprise the server of multiple difference in functionality.
In the embodiment of the present invention, communication module is integrated with in gateway 300, store in gateway 300 and program command/the module corresponding to the method step performed by gateway 300, the server 200 shown in the specific implementation structure of gateway 300 and Fig. 3 is similar, does not thus do repeat specification at this.
The data transmission method provided in the embodiment of the present invention and system, adopt binary protocol to obtain data message to the data recompile that user side 100 sends by gateway 300 and transmit, effectively improve data transmission efficiency.The data message obtained of encoding comprises protocol header, data content and safety check data, also effectively ensure that the fail safe of transfer of data, realistic demand while guaranteeing data transmission efficiency.
Below in conjunction with accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.The assembly of the embodiment of the present invention describing and illustrate in usual accompanying drawing herein can be arranged with various different configuration and design.Therefore, below to the detailed description of the embodiments of the invention provided in the accompanying drawings and the claimed scope of the present invention of not intended to be limiting, but selected embodiment of the present invention is only represented.Based on embodiments of the invention, the every other embodiment that those skilled in the art obtain under the prerequisite not making creative work, all belongs to the scope of protection of the invention.
As shown in Figure 4, embodiments provide a kind of data transmission method, said method comprising the steps of.
Step S401: described gateway 300 receives the data that described user side 100 sends.
Wherein, integrated 433M radio-frequency communication module in preferred, users end 100, integrated 433M radio-frequency communication module in gateway 300, in any case, as user carry out operating when, user side 100 sends corresponding data to gateway 300 by 433M radio-frequency communication module.
Step S402: described gateway 300 uses binary protocol to carry out coding to described data and obtains data message, and described data message comprises protocol header, data content and safety check data, described data content comprises the data that user side 100 sends.
Wherein, data message comprises three parts, the protocol header of Part I is used for indicating data message attribute, and the data content of Part II is for storing data waiting for transmission, and the safety check data of Part III are used for the fail safe being guaranteed transfer of data by operations such as encrypted authentications.
Step S403: described data message is sent to described server 200 by described gateway 300.
Wherein, integrated GPRS communication module in preferred gateways 300, server 200 is run the standard host having LINUX operating system.Gateway 300 re-starts coding by binary protocol to data, is then sent to cloud server 200 by GPRS communication module after receiving the data of user side 100 transmission.
As shown in Figure 5, described method is further comprising the steps of.Step S404: described server 200 receives the data message that described gateway 300 sends.Step S405: described server 200 is resolved the described data message received by described binary protocol, obtains data content.Wherein, server 200 can obtain data content by the inverse operation of gateway 300 coded data message.
In the embodiment of the present invention, carried out particular design to adopted binary protocol, preferred described protocol header comprises starting character, data packet length, version number and instruction type, prestores the instruction type that different pieces of information content is corresponding respectively in described gateway 300.Gateway 300 described in step S402 uses binary protocol to comprise the described data step obtaining data message of encoding: described gateway 300 writes starting character, data packet length, version number, instruction type, data content and described safety check data that data content is corresponding successively, forms described data message.
The encode process that obtains data message of gateway 300 pairs of data can be understood as the process writing data packet length, version number, instruction type, data content and described safety check data that data content is corresponding in a manner described successively.
Wherein, described starting character is fixed value, described data packet length is the length of the data that described user side 100 sends, described version number is the version numerical value of binary protocol iteration, described safety check data are calculate numerical value by the computation rule preset, described instruction type refers to the instruction type corresponding with data content, when implementing, gives different numerical value can to different instruction type.
With gateway 300 coded data message accordingly, as shown in Figure 6, described server 200 is resolved the described data message received by described binary protocol, and the step obtaining data content comprises the following steps performed by described server 200.
Step S501: parse the described data message received.
Wherein, the data message received can obtain protocol header, data content and safety check data three parts after resolving.Resolve the protocol header obtained and comprise starting character, data packet length, version number and instruction type.
Step S502: the length calculating data content in the described data message received.
Step S503: judge that whether the length of the described data content calculated is identical with the data packet length in described protocol header, if identical, then perform step S504: calculate the safety check data of the described data message received by described default computation rule and perform step S505: judge the described safety check data that calculate whether with the safety check data consistent in described data message, if consistent, then perform step S506: extract the data content in described data message.
In the embodiment of the present invention, when building data message, data packet length is the length of the data that described user side 100 sends, described data content is the data that described user side 100 sends, if thus to calculate the length of the data content in the data message received identical with the data packet length write in data message for server 200, then illustrate that data content is not lost.After judging that the data content drawing in data message is not lost, then calculate the safety check data of data message and compare with the safety check data that write in data message.Then illustrate that data message is not tampered during the safety check data consistent write in the safety check data calculated and data message, thus guarantee integrality and the fail safe of transfer of data.
In order to fully guarantee the fail safe of transfer of data, in the embodiment of the present invention, the described safety check data that preferred described gateway 300 writes comprise check value and security token two data segments, described check value adopts Cyclical Redundancy Check algorithm (CyclicRedundancyCheck, crc) to calculate the starting character write, data packet length, version number, instruction type and data content by described gateway 300.Described security token adopts Message Digest 5 (MessageDigestAlgorithmmd5) to combine the PKI prestored by described gateway 300 and calculates the starting character write, data packet length, version number, instruction type and data content.
Correspondingly, the step performed by described server 200, the safety check data calculating the described data message received by described default computation rule also judge the described safety check data that calculate whether with the safety check data consistent in described data message, if consistent, then extract the data content in described data message, comprise: adopt described Cyclical Redundancy Check algorithm to the starting character in the described data message received, data packet length, version number, instruction type and data content carry out calculating check value, judge that whether the described check value calculated is consistent with the check value in described data message, if consistent, then adopt described Message Digest 5 in conjunction with described PKI to the starting character in the described data message received, data packet length, version number, instruction type and data content carry out calculating security token, judge that whether the described security token calculated is consistent with the security token in described data message, if the described security token calculated is consistent with the security token in described data message, then extract the data content in described data message.
Consider actual demand, prestore the task process that different instruction type is corresponding respectively in preferred described server 200, as shown in Figure 7, described method is further comprising the steps of.
Step S601: described server 200 finds out the task process corresponding with the instruction type in described data message.Step S602: the data content in described data message is sent to the task process corresponding with the instruction type in described data message and carries out task process.
When implementing, give different numerical value, with the data content that different numeric representations is different can to different instruction type.And then server 200 can learn the task process corresponding to data content in this data message by the numerical value of instruction type place write in identification data message.
In order to make the technical scheme in the embodiment of the present invention more clear, now carry out following illustrating.
The binary protocol adopted in the embodiment of the present invention is as shown in table 1.
Table 1
Wherein, starting character is preferably fixed value, and fixed value can be chosen flexibly, such as, can be stationary digital 0x3A.Data packet length is the length of the data that user side 100 sends.Version number preferably fills according to the version of agreement iteration, and number range can be any number in 1 ~ 255.Each instruction type represents a kind of protocol contents respectively.A, B, C, D...... are the data content comprising data to be transmitted, fill these data flexibly according to different instruction type.After gateway 300 has filled data by agreement, generate crc check value by all data crc algorithms write above, this crc check value is as the check code of check and correction data integrity.Crc check value, can not as safety check only as checking data integrity.Multiple byte before the generating mode of md5 security token preferably gets the data of agreement, carries out md5 computing in conjunction with PKI, the result of computing is signed as md5.
The data now transmitted for user side 100 are an alert data, and the data message that gateway 300 is formed after receiving this alert data is as shown in table 2.
Table 2
Wherein, 0x09 presentation directives type is alarm command.In practical application, in A, multiple type of alarm can be write, such as: in A, write 1 can represent that button is reported to the police, write 2 can represent warning of falling, and write 3 can represent that mattress is reported to the police from bed, and write 4 can represent stay cord alarm equipment alarm etc.Time of fire alarming can be write in B.The ID of alerts user end 100 can be write in C.The DI of gateway 300 can be write in D.Can writing position locating information etc. in E.
Gateway 300 can adopt Transmission Control Protocol that data message is sent to server 200 after completing above-mentioned data message structure.
Wherein, gateway 300 and server 200 are by connecting with under type.Initiate TCP by gateway 300 to server 200 to connect, heartbeat instruction is there is after successful connection, by server 200, gateway 300 identity be attached thereto is tested, if by inspection, keep connecting, wait for and receive this gateway 300 send data, then disconnect if the test fails, server 200 rejects the data that gateway 300 sends.
Server 200 keeps in the process be connected with gateway 300, after receiving a frame data bag, can build agreement at once resolve data by data message.The data parsed are divided into three parts: protocol header, data content, safety check data.After server 200 parses protocol header, can draw the data length of write, server 200 carries out length computation to whole packet, if result of calculation is identical with the data length of write, then detects and passes through.When data length detect by after, server 200 crc algorithm carries out crc computing to data, is compared by the crc of the crc calculated and write, if unanimously, inspection is passed through, otherwise does not pass through.Check by rear at crc, server 200 carries out md5 calculating with identical PKI and md5 algorithm to data and generates signature, and is compared by the md5 of the md5 calculated and write, if consistent, check and pass through, otherwise inspection is not passed through.Only have when length detection, crc checks and md5 inspection is all passed through, server 200 side extracts data content, and the task process data content of extraction being passed to correspondence carries out task process.
It should be noted that, after gateway 300 with server 200 successful connection, the two can continue to keep connection status, when server 200 has task to issue or need to reply data, reply data composition data message also can be sent to gateway 300 by TCP by identical mode by server 200, is undertaken resolving and processing after gateway 300 receives the data message of reply by identical mode.
On the basis of the above, as shown in Figure 1, the embodiment of the present invention additionally provides a kind of data transmission system, and described data transmission system comprises: user side 100, gateway 300 and server 200.
Wherein, the data that described gateway 300 sends for receiving described user side 100, use binary protocol to carry out coding to described data and obtain data message, described data message comprises protocol header, data content and safety check data, and described data content comprises the data that user side 100 sends; Described gateway 300 is also for being sent to described server 200 by described data message.
The data message that described server 200 sends for receiving described gateway 300, resolves the described data message received by described binary protocol, obtains data content.
Described protocol header comprises starting character, data packet length, version number and instruction type, prestores the instruction type that different pieces of information content is corresponding respectively in described gateway 300.Described gateway 300, for writing starting character, data packet length, version number, instruction type, data content and described safety check data that data content is corresponding successively, forms described data message.
Wherein, described starting character is fixed value, and described data packet length is the length of the data that described user side 100 sends, and described version number is the version numerical value of binary protocol iteration, and described safety check data are calculate numerical value by the computation rule preset.
Agreement in the embodiment of the present invention be based on TCP on application layer protocol, protocol data content adopts binary coding mode, and introduce security token, transfer of data can send to server 200 safely, efficiently, realistic demand simultaneously.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.It should be noted that: represent similar terms in similar label and letter accompanying drawing below, therefore, once be defined in an a certain Xiang Yi accompanying drawing, then do not need to define further it and explain in accompanying drawing subsequently.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of described claim.

Claims (10)

1. a data transmission method, is characterized in that, described method comprises:
Gateway receives the data that user side sends;
Described gateway uses binary protocol to carry out coding to described data and obtains data message, and described data message comprises protocol header, data content and safety check data, and described data content comprises the data that user side sends;
Described data message is sent to server by described gateway.
2. data transmission method according to claim 1, is characterized in that, described method also comprises:
Described server receives the data message that described gateway sends;
Described server is resolved the described data message received by described binary protocol, obtains data content.
3. data transmission method according to claim 2, it is characterized in that, described protocol header comprises starting character, data packet length, version number and instruction type, prestore the instruction type that different pieces of information content is respectively corresponding in described gateway, described gateway uses binary protocol to comprise the described data step obtaining data message of encoding:
Described gateway writes starting character, data packet length, version number, instruction type, data content and described safety check data that data content is corresponding successively, forms described data message;
Wherein, described starting character is fixed value, and described data packet length is the length of the data that described user side sends, and described version number is the version numerical value of binary protocol iteration, and described safety check data are the numerical value calculated by the computation rule preset.
4. data transmission method according to claim 3, is characterized in that, described server is resolved the described data message received by described binary protocol, and the step obtaining data content comprises:
Parse the described data message received;
Calculate the length of data content in the described data message received;
Judge that whether the length of the described data content calculated is identical with the data packet length in described protocol header, if identical, the safety check data then calculating the described data message received by described default computation rule also judge the described safety check data that calculate whether with the safety check data consistent in described data message, if consistent, then extract the data content in described data message.
5. data transmission method according to claim 4, it is characterized in that, the described safety check data of described gateway write comprise check value and security token, and described check value adopts Cyclical Redundancy Check algorithm to calculate the starting character write, data packet length, version number, instruction type and data content by described gateway; Described security token adopts Message Digest 5 to combine the PKI prestored by described gateway and calculates the starting character write, data packet length, version number, instruction type and data content.
6. data transmission method according to claim 5, it is characterized in that, the step performed by described server, the safety check data calculating the described data message received by described default computation rule also judge the described safety check data that calculate whether with the safety check data consistent in described data message, if consistent, then extract the data content in described data message, comprising:
Adopt described Cyclical Redundancy Check algorithm to the starting character in the described data message received, data packet length, version number, instruction type and data content carry out calculating check value, judge that whether the described check value calculated is consistent with the check value in described data message, if consistent, then adopt described Message Digest 5 in conjunction with described PKI to the starting character in the described data message received, data packet length, version number, instruction type and data content carry out calculating security token, judge that whether the described security token calculated is consistent with the security token in described data message, if the described security token calculated is consistent with the security token in described data message, then extract the data content in described data message.
7. the data transmission method according to claim 4 ~ 6 any one, is characterized in that, prestore the task process that different instruction type is corresponding respectively in described server, described method also comprises:
Described whois lookup goes out the task process corresponding with the instruction type in described data message;
Data content in described data message is sent to the task process corresponding with the instruction type in described data message and carries out task process.
8. a data transmission system, is characterized in that, described system comprises: user side, gateway and server;
The data that described gateway sends for receiving described user side, use binary protocol to carry out coding to described data and obtain data message, described data message comprises protocol header, data content and safety check data, and described data content comprises the data that user side sends; Described gateway is also for being sent to described server by described data message.
9. data transmission system according to claim 8, is characterized in that, the data message that described server sends for receiving described gateway, resolves, obtain data content by described binary protocol to the described data message received.
10. data transmission system according to claim 9, is characterized in that, described protocol header comprises starting character, data packet length, version number and instruction type, prestores the instruction type that different pieces of information content is corresponding respectively in described gateway; Described gateway is used for writing starting character, data packet length, version number, instruction type, data content and described safety check data that data content is corresponding successively, forms described data message;
Wherein, described starting character is fixed value, and described data packet length is the length of the data that described user side sends, and described version number is the version numerical value of binary protocol iteration, and described safety check data are calculate numerical value by the computation rule preset.
CN201610024433.XA 2016-01-14 2016-01-14 Data transmission method and system Pending CN105471917A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610024433.XA CN105471917A (en) 2016-01-14 2016-01-14 Data transmission method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610024433.XA CN105471917A (en) 2016-01-14 2016-01-14 Data transmission method and system

Publications (1)

Publication Number Publication Date
CN105471917A true CN105471917A (en) 2016-04-06

Family

ID=55609187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610024433.XA Pending CN105471917A (en) 2016-01-14 2016-01-14 Data transmission method and system

Country Status (1)

Country Link
CN (1) CN105471917A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106357690A (en) * 2016-11-08 2017-01-25 浙江中控技术股份有限公司 Data transmission method, data sending device and data receiving device
CN106534103A (en) * 2016-10-28 2017-03-22 美的智慧家居科技有限公司 WIFI device control method and device
CN106685908A (en) * 2016-07-11 2017-05-17 南京兜秘网络科技有限公司 Protection method for audio data completeness in audio live broadcasting process
CN109802883A (en) * 2018-12-27 2019-05-24 南京信息职业技术学院 Mail transmission method and system thereof
CN109905392A (en) * 2019-02-27 2019-06-18 苏州浪潮智能科技有限公司 A kind of data transmission security verification method and system
CN110149631A (en) * 2019-05-29 2019-08-20 飞天诚信科技股份有限公司 A kind of method and system for establishing connection suitable for cloud speaker
CN110234115A (en) * 2019-05-23 2019-09-13 深圳和而泰家居在线网络科技有限公司 More facility communication systems and data communications method
CN110400449A (en) * 2018-04-25 2019-11-01 杭州海康威视数字技术股份有限公司 Warning message input method, device, monitoring server and storage medium
CN112104660A (en) * 2020-09-18 2020-12-18 国网浙江省电力有限公司 Data transmission method, related equipment and readable storage medium
CN115174486A (en) * 2022-06-01 2022-10-11 湖南天冠电子信息技术有限公司 Message transmission method, system and storage medium
CN115331318A (en) * 2022-07-06 2022-11-11 广西添亿友科技有限公司 Method and device for binding vehicle and mobile terminal through infrared
WO2023174170A1 (en) * 2022-03-18 2023-09-21 华为技术有限公司 Packet processing method and apparatus, and packet checking method and apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1402475A (en) * 2001-08-15 2003-03-12 华为技术有限公司 Method for implement interneting protocol communication data transmission
US20050091377A1 (en) * 2001-11-30 2005-04-28 Ralph Behrens Browser-enabled communication system and client and server for one such communication system
CN101673296A (en) * 2009-09-02 2010-03-17 太仓市同维电子有限公司 Method for checking file in the process of data communication
CN105162825A (en) * 2015-07-11 2015-12-16 深圳市美贝壳科技有限公司 Safe file transmission method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1402475A (en) * 2001-08-15 2003-03-12 华为技术有限公司 Method for implement interneting protocol communication data transmission
US20050091377A1 (en) * 2001-11-30 2005-04-28 Ralph Behrens Browser-enabled communication system and client and server for one such communication system
CN101673296A (en) * 2009-09-02 2010-03-17 太仓市同维电子有限公司 Method for checking file in the process of data communication
CN105162825A (en) * 2015-07-11 2015-12-16 深圳市美贝壳科技有限公司 Safe file transmission method

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106685908A (en) * 2016-07-11 2017-05-17 南京兜秘网络科技有限公司 Protection method for audio data completeness in audio live broadcasting process
CN106685908B (en) * 2016-07-11 2019-06-28 南京兜秘网络科技有限公司 The support method of audio data integrality during voice broadcast
CN106534103A (en) * 2016-10-28 2017-03-22 美的智慧家居科技有限公司 WIFI device control method and device
CN106357690A (en) * 2016-11-08 2017-01-25 浙江中控技术股份有限公司 Data transmission method, data sending device and data receiving device
CN110400449A (en) * 2018-04-25 2019-11-01 杭州海康威视数字技术股份有限公司 Warning message input method, device, monitoring server and storage medium
CN109802883A (en) * 2018-12-27 2019-05-24 南京信息职业技术学院 Mail transmission method and system thereof
CN109905392A (en) * 2019-02-27 2019-06-18 苏州浪潮智能科技有限公司 A kind of data transmission security verification method and system
CN110234115A (en) * 2019-05-23 2019-09-13 深圳和而泰家居在线网络科技有限公司 More facility communication systems and data communications method
CN110149631A (en) * 2019-05-29 2019-08-20 飞天诚信科技股份有限公司 A kind of method and system for establishing connection suitable for cloud speaker
CN112104660A (en) * 2020-09-18 2020-12-18 国网浙江省电力有限公司 Data transmission method, related equipment and readable storage medium
WO2023174170A1 (en) * 2022-03-18 2023-09-21 华为技术有限公司 Packet processing method and apparatus, and packet checking method and apparatus
CN115174486A (en) * 2022-06-01 2022-10-11 湖南天冠电子信息技术有限公司 Message transmission method, system and storage medium
CN115174486B (en) * 2022-06-01 2024-05-28 湖南天冠电子信息技术有限公司 Message transmission method, system and storage medium
CN115331318A (en) * 2022-07-06 2022-11-11 广西添亿友科技有限公司 Method and device for binding vehicle and mobile terminal through infrared

Similar Documents

Publication Publication Date Title
CN105471917A (en) Data transmission method and system
CN109450649A (en) Gateway verification method and device based on application program interface and electronic equipment
CN103647777B (en) Safety certificate method and bidirectional forwarding detection BFD equipment
CN103647869B (en) A kind of matching method of terminal, terminal and system
CN109756568A (en) Processing method, equipment and the computer readable storage medium of file
CN104468531A (en) Authorization method, device and system for sensitive data
WO2018018697A1 (en) Method and system for identifying spam message from false base station
CN108040355B (en) Network access method and system
US11023412B2 (en) RDMA data sending and receiving methods, electronic device, and readable storage medium
CN104348578B (en) The method and device of data processing
CN104022878B (en) A kind of pad pasting SIM card and corresponding weight discriminating system and method for authenticating
CN110380842B (en) CAN bus message signature method, device and system suitable for intelligent network-connected automobile
CN110569127B (en) Virtual resource transferring, sending and obtaining method and device
CN107277156A (en) A kind of photovoltaic data transmission method and system based on NB IOT
CN106487746A (en) A kind of method and device of BMP message authentication
CN110445615A (en) Network request security verification method, device, medium and electronic equipment
CN104869259A (en) Information relay transmission system based on mobile terminals and relay transmission method thereof
CN112817602A (en) JSON format data sending and receiving method, device and medium
CN108322366A (en) Access the methods, devices and systems of network
CN109636460B (en) Service processing method, device, equipment and storage medium
US10574392B2 (en) System. methods and devices for transmitting and/or receiving data using an inter communication link
CN111935767B (en) Network simulation system
CN109040011A (en) Method, apparatus, system and the terminal device of data processing
CN105306577A (en) Data sharing system and method between handheld devices based on APP
CN104933059A (en) File reputation acquisition method, gateway equipment and file reputation server

Legal Events

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

Application publication date: 20160406