CN109194674A - A kind of processing method and processing device of communication data - Google Patents

A kind of processing method and processing device of communication data Download PDF

Info

Publication number
CN109194674A
CN109194674A CN201811101195.3A CN201811101195A CN109194674A CN 109194674 A CN109194674 A CN 109194674A CN 201811101195 A CN201811101195 A CN 201811101195A CN 109194674 A CN109194674 A CN 109194674A
Authority
CN
China
Prior art keywords
data
hash value
data block
block
pending
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
CN201811101195.3A
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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201811101195.3A priority Critical patent/CN109194674A/en
Publication of CN109194674A publication Critical patent/CN109194674A/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
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions

Abstract

This application discloses a kind of processing method and processing devices of communication data, it include: reception pending data, it include the number N of multiple data blocks, the standard hash value of each data block and data block in pending data, the standard hash value of data block is the corresponding hash value of complete data block, the number N of the data block refers to the number of data block in complete communication data, and N is the positive integer greater than 1;According to the data characteristics of data block, calculate its practical hash value, and be compared practical hash value with standard hash value, if the number of practical hash value and the consistent data block of standard hash value is N, it is determined that the multiple data blocks for including in pending data are complete communication data.The practical hash value Yu standard hash value of each data block in the pending data received by comparing, so that it may determine whether communication data received by receiving end is complete.

Description

