CN107592294A - Data reporting method and device - Google Patents

Data reporting method and device Download PDF

Info

Publication number
CN107592294A
CN107592294A CN201710628139.4A CN201710628139A CN107592294A CN 107592294 A CN107592294 A CN 107592294A CN 201710628139 A CN201710628139 A CN 201710628139A CN 107592294 A CN107592294 A CN 107592294A
Authority
CN
China
Prior art keywords
bag
data
server
encryption
key
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
CN201710628139.4A
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.)
Beijing VRV Software Corp Ltd
Original Assignee
Beijing VRV Software Corp 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 Beijing VRV Software Corp Ltd filed Critical Beijing VRV Software Corp Ltd
Priority to CN201710628139.4A priority Critical patent/CN107592294A/en
Publication of CN107592294A publication Critical patent/CN107592294A/en
Pending legal-status Critical Current

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiments of the invention provide a kind of data reporting method and device, and applied to the terminal device of server communication connection, this method includes:Reported data is treated using the key locally generated to be encrypted, and generates encryption data bag;In default transmission size of the encryption data bag size more than UDP communication interfaces, encryption data bag is split as multiple subdata bags and sent by UDP communication interfaces to server;Whether detection receives the feedback information of server transmission in the first preset time, if do not receive, multiple subdata bags are then re-transmitted to server, if receiving the feedback information for showing packet missing of server transmission, the subdata bag of missing is re-transmitted to server.Data provided by the invention report scheme, and carrying out data using UDP communication protocols reports, and is sent by data encryption and data and detects the reliability and safety for realizing communication data and reporting, and application is upper more simple.

Description

