CN117201038A - Data transmission verification method, system, electronic equipment and storage medium - Google Patents

Data transmission verification method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN117201038A
CN117201038A CN202311248880.XA CN202311248880A CN117201038A CN 117201038 A CN117201038 A CN 117201038A CN 202311248880 A CN202311248880 A CN 202311248880A CN 117201038 A CN117201038 A CN 117201038A
Authority
CN
China
Prior art keywords
data
round
current round
value corresponding
data segment
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
CN202311248880.XA
Other languages
Chinese (zh)
Inventor
曹永威
刘平
任云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile 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 Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202311248880.XA priority Critical patent/CN117201038A/en
Publication of CN117201038A publication Critical patent/CN117201038A/en
Pending legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Abstract

The embodiment of the invention provides a data transmission verification method, a system, electronic equipment and a storage medium, and relates to the technical field of data transmission. The method comprises the following steps: the receiving end receives a plurality of data segments which are sequentially transmitted by the transmitting end according to a plurality of rounds; in the first round of data transmission, determining and storing a hash value corresponding to a data segment of the current round according to the data segment of the current round; in each round of data transmission after the first round, determining and storing the hash value corresponding to the data segment of the current round according to the hash value corresponding to the data segment of the current round and the data segment of the last round until a plurality of data segments are successfully received, and obtaining the hash value corresponding to the data segment of the last round; comparing the hash value corresponding to the data segment of the last round with the hash value corresponding to the target data; under the condition that the hash values are the same, the target data is confirmed to be transmitted and checked to pass, so that the data receiving and the hash value calculation are processed simultaneously, and the time consumption of data transmission is saved.

Description