A kind of processing method and processing device of communication data
Technical field
This application involves fields of communication technology, more particularly to a kind of processing method and processing device of communication data.
Background technique
With the continuous development of data communication technology, usually there will be between various communication equipments a large amount of communication data into Row interaction.It, may be due to partial data during communication data is transmitted to another communication equipment by a communication equipment The reasons such as packet loss, data received by receiving end be not be partial data transmitted by transmitting terminal.And communication data connects Receiving end is mainly responsible for the reception of communication data, can not know whether received communication data is complete.Therefore, how to guarantee Data received by receiving end are the total datas that transmitting terminal is sent, and are progress data interaction when institutes between two communication equipments Major issue to be solved.
Summary of the invention
The embodiment of the present application provides a kind of processing method and processing device of communication data, so that the receiving end of communication data Can determine whether received communication data is complete, in order to which receiving end can be in the feelings for not obtaining complete communication data It can take appropriate measures under condition and regain communication data, to guarantee that receiving end can obtain complete communication data.
In a first aspect, the embodiment of the present application provides a kind of processing method of communication data, the method is applied to communication The receiving end of data, which comprises
Pending data is received, the pending data includes the standard hash Hash of multiple data blocks, each data block The standard hash value of the number N of value and data block, the data block are the corresponding hash value of complete data block, and the N is Positive integer greater than 1, the number N of the data block refer to the number of data block in complete communication data;
According to the data characteristics of data block each in the pending data, the practical hash value of the data block is calculated;
The practical hash value of each data block is compared with the standard hash value of the data block;
If the number of practical hash value and the consistent data block of standard hash value is N in the pending data, it is determined that The multiple data blocks for including in the pending data are complete communication data.
In some possible embodiments, the data characteristics of the data block, the size of data including the data block.
In some possible embodiments, the pending data further includes standard root hash value, and the method is also wrapped It includes:
The corresponding reality of multiple data blocks for including in the pending data is calculated using Merkle Merkel's algorithm Root hash value;
If the number of practical hash value and the consistent data block of standard hash value is N in the pending data, Determine that the receiving end receives complete data, comprising:
If the number of practical hash value and the consistent data block of standard hash value is N in the pending data, and described Practical root hash value is consistent with the standard root hash value, it is determined that the multiple data blocks for including in the pending data have been Whole communication data.
In some possible embodiments, the pending data further includes timestamp, the method also includes:
Verify whether the pending data fails using the timestamp;
If it is determined that the pending data failure, then the transmitting terminal for triggering communication data retransmits complete communication number According to.
In some possible embodiments, the method also includes:
If the number of practical hash value and the consistent data block of standard hash value is less than N in the pending data, touch The transmitting terminal for sending out communication data retransmits complete communication data.
In some possible embodiments, the method also includes:
Whether the number for comparing data block in the pending data is less than N;
If the number of data block is less than N in the pending data, the transmitting terminal for triggering communication data has been retransmitted Whole communication data.
Second aspect, the embodiment of the present application also provides a kind of processing method of communication data, the method is applied to logical The transmitting terminal of letter data, which comprises
Data to be sent are divided into N number of data block, wherein the N is the positive integer greater than 1;
It is directed to each data block, according to the data characteristics of the data block, calculates the standard hash of the data block Hash value;
N number of data block, the standard hash hash value of each data block and institute are sent to the receiving end of communication data State the number N of data block.
In some possible embodiments, the method also includes:
The corresponding standard root Hash of N number of data block in the data to be sent is calculated using Merkle Merkel's algorithm Value;
The standard root hash value is sent to the receiving end.
In some possible embodiments, the data characteristics of the data block, the size of data including the data block.
In some possible embodiments, the method also includes:
Timestamp is added for the data to be sent.
The third aspect, the embodiment of the present application also provides a kind of processing unit of communication data, described device is applied to logical The receiving end of letter data, described device include:
Receiving unit, for receiving pending data, the pending data includes multiple data blocks, each data block Standard hash hash value and the number N, the N of data block are the positive integer greater than 1, and the standard hash value of the data block is The corresponding Hash of complete data block;
Computing unit calculates the data block for the data characteristics according to data block each in the pending data Practical hash value;
Comparing unit, for comparing the practical hash value of each data block and the standard hash value of the data block Compared with;
Determination unit, if for practical hash value in the pending data and the consistent data block of standard hash value Number is N, it is determined that the multiple data blocks for including in the pending data are complete communication data.
In some possible embodiments, the data characteristics of the data block, the size of data including the data block.
In some possible embodiments, the pending data further includes standard root hash value, and described device is also wrapped It includes:
Root hash value computing unit includes for being calculated in the pending data using Merkle Merkel's algorithm The corresponding practical root hash value of multiple data blocks;
The determination unit, if being specifically used for practical hash value and the consistent number of standard hash value in the pending data It is N according to the number of block, and the practical root hash value is consistent with the standard root hash value, it is determined that in the pending data Including multiple data blocks be complete communication data.
In some possible embodiments, the pending data further includes timestamp, described device further include:
Authentication unit, for verifying whether the pending data fails using the timestamp;
First trigger unit is used for if it is determined that pending data failure, then trigger the transmitting terminal of communication data again Send complete communication data.
In some possible embodiments, described device further include:
Second trigger unit, if for practical hash value in the pending data and the consistent data block of standard hash value Number be less than N, then the transmitting terminal for triggering communication data retransmits complete communication data.
In some possible embodiments, described device further include:
Whether data block number comparing unit, the number for data block in the pending data are less than N;
Third trigger unit triggers communication data if the number for data block in the pending data is less than N Transmitting terminal retransmits complete communication data.
Fourth aspect, the embodiment of the present application also provides a kind of processing unit of communication data, described device is applied to logical The transmitting terminal of letter data, described device include:
Division unit, for data to be sent to be divided into N number of data block, wherein the N is the positive integer greater than 1;
Computing unit, according to the data characteristics of the data block, calculates the data for being directed to each data block The standard hash hash value of block;
Transmission unit, for sending the standard hash of N number of data block, each data block to the receiving end of communication data The number N of hash value and the data block.
In some possible embodiments, described device further include:
Root hash value computing unit, for calculating N number of number in the data to be sent using Merkle Merkel's algorithm According to the corresponding standard root hash value of block;
Standard root hash value transmission unit, for sending the standard root hash value to the receiving end.
In some possible embodiments, the data characteristics of the data block, the size of data including the data block.
In some possible embodiments, described device further include:
Adding unit, for adding timestamp for the data to be sent.
In the above-mentioned implementation of the embodiment of the present application, the receiving end of communication data can receive pending data, In, it include the number N of multiple data blocks, the standard hash value of each data block and data block, data in the pending data The standard hash value of block is the corresponding hash value of complete data block, and the number N of the data block refers in complete communication data The number of data block, certainly, N are the positive integer greater than 1;Then, receiving end can be according to data block each in pending data Data characteristics, calculate the practical hash value of data block, and by the mark of the practical hash value of each data block and the data block Quasi- hash value is compared, if the number of practical hash value and the consistent data block of standard hash value is N in pending data, Determine that the multiple data blocks for including in pending data are complete communication data.If be appreciated that received by receiving end Communication data be complete communication data, then in received communication data each data block practical hash value and standard Hash value should be all consistent, and therefore, receiving end leads to when whether the received data of verification are complete communication data Cross the practical hash value Yu standard hash value for comparing each data block in the pending data received, so that it may determine to receive Whether the received communication data in end is complete, so that receiving end can be in the feelings for not obtaining complete communication data It can take appropriate measures under condition and regain communication data, and then can guarantee that receiving end can obtain complete communication number According to.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations as described in this application Example, for those of ordinary skill in the art, is also possible to obtain other drawings based on these drawings.
Fig. 1 is the schematic diagram of an exemplary application scene in the embodiment of the present application;
Fig. 2 is a kind of Signalling exchange schematic diagram of the processing method of communication data in the embodiment of the present application;
Fig. 3 is the Signalling exchange schematic diagram of the processing method of another communication data in the embodiment of the present application;
Fig. 4 is a kind of structural schematic diagram of the processing unit of communication data in the embodiment of the present application;
Fig. 5 is a kind of structural schematic diagram of the processing unit of communication data in the embodiment of the present application.
Specific embodiment
Inventor it has been investigated that, between two communication equipments when carrying out data communication, communication data can be logical by one Letter equipment is transmitted to another communication equipment, and in transmission process, communication data transmitted by one of communication equipment, not It can must completely be received by another communication equipment.For example, when the communication network locating for two communication equipments is unstable, In communication data transmitted by a communication equipment in data transmission procedure, it may occur that the loss of partial data packet, from And the data packet for lacking this partial loss in communication data received by another communication equipment is caused, to cause the communication Equipment is not received by complete communication data.And for the communication equipment for receiving communication data, it can not know and be received Whether the communication data arrived is complete.Therefore, how to guarantee that data received by receiving end are the total datas that transmitting terminal is sent, It is that data interaction when institute major issue to be solved is carried out between two communication equipments.
In order to solve the above-mentioned technical problem, the embodiment of the present application provides a kind of processing method of communication data, so that The receiving end of communication data can determine whether received communication data is complete.Specifically, the receiving end of communication data can To receive pending data, wherein in the pending data comprising multiple data blocks, each data block standard hash value and The standard hash value of the number N of data block, data block are the corresponding Hash of complete data block, and the number N of the data block refers to The number of data block in complete communication data, certainly, N is the positive integer greater than 1;Then, receiving end can be according to be processed The data characteristics of each data block in data, calculates the practical hash value of data block, and by the practical Hash of each data block Value is compared with the standard hash value of the data block, if practical hash value and the consistent number of standard hash value in pending data Number according to block is N, it is determined that the multiple data blocks for including in pending data are complete communication data.It is appreciated that such as Communication data received by fruit receiving end is complete communication data, then each data block in received communication data Practical hash value and standard hash value should be all consistent, therefore, receiving end the received data of verification whether be When whole communication data, the practical hash value and standard Hash of each data block in the pending data that receives by comparing Value, so that it may determine whether communication data received by receiving end is complete, so that receiving end can not obtained It can take appropriate measures in the case where obtaining complete communication data and regain communication data, and then can guarantee receiving end Complete communication data can be obtained.
For example, the embodiment of the present application can be applied and exemplary application scene as shown in Figure 1.In this scenario, Data communication is needed between terminal 101 and terminal 102, then terminal 101 can be divided into N number of data to communication data to be sent Block, wherein N is the positive integer greater than 1;Then, terminal 101 can calculate the standard hash value of each data block, and to end End 102 sends N number of data block, the standard hash value of each data block and the number N of data block;Terminal 101 is sent logical Letter data is transmitted to terminal 102 and is formed by pending data The number N of multiple data blocks, the standard hash value of each data block and data block, wherein N refers in complete communication data The number of data block;Terminal 102 can calculate the reality of the data block according to the data characteristics of data block each in pending data Border hash value;Then, terminal 102 can more each data block practical hash value and the data block standard hash value, if The number of practical hash value and the consistent data block of standard hash value is N in pending data, then terminal 102 can be determined wait locate The multiple data blocks for including in reason data are complete communication data.
It is understood that above-mentioned scene is only a Sample Scenario provided by the embodiments of the present application, the embodiment of the present application It is not limited to this scene.
In order to make the above objects, features, and advantages of the present application more apparent, below in conjunction with attached drawing to this Shen Please the various non-limiting implementations in embodiment illustrate.Obviously, described embodiment is the application one Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing All other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
The technical solution of the embodiment of the present application in order to facilitate understanding, below from the transmitting terminal of communication data and receiving end it Between data communication process be described in detail.Referring to Fig.2, Fig. 2 shows the places of communication data a kind of in the embodiment of the present application The Signalling exchange schematic diagram of reason method, this method can specifically include:
S201: data to be sent are divided into N number of data block by transmitting terminal, wherein N is the positive integer greater than 1.
Before transmitting terminal needs data to be sent (being also complete communication data) being sent to receiving end, transmitting terminal can Data to be sent are divided into multiple data blocks in advance, it specifically can be according to preset N value, data to be sent be divided into N block, wherein the value of N is the positive integer greater than 1.In this way, transmitting terminal to receiving end send data block after, receiving end Completeness check is carried out to each data block received.
In practical application, transmitting terminal can be when sending communication data, the multiple data blocks of transmitted in parallel, to improve transmitting terminal Data transmission efficiency between receiving end;Meanwhile the receiving end as communication data, when receiving data block, can be with Data block be unit stored, can more scrappy memory space on the receive side stored, without require that connecing Receiving end vacates biggish Coutinuous store space to store communication data transmitted by transmitting terminal.
S202: being directed to each data block, and transmitting terminal calculates the mark of the data block according to the data characteristics of the data block Quasi- hash value.
It is appreciated that the data to be sent being stored on transmitting terminal are complete communication data, then, by division to be sent After N number of data block, each data block is also complete before data is transmitted.Therefore, it is directed to each complete data block, Can according to the data characteristics of the data block, to calculate the hash value of the data block, and using the hash value of the data block as Standard hash value.In a kind of example, transmitting terminal can be the initial address according to data block size or data block, to calculate The hash value of data block out, once in this way, the loss of partial data occurs in transmission process for data block, then for by data biography The calculated hash value of data block institute after defeated, generally also will not be identical as standard Hash.Therefore, which can be with It is as the measurement whether complete standard of data block.
S203: transmitting terminal to receiving end send N number of data block, calculated each data block standard hash value and The number N of data block.
Completeness check can be carried out to the data block received in order to facilitate receiving end, transmitting terminal is sending N number of data While block, the standard hash value of each data block and the number N of data block can also be sent, in order to which receiving end can root According to the standard hash value of each data block and the number N of data block, the verification of communication data integrality is completed.
S204: receiving end receives pending data, includes the mark of multiple data blocks, each data block in the pending data The number N of quasi- hash value and data block.
Wherein, the standard hash value of data block is that complete data block is corresponding in received pending data Hash value, in other words for transmitting terminal before carrying out data transmission hash value corresponding to the data block;And the number of data block N, the number for the data block for including in as complete communication data.
It is appreciated that the communication data that transmitting terminal is sent, if receiving end completely receives, institute is received to be processed The number of data block is N number of in data;But if the communication data that transmitting terminal is sent to receiving end, by the biography of communication network After defeated, there is the loss of partial data, even there is some or certain data blocks are lost, then will lead to reception The number of data block included in the received pending data in end is less than N.Based on this, in some possible embodiments In, if receiving end counts and determines that the number of data block in pending data is not up to N, show communication transmitted by transmitting terminal There are partial data blocks to lose in data, and receiving end is caused not to be completely received communication data, then, receiving end can be at this time Directly determining the pending data received not is complete communication data.
Further, even if the number of data block received by receiving end is N, still, if partial data block is transmitting The number of the partial data being lost in the data block in the process, data block can't be affected, however, for receiving end and Speech, received pending data is not but complete communication data.Therefore, in the present embodiment, receiving end can continue to hold Row subsequent step, it is whether complete to verify each data block in pending data, to verify whether receiving end has had received Whole communication data.
S205: according to the data characteristics of data block each in pending data, the practical hash value of data block is calculated.
In the present embodiment, when whether each data block that verification receives is complete, the number according to the data block can be According to feature, the practical hash value of data block is calculated.What needs to be explained here is that receiving end calculates the practical hash value of data block Computation rule, it should with transmitting terminal calculate the computation rule of standard hash value of data block it is consistent.For example, if transmitting terminal is root According to the length of data block, the standard hash value of data block is calculated, then receiving end should be data block based on the received Length, to calculate the practical hash value of the data block received.
S206: receiving end is by the standard hash value of the practical hash value of data block each in pending data and the data block It is compared.
If being appreciated that, the practical hash value of data block is consistent with standard hash value, it may be considered that the data block is not Have and loss of data occurs in data transmission procedure.It is because the data block once received is imperfect, then incomplete based on this The calculated practical hash value of data block institute usually with will not be consistent with complete hash value.Therefore, by by data block Practical hash value be compared with standard hash value, receiving end is assured that whether received this data block of institute is complete Data block.
S207: if the number of practical hash value and the consistent data block of standard hash value is N in pending data, it is determined that The multiple data blocks for including in the pending data are complete communication data.
In the present embodiment, only in pending data the practical hash value of each data block with the standard of the data block Under hash value unanimous circumstances, just think that data block received by the receiving end is complete data block, and works as and received When the number of the complete data block arrived is N, show received by all equal receiving ends of data block transmitted by transmitting terminal, and And each data block received by receiving end is complete data block, at this point, receiving end just can determine that it is received to Handling multiple data blocks in data is complete communication data.
As an example, if in the pending data practical hash value and the consistent data block of standard hash value Number is less than N, shows that communication data received by receiving end is imperfect, then the transmitting terminal that can trigger communication data retransmits Complete communication data.For example, receiving end can send the request for obtaining communication data to transmitting terminal, so that transmitting terminal is again Complete communication data is sent to receiving end.
In the present embodiment, data to be sent (being also complete communication data) can be divided into N number of data by transmitting terminal Block, N are the positive integer greater than 1, and then, transmitting terminal can calculate the data block according to the data characteristics of each data block Standard hash value, and the number N of N number of data block, the standard hash value of each data block and data block is sent to reception End;Receiving end can receive the pending data transmitted by transmitting terminal, wherein include multiple data in the pending data The number N of block, the standard hash value of each data block and data block, the standard hash value of data block are complete data block pair The hash value answered, the number N of the data block refer to the number of data block in complete communication data;Then, receiving end can root According to the data characteristics of data block each in pending data, the practical hash value of data block is calculated, and by each data block Practical hash value is compared with the standard hash value of the data block, if practical hash value and standard hash value in pending data The number of consistent data block is N, it is determined that the multiple data blocks for including in pending data are complete communication data.It can See, if communication data received by receiving end is complete communication data, every number in received communication data It should be all consistent according to the practical hash value and standard hash value of block, therefore, receiving end is in the received data of verification It is not no when being complete communication data, the practical hash value and standard of each data block in the pending data that receives by comparing Hash value, so that it may determine whether communication data received by receiving end is complete, so that receiving end can be It can take appropriate measures in the case where not obtaining complete communication data and regain communication data, and then can guarantee to connect Receiving end can obtain complete communication data.
In above-described embodiment, it is the verifying by carrying out integrality to each data block received respectively, is connect to determine Whether receiving end has received complete communication data.In practical application, in order to guarantee the accuracy of verification, it can also utilize Merkle algorithm further verifies, also, can also guarantee the timeliness of the communication data of transmission using timestamp, To prevent communication data to be re-used.Specifically, Fig. 3 shows the place of another communication data in the embodiment of the present application referring to Fig. 3 The Signalling exchange schematic diagram of reason method, this method can specifically include:
S301: data to be sent are divided into N number of data block by transmitting terminal, wherein N is the positive integer greater than 1.
S302: being directed to each data block, and transmitting terminal calculates the mark of the data block according to the data characteristics of the data block Quasi- hash value.
In the present embodiment, the specific embodiment of step S301 to step S302 is specific with step S201's to step S202 Embodiment is similar, and for details, reference can be made to the related place descriptions in a upper embodiment, does not do excessively repeat herein.
S303: the corresponding standard root hash value of N number of data block in data to be sent is calculated using Merkle algorithm.
In the present embodiment, further integrality school can be carried out to the communication data received in order to facilitate receiving end It tests, Merkle algorithm can be advanced with and calculate root hash value in the Merkle tree that N number of data block is constituted, and should Root hash value is as the corresponding standard root hash value of N number of data block.It is appreciated that if the communication data that receives of receiving end is complete It is whole, then it should be with standard root Hash also with calculated hash value of Merkle algorithm institute based on the data block received Value is consistent, because the standard root hash value is calculated based on complete N number of data block.Therefore, standard root Hash Value can be used as the standard whether receiving end receives complete communication data of measuring.
S304: transmitting terminal is the timestamp that data to be sent addition has certain timeliness.
S305: transmitting terminal to receiving end send N number of data block, calculated each data block standard hash value, number According to the number N, standard root hash value and timestamp of block.
In the present embodiment, unlike a upper embodiment, transmitting terminal can not only send complete communication data, can also send out It gives standard root hash value corresponding to N number of data block in the communication data and characterizes the communication data with certain timeliness Timestamp.
S306: receiving end receives pending data, includes the mark of multiple data blocks, each data block in the pending data Quasi- hash value, the number N of data block, standard root hash value and timestamp.
S307: receiving end parses the timestamp in pending data, and is using timestamp verifying pending data No failure.
As an example, pending data received by receiving end has certain timeliness, that is, utilizes the time Stamp can determine the validity period of the pending data.Receiving end after receiving pending data, if timestamp identified when At the time of carving current more than or equal to receiving end, then show that the pending data is effective;And if timestamp it is identified at the time of At the time of current less than receiving end, then show that the pending data is no longer valid, at this point it is possible to trigger the transmitting terminal of communication data Retransmit complete communication data.
In the present embodiment, by adding timestamp for the communication data of transmission, received validity period is set to communication data Limit, can achieve the effect for preventing the communication data to be re-used.
S308: under pending data non-failure case, receiving end is according to the number of data block each in pending data According to feature, the practical hash value of data block is calculated.
In the present embodiment, however, it is determined that pending data does not fail, then can carry out to data block each in pending data Completeness check.
S309: receiving end is by the standard hash value of the practical hash value of data block each in pending data and the data block It is compared.
If being appreciated that, the practical hash value of data block is consistent with standard hash value, it may be considered that the data block is not Have and loss of data occurs in data transmission procedure.It is because the data block once received is imperfect, then incomplete based on this The calculated practical hash value of data block institute usually with will not be consistent with complete hash value.Therefore, by by data block Practical hash value be compared with standard hash value, receiving end is assured that whether received this data block of institute is complete Data block.
S310: receiving end calculates the corresponding reality of multiple data blocks for including in pending data using Merkle algorithm Root hash value.
In the present embodiment, receiving end can use standard root hash value corresponding to complete communication data, come further Whether complete verify the communication data received.It calculates specifically, receiving end can use same Merkle algorithm wait locate Practical hash value corresponding to the multiple data blocks for including in reason data, if including in practical root hash value and pending data Standard root hash value it is consistent, then receiving end can determine that the multiple data blocks for including in received pending data are Required received complete communication data, and if the standard root hash value one that includes in practical root hash value and pending data It causes, it is determined that receiving end has received incomplete communication data.
S311: if the number of practical hash value and the consistent data block of standard hash value is N in pending data, and practical Root hash value is consistent with standard root hash value, then receiving end can determine that the multiple data blocks for including in pending data are complete Communication data.
It should be noted that the present embodiment is only used for illustrating the technical solution of the embodiment of the present application, and It is not used in and the technical solution of the embodiment of the present application is defined, it is suitable especially for the execution between step each in the present embodiment For sequence, it can be adjusted in practical applications.For example, in other embodiments, it can be to first carry out and calculate practical root Hash to the step of, then carry out the practical hash value of each data block compared between standard hash value etc..
In the present embodiment, if communication data received by receiving end is complete communication data, received The practical hash value Yu standard hash value of each data block and the utilization calculated practical root of Merkle algorithm in communication data Hash value and standard root hash value should be all consistent, and therefore, whether receiving end is complete in the received data of verification Communication data when, the practical hash value and standard hash value of each data block in the pending data that receives by comparing, And practical root hash value and standard root hash value, so that it may determine whether communication data received by receiving end is complete, It is obtained again so that receiving end can take appropriate measures in the case where not obtaining complete communication data Communication data is obtained, and then can guarantee that receiving end can obtain complete communication data.Moreover, being also transmission in the present embodiment Communication data adds timestamp, sets received term of validity to communication data, can achieve prevents the communication data to be re-used Effect.
In addition, the device is answered the embodiment of the present application also provides a kind of structural schematic diagram of the processing unit of communication data For receiving end, which be can specifically include:
Receiving unit 401, for receiving pending data, the pending data includes multiple data blocks, each data The standard hash hash value of block and the number N, the N of data block are the positive integer greater than 1, the standard Hash of the data block Value is the corresponding Hash of complete data block;
Computing unit 402 calculates the data for the data characteristics according to data block each in the pending data The practical hash value of block;
Comparing unit 403, for carrying out the standard hash value of the practical hash value of each data block and the data block Compare;
Determination unit 404, if for practical hash value in the pending data and the consistent data block of standard hash value Number be N, it is determined that the multiple data blocks for including in the pending data be complete communication data.
In some possible embodiments, the data characteristics of the data block, the size of data including the data block.
In some possible embodiments, the pending data further includes standard root hash value, and described device 400 is also Include:
Root hash value computing unit includes for being calculated in the pending data using Merkle Merkel's algorithm The corresponding practical root hash value of multiple data blocks;
The determination unit, if being specifically used for practical hash value and the consistent number of standard hash value in the pending data It is N according to the number of block, and the practical root hash value is consistent with the standard root hash value, it is determined that in the pending data Including multiple data blocks be complete communication data.
In some possible embodiments, the pending data further includes timestamp, described device 400 further include:
Authentication unit, for verifying whether the pending data fails using the timestamp;
First trigger unit is used for if it is determined that pending data failure, then trigger the transmitting terminal of communication data again Send complete communication data.
In some possible embodiments, described device 400 further include:
Second trigger unit, if for practical hash value in the pending data and the consistent data block of standard hash value Number be less than N, then the transmitting terminal for triggering communication data retransmits complete communication data.
In some possible embodiments, described device 400 further include:
Whether data block number comparing unit, the number for data block in the pending data are less than N;
Third trigger unit triggers communication data if the number for data block in the pending data is less than N Transmitting terminal retransmits complete communication data.
In the present embodiment, if communication data received by receiving end is complete communication data, received The practical hash value and standard hash value of each data block should be consistent in communication data, and therefore, receiving end is verifying When whether received data are complete communication data, each data block in the pending data that receives by comparing Practical hash value and standard hash value, so that it may determine whether communication data received by receiving end is complete, so as to Receiving end can be taken appropriate measures in the case where not obtaining complete communication data and regain communication number According to, and then can guarantee that receiving end can obtain complete communication data.
In addition, described device is applied to communication number the embodiment of the present application also provides a kind of processing unit of communication data According to transmitting terminal, described device 500 includes:
Division unit 501, for data to be sent to be divided into N number of data block, wherein the N is just whole greater than 1 Number;
Computing unit 502, according to the data characteristics of the data block, calculates described for being directed to each data block The standard hash hash value of data block;
Transmission unit 503, for sending N number of data block, the standard of each data block to the receiving end of communication data Hash the number N of hash value and the data block.
In some possible embodiments, described device 500 further include:
Root hash value computing unit, for calculating N number of number in the data to be sent using Merkle Merkel's algorithm According to the corresponding standard root hash value of block;
Standard root hash value transmission unit, for sending the standard root hash value to the receiving end.
In some possible embodiments, the data characteristics of the data block, the size of data including the data block.
In some possible embodiments, described device 500 further include:
Adding unit, for adding timestamp for the data to be sent.
In the present embodiment, transmitting terminal has been divided into N number of data block to data to be sent in advance before sending data, calculates The corresponding standard hash value of each data block out, and by N number of data block, the standard hash value of each data block and data block Number N be sent to receiving end, in this way, receiving end can according to the corresponding hash value of each data block received with And the number N of data block, determine whether its received multiple data block of institute is complete, so that receiving end can not obtained It can take appropriate measures in the case where obtaining complete communication data and regain communication data, and then can guarantee receiving end Complete communication data can be obtained.
" first " in titles such as " the first trigger units " mentioned in the embodiment of the present application is used only to do name mark, First sequentially is not represented.The rule is equally applicable to " second ", " third " etc..
As seen through the above description of the embodiments, those skilled in the art can be understood that above-mentioned implementation All or part of the steps in example method can add the mode of general hardware platform to realize by software.Based on this understanding, The technical solution of the application can be embodied in the form of software products, which can store is situated between in storage In matter, such as read-only memory (English: read-only memory, ROM)/RAM, magnetic disk, CD etc., including some instructions to So that a computer equipment (can be the network communication equipments such as personal computer, server, or router) executes Method described in certain parts of each embodiment of the application or embodiment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for method reality For applying example and apparatus embodiments, since it is substantially similar to system embodiment, so describe fairly simple, related place ginseng See the part explanation of system embodiment.Equipment and system embodiment described above is only schematical, wherein making It may or may not be physically separated for the module of separate part description, the component shown as module can be Or it may not be physical module, it can it is in one place, or may be distributed over multiple network units.It can be with Some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment according to the actual needs.The common skill in this field Art personnel can understand and implement without creative efforts.
The above is only the illustrative embodiment of the application, is not intended to limit the protection scope of the application.