Data reporting method and device
Technical field
The present invention relates to information security and communication technical field, in particular to a kind of data reporting method and device.
Background technology
At present, the data of controlled terminal are reported often using TCP (Transmission in information safety system Control Protocol) agreement.Transmission Control Protocol is a kind of reliable data communication protocol, in terms of big data transmission performance compared with It is good, but it is poor for the concurrent capability of small lot data exchange.On the contrary, UDP (User Datagram Protocol) communication protocol shows comparative superiority in the Data Concurrent ability of small lot, is suitable for the reality of terminal device data When report.But in the prior art, lack a kind of reliable data control program based on udp protocol, therefore, controlled terminal at present Data can not also be reported and be transformed into completely on udp protocol.Therefore, a kind of reliable number based on udp protocol how is realized It is the technical problem that those skilled in the art are badly in need of solving according to control program.
The content of the invention
In view of this, it is an object of the invention to provide a kind of data reporting method and device, to solve the above problems.
Embodiments of the invention provide a kind of data reporting method, applied to the terminal device being connected with server communication, Methods described includes:
Reported data is treated using the key locally generated to be encrypted, and generates encryption data bag;
Detect the encryption data bag size whether more than UDP communication interfaces default transmission size, if leading to more than UDP Believe the default transmission size of interface, then the encryption data bag is split as multiple subdata bags, by the multiple subdata bag Sent by UDP communication interfaces to the server;
Whether detection receives the feedback information that the server is sent in the first preset time, if not receiving described The feedback information that server is sent, then be re-transmitted to the server, if receiving the clothes by the multiple subdata bag The feedback information for showing packet missing that business device is sent, then be re-transmitted to the server by the subdata bag of missing.
Alternatively, if not receiving the feedback information that the server is sent in first preset time, the side Method also includes:
Whether detection receives the heartbeat packet that the server is sent in the second preset time, wherein, described second is pre- If the time is more than first preset time;
It is lost contact state by the server-tag, and stop this if not receiving the heartbeat packet that the server is sent Secondary data report.
Alternatively, it is described that the encryption data bag is split as multiple subdata bags, the multiple subdata bag is passed through The step of UDP communication interfaces are sent to the server, including:
The encryption data bag is split as multiple subdata bags, and counts total bag number of the subdata bag after splitting;
Record the sequence number of each subdata bag and the identification number of each subdata bag;
By the multiple subdata bag, total bag number, the sequence number of each subdata bag and the identification number of each subdata bag Send to the server, so that the server is tested and re-grouped package to the multiple subdata bags received.
Alternatively, the data to be reported include mark data and business datum, described to utilize the key pair locally generated Data to be reported are encrypted, generate encryption data bag the step of, including:
The business datum treated using the key locally generated in reported data carries out symmetric cryptography;
Encryption data bag is generated according to the business datum after encryption, the mark data and the key.
Alternatively, the key is obtained by following steps:
Obtain the asymmetric encryption public key and key original text of the terminal device internal system;
Locally with key original text described in the asymmetric encryption public key encryption, key is generated.
Another preferred embodiment of the present invention also provides a kind of data reporting device, applied to what is be connected with server communication Terminal device, the data reporting device include:
Encrypting module, it is encrypted for treating reported data using the key locally generated, generates encryption data bag;
First detection module, for detect the encryption data bag size whether more than UDP communication interfaces default hair Send size;
Split module, for the encryption data bag size exceed UDP communication interfaces default transmission size when, general The encryption data bag is split as multiple subdata bags, and the multiple subdata bag is sent to described by UDP communication interfaces Server;
Second detection module, for detecting the feedback letter that the server whether is received in the first preset time and is sent Breath;
First sending module, for when not receiving the feedback information that the server is sent, by the multiple subnumber The server is re-transmitted to according to bag;
Second sending module, for receiving when showing the feedback information that packet lacks of the server transmission, The subdata bag of missing is re-transmitted to the server.
Alternatively, if not receiving the feedback information that the server is sent in first preset time, the data Reporting device also includes:
3rd detection module, for detecting the heartbeat that the server whether is received in the second preset time and is sent Bag, wherein, second preset time is more than first preset time;
Mark module, for being lost contact by the server-tag when not receiving the heartbeat packet that the server is sent State, and stop this data and report.
Alternatively, the fractionation module includes split cells, recording unit and transmitting element;
The split cells is used to the encryption data bag being split as multiple subdata bags, and counts the subnumber after splitting According to total bag number of bag;
The recording unit is used to record the sequence number of each subdata bag and the identification number of each subdata bag;
The transmitting element is used for the multiple subdata bag, total bag number, the sequence number of each subdata bag and each The identification number of subdata bag is sent to the server, so that the server is tested to the multiple subdata bags received And re-group package.
Alternatively, the data to be reported include mark data and business datum, and the encrypting module includes ciphering unit And generation unit;
The business datum that the ciphering unit is used to treat using the key locally generated in reported data symmetrically add It is close;
The generation unit, which is used to be generated according to the business datum after encryption, the mark data and the key, encrypts Packet.
Alternatively, the data reporting device also includes acquisition module and key production module;
The acquisition module is used for the asymmetric encryption public key and key original text for obtaining the terminal device internal system;
The key production module is used for locally with key original text described in the asymmetric encryption public key encryption, generation Key.
Data reporting method and device provided in an embodiment of the present invention, treat reported data using the key locally generated and enter Row encryption to generate encryption data bag, encryption data bag size more than UDP communication interfaces default transmission size when, will add Ciphertext data bag is split as multiple subdata bags, and multiple subdata bags are sent to server.The feedback of server is not being received During information, multiple subdata bags are re-transmitted to server, receive server transmission show packet missing it is anti- During feedforward information, then the subdata bag of missing is re-transmitted to server.Data provided by the invention report scheme, using UDP Communication protocol carries out data and reported, and is sent by data encryption and data and detects the reliability and peace that realize communication data and report Quan Xing, and application is upper more simple.
To enable the above objects, features and advantages of the present invention to become apparent, preferred embodiment cited below particularly, and coordinate Appended accompanying drawing, is described in detail below.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by embodiment it is required use it is attached Figure is briefly described, it will be appreciated that the following drawings illustrate only certain embodiments of the present invention, therefore be not construed as pair The restriction of scope, for those of ordinary skill in the art, on the premise of not paying creative work, can also be according to this A little accompanying drawings obtain other related accompanying drawings.
Fig. 1 is the application scenarios schematic diagram for the data reporting method that present pre-ferred embodiments provide.
Fig. 2 is the schematic block diagram for the terminal device that present pre-ferred embodiments provide.
Fig. 3 is the flow chart for the data reporting method that present pre-ferred embodiments provide.
Fig. 4 is another flow chart for the data reporting method that present pre-ferred embodiments provide.
Fig. 5 is the flow chart of step S101 sub-step in Fig. 3.
Fig. 6 is the flow chart of step S103 sub-step in Fig. 3.
Fig. 7 is the functional block diagram for the data reporting device that present pre-ferred embodiments provide.
Fig. 8 is the functional block diagram for the encrypting module that present pre-ferred embodiments provide.
Fig. 9 is the functional block diagram for the fractionation module that present pre-ferred embodiments provide.
Figure 10 is another functional block diagram for the data reporting device that present pre-ferred embodiments provide.
Figure 11 is another functional block diagram for the data reporting device that present pre-ferred embodiments provide.
Icon:100- terminal devices;110- data reporting devices;111- encrypting modules;1111- ciphering units;1112- gives birth to Into unit;112- first detection modules;113- splits module;1131- split cells;1132- recording units;1133- sends single Member;The detection modules of 114- second;The sending modules of 115- first;The sending modules of 116- second;117- acquisition modules;118- keys are given birth to Into module;The detection modules of 119- the 3rd;1110- mark modules;120- processors;130- memories;200- servers.
Embodiment
Below in conjunction with accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Ground describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.Generally exist The component of the embodiment of the present invention described and illustrated in accompanying drawing can be configured to arrange and design with a variety of herein.Cause This, the detailed description of the embodiments of the invention to providing in the accompanying drawings is not intended to limit claimed invention below Scope, but it is merely representative of the selected embodiment of the present invention.Based on embodiments of the invention, those skilled in the art are not doing The every other embodiment obtained on the premise of going out creative work, belongs to the scope of protection of the invention.
It should be noted that:Similar label and letter represents similar terms in following accompanying drawing, therefore, once a certain Xiang Yi It is defined, then it further need not be defined and explained in subsequent accompanying drawing in individual accompanying drawing.Meanwhile the present invention's In description, unless otherwise clearly defined and limited, term " connection " should be interpreted broadly, for example, it may be fixedly connected, Can be detachably connected, or be integrally connected;Can be mechanical connection or electrical connection;Can be joined directly together, It can be indirectly connected by intermediary, can be the connection of two element internals.For one of ordinary skill in the art Speech, the concrete meaning of above-mentioned term in the present invention can be understood with concrete condition.
Referring to Fig. 1, it is a kind of application scenarios schematic diagram of data reporting method provided in an embodiment of the present invention.The scene Including terminal device 100 and server 200.The terminal device 100 is communicated to connect by network and the server 200, with Enter row data communication or interaction.In the present embodiment, the terminal device 100 can include multiple (one is only shown in figure), Multiple terminal devices 100 communicate to connect with the server 200.
Wherein, the terminal device 100 can be but not limited to PC, tablet personal computer, smart mobile phone, mobile Internet access Equipment etc..The server 200 can be the webserver, database server, can be that single server can also be Server cluster etc..
Referring to Fig. 2, the schematic block diagram for above-mentioned terminal device 100 provided in an embodiment of the present invention.In this reality Apply in example, the terminal device 100 includes data reporting device 110, processor 120 and memory 130.Wherein, the storage Direct or indirect electric connection between device 130 and the processor 120, to realize the transmission of data or interaction.The data Reporting device 110 include it is at least one can be stored in the memory 130 or be solidificated in the form of software or firmware it is described Software function module in the operating system of terminal device 100.The processor 120 is used to perform to deposit in the memory 130 The executable module of storage, such as the software function module or computer program that the data reporting device 110 includes.
Referring to Fig. 3, it is a kind of data reporting method applied to above-mentioned terminal device 100 provided in an embodiment of the present invention Flow chart.It should be noted that method provided by the invention is not using Fig. 3 and particular order as described below as limitation.Below Each step shown in Fig. 3 will be described in detail.
Step S101, treat reported data using the key locally generated and be encrypted, generate encryption data bag.
Alternatively, referring to Fig. 4, in the present embodiment, the key can be obtained by following steps:
Step S201, obtain the asymmetric encryption public key and key original text of the internal system of terminal device 100.
Step S203, locally with key original text described in the asymmetric encryption public key encryption, generate key.
In the present embodiment, terminal device 100 can download related data at server 200 and report application.In data Report using after being downloaded from server 200 and being successfully installed to terminal device 100, reported in data in application inside place system Asymmetric public key.And the key original text for generating key is obtained, the key original text can be that user inputs to terminal and set It is in standby 100 or be pre-stored in the database of terminal device 100, this is not specifically limited in the present embodiment.
Alternatively, it is local in terminal device 100, the key original text of acquisition is added using the asymmetric encryption public key It is close, to generate key.
Alternatively, referring to Fig. 5, in the present embodiment, step S101 includes step S1011 and step S1013 two Sub-step.
Step S1011, the business datum treated using the key locally generated in reported data carry out symmetric cryptography.
Step S1013, encryption data is generated according to the business datum after encryption, the mark data and the key Bag.
During data communicate, communication data is often divided into three parts, and Part I is not encrypted, mainly The mark data of the business of regular length.Part II is the key data of this session, and key data is typically using asymmetric Cipher mode is encrypted.Part III is asymmetric cryptography data, is the business datum that this data reports.Wherein, business number Symmetric cryptography is carried out according to needing to use the key data in packet.Treated using the key locally generated in reported data Business datum carries out symmetric cryptography.
Alternatively, in the present embodiment, according to the business datum after encryption, the mark data and the key, and Description information of session information, bag data with reference to this session etc. generates encryption data bag in the lump.
Step S103, detect the encryption data bag size whether more than UDP communication interfaces default transmission size, if More than the default transmission size of UDP communication interfaces, then the encryption data bag is split as multiple subdata bags, will be the multiple Subdata bag is sent to the server 200 by UDP communication interfaces.
Because udp protocol is an insecure communication protocol, easily there is packet loss phenomenon.Therefore, in order to ensure that UDP leads to Reliability during letter on application, it is necessary to establish the error-control schemes of data communication.
Alternatively, in the present embodiment, the data package size that UDP communication interfaces can allow to send every time is preset.Inspection Whether the size for surveying the encryption data bag has exceeded the default transmission size of UDP communication interfaces.If be currently needed for sending adds The size of ciphertext data bag has exceeded the default transmission size of UDP communication interfaces, then needs to split encryption data bag, so as to Server 200 can be sent data packets to by UDP communication interfaces.
Referring to Fig. 6, in the present embodiment, step S103 includes step S1031, step S1033 and step S1035 tri- Sub-steps.
Step S1031, the encryption data bag is split as multiple subdata bags, and counts the subdata bag after splitting Total bag number.
Step S1033, record the sequence number of each subdata bag and the identification number of each subdata bag.
Step S1035, by the multiple subdata bag, total bag number, the sequence number of each subdata bag and each subdata The identification number of bag is sent to the server 200, so that the server 200 is tested to the multiple subdata bags received And re-group package.
Alternatively, in the encryption data bag size for being currently needed for reporting more than the default feelings for sending size of UDP communication interfaces Under condition, encryption data bag is split as multiple subdata bags.And total bag number of multiple subdata bags is counted, and is recorded each The sequence number of individual sub- packet, and identification number is set for each subdata bag, the identification number of each subdata bag is bound one by one with sequence number, Subsequently to carry out package-restructuring.
Alternatively, the terminal device 100 by the multiple subdata bag, total bag number, each subdata bag mark Number and the sequence number of each subdata bag send in the lump to the server 200 so that the server 200 is multiple to what is received Subdata bag is tested and re-grouped package.
Step S105, detect the feedback information that the server 200 is sent whether is received in the first preset time, if The feedback information that the server 200 is sent is not received, then following steps S107 is performed, if receiving the server 200 What is sent shows the feedback information of packet missing, then performs following steps S109.
Step S107, the multiple subdata bag is re-transmitted to the server 200.
Step S109, the subdata bag of missing is re-transmitted to the server 200.
Alternatively, in the present embodiment, subdata bag is retransmited after being backed up to server 200, therefore in local Still each subdata bag is remained with.Alternatively, terminal device 100 sends each subdata bag to server 200, server The number for the subdata bag that 200 statistics receive in the first preset time.And detect the total number of the subdata bag received Whether reach total bag number, if reaching total bag number, the message for showing that bag collects is sent to terminal device 100.Terminal device 100 exists Receive the transmission of server 200 shows the message that collects of bag, then deletes the local subdata bag sent, and to server 200 send confirmation instruction.
If terminal device 100 does not receive the response of server 200 in first preset time, by all subnumbers Server 200 is re-transmitted to according to bag.If terminal device 100 receives the transmission of server 200 in first preset time Show the feedback information of packet missing, then the subdata bag of the missing indicated by the feedback information is re-transmitted to server 200。
Alternatively, server 200 is after each subdata bag is successfully received, then according to the sequence number of each subdata bag and Total bag number subdata bag is re-grouped package, and the multiple subdata bags received are recovered to original encryption data bag Sequence state, then transfer to perform the operation such as decryption to business processing interface.
In the present embodiment, if not receiving the feedback letter that the server 200 is sent in first preset time Breath, the data reporting method are further comprising the steps of.
Whether detection receives the heartbeat packet that the server 200 is sent in the second preset time, wherein, described second Preset time is more than first preset time, if the heartbeat packet that the server 200 is sent is not received, by the server 200 are labeled as lost contact state, and stop this data and report.
In the present embodiment, terminal device 100 is sent to server 200 by multiple subdata bags, if The feedback information of server 200 is not received in one preset time, then is again sent subdata bag to server 200.Examine again The feedback information that server 200 whether is received in the second preset time is surveyed, wherein, it is pre- that second preset time is more than first If the time, if still not receiving the feedback information of server 200 after the arrival of the second preset time, showing for a long time can not The heartbeat packet of server 200 is received, then judges the lost contact of server 200, the server 200 is labeled as lost contact state, and Stop this data and report action.
It should be appreciated that UDP communication interfaces are mainly used for externally providing public calling interface, and the communication of inside Journey and ciphering process are encapsulated, and externally the calling interface securely and reliably to be communicated based on UDP are only provided, in order to third party couple UDP communication protocol interfaces directly invoke.In the present embodiment, to the primary interface of UDP communications, i.e. data transmission interface and industry Business Processing Interface is designed, specific as follows:
For data transmission interface, when sending data, business datum is switched into byte, supervised by the UDP of local boot Port is listened to send the business datum after conversion to server 200.The UDP listening ports are obtaining data transmission interface API Can auto-initiation during (Application Program Interface) example.It should be appreciated that the process is a singleton, It can only initialize once.After data are sent, it could be arranged to waiting for server 200 and respond, it can also be provided that not Waiting for server 200 responds.Wherein, selection, which is not to wait for the response of server 200, can improve local execution efficiency.
For business processing interface, business processing interface is the interface definition of local service general procedure.UDP listening ports After the data of server 200 are got, the local example for realizing business processing interface can be handed to and go to complete accordingly Business processing.Terminal device 100 receives data at server 200 can be divided into two classes, and one kind is that terminal device 100 is being sent After data to server 200, response that server 200 is returned.It is another kind of be server 200 send to terminal device The calling of 100 local services processing.The two classes data can transfer to different interfaces to realize that class goes to realize respectively.
Referring to Fig. 7, it is a kind of functional block diagram of data reporting device 110 provided in an embodiment of the present invention.It is described Data reporting device 110 includes encrypting module 111, first detection module 112, splits module 113, the second detection module 114, the One sending module 115 and the second sending module 116.
The encrypting module 111 is encrypted for treating reported data using the key locally generated, generation encryption number According to bag.Specifically, the encrypting module 111 can be used for performing the step S101 shown in Fig. 3, and specific operating method refers to walk Rapid S101 detailed description.
Referring to Fig. 8, in the present embodiment, the data to be reported include mark data and business datum, the encryption Module 111 includes ciphering unit 1111 and generation unit 1112.
The business datum that the ciphering unit 1111 is used to treat using the key locally generated in reported data is carried out pair Claim encryption.Specifically, the ciphering unit 1111 can be used for performing the step S1011 shown in Fig. 5, and specific operating method can join Examine step S1011 detailed description.
The generation unit 1112 is used to be generated according to the business datum after encryption, the mark data and the key Encryption data bag.Specifically, the generation unit 1112 can be used for performing the step S1013 shown in Fig. 5, specific operating method Refer to step S1013 detailed description.
Whether the size that the first detection module 112 is used to detect the encryption data bag is more than UDP communication interfaces It is default to send size.It is described split module 113 be used for the encryption data bag size more than UDP communication interfaces default hair When sending size, the encryption data bag is split as multiple subdata bags, the multiple subdata bag is passed through into UDP communication interfaces Send to the server 200.Specifically, the first detection module 112 and fractionation module 113 can be provided commonly for performing in Fig. 3 Shown step S103, specific operating method refer to step S103 detailed description.
Alternatively, referring to Fig. 9, in the present embodiment, the fractionation module 113 includes split cells 1131, record Member 1132 and transmitting element 1133.
The split cells 1131 is used to the encryption data bag being split as multiple subdata bags, and after counting fractionation Total bag number of subdata bag.Specifically, the split cells 1131 can be used for performing the step S1031 shown in Fig. 6, specific behaviour Step S1031 detailed description is referred to as method.
The recording unit 1132 is used to record the sequence number of each subdata bag and the identification number of each subdata bag.Specifically Ground, the recording unit 1132 can be used for performing the step S1033 shown in Fig. 6, and specific operating method refers to step S1033 Detailed description.
The transmitting element 1133 be used for by the sequence number of the multiple subdata bag, total bag number, each subdata bag with And the identification number of each subdata bag is sent to the server 200, so that the server 200 is to multiple subdatas for receiving Bag is tested and re-grouped package.Specifically, the transmitting element 1133 can be used for performing the step S1035 shown in Fig. 6, specifically Operating method refer to step S1035 detailed description.
Second detection module 114 is sent out for whether detection to receive the server 200 in the first preset time The feedback information sent.Specifically, second detection module 114 can be used for performing the step S105 shown in Fig. 3, specific operation Method refers to step S105 detailed description.
First sending module 115 is used for when not receiving the feedback information that the server 200 is sent, by described in Multiple subdata bags are re-transmitted to the server 200.Specifically, first sending module 115 can be used for performing institute in Fig. 3 The step S107 shown, specific operating method refer to step S107 detailed description.
Second sending module 116 is used to show the anti-of packet missing receive that the server 200 sends During feedforward information, the subdata bag of missing is re-transmitted to the server 200.Specifically, second sending module 116 can be used In performing the step S109 shown in Fig. 3, specific operating method refers to step S109 detailed description.
Alternatively, referring to Fig. 10, in the present embodiment, the data reporting device 110 also include acquisition module 117 with And key production module 118.The key is obtained by the acquisition module 117 and the key production module 118.
The acquisition module 117 is used to obtaining the asymmetric encryption public key of the internal system of terminal device 100 and close Key original text.Specifically, the acquisition module 117 can be used for performing the step S201 shown in Fig. 4, and specific operating method refers to Step S201 detailed description.
The key production module 118 is used for locally with key original text described in the asymmetric encryption public key encryption, Generate key.Specifically, the key production module 118 can be used for performing the step S203 shown in Fig. 4, specific operating method Refer to step S203 detailed description.
Alternatively, Figure 11 is referred to, in the present embodiment, the data reporting device 110 also includes the 3rd detection module 119 and mark module 1110.
3rd detection module 119 is sent out for whether detection to receive the server 200 in the second preset time The heartbeat packet sent, wherein, second preset time is more than first preset time.
The mark module 1110 is used for when not receiving the heartbeat packet that the server 200 is sent, by the server 200 are labeled as lost contact state, and stop this data and report.
In summary, data reporting method and device provided by the invention, it is applied to communicate to connect with server 200 Terminal device 100.Reported data is treated using the key locally generated to be encrypted to generate encryption data bag, in encryption number According to bag size more than UDP communication interfaces default transmission size when, encryption data bag is split as multiple subdata bags, will be more Individual sub- packet is sent to server 200.When not receiving the feedback information of server 200, by multiple subdata bags again Send to server 200, when receiving the feedback information for showing packet missing of the transmission of server 200, then by missing Subdata bag is re-transmitted to server 200.Data provided by the invention report scheme, and data are carried out using UDP communication protocols Report, sent by data encryption and data and detect the reliability and safety for realizing communication data and reporting, and application is upper more To be simple.
In embodiment provided herein, it should be understood that disclosed apparatus and method, can also be by other Mode realize.Device embodiment described above is only schematical, for example, the flow chart and block diagram in accompanying drawing are shown Devices in accordance with embodiments of the present invention, architectural framework in the cards, function and the behaviour of method and computer program product Make.At this point, each square frame in flow chart or block diagram can represent a part for a module, program segment or code, institute The part for stating module, program segment or code includes one or more executable instructions for being used to realize defined logic function. It should also be noted that at some as in the implementation replaced, the function of being marked in square frame can also be with different from accompanying drawing The order marked occurs.For example, two continuous square frames can essentially perform substantially in parallel, they sometimes can also be by Opposite order performs, and this is depending on involved function.It is also noted that each square frame in block diagram and/or flow chart, And the combination of the square frame in block diagram and/or flow chart, the special based on hardware of function or action as defined in performing can be used System realize, or can be realized with the combination of specialized hardware and computer instruction.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or equipment including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or equipment institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including institute State in process, method, article or the equipment of key element and other identical element also be present.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should be included in the scope of the protection.It should be noted that:Similar label and letter exists Similar terms is represented in following accompanying drawing, therefore, once being defined in a certain Xiang Yi accompanying drawing, is then not required in subsequent accompanying drawing It is further defined and explained.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.