Data transmission verification method, system, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of data transmission, in particular to a data transmission verification method, a system, electronic equipment and a storage medium.
Background
Data integrity verification is a very important step in the data transmission process. The data integrity check is used for checking the integrity of the data in the storage and transmission process so as to prevent modification of the data by illegal entities or damage of the data in the storage or transmission process.
In the current data transmission process, generally, after all data transmission is completed, hash calculation of the whole data is performed, so that integrity check of data transmission is performed through the hash value of the whole data. However, in the case where the amount of the transmission data itself is large, it takes a lot of time to perform the hash calculation itself on the transmission data, resulting in a longer time to perform the integrity check, which further results in a problem that the data transmission takes longer. Therefore, how to shorten the time consumed by data transmission is a technical problem to be solved by the present invention.
Disclosure of Invention
The embodiment of the invention provides a data transmission verification method, a system, electronic equipment and a storage medium, so as to save the time consumed by data transmission.
An embodiment of the present invention provides a data transmission verification method, where the method includes:
The receiving end receives a plurality of data segments which are sequentially transmitted by the transmitting end according to a plurality of rounds, wherein the data segments are formed by dividing the transmitting end based on target data;
in the first round of data transmission, after the receiving end successfully receives the data segment of the current round, determining and storing a hash value corresponding to the data segment of the current round according to the data segment of the current round;
in each round of data transmission after the first round, after the receiving end successfully receives the data segment of the current round, determining the hash value corresponding to the data segment of the current round according to the hash value corresponding to the data segment of the current round and the data segment of the last round, and storing until the plurality of data segments are successfully received, so as to obtain the hash value corresponding to the data segment of the last round;
the receiving end receives the hash value corresponding to the target data sent by the sending end, and compares the hash value corresponding to the data segment of the last round with the hash value corresponding to the target data;
and under the condition that the hash value corresponding to the target data is the same as the hash value corresponding to the data segment of the last round, the receiving end determines that the target data is transmitted and the verification is passed.
Optionally, the method further comprises:
the receiving end returns the maximum data length to the sending end based on the data transmission request sent by the sending end;
the sending end receives the maximum data length, and before each round of data transmission, the data length of the current round is determined at least according to the maximum data length;
for the first round, the transmitting end reads the data size of the data length of the current round from the target data to obtain a data segment of the current round and the residual target data of the current round;
for each round after the first round, the transmitting end reads the data size of the data length of the current round from the residual target data of the previous round to obtain the data segment of the current round and the residual target data of the current round until the target data are completely read;
in each round of data transmission, the transmitting end transmits the data packet of the current round to the receiving end; the data packet of the current round at least comprises: and the data segment of the current round.
Optionally, the data packet of the current round further includes: a check value corresponding to the data segment of the current round;
The method further comprises the steps of:
in each round of data transmission, after receiving the data segment of the current round and the check value corresponding to the data segment of the current round, the receiving end determines the actual check value corresponding to the data segment of the current round based on the data segment of the current round;
the receiving end compares the check value corresponding to the data segment of the current round with the actual check value corresponding to the data segment of the current round;
and under the condition that the check value corresponding to the data segment of the current round is the same as the actual check value corresponding to the data segment of the current round, the receiving end determines that the data segment of the current round is successfully received.
Optionally, the data packet of the current round further includes: the data length of the current round; the check value corresponding to the data segment of the current round is obtained by the transmitting end through check calculation based on the data segment of the current round and the data length of the current round;
the determining the actual check value corresponding to the data segment of the current round based on the data segment of the current round includes:
and performing verification calculation based on the data segment of the current round and the data length of the current round, and determining an actual verification value corresponding to the data segment of the current round.
Optionally, the verification calculation includes at least one of: CRC calculation and hash calculation.
Optionally, the method further comprises:
before each round of data transmission, the sending end determines the communication load condition with the receiving end, and/or the sending end receives the processing load condition returned by the receiving end;
the determining the data length of the current round at least according to the maximum data length comprises the following steps:
and determining the data length of the current round according to the maximum data length, the communication load condition and/or the processing load condition.
Optionally, the sending end is an in-vehicle terminal, the receiving end is a gateway, and the target data is a software package.
A second aspect of an embodiment of the present invention provides a data transmission verification system, including: receiving end and transmitting end:
the receiving end is used for receiving a plurality of data segments which are sequentially transmitted by the transmitting end according to a plurality of rounds, and the data segments are divided by the transmitting end based on target data;
the receiving end is used for determining and storing a hash value corresponding to the data segment of the current round according to the data segment of the current round after successfully receiving the data segment of the current round in the first round data transmission;
The receiving end is used for determining and storing the hash value corresponding to the data segment of the current round according to the hash value corresponding to the data segment of the current round and the data segment of the last round after successfully receiving the data segment of the current round in each round of data transmission after the first round until the plurality of data segments are successfully received, so as to obtain the hash value corresponding to the data segment of the last round;
the receiving end is used for receiving the hash value corresponding to the target data sent by the sending end and comparing the hash value corresponding to the data segment of the last round with the hash value corresponding to the target data;
the receiving end is configured to determine that the target data is transmitted and the verification passes when the hash value corresponding to the target data is the same as the hash value corresponding to the data segment of the last round.
Optionally, the receiving end is configured to return, based on a data transmission request sent by the sending end, a maximum data length to the sending end;
the sending end is used for receiving the maximum data length, and determining the data length of the current round at least according to the maximum data length before each round of data transmission;
The sending end is used for reading the data quantity of the data length of the current round from the target data aiming at the first round to obtain the data segment of the current round and the residual target data of the current round;
the sending end is used for reading the data size of the data length of the current round from the residual target data of the previous round for each round after the first round to obtain the data segment of the current round and the residual target data of the current round until the target data are completely read;
the sending end is used for sending the data packet of the current round to the receiving end in each round of data transmission; the data packet of the current round at least comprises: and the data segment of the current round.
Optionally, the data packet of the current round further includes: a check value corresponding to the data segment of the current round;
the receiving end is used for determining an actual check value corresponding to the data segment of the current round based on the data segment of the current round after receiving the data segment of the current round and the check value corresponding to the data segment of the current round in data transmission of each round;
The receiving end is used for comparing the check value corresponding to the data segment of the current round with the actual check value corresponding to the data segment of the current round;
the receiving end is used for determining that the data segment of the current round is successfully received under the condition that the check value corresponding to the data segment of the current round is the same as the actual check value corresponding to the data segment of the current round.
Optionally, the data packet of the current round further includes: the data length of the current round; the check value corresponding to the data segment of the current round is obtained by the transmitting end through check calculation based on the data segment of the current round and the data length of the current round;
the receiving end is specifically configured to perform verification calculation based on the data segment of the current round and the data length of the current round, and determine an actual verification value corresponding to the data segment of the current round.
Optionally, the verification calculation includes at least one of: CRC calculation and hash calculation.
Optionally, the sending end is configured to determine, before each round of data transmission, a communication load condition with the receiving end, and/or receive a processing load condition returned by the receiving end;
The sending end is specifically configured to determine the data length of the current round according to the maximum data length, and the communication load condition and/or the processing load condition.
Optionally, the sending end is an in-vehicle terminal, the receiving end is a gateway, and the target data is a software package.
A third aspect of an embodiment of the present invention provides an electronic device, including: comprising a memory, a processor and a computer program stored on the memory and running on the processor, which when executed by the processor implements a data transmission verification method as in the first aspect of the embodiments of the invention.
A fourth aspect of the embodiment of the present invention provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the data transmission verification method of the first aspect of the embodiment of the present invention.
In the data transmission verification method provided by the embodiment of the invention, a receiving end receives a plurality of data segments which are sequentially transmitted by a transmitting end according to a plurality of rounds, wherein the plurality of data segments are divided by the transmitting end based on target data; in the first round of data transmission, after the data segment of the current round is successfully received, determining and storing a hash value corresponding to the data segment of the current round according to the data segment of the current round; in each round of data transmission after the first round, after the data segment of the current round is successfully received, determining and storing the hash value corresponding to the data segment of the current round according to the hash value corresponding to the data segment of the current round and the data segment of the last round until a plurality of data segments are successfully received, and obtaining the hash value corresponding to the data segment of the last round; comparing the hash value corresponding to the data segment of the last round with the hash value corresponding to the target data sent by the sending end; and under the condition that the hash values are the same, determining that the target data transmission is finished and checking is passed.
According to the data transmission verification method, after each round of data is successfully received, the hash value calculation of the current round of data can be executed in parallel before the next round of data transmission or while the next round of data transmission is carried out, the hash value of the data segment of the current round is calculated based on the hash value corresponding to the data segment of the current round and the hash value corresponding to the data segment of the previous round, and therefore after the last round of data reception is completed, the hash value corresponding to the data segment of the last round can be obtained quickly, namely the hash value of the whole target data is obtained.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a data transmission verification method according to an embodiment of the present invention;
FIG. 2 is a system block diagram illustrating a software package transmission in accordance with one embodiment of the present invention;
FIG. 3 is a timing diagram illustrating a data transfer check in accordance with one embodiment of the present invention;
FIG. 4 is a flow chart illustrating the steps of a data transfer check in accordance with one embodiment of the present invention;
FIG. 5 is a block diagram of a data transmission verification system according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In an embodiment, referring to fig. 1, fig. 1 is a flowchart of a data transmission checking method according to an embodiment of the present invention. As shown in fig. 1, the data transmission verification method of the present embodiment may include the following steps:
Step S11: the receiving end receives a plurality of data segments which are sequentially transmitted by the transmitting end according to a plurality of rounds, wherein the data segments are formed by dividing the transmitting end based on target data.
In this embodiment, the sending end may send target data to the receiving end, where the target data is the data sent by the sending end to the receiving end, and the target data may be a network file, network data, a software package, or the like, and the type of the target data is not limited in this embodiment. Since the target data may be data with a larger data amount, the problem of transmission failure and long transmission time will be usually caused by one-time transmission, so in this embodiment, the transmitting end may divide the target data into a plurality of data segments, for example, may divide the target data into a plurality of data segments in sequence.
In this embodiment, the transmitting end sequentially transmits a plurality of data segments to the receiving end according to a plurality of rounds, where the transmitting end may divide the data segments of the target data before transmitting the data in each round, and then transmit one data segment obtained by dividing the current round to the receiving end in the current round; the transmitting end can also divide the target data into a plurality of data segments, and then respectively transmit one data segment to the receiving end according to a plurality of rounds each time until the data segments are transmitted; this embodiment is not limited thereto. Thus, the receiving end can receive a plurality of data segments which are sequentially transmitted by the transmitting end according to a plurality of rounds.
Step S12: in the first round of data transmission, after the receiving end successfully receives the data segment of the current round, determining and storing a hash value corresponding to the data segment of the current round according to the data segment of the current round.
In this embodiment, in the first round of data transmission in multiple rounds, the receiving end may determine whether to successfully receive the data segment of the current round sent by the sending end, where the data segment of the current round is one of multiple data segments of the current round of data transmission. After the receiving end determines that the data segment of the current round is successfully received, hash calculation can be performed according to the data segment of the current round, and a hash value corresponding to the data segment of the current round is determined and stored.
The hash calculation is to convert an input with any length into an output with a fixed length, wherein the output is a hash value, and the hash value is a method for realizing data transmission integrity check. The transmitting end can calculate the hash value of the data to be transmitted according to a predetermined hash algorithm, the receiving end receives the data, calculates the hash value of the data by using the same hash algorithm, and compares the hash value with the hash value calculated by the transmitting end to judge whether the received data is modified.
Therefore, for the data transmission of the first round, after the receiving end successfully receives the data segment of the first round (i.e. the data segment of the current round), the determining of the hash value corresponding to the data segment of the first round is further performed: and carrying out hash calculation based on the data segments of the first round, obtaining and storing hash values corresponding to the data segments of the first round.
In addition, after the receiving end successfully receives the data segment of the current round, a successful receiving response is returned to the sending end, and after the sending end receives the successful receiving response, the data segment of the next round is sent to the receiving end to start the data transmission of the next round.
Step S13: in each round of data transmission after the first round, after the receiving end successfully receives the data segment of the current round, determining the hash value corresponding to the data segment of the current round according to the hash value corresponding to the data segment of the current round and the data segment of the previous round, and storing until the data segments are successfully received, so as to obtain the hash value corresponding to the data segment of the last round.
In this embodiment, in each round of data transmission after the first round, the receiving end may determine whether to successfully receive the data segment of the current round sent by the sending end, after the receiving end determines that the data segment of the current round is successfully received, hash calculation may be performed according to the hash values corresponding to the data segment of the current round and the data segment of the previous round of the current round, so as to determine and store the hash value corresponding to the data segment of the current round until all the data segments of the target data are successfully received, and the receiving end performs hash calculation according to the data segment of the last round and the hash value corresponding to the data segment of the last-last round to obtain the hash value corresponding to the data segment of the last round.
That is, from the second round of data transmission, after the receiving end successfully receives the data segment of the current round, when determining the hash value corresponding to the data segment of the current round, the receiving end performs hash calculation on the hash value corresponding to the data segment of the current round and the data segment of the previous round.
For example, for the data transmission of the second round, the hash value corresponding to the data segment of the second round is obtained by performing hash calculation on the hash value corresponding to the data segment of the first round and the data segment of the second round, the hash value corresponding to the data segment of the third round is obtained by performing hash calculation on the hash value corresponding to the data segment of the second round and the data segment of the third round, … …, and the hash value corresponding to the data segment of the last round is obtained by performing hash calculation on the hash value corresponding to the data segment of the last round and the data segment of the last round.
In this way, for each round of data transmission after the first round, after the data reception of the current round is successful, when the hash values corresponding to the data segments of the current round are determined, the hash values corresponding to the data segments of the previous round and the hash values corresponding to the data segments of the current round are obtained by performing hash calculation, and the hash values corresponding to the data segments of each current round are the hash values corresponding to the data segments of the current round and all the previous rounds, then the hash values corresponding to the data segments of the last round are the hash values corresponding to the data segments of the last round and all the previous rounds, that is, the hash values corresponding to the data segments of the last round are the hash values obtained by performing hash calculation on the target data by the receiving end.
It should be noted that, in this embodiment, the calculation of the hash value corresponding to the data segment of each round by the receiving end is performed in parallel with the data reception performed by the receiving end: after each round of data reception is successful, the hash value calculation of the current round of data may be performed in parallel before or while the next round of data transmission is performed. Therefore, after a plurality of data segments are successfully received, hash calculation is performed based on the hash value corresponding to the data segment of the last round and the hash value corresponding to the data segment of the last round, that is, the receiving end can quickly determine the hash value corresponding to the whole target data.
Step S14: the receiving end receives the hash value corresponding to the target data sent by the sending end, and compares the hash value corresponding to the data segment of the last round with the hash value corresponding to the target data.
In this embodiment, after the receiving end receives the data segment of the last round, a successful receiving response is returned to the sending end, after the receiving end receives the successful receiving response, it is determined that all the target data are completely sent, a transmission completion response is sent to the receiving end, where the transmission completion response includes at least the data identifier of the target data and the hash value corresponding to the target data, where the hash value corresponding to the target data may be obtained by downloading together when the sending end downloads the target data, or may be obtained by calculating based on the target data after the sending end downloads the target data.
The receiving end receives the hash value corresponding to the target data sent by the sending end, and compares the hash value corresponding to the data segment of the last turn stored with the hash value corresponding to the received target data so as to carry out integrity check of the target data.
It should be noted that, the transmitting end may interact with multiple receiving ends to perform data transmission, and the receiving end may interact with multiple transmitting ends to perform data transmission, so in the data transmission process, the transmitted data segment and the hash value corresponding to the obtained data segment may both carry the data identifier to calibrate the transmitted target data.
Step S15: and under the condition that the hash value corresponding to the target data is the same as the hash value corresponding to the data segment of the last round, the receiving end determines that the target data is transmitted and the verification is passed.
In this embodiment, when determining that the hash value corresponding to the target data is the same as the hash value corresponding to the data segment of the last round, the receiving end may determine that the transmission of the target data is completed and the integrity check is passed; when the receiving end determines that the hash value corresponding to the target data is different from the hash value corresponding to the data segment of the last round, the receiving end can determine that the transmission of the target data is finished but the integrity check is not passed.
In this embodiment, after each round of data reception is successful, before or while the next round of data transmission is performed, the hash value calculation of the current round of data may be performed in parallel, and the hash value corresponding to the data segment of each current round is the hash value corresponding to the data segment of the current round and all the previous rounds, so after the last round of data reception is completed, the hash value corresponding to the data segment of the last round may be obtained quickly, and the hash value of the whole target data may be obtained. The embodiment can process data receiving and hash value calculation at the same time, does not need to calculate the hash value for the whole target data after the target data is received, and saves the time required to be consumed during integrity verification, thereby saving the time consumption of data transmission.
In combination with the above embodiment, in one implementation manner, before sending the target data to the receiving end, the sending end may determine the target data to be sent, determine the data identifier of the target data, the hash value of the target data, the data size of the target data, and the receiving end of the target data, then establish a communication connection with the receiving end, and begin data transmission after determining that the online communication with the transmission link of the receiving end is correct.
In combination with the above embodiment, in an implementation manner, the embodiment of the present invention further provides a data transmission verification method. In the method, in addition to the above steps, steps S21 to S25 may be included:
step S21: and the receiving end returns the maximum data length to the sending end based on the data transmission request sent by the sending end.
In this embodiment, before the sending end sends the target data to the receiving end, a data transmission request is sent to the receiving end, where the data transmission request at least includes: the data identification of the target data and the data size of the target data. After the receiving end receives the data transmission request, the receiving end can analyze the data transmission request to obtain a data identifier of the target data and a data size of the target data, check the space of the receiving end based on the data size of the target data, if the space is insufficient, the memory is clear, and reply a receiving response to the sending end, wherein the receiving response at least comprises a maximum data length, and the maximum data length represents the receiving capacity of the receiving end, namely the data quantity received by the receiving end at most once.
Step S22: the sending end receives the maximum data length, and before each round of data transmission, the data length of the current round is determined at least according to the maximum data length.
In this embodiment, after receiving the receiving response, the transmitting end may parse to obtain the maximum data length, so that, before each round of data transmission, the data length of the current round is determined at least according to the maximum data length of the transmitting end, where the data length of the current round is the data size of the data segment that needs to be transmitted to the receiving end by the current round.
Step S23: for the first round, the sending end reads the data size of the data length of the current round from the target data to obtain the data segment of the current round and the residual target data of the current round.
In this embodiment, for the first round of data transmission, after determining the data length of the first round, the transmitting end may read the data size of the data length of the current round (i.e., the data length of the first round) from the target data, to obtain the data segment of the current round, and obtain the remaining target data of the current round.
Step S24: for each round after the first round, the transmitting end reads the data size of the data length of the current round from the residual target data of the previous round to obtain the data segment of the current round and the residual target data of the current round until the target data are completely read.
In this embodiment, for each round after the first round in data transmission, after determining the data length of the current round, the transmitting end may read the data amount of the data length of the current round from the remaining target data of the previous round to obtain the data segment of the current round, and obtain the remaining target data of the current round, so as to complete the division of multiple data segments of the target data until all the target data are read.
Step S25: in each round of data transmission, the transmitting end transmits the data packet of the current round to the receiving end; the data packet of the current round at least comprises: and the data segment of the current round.
In this embodiment, after determining the data segment of the current round corresponding to each round, the transmitting end transmits the data segment of the current round to the receiving end in the form of a data packet of the current round in data transmission of each round, where the data packet of the current round at least includes: the data segment of the current round.
For data division in data transmission in the related art, the transmitting end is divided into data segments with fixed sizes, and therefore the transmitting end cannot be suitable for a scene that the sizes of the data segments need to be dynamically adjusted in data transmission.
In combination with the above embodiment, in an implementation manner, the embodiment of the present invention further provides a data transmission verification method. In the method, the data packet of the current round further includes: a check value corresponding to the data segment of the current round; and in the method, in addition to the above steps, steps S31 to S33 may be included:
in this embodiment, in each round of data transmission process, the transmitting end determines a check value corresponding to the data segment of the current round after determining the data segment of the current round, and transmits the check value corresponding to the data segment of the current round and the data segment of the current round to the receiving end in the form of a data packet of the current round.
Step S31: in each round of data transmission, after receiving the data segment of the current round and the check value corresponding to the data segment of the current round, the receiving end determines the actual check value corresponding to the data segment of the current round based on the data segment of the current round.
In this embodiment, in each round of data transmission, after receiving the data segment of the current round and the check value corresponding to the data segment of the current round sent by the sending end, the receiving end may determine the actual check value corresponding to the data segment of the current round based on the data segment of the current round.
Step S32: and the receiving end compares the check value corresponding to the data segment of the current round with the actual check value corresponding to the data segment of the current round.
In this embodiment, the check value corresponding to the data segment of the current round is a check value determined by the transmitting end based on the data segment of the current round, the actual check value corresponding to the data segment of the current round is a check value determined by the receiving end based on the data segment of the current round, and the receiving end may compare the check value corresponding to the data segment of the current round with the actual check value corresponding to the data segment of the current round to determine whether the data segment received by the current round is correct, thereby determining whether the data segment of the current round is successfully received.
Step S33: and under the condition that the check value corresponding to the data segment of the current round is the same as the actual check value corresponding to the data segment of the current round, the receiving end determines that the data segment of the current round is successfully received.
In this embodiment, when the receiving end determines that the check value corresponding to the data segment of the current round is the same as the actual check value corresponding to the data segment of the current round, the receiving end may determine that the data segment of the current round is successfully received, and reply a successful reception response to the transmitting end, and the transmitting end determines, based on the successful reception response, the data length of the next round and the data segment of the next round, so as to transmit the data segment of the next round to the receiving end.
And under the condition that the receiving end determines that the check value corresponding to the data segment of the current round is different from the actual check value corresponding to the data segment of the current round, the receiving end can determine that the data segment of the current round is successfully received, so that a receiving failure response is replied to the sending end, and the sending end resends the data segment of the current round to the receiving end based on the receiving failure response.
In this embodiment, the transmitting end transmits the data segment and simultaneously transmits the check value corresponding to the data segment, so that the receiving end can determine whether the data segment is successfully received based on the check value after receiving the data in each round, thereby ensuring the integrity problem in the data transmission process to a certain extent and providing a pre-stage basis for the subsequent integrity check.
In combination with the above embodiment, in an implementation manner, the embodiment of the present invention further provides a data transmission verification method. In the method, the data packet of the current round further includes: the data length of the current round; and the step S31 of determining the actual check value corresponding to the data segment of the current round based on the data segment of the current round may specifically include step S41:
Step S41: and performing verification calculation based on the data segment of the current round and the data length of the current round, and determining an actual verification value corresponding to the data segment of the current round.
In this embodiment, the check value corresponding to the data segment of the current round is obtained by performing check calculation by the transmitting end based on the data segment of the current round and the data length of the current round; and the transmitting end transmits the check value corresponding to the data segment of the current round, the data length of the current round and the data segment of the current round to the receiving end in the form of a data packet of the current round in the data transmission process of each round.
After receiving the check value corresponding to the data segment of the current round, the data length of the current round and the data segment of the current round, the receiving end can perform check calculation together based on the data length of the current round and the data segment of the current round to obtain an actual check value corresponding to the data segment of the current round. It should be noted that, the method for performing the verification calculation by the transmitting end is the same as the method for performing the verification calculation by the receiving end.
In this embodiment, when the data segment of the current round is subjected to the check computation, the check computation is not performed based on the data only, but is performed based on the data segment of the current round and the data length of the current round, so that the check value and the actual check value are the checksum of the data length and the data, thereby further improving the security of data check.
In combination with the above embodiment, in an implementation manner, the embodiment of the present invention further provides a data transmission verification method. In the method, the verification calculation includes at least one of: CRC calculation and hash calculation. The CRC is Cyclic Redundancy Check, namely cyclic redundancy check, is a rapid algorithm for generating a short fixed bit check code according to data such as a network data packet or a computer file, and is mainly used for detecting or checking errors possibly occurring after data transmission or storage. When the check calculation is CRC calculation, the actual check value and the check value corresponding to the data segment of the current round are CRC values.
In combination with the above embodiment, in an implementation manner, the embodiment of the present invention further provides a data transmission verification method. In this method, step S51 may be included in addition to the above steps, and the "determining the data length of the current round at least according to the maximum data length" in step S22 may specifically include step S52:
step S51: before each round of data transmission, the sending end determines the communication load condition with the receiving end, and/or the sending end receives the processing load condition returned by the receiving end.
In this embodiment, before each round of data transmission, the transmitting end may determine a communication load condition with the receiving end, and/or receive a processing load condition returned by the receiving end. Wherein the communication load condition is related to the communication condition and the network condition between the transmitting end and the receiving end, and the processing load condition is related to the current data processing capability of the receiving end. The receiving end can carry the processing load condition of the receiving end in each successful receiving response returned to the sending end, so that the sending end can receive the processing load condition; or the sending end obtains the communication load condition between the sending end and the receiving end before each round of data transmission; the receiving end can also carry the processing load condition of the receiving end in each time of returning the successful receiving response to the sending end, so that the sending end can receive the processing load condition, and the sending end obtains the communication load condition between the sending end and the receiving end before each round of data transmission.
Step S52: and determining the data length of the current round according to the maximum data length, the communication load condition and/or the processing load condition.
In this embodiment, when the sending end obtains the communication load condition and/or the processing load condition, the data length of the current round may be determined according to the maximum data length returned by the receiving end and the communication load condition and/or the processing load condition. The data length of the current round is smaller than or equal to the maximum data length.
For example, the maximum data length returned by the receiving end is 100kb, and in the case that the communication charge condition is general, the data length of the current round can be determined to be 80kb according to the maximum data length and the communication load condition; in the case where the communication responsibility situation is good, it may be determined that the data length of the current round is 100 or 90kb according to the maximum data length and the communication load situation, and so on.
For example, the maximum data length returned by the receiving end is 100kb, and in the case that the processing load condition is a medium load, the data length of the current round can be determined to be 70kb according to the maximum data length and the processing load condition; under the condition that the communication charge condition is high load, the data length of the current round can be determined to be 50kb according to the maximum data length and the processing load condition; in the case where the communication responsibility is low load, the data length of the current round may be determined to be 100 or 90kb according to the maximum data length and the processing load, and so on.
For example, the maximum data length returned by the receiving end is 100kb, and when the communication charge condition is a general condition and the processing load condition is a medium load condition, the data length of the current round can be determined to be 60kb according to the maximum data length, the processing load condition and the communication load condition; in the case where the communication charge condition is good, in the case where the communication charge condition is good and the processing load condition is high, the data length of the current round may be determined to be 40kb according to the maximum data length, the processing load condition, and the communication load condition, and so on. The above are examples provided in this embodiment, and the present embodiment does not limit any specific value for determining the data length of the current round.
In this embodiment, the transmitting end does not determine the data length of the current round only according to the maximum data length of the receiving end, but determines the data length of the current round according to the communication load condition and/or the processing load condition before each round of data transmission and the maximum data length, so that the size of the data segment transmitted in each round can be flexibly and dynamically adjusted according to the real-time transmission condition, and the situation that the data segment size needs to be dynamically adjusted when the transmitting end divides the data into fixed sizes is further solved.
At present, with the vigorous development of automobile software technology, the exponential growth of the software code quantity in an automobile and the continuous increase of the software iteration frequency, a plurality of software iteration modes are developed on the automobile, most automobiles at present support the transmission of software packages in the automobile through the writing of a diagnostic instrument, OTA upgrading, U disk upgrading and the like, and each upgrading mode can involve the transmission of the software packages in the automobile. The diagnostic instrument refreshing is that the diagnostic instrument equipment transmits the software package to the in-vehicle controller through the vehicle OBD interface; OTA upgrade is that in-car TBOX downloads a software package from the cloud and then transmits the software package to other controllers; the USB flash disk upgrade is to copy the upgrade package in the USB flash disk to the vehicle machine through the USB interface of the vehicle machine and then transmit the upgrade package to other controllers. In the process of software package transmission, the software package integrity check is also a very important step, but as the software code amount is large, the storage space occupied by the software package is also increased, and longer time is required to be consumed when the software package integrity check is carried out.
Based on this, in combination with the above embodiment, in an implementation manner, the embodiment of the present invention further provides a data transmission verification method. In the method, the sending end is an in-vehicle terminal, the receiving end is a gateway, and the target data is a software package.
In the method, when a software package is transmitted from an in-vehicle terminal to a gateway, firstly, the identification of the software package, the size of the software package and the hash value corresponding to the software package are required to be transmitted to the gateway, then the in-vehicle terminal transmits the software package to the gateway in a segmented mode, the gateway receives the software package segmentation data and calculates the hash value, when the hash value is calculated, the hash value calculated in the last round is used as the input of the hash value calculated by the current data, namely, the hash value obtained in the last round is calculated together with the software package data obtained in the current round to obtain the hash value of the current round, so that after the software package is completely received, the hash value of the whole software package is obtained, and the data receiving and the hash value calculating can be processed simultaneously.
In one embodiment, as shown in FIG. 2, FIG. 2 is a system block diagram of a software package transmission, as shown in one embodiment of the present invention. In fig. 2, the in-vehicle system includes two controllers connected by an in-vehicle bus, the two controllers are currently connected by using an ethernet, the in-vehicle terminal is a software packet sender, the software packet is stored, the gateway is a software packet receiver, the in-vehicle terminal sends the software packet to the gateway through the ethernet and a software packet transmission application layer protocol, when the in-vehicle terminal starts to send the software packet name, the software packet length (i.e. the software packet size) and the software packet hash to the gateway, the gateway replies with a maximum accepted data length after affirming the corresponding, and after receiving the maximum accepted data length, the in-vehicle terminal can determine the software packet segment length of each round based on the maximum accepted data length, so that the software packet segment data, the software packet segment length and the CRC corresponding to the software packet segment are sent to the gateway in each round.
In one embodiment, as shown in fig. 3, fig. 3 is a timing diagram of a data transmission check according to one embodiment of the present invention. In fig. 3, step 1, a software package sender stores a software package name, a software package hash value, a software package size, and confirms a receiver of the software package, establishes communication with the software package receiver, and the software package receiver feeds back information to confirm that the communication between the online and transmission links of the software package receiver is correct.
And 2, the software package sender sends a software package transmission request data package to the receiver, wherein the software package transmission request data package comprises a software package name and a software package size. After receiving the data packet of the software packet transmission request, the software packet receiver analyzes the name of the software packet and the size of the software packet, and then replies positive response data, wherein the positive response data comprises the maximum received data block length n of the receiver, namely the maximum data quantity received by the receiver at one time. After receiving the positive response data, the software package sender analyzes the maximum received data length of the receiver as n, reads the software package data content with the length of n, calculates the CRC value, sends the CRC value to the receiver, and sends the data package content containing the software package data length, the software package data and the CRC value.
And 3, after receiving the first software package data, the software package receiver calculates CRC of the data, compares the CRC with CRC in the data package, replies that the sender receives successfully if the CRC is consistent, and then calculates the hash value of the software package data received at this time in parallel by the receiver and stores Chu Haxi value. If the CRC is inconsistent, the reply sender fails to receive.
And 4, after receiving the reply, if the receiver replies that the receiving is successful, reading the software package data content with n length again, and sending the software package data, the software package data length and the CRC value to the receiver. If the recipient replies failed, the transmission is retried. After receiving the data again, the receiver repeats the step of comparing CRC in the previous steps, replies the receiving result to the sender, extracts the software package data and the stored hash value, recalculates the hash value of the software package data, and saves the hash value after the calculation is completed. Step 4 is then repeated until all the software package data transmission is completed.
Step 5: the sender sends a data packet for exiting the software package transmission to the receiver, wherein the data packet for exiting the software package transmission comprises a software package name, a software package hash value and a software package length. After receiving the data packet which is withdrawn from the software package transmission, the receiver compares the length of the software package with the hash value, and if the hash values are consistent, the receiver determines that the software package transmission is completed and the verification is successful, and replies that the software package is successfully received.
In one embodiment, as shown in fig. 4, fig. 4 is a flowchart illustrating steps of a data transmission check according to an embodiment of the present invention. In fig. 4, the target data may be a software package, the software package sender may be an in-vehicle terminal in an in-vehicle system, and the software package receiver may be an in-vehicle network. First, the package sender downloads the package and stores it locally, and after the download is completed, the package name, size, and hash value are obtained. The software package sender determines the software package receiver and is connected with the software package receiver, whether the gateway is on-line is confirmed through three times of handshaking of the TCP, if the handshaking is successful, the gateway is proved to be on-line, the data link is smooth, and the software package receiver replies response data.
Secondly, the software package sender sends a software package transmission request to the software package receiver, and the data carries the software package name and the software package size; after receiving the software package transmission request, the software package receiver analyzes the software package name, the software package size, checks the self space, if the space is insufficient, clears the memory, replies a positive response, and the response data comprises 100kb of the receiving capacity of the self controller, namely the maximum receiving data length.
Then, after receiving the response, the software package sender transmits the software data package: the sender of the software package obtains the data of 100kb at most once which can be received by the receiver of the software package, opens the software package, reads the data of 100kb, and then sends the data to the receiver of the software package, wherein the sending content comprises the data length, the data and the CRC checksum of the data length and the data. After receiving the data, the software package receiver executes the calculation of the CRC value according to the data length and the data, compares the CRC value with the received CRC, and if the CRC is consistent, the software package receiver replies a positive response, simultaneously extracts the received software package data, reads the hash value stored last time as an initial value, calculates the SHA256 value of the 100kb data as a new hash value, and stores the calculated new hash value. If the CRC is inconsistent, replying to the failure of receiving, and the sender of the software package re-sends the data.
Then, after receiving the affirmative response replied by the software package receiver, the software package sender reads the 100kb data again and sends the 100kb data to the software package receiver; after receiving the data, the software package receiver compares the CRC again, if the CRC is consistent, replies a positive response, then acquires the stored SHA256 value, carries out hash calculation on the stored SHA256 value serving as the initial value of the hash calculation and the received data so as to calculate the hash value of the received data, and stores the calculation result. And repeatedly executing the steps that after receiving the affirmative response replied by the software package receiver, the software package sender reads the data again and sends the data to the software package receiver, and the software package receiver performs CRC comparison and hash value calculation until all data of the software package are sent.
Finally, the sender of the software package determines that the sending is completed, and sends a request for exiting the transmission of the software package, including the name of the software package and the hash value (e.g., SHA256 value) of the software package. After receiving the request for exiting the transmission of the software package, the software package receiver compares the final hash value (such as SHA256 value) calculated by itself with the hash value (such as SHA256 value) in the request, if the hash values are consistent, the receiving success and the integrity check success are determined, positive data is returned, and the transmission success of the software package is determined; if the data packet is inconsistent, the replying integrity check is not passed, and the transmission failure of the software packet is determined.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Based on the same inventive concept, an embodiment of the present invention provides a data transmission verification system 500. Referring to fig. 5, fig. 5 is a block diagram of a data transmission verification system according to an embodiment of the present invention. As shown in fig. 5, the system 500 includes: receiving end 501 and transmitting end 502:
The receiving end 501 is configured to receive a plurality of data segments that are sequentially sent by the sending end 502 according to a plurality of rounds, where the plurality of data segments are divided by the sending end 502 based on target data;
the receiving end 501 is configured to determine, in a first round of data transmission, a hash value corresponding to a data segment of a current round according to the data segment of the current round after the data segment of the current round is successfully received, and store the hash value;
the receiving end 501 is configured to determine, in each round of data transmission after the first round, a hash value corresponding to a data segment of the current round and a hash value corresponding to a data segment of a previous round after the data segment of the current round is successfully received, and store the hash value corresponding to the data segment of the current round until the plurality of data segments are successfully received, so as to obtain a hash value corresponding to a data segment of a last round;
the receiving end 501 is configured to receive the hash value corresponding to the target data sent by the sending end 502, and compare the hash value corresponding to the data segment of the last round with the hash value corresponding to the target data;
the receiving end 501 is configured to determine that the target data is transmitted and the verification is passed when the hash value corresponding to the target data is the same as the hash value corresponding to the data segment of the last round.
Optionally, the receiving end 501 is configured to return, to the sending end 502, a maximum data length based on a data transmission request sent by the sending end 502;
the transmitting end 502 is configured to receive the maximum data length, and determine, before each round of data transmission, a data length of a current round at least according to the maximum data length;
the sending end 502 is configured to read, for a first round, a data size of a data length of the current round from the target data, to obtain a data segment of the current round and remaining target data of the current round;
the sending end 502 is configured to read, for each round after the first round, a data amount of a data length of the current round from remaining target data of a previous round, to obtain a data segment of the current round and remaining target data of the current round, until the target data are all read;
the transmitting end 502 is configured to transmit, in each round of data transmission, a data packet of a current round to the receiving end 501; the data packet of the current round at least comprises: and the data segment of the current round.
Optionally, the data packet of the current round further includes: a check value corresponding to the data segment of the current round;
The receiving end 501 is configured to determine, in each round of data transmission, an actual check value corresponding to the data segment of the current round based on the data segment of the current round after receiving the data segment of the current round and the check value corresponding to the data segment of the current round;
the receiving end 501 is configured to compare a check value corresponding to the data segment of the current round with an actual check value corresponding to the data segment of the current round;
the receiving end 501 is configured to determine that the data segment of the current round is successfully received when the check value corresponding to the data segment of the current round is the same as the actual check value corresponding to the data segment of the current round.
Optionally, the data packet of the current round further includes: the data length of the current round; the check value corresponding to the data segment of the current round is obtained by the transmitting end through check calculation based on the data segment of the current round and the data length of the current round;
the receiving end 501 is specifically configured to perform verification calculation based on the data segment of the current round and the data length of the current round, and determine an actual verification value corresponding to the data segment of the current round.
Optionally, the verification calculation includes at least one of: CRC calculation and hash calculation.
Optionally, the sending end 502 is configured to determine, before each round of data transmission, a communication load situation with the receiving end, and/or receive a processing load situation returned by the receiving end;
the sending end 502 is specifically configured to determine the data length of the current round according to the maximum data length, and the communication load condition and/or the processing load condition.
Optionally, the sending end is an in-vehicle terminal, the receiving end is a gateway, and the target data is a software package.
Based on the same inventive concept, another embodiment of the present invention provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the data transmission verification method according to any one of the above embodiments of the present invention.
Based on the same inventive concept, another embodiment of the present invention provides an electronic device 600 as shown in fig. 6. Fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device comprises a memory 602, a processor 601 and a computer program stored in the memory and executable on the processor, which when executed implements the steps of the data transmission verification method according to any of the above embodiments of the present invention.
For system embodiments, the description is relatively simple as it is substantially similar to method embodiments, and reference is made to the description of method embodiments for relevant points.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The above description is provided for a data transmission verification method, system, electronic device and storage medium, and specific examples are applied to illustrate the principles and embodiments of the present invention, and the above description of the embodiments is only used to help understand the method and core idea of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. A method for verifying data transmission, the method comprising:
the receiving end receives a plurality of data segments which are sequentially transmitted by the transmitting end according to a plurality of rounds, wherein the data segments are formed by dividing the transmitting end based on target data;
in the first round of data transmission, after the receiving end successfully receives the data segment of the current round, determining and storing a hash value corresponding to the data segment of the current round according to the data segment of the current round;
in each round of data transmission after the first round, after the receiving end successfully receives the data segment of the current round, determining the hash value corresponding to the data segment of the current round according to the hash value corresponding to the data segment of the current round and the data segment of the last round, and storing until the plurality of data segments are successfully received, so as to obtain the hash value corresponding to the data segment of the last round;
the receiving end receives the hash value corresponding to the target data sent by the sending end, and compares the hash value corresponding to the data segment of the last round with the hash value corresponding to the target data;
and under the condition that the hash value corresponding to the target data is the same as the hash value corresponding to the data segment of the last round, the receiving end determines that the target data is transmitted and the verification is passed.
2. The data transmission verification method according to claim 1, wherein the method further comprises:
the receiving end returns the maximum data length to the sending end based on the data transmission request sent by the sending end;
the sending end receives the maximum data length, and before each round of data transmission, the data length of the current round is determined at least according to the maximum data length;
for the first round, the transmitting end reads the data size of the data length of the current round from the target data to obtain a data segment of the current round and the residual target data of the current round;
for each round after the first round, the transmitting end reads the data size of the data length of the current round from the residual target data of the previous round to obtain the data segment of the current round and the residual target data of the current round until the target data are completely read;
in each round of data transmission, the transmitting end transmits the data packet of the current round to the receiving end; the data packet of the current round at least comprises: and the data segment of the current round.
3. The data transmission verification method according to claim 2, wherein the data packet of the current round further comprises: a check value corresponding to the data segment of the current round;
The method further comprises the steps of:
in each round of data transmission, after receiving the data segment of the current round and the check value corresponding to the data segment of the current round, the receiving end determines the actual check value corresponding to the data segment of the current round based on the data segment of the current round;
the receiving end compares the check value corresponding to the data segment of the current round with the actual check value corresponding to the data segment of the current round;
and under the condition that the check value corresponding to the data segment of the current round is the same as the actual check value corresponding to the data segment of the current round, the receiving end determines that the data segment of the current round is successfully received.
4. The data transmission verification method according to claim 3, wherein the data packet of the current round further comprises: the data length of the current round; the check value corresponding to the data segment of the current round is obtained by the transmitting end through check calculation based on the data segment of the current round and the data length of the current round;
the determining the actual check value corresponding to the data segment of the current round based on the data segment of the current round includes:
And performing verification calculation based on the data segment of the current round and the data length of the current round, and determining an actual verification value corresponding to the data segment of the current round.
5. The data transmission verification method according to claim 4, wherein the verification calculation includes at least one of: CRC calculation and hash calculation.
6. The data transmission verification method according to claim 2, wherein the method further comprises:
before each round of data transmission, the sending end determines the communication load condition with the receiving end, and/or the sending end receives the processing load condition returned by the receiving end;
the determining the data length of the current round at least according to the maximum data length comprises the following steps:
and determining the data length of the current round according to the maximum data length, the communication load condition and/or the processing load condition.
7. The method for checking data transmission according to any one of claims 1 to 6, wherein the transmitting end is an in-vehicle terminal, the receiving end is a gateway, and the target data is a software package.
8. A data transmission verification system, the system comprising: receiving end and transmitting end:
The receiving end is used for receiving a plurality of data segments which are sequentially transmitted by the transmitting end according to a plurality of rounds, and the data segments are divided by the transmitting end based on target data;
the receiving end is used for determining and storing a hash value corresponding to the data segment of the current round according to the data segment of the current round after successfully receiving the data segment of the current round in the first round data transmission;
the receiving end is used for determining and storing the hash value corresponding to the data segment of the current round according to the hash value corresponding to the data segment of the current round and the data segment of the last round after successfully receiving the data segment of the current round in each round of data transmission after the first round until the plurality of data segments are successfully received, so as to obtain the hash value corresponding to the data segment of the last round;
the receiving end is used for receiving the hash value corresponding to the target data sent by the sending end and comparing the hash value corresponding to the data segment of the last round with the hash value corresponding to the target data;
the receiving end is configured to determine that the target data is transmitted and the verification passes when the hash value corresponding to the target data is the same as the hash value corresponding to the data segment of the last round.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program when executed by the processor implements a data transmission verification method according to any one of claims 1 to 7.
10. A computer readable storage medium having a computer program stored thereon, wherein the computer program when executed by a processor implements the data transmission verification method according to any one of claims 1 to 7.
CN202311248880.XA 2023-09-25 2023-09-25 Data transmission verification method, system, electronic equipment and storage medium Pending CN117201038A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311248880.XA CN117201038A (en) 2023-09-25 2023-09-25 Data transmission verification method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311248880.XA CN117201038A (en) 2023-09-25 2023-09-25 Data transmission verification method, system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117201038A true CN117201038A (en) 2023-12-08