Claims (10)

1. a kind of processing method of communication data, which is characterized in that the method is applied to the receiving end of communication data, the side Method includes:
Receive pending data, the pending data include multiple data blocks, each data block standard hash hash value with And the number N of data block, the standard hash value of the data block are the corresponding hash value of complete data block, the N is greater than 1 Positive integer, the number N of the data block refers to the number of data block in complete communication data;
According to the data characteristics of data block each in the pending data, the practical hash value of the data block is calculated;
The practical hash value of each data block is compared with the standard hash value of the data block;
If the number of practical hash value and the consistent data block of standard hash value is N in the pending data, it is determined that described The multiple data blocks for including in pending data are complete communication data.
2. the method according to claim 1, wherein the data characteristics of the data block, including the data block Size of data.
3. the method according to claim 1, wherein the pending data further includes standard root hash value, institute State method further include:
The corresponding practical root of multiple data blocks for including in the pending data is calculated using Merkle Merkel's algorithm Hash value;
If the number of practical hash value and the consistent data block of standard hash value is N in the pending data, it is determined that The receiving end receives complete data, comprising:
If the number of practical hash value and the consistent data block of standard hash value is N in the pending data, and the reality Root hash value is consistent with the standard root hash value, it is determined that the multiple data blocks for including in the pending data are complete Communication data.
4. the method according to claim 1, wherein the pending data further includes timestamp, the method Further include:
Verify whether the pending data fails using the timestamp;
If it is determined that the pending data failure, the then transmitting terminal for triggering communication data retransmit complete communication data.
5. the method according to claim 1, wherein the method also includes:
If the number of practical hash value and the consistent data block of standard hash value is less than N in the pending data, triggering is logical The transmitting terminal of letter data retransmits complete communication data.
6. method according to any one of claims 1 to 5, which is characterized in that the method also includes:
Whether the number for comparing data block in the pending data is less than N;
If the number of data block is less than N in the pending data, the transmitting terminal for triggering communication data is retransmitted completely Communication data.
7. a kind of processing method of communication data, which is characterized in that the method is applied to the transmitting terminal of communication data, the side Method includes:
Data to be sent are divided into N number of data block, wherein the N is the positive integer greater than 1;
It is directed to each data block, according to the data characteristics of the data block, calculates the standard hash Hash of the data block Value;
The standard hash hash value and the number of N number of data block, each data block are sent to the receiving end of communication data According to the number N of block.
8. the method according to the description of claim 7 is characterized in that the method also includes:
The corresponding standard root hash value of N number of data block in the data to be sent is calculated using Merkle Merkel's algorithm;
The standard root hash value is sent to the receiving end.
9. a kind of processing unit of communication data, which is characterized in that described device is applied to the receiving end of communication data, the dress It sets and includes:
Receiving unit, for receiving pending data, the pending data includes the standard of multiple data blocks, each data block The number N, the N for hashing hash value and data block are the positive integer greater than 1, and the standard hash value of the data block is complete The corresponding Hash of data block;
Computing unit calculates the reality of the data block for the data characteristics according to data block each in the pending data Border hash value;
Comparing unit, for the practical hash value of each data block to be compared with the standard hash value of the data block;
Determination unit, if being for practical hash value in the pending data and the number of the consistent data block of standard hash value N, it is determined that the multiple data blocks for including in the pending data are complete communication data.
10. a kind of processing unit of communication data, which is characterized in that described device is applied to the transmitting terminal of communication data, described Device includes:
Division unit, for data to be sent to be divided into N number of data block, wherein the N is the positive integer greater than 1;
Computing unit, according to the data characteristics of the data block, calculates the data block for being directed to each data block Standard hash hash value;
Transmission unit, for sending the standard hash Hash of N number of data block, each data block to the receiving end of communication data The number N of value and the data block.
CN201811101195.3A 2018-09-20 2018-09-20 A kind of processing method and processing device of communication data Pending CN109194674A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811101195.3A CN109194674A (en) 2018-09-20 2018-09-20 A kind of processing method and processing device of communication data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811101195.3A CN109194674A (en) 2018-09-20 2018-09-20 A kind of processing method and processing device of communication data