Claims (10)

1. a kind of data reporting method, it is characterised in that applied to the terminal device being connected with server communication, methods described bag Include:
Reported data is treated using the key locally generated to be encrypted, and generates encryption data bag;
Detect the encryption data bag size whether more than UDP communication interfaces default transmission size, if more than UDP communication connect The default transmission size of mouth, then be split as multiple subdata bags by the encryption data bag, the multiple subdata bag passed through UDP communication interfaces are sent to the server;
Whether detection receives the feedback information that the server is sent in the first preset time, if not receiving the service The feedback information that device is sent, then be re-transmitted to the server, if receiving the server by the multiple subdata bag What is sent shows the feedback information of packet missing, then the subdata bag of missing is re-transmitted into the server.
2. data reporting method according to claim 1, it is characterised in that if not received in first preset time The feedback information sent to the server, methods described also include:
Whether detection receives the heartbeat packet that the server is sent in the second preset time, wherein, described second it is default when Between be more than first preset time;
It is lost contact state by the server-tag, and stop this number if not receiving the heartbeat packet that the server is sent According to reporting.
3. data reporting method according to claim 1, it is characterised in that it is described the encryption data bag is split as it is more Individual sub- packet, the step of the multiple subdata bag is sent to the server by UDP communication interfaces, including:
The encryption data bag is split as multiple subdata bags, and counts total bag number of the subdata bag after splitting;
Record the sequence number of each subdata bag and the identification number of each subdata bag;
The multiple subdata bag, total bag number, the sequence number of each subdata bag and the identification number of each subdata bag are sent To the server, so that the server is tested and re-grouped package to the multiple subdata bags received.
4. data reporting method according to claim 1, it is characterised in that the data to be reported include mark data and Business datum, described to treat reported data using the key that locally generates and be encrypted, the step of generating encryption data bag, bag Include:
The business datum treated using the key locally generated in reported data carries out symmetric cryptography;
Encryption data bag is generated according to the business datum after encryption, the mark data and the key.
5. data reporting method according to claim 1, it is characterised in that the key is obtained by following steps:
Obtain the asymmetric encryption public key and key original text of the terminal device internal system;
Locally with key original text described in the asymmetric encryption public key encryption, key is generated.
6. a kind of data reporting device, it is characterised in that applied to the terminal device being connected with server communication, in the data Reporting device includes:
Encrypting module, it is encrypted for treating reported data using the key locally generated, generates encryption data bag;
Whether first detection module, the size for detecting the encryption data bag are big more than the default transmission of UDP communication interfaces It is small;
Split module, for the encryption data bag size exceed UDP communication interfaces default transmission size when, general described in Encryption data bag is split as multiple subdata bags, and the multiple subdata bag is sent to the service by UDP communication interfaces Device;
Second detection module, for detecting the feedback information that the server whether is received in the first preset time and is sent;
First sending module, for when not receiving the feedback information that the server is sent, by the multiple subdata bag It is re-transmitted to the server;
Second sending module, for when receiving the feedback information for showing packet missing that the server is sent, will lack The subdata bag of mistake is re-transmitted to the server.
7. data reporting device according to claim 6, it is characterised in that if not received in first preset time The feedback information that the server is sent, the data reporting device also include:
3rd detection module, for detecting the heartbeat packet that the server whether is received in the second preset time and is sent, its In, second preset time is more than first preset time;
Mark module, for being lost contact state by the server-tag when not receiving the heartbeat packet that the server is sent, And stop this data and report.
8. data reporting device according to claim 6, it is characterised in that the fractionation module includes split cells, note Record unit and transmitting element;
The split cells is used to the encryption data bag being split as multiple subdata bags, and counts the subdata bag after splitting Total bag number;
The recording unit is used to record the sequence number of each subdata bag and the identification number of each subdata bag;
The transmitting element is used for the multiple subdata bag, total bag number, the sequence number of each subdata bag and each subnumber Send to the server according to the identification number of bag, lay equal stress on so that the server is tested to the multiple subdata bags received New group bag.
9. data reporting device according to claim 6, it is characterised in that the data to be reported include mark data and Business datum, the encrypting module include ciphering unit and generation unit;
The business datum that the ciphering unit is used to treat using the key locally generated in reported data carries out symmetric cryptography;
The generation unit is used to generate encryption data according to the business datum after encryption, the mark data and the key Bag.
10. data reporting device according to claim 6, it is characterised in that the data reporting device also includes obtaining Module and key production module;
The acquisition module is used for the asymmetric encryption public key and key original text for obtaining the terminal device internal system;
The key production module is used for close locally with key original text described in the asymmetric encryption public key encryption, generation Key.
CN201710628139.4A 2017-07-28 2017-07-28 Data reporting method and device Pending CN107592294A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710628139.4A CN107592294A (en) 2017-07-28 2017-07-28 Data reporting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710628139.4A CN107592294A (en) 2017-07-28 2017-07-28 Data reporting method and device