Family

ID=88986897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311248880.XA Pending CN117201038A (en) 2023-09-25 2023-09-25 Data transmission verification method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117201038A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117979118A (en) * 2024-03-29 2024-05-03 杭州海康威视数字技术股份有限公司 Data stream recording method, device, recorder and recording system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117979118A (en) * 2024-03-29 2024-05-03 杭州海康威视数字技术股份有限公司 Data stream recording method, device, recorder and recording system

Similar Documents

Publication Publication Date Title
CN117201038A (en) Data transmission verification method, system, electronic equipment and storage medium
CN112165533B (en) Data checking and transmitting method, device, equipment, system and storage medium
EP3933573B1 (en) Zero differential upgrade method, non-volatile storage medium and electronic device
CN107425943A (en) Message data transmission method and device, electronic equipment and computer storage medium
CN110784348A (en) Firmware upgrading method and device, electronic equipment and storage medium
CN109683930A (en) Air conditioning equipment program upgrading method, device and system and household electrical appliance
CN112286565B (en) Embedded system differential upgrading method based on storage container
CN112783541B (en) Equipment upgrading method, device and server
US8581751B2 (en) Multi-cell voltage secure data encoding in hybrid vehicles
CN112803950A (en) Data compression method, device and equipment and computer storage medium
CN111966375A (en) Firmware upgrading method, system, equipment and computer readable storage medium
CN117391099B (en) Data downloading and checking method and system for smart card and storage medium
CN114518897A (en) Remote upgrading method and system for communication module
CN111147597B (en) File transmission method, terminal, electronic device and storage medium
CN116009908A (en) Device upgrading method, device, computer device and computer readable storage medium
CN110769030A (en) Method, terminal, server and storage medium for downloading file
CN101635742A (en) Downloading method and device
CN116366629A (en) File uploading and acquiring method, computer equipment and storage medium
CN112925546B (en) Multistage verification method and system for preventing vehicle-mounted ECU from refreshing errors
CN114500508A (en) Gas meter upgrading method and device and electronic equipment
CN115001623B (en) Method and device for checking vehicle-mounted electronic map data
CN116107603B (en) Firmware upgrading method and device, storage medium and electronic equipment
CN109901861B (en) Method and device for updating software of electronic control unit
CN115220750B (en) Automobile OTA upgrading method, front-row host and system
CN117873539B (en) MicroBlaze-based FPGA online upgrading method, system and 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