Publications (1)

Publication Number Publication Date
CN109194674A true CN109194674A (en) 2019-01-11

Family

ID=64909018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811101195.3A Pending CN109194674A (en) 2018-09-20 2018-09-20 A kind of processing method and processing device of communication data

Country Status (1)

Country Link
CN (1) CN109194674A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112511276A (en) * 2020-11-24 2021-03-16 广州技象科技有限公司 Data processing method and device
CN112511277A (en) * 2020-11-24 2021-03-16 广州技象科技有限公司 Data processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103246730A (en) * 2013-05-08 2013-08-14 网易(杭州)网络有限公司 File storage method and device and file sensing method and device
CN103259797A (en) * 2013-05-17 2013-08-21 中国联合网络通信集团有限公司 Data file transmission method and platform
WO2017146333A1 (en) * 2016-02-22 2017-08-31 (주)코인플러그 Forgery/tampering verification system and method for financial institution certificates based on blockchain
CN107425960A (en) * 2017-08-04 2017-12-01 中国地质大学(武汉) A kind of method, equipment and its storage device for examining anti-end to end network bad data points
CN107809423A (en) * 2017-10-20 2018-03-16 国信嘉宁数据技术有限公司 A kind of electronic evidence data transmission method, system and equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103246730A (en) * 2013-05-08 2013-08-14 网易(杭州)网络有限公司 File storage method and device and file sensing method and device
CN103259797A (en) * 2013-05-17 2013-08-21 中国联合网络通信集团有限公司 Data file transmission method and platform
WO2017146333A1 (en) * 2016-02-22 2017-08-31 (주)코인플러그 Forgery/tampering verification system and method for financial institution certificates based on blockchain
CN107425960A (en) * 2017-08-04 2017-12-01 中国地质大学(武汉) A kind of method, equipment and its storage device for examining anti-end to end network bad data points
CN107809423A (en) * 2017-10-20 2018-03-16 国信嘉宁数据技术有限公司 A kind of electronic evidence data transmission method, system and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈科: ""基于动态变色龙认证树的流式数据完整性验证研究与应用"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112511276A (en) * 2020-11-24 2021-03-16 广州技象科技有限公司 Data processing method and device
CN112511277A (en) * 2020-11-24 2021-03-16 广州技象科技有限公司 Data processing method and device
CN112511277B (en) * 2020-11-24 2021-08-06 广州技象科技有限公司 Data processing method and device