Publications (1)

Publication Number Publication Date
CN107592294A true CN107592294A (en) 2018-01-16

Family

ID=61041833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710628139.4A Pending CN107592294A (en) 2017-07-28 2017-07-28 Data reporting method and device

Country Status (1)

Country Link
CN (1) CN107592294A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111193574A (en) * 2019-12-31 2020-05-22 西安翔腾微电子科技有限公司 Data transmission method and data transmission system
CN112468306A (en) * 2019-09-09 2021-03-09 西安诺瓦星云科技股份有限公司 Communication control method, device, system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009535A (en) * 2007-01-26 2007-08-01 北京航空航天大学 Sliding-window-based SOAP message transfer method
CN101039310A (en) * 2006-03-16 2007-09-19 联想(北京)有限公司 Link sharing service apparatus and communication method thereof
CN101193060A (en) * 2006-12-01 2008-06-04 武汉烽火网络有限责任公司 Method for reliable E1 transmission based on forward error correction mechanism in packet network
CN101699797B (en) * 2009-11-13 2012-07-11 珠海网博信息科技有限公司 Method for performing data transmission by using UDP protocol
US20160094427A1 (en) * 2014-09-25 2016-03-31 Microsoft Corporation Managing classified network streams

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101039310A (en) * 2006-03-16 2007-09-19 联想(北京)有限公司 Link sharing service apparatus and communication method thereof
CN101193060A (en) * 2006-12-01 2008-06-04 武汉烽火网络有限责任公司 Method for reliable E1 transmission based on forward error correction mechanism in packet network
CN101009535A (en) * 2007-01-26 2007-08-01 北京航空航天大学 Sliding-window-based SOAP message transfer method
CN101699797B (en) * 2009-11-13 2012-07-11 珠海网博信息科技有限公司 Method for performing data transmission by using UDP protocol
US20160094427A1 (en) * 2014-09-25 2016-03-31 Microsoft Corporation Managing classified network streams

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112468306A (en) * 2019-09-09 2021-03-09 西安诺瓦星云科技股份有限公司 Communication control method, device, system and storage medium
CN111193574A (en) * 2019-12-31 2020-05-22 西安翔腾微电子科技有限公司 Data transmission method and data transmission system
CN111193574B (en) * 2019-12-31 2023-04-28 西安翔腾微电子科技有限公司 Data transmission method and data transmission system