Similar Documents

Publication Publication Date Title
CN104539739B (en) A kind of system, method and device that file uploads
CN104410692B (en) A kind of method and system uploaded for duplicate file
CN108494775A (en) It prevents from utilizing valid data or the method for distorting valid data progress network attack
CN107634964B (en) WAF (Wireless Access Filter) testing method and device
CN105743610B (en) The technology of data integrity for Multi net voting division operation
CN104348578B (en) The method and device of data processing
CN104580104A (en) Method, device and system for identity verification
RU2013108211A (en) METHOD FOR PREVENTING RE-USE OF DIGITAL DATA PACKAGES IN A NETWORK DATA TRANSFER SYSTEM
CN112822260B (en) File transmission method and device, electronic equipment and storage medium
CN109525542A (en) Data reconstruction method, transmitting/receiving means and computer readable storage medium
KR20170120029A (en) Method and device for preventing manipulation of a data transmission
CN107172174A (en) The quick upload of file is realized between clients and servers
CN109194674A (en) A kind of processing method and processing device of communication data
CN111064755A (en) Data protection method and device, computer equipment and storage medium
CN114553863B (en) File transmission method and device, storage medium and electronic equipment
CN103229486B (en) Batch file transmission method and equipment
US20140003438A1 (en) Methods, systems, and computer readable media for updating sequence and acknowledgment numbers associated with replay packets
US10812480B2 (en) Method and device for verifying validity of identity of entity
CN106899554A (en) A kind of method and device for preventing ARP from cheating
CN108965463B (en) File transmission method, device and system
CN109067503B (en) Data retransmission method and device
CN106302364A (en) Proxy Method, assistance agent method and apparatus
CN105812138A (en) Logging-in processing method, processing device, user terminal, and logging-in system
CN114371863A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN109167647A (en) Data transmission method and device, electronic equipment and storage medium

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: 20190111