Similar Documents

Publication Publication Date Title
CN110995642B (en) Providing secure connections using pre-shared keys
CN111835511A (en) Data security transmission method and device, computer equipment and storage medium
CN107276756A (en) A kind of method and server for obtaining root key
CN111628976B (en) Message processing method, device, equipment and medium
CN109639828A (en) Conversation message treating method and apparatus
CN104270516B (en) Decryption method and mobile terminal
CN105007272A (en) Information exchange system with safety isolation
CN107534665A (en) The scalable intermediary network device extended using SSL session tickets
CN106533669A (en) Device identification method, device and system
CN108064436A (en) Biometric information transmission method for building up, device, system and storage medium
CN111756751B (en) Message transmission method and device and electronic equipment
CN106790221A (en) A kind of safe ipsec protocol encryption method of internet protocol and the network equipment
CN109005194A (en) Portless shadow communication means and computer storage medium based on KCP agreement
CN110505066A (en) A kind of data transmission method, device, equipment and storage medium
CN108304733A (en) Encryption data searching method and the data-storage system that search can be encrypted
CN107819650A (en) Data safety method of testing and device
CN109543452A (en) Data transmission method, device, electronic equipment and computer readable storage medium
CN106161224B (en) Method for interchanging data, device and equipment
CN112987942A (en) Method, device and system for inputting information by keyboard, electronic equipment and storage medium
CN107592294A (en) Data reporting method and device
CN110351225A (en) A kind of networking method of hardware device, device, system and storage medium
CN109802834A (en) The method and system that a kind of pair of business layer data is encrypted, decrypted
CN107947927A (en) A kind of id password cipher key processing method and system
CN103873245B (en) Dummy machine system data ciphering method and equipment
CN116049851B (en) Ciphertext processing system and method based on full homomorphic encryption

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180116