CN115941208B - Method, system, equipment and medium for transmitting vehicle-end file - Google Patents

Method, system, equipment and medium for transmitting vehicle-end file Download PDF

Info

Publication number
CN115941208B
CN115941208B CN202211699720.2A CN202211699720A CN115941208B CN 115941208 B CN115941208 B CN 115941208B CN 202211699720 A CN202211699720 A CN 202211699720A CN 115941208 B CN115941208 B CN 115941208B
Authority
CN
China
Prior art keywords
file
vehicle
hash value
digital signature
end file
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.)
Active
Application number
CN202211699720.2A
Other languages
Chinese (zh)
Other versions
CN115941208A (en
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.)
Guangzhou Weride Technology Co Ltd
Original Assignee
Guangzhou Weride Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Weride Technology Co Ltd filed Critical Guangzhou Weride Technology Co Ltd
Priority to CN202211699720.2A priority Critical patent/CN115941208B/en
Publication of CN115941208A publication Critical patent/CN115941208A/en
Application granted granted Critical
Publication of CN115941208B publication Critical patent/CN115941208B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method, a system, equipment and a medium for transmitting a vehicle-end file, wherein the method comprises the following steps: when a vehicle-end file in an automatic driving system is copied, a unique identifier corresponding to the vehicle-end file is created according to a preset sequence, file names are associated, the unique identifier and the file names are loaded into a meta-information file until all the vehicle-end files are copied, hash operation is carried out step by step on the vehicle-end file, a file hash value is generated, a private key is adopted to encrypt the file hash value and a column name number group corresponding to the vehicle-end file, a digital signature is generated, an object mark character string is constructed, and the meta-information file, the object mark character string and the vehicle-end file at the current moment are transmitted to a downstream terminal according to a data transmission flow. Therefore, the anti-tampering function of the vehicle-end file is realized by means of digital signature and combining with a step-by-step calculation hash value and meta-information file, and the safety of data is effectively ensured.

Description

Method, system, equipment and medium for transmitting vehicle-end file
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a method, a system, an apparatus, and a medium for transmitting a vehicle-end file.
Background
With the continuous development of technology, the automatic driving technology is mature, and in the regulation and control of an automatic driving system, a plurality of different technical teams are generally required to carry out different verification and adjustment on data so as to ensure the reliability of the automatic driving system in the driving process.
In the prior art, as a plurality of different technical teams are required to adjust data, the transmission process is numerous and the data volume is large, and the situation of data misoperation or misoperation modification can possibly occur, in this case, the misoperation is usually repaired in a manual correction mode, and the data security is difficult to effectively guarantee.
Disclosure of Invention
The invention provides a transmission method, a system, equipment and a medium of a vehicle-end file, which solve the technical problems that misoperation data are required to be manually modified in the existing data transmission process, and the data security is difficult to be effectively ensured.
The invention provides a transmission method of a vehicle-end file, which relates to an automatic driving system and a downstream terminal in a data transmission flow, and comprises the following steps:
when the vehicle-end file of the automatic driving system is copied, creating a unique identifier corresponding to the vehicle-end file according to a preset sequence, associating file names, and loading the unique identifier and the associated file names into a meta-information file until all the vehicle-end files are copied;
Performing hash operation step by step on the vehicle-end file to generate a file hash value;
encrypting the file hash value and the column name number group corresponding to the vehicle-end file by adopting a private key to generate a digital signature;
constructing an object mark character string by adopting the file hash value, the column name array and the digital signature;
and transmitting the meta information file, the object mark character string and the vehicle-end file at the current moment to a downstream terminal according to the data transmission flow.
Optionally, when the vehicle-end file of the automatic driving system is copied, creating a unique identifier corresponding to the vehicle-end file according to a preset sequence and associating a file name, and then loading the unique identifier and the associated file name into the meta-information file until all the vehicle-end files are copied, including the steps of:
when the vehicle-end file of the automatic driving system is copied, determining the current moment as the copying time;
creating unique identifiers corresponding to the vehicle-end files according to a preset sequence;
acquiring a file name and file creation time corresponding to the vehicle-end file;
and loading the unique identifier to a meta-information file, and associating the file name, the file creation time and the current copying time until all the vehicle-end files are copied.
Optionally, the vehicle-side file includes a plurality of data columns, and each data column includes a plurality of cell data; the step of performing hash operation step by step on the vehicle-end file to generate a file hash value comprises the following steps:
calculating initial hash values corresponding to the cell data respectively;
according to the number of columns to which the cell data belong, calculating an intermediate hash value corresponding to each data column by adopting each initial hash value;
and carrying out hash operation by adopting all the intermediate hash values to generate a file hash value corresponding to the vehicle-end file.
Optionally, the step of encrypting the file hash value and the column name number group corresponding to the vehicle-end file by using a private key to generate a digital signature includes:
extracting the data column names corresponding to the data columns respectively;
sequencing the data column names according to the sequence of the data columns, and constructing a column name array corresponding to the vehicle-end file;
and encrypting the file hash value and the column name data group by adopting a private key to generate a digital signature.
Optionally, the downstream terminal stores a plurality of public keys, and the method further includes:
when the downstream terminal receives the meta information file, the object mark character string and the vehicle-end file, extracting a digital signature to be verified from the object mark character string;
Analyzing the digital signature to be verified by adopting a public key corresponding to the automatic driving system to obtain a first hash value and a column name array to be verified;
performing hash operation step by step on the vehicle-end file according to the column name array to be verified to generate a second hash value;
if the first hash value is equal to the second hash value, judging that the vehicle-end file is not tampered;
and if the first hash value is not equal to the second hash value, judging that the vehicle-end file is tampered.
Optionally, the method further comprises:
when the vehicle-end file is judged not to be tampered and modification information is received, modifying the vehicle-end file according to the modification information, and determining to update the vehicle-end file and a modification data column;
performing hash operation step by step on the modified data column to generate a modified hash value;
encrypting the modified hash value, the modified column name array corresponding to the modified data column and the digital signature to be verified by adopting a private key corresponding to the downstream terminal to generate an updated digital signature;
and constructing an update object marking character string by adopting the modified hash value, the modified column name array and the update digital signature.
Optionally, the method further comprises:
when the vehicle-end file is judged not to be tampered and the modification information is not received, constructing an updated digital signature by adopting the digital signature to be verified;
and constructing an update object marking character string by adopting the update digital signature.
Optionally, the method further comprises:
if the downstream terminal is not the final terminal, transmitting the update object mark character string and the update vehicle end file to a target terminal corresponding to the downstream terminal according to the data transmission flow;
when the target terminal receives the update object mark character string and the update vehicle-end file, determining the update object mark character string as a new object mark character string, determining the target terminal as a new downstream terminal, and taking the update vehicle-end file as a new vehicle-end file;
and skipping to execute the step of extracting the digital signature to be verified from the object mark character string until the downstream terminal is a final terminal.
Optionally, the method further comprises:
if a plurality of digital signatures to be verified exist, selecting target public keys respectively corresponding to the digital signatures to be verified from a plurality of public keys according to the data transmission flow;
And the target public key is used for analyzing the digital signature to be verified.
Optionally, the method further comprises:
when judging that the vehicle-end file is not tampered and receiving a meta-information file, analyzing the meta-information file to obtain a plurality of file names;
judging whether a vehicle-end file corresponding to each file name exists or not;
if yes, adding a terminal identifier corresponding to the downstream terminal and a file receiving time corresponding to the vehicle-end file into the meta-information file;
when the downstream terminal sends the vehicle-end file, increasing file sending time corresponding to the vehicle-end file in the meta-information file;
if not, outputting an alarm signal.
The second aspect of the present invention provides a transmission system for a vehicle-end document, involving an autopilot system and a downstream terminal in a data transmission flow, the system comprising:
the meta-information loading module is used for creating unique identifiers corresponding to the vehicle-end files according to a preset sequence when the vehicle-end files of the automatic driving system are copied, and loading the unique identifiers and associated file names into the meta-information files until all the vehicle-end files are copied;
the step-by-step hash operation module is used for carrying out hash operation on the vehicle-end file step by step to generate a file hash value;
The digital signature module is used for encrypting the file hash value and the column name number group corresponding to the vehicle-end file by adopting a private key to generate a digital signature;
the character string construction module is used for constructing an object marking character string by adopting the file hash value, the column name array and the digital signature;
and the file transmission module is used for transmitting the meta information file, the object mark character string and the vehicle-end file at the current moment to a downstream terminal according to the data transmission flow.
A third aspect of the present invention provides an electronic device, including a memory and a processor, where the memory stores a computer program, where the computer program, when executed by the processor, causes the processor to execute the steps of the method for transmitting a vehicle-end file according to any one of the first aspect of the present invention.
A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed, implements a method of transmitting a vehicle-side file according to any one of the first aspects of the present invention.
From the above technical scheme, the invention has the following advantages:
when a vehicle-end file in an automatic driving system is copied, a unique identifier corresponding to the vehicle-end file is created according to a preset sequence, file names are associated, the unique identifier and the file names are loaded into a meta-information file until all the vehicle-end files are copied, hash operation is carried out step by step on the vehicle-end file, a file hash value is generated, a private key is adopted to encrypt the file hash value and a column name number group corresponding to the vehicle-end file, a digital signature is generated, an object mark character string is constructed, and the meta-information file, the object mark character string and the vehicle-end file at the current moment are transmitted to a downstream terminal according to a data transmission flow. Therefore, the anti-tampering function of the vehicle-end file is realized by means of digital signature and combining with a step-by-step calculation hash value and meta-information file, and the safety of data is effectively ensured.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained from these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a flowchart of a method for transmitting a vehicle-side file according to a first embodiment of the present invention;
fig. 2 is a flowchart of a method for transmitting a vehicle-side file according to a second embodiment of the present invention;
fig. 3 is a block diagram of a transmission system for a vehicle-end file according to a third embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a transmission method, a system, equipment and a medium of a vehicle-end file, which are used for solving the technical problems that misoperation data are required to be manually modified in the existing data transmission process, and the data security is difficult to be effectively ensured.
In order to make the objects, features and advantages of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in detail below with reference to the accompanying drawings, and it is apparent that the embodiments described below are only some embodiments of the present invention, but not all embodiments of the present 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.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for transmitting a vehicle-side file according to an embodiment of the present invention.
The invention provides a transmission method of a vehicle-end file, which relates to an automatic driving system and a downstream terminal in a data transmission flow, and comprises the following steps:
step 101, when the vehicle-end file of the automatic driving system is copied, creating a unique identifier corresponding to the vehicle-end file according to a preset sequence, associating file names, and loading the unique identifier to the meta-information file until all the vehicle-end files are copied;
the vehicle-end file refers to tabular data stored by adopting a column type storage structure and is used for storing various drive test data or sensing data of an automatic driving system in the driving process.
The data transmission flow refers to a data transmission link constructed by a plurality of terminal communication connections, for example, from an autopilot system to at least one downstream terminal or cloud.
Meta-information files are information about information that allows a server to provide information about transmitted data, such as HTTP, which may enhance transmitted object languages and objects, and meta-information may be used to implement conditional requests and report transaction completions. The browser receiving the data can determine what content the server sends, what data is expected, whether the complete data is received or not and whether errors occur in the process are determined according to the meta information, so that the client can know the type of the transmission object.
In the embodiment of the invention, when the vehicle-end file needs to be transmitted to a downstream terminal, file copying is needed in an automatic driving system, at this time, when the vehicle-end file of the automatic driving system is copied, a unique identifier corresponding to the vehicle-end file is created according to the copied sequence and in combination with a preset sequence, and after the file names of the vehicle-end files are associated, the unique identifier is sequentially loaded and stored into meta-information files until all the vehicle-end files are copied.
It should be noted that, the copying of the end file may be performed by setting a separate copying period, for example, 0 to 12 hours as a separate copying period, and when all the end files in the period are copied, the subsequent step 102 is performed.
Step 102, performing hash operation step by step on a vehicle-end file to generate a file hash value;
in the embodiment of the invention, hash operation can be carried out step by step according to the data structure of the vehicle-end file so as to generate a file hash value.
For example, after hash operation is performed from the cell data of the lowest layer, hash operation is performed according to the cell columns, and hash operation is performed on the hash value of the entire table, so as to generate a file hash value.
Step 103, encrypting the file hash value and the column name number group corresponding to the vehicle-end file by adopting a private key to generate a digital signature;
Since the vehicle-end file usually needs to be modified and processed for multiple times at the downstream terminal, after the file hash value is calculated and generated, the file hash value and the column name number group corresponding to the vehicle-end file can be encrypted by adopting a private key corresponding to the automatic driving system to generate a digital signature.
In a specific implementation, each data column in the vehicle-end file generally has a corresponding data column name, and each data column name may be used to form a column name array corresponding to the vehicle-end file.
It should be noted that a digital signature (also called public key digital signature) is a digital string that cannot be forged by others only the sender of information, and this digital string is also a valid proof for the authenticity of the information sent by the sender of information. It is a method for authenticating digital information that resembles a common physical signature written on paper, but is implemented using techniques in the field of public key cryptography. A set of digital signatures typically defines two complementary operations, one for signing and the other for verification. Digital signature is the application of asymmetric key encryption technology and digital digest technology.
104, constructing an object marking character string by adopting a file hash value, a list number group and a digital signature;
After the file hash value, the array of column names and the digital signature are generated, the three can be used to construct an object markup string, such as a json string.
Specifically, taking a file hash value of 123123123131231231, a column name array of [ "Col1", "Col2" ], a digital signature of xxejfiejifiifeh 123132131 as an example, the object tag string may be as follows:
and 105, transmitting the meta information file, the object mark character string and the vehicle-end file at the current moment to a downstream terminal according to the data transmission flow.
In the embodiment of the invention, all terminals in the data transmission flow are informed of the flow data flow, and after the meta information file, the object mark character string and the vehicle end file are obtained, the data flow can be transmitted from the automatic driving system to the downstream terminal according to the data transmission flow.
In the embodiment of the invention, when a vehicle-end file in an automatic driving system is copied, a unique identifier corresponding to the vehicle-end file is created according to a preset sequence, the file names are associated, and then the unique identifier is loaded to a meta-information file until all the vehicle-end files are copied, hash operation is carried out on the vehicle-end file step by step, a file hash value is generated, a private key is adopted to encrypt the file hash value and a column name number group corresponding to the vehicle-end file, a digital signature is generated, the file hash value, the column name number group and the digital signature are adopted, an object mark character string is constructed, and the meta-information file, the object mark character string and the vehicle-end file at the current moment are transmitted to a downstream terminal according to a data transmission flow. Therefore, the anti-tampering function of the vehicle-end file is realized by means of digital signature and combining with a step-by-step calculation hash value and meta-information file, and the safety of data is effectively ensured.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for transmitting a vehicle-side file according to a second embodiment of the present invention.
The invention provides a transmission method of a vehicle-end file, which relates to an automatic driving system and a downstream terminal in a data transmission flow, and comprises the following steps:
step 201, when the vehicle-end file of the automatic driving system is copied, creating a unique identifier corresponding to the vehicle-end file according to a preset sequence, associating file names, and loading the unique identifier to the meta-information file until all the vehicle-end files are copied;
optionally, step 201 may comprise the sub-steps of:
when the vehicle-end file of the automatic driving system is copied, determining the current moment as the copying time;
creating unique identifiers corresponding to the vehicle-end files according to a preset sequence;
acquiring a file name and file creation time corresponding to a vehicle-end file;
and loading the unique identification into the meta-information file, and associating the file name, the file creation time and the current copying time until all the vehicle-end files are copied.
In the embodiment of the invention, when the vehicle-end file of the automatic driving system is copied, the current moment can be determined as the copying time, and when each vehicle-end file is copied, the unique identifier corresponding to the vehicle-end file is increased from 1. And at the same time, acquiring the file name and the file creation time corresponding to the vehicle-end file, loading the unique identifier into the meta-information file for storage, and simultaneously establishing the association between the unique identifier and the file name, the file creation time and the current copying time. And updating the copying time when each vehicle-end file is copied until all the vehicle-end files are copied, obtaining a final meta-information file, and waiting for subsequent further data processing.
Step 202, performing hash operation step by step on a vehicle-end file to generate a file hash value;
optionally, the vehicle-side file includes a plurality of data columns, each data column including a plurality of cell data, and step 202 may include the following substeps:
calculating initial hash values respectively corresponding to the cell data;
according to the number of columns to which the cell data belong, calculating an intermediate hash value corresponding to each data column by adopting each initial hash value;
and carrying out hash operation by adopting all the intermediate hash values to generate a file hash value corresponding to the vehicle-end file.
In the embodiment of the invention, the vehicle-end file may include a plurality of data columns, each data column includes a plurality of cell data, after each vehicle-end file is obtained, hash operations such as MD5 algorithm are performed on each cell data to obtain initial hash values respectively corresponding to the cell data, and hash operations are performed by using each initial hash value according to the column number to which the cell data belongs to, so as to calculate intermediate hash values respectively corresponding to each data column. And finally, carrying out hash operation by adopting all the intermediate hash values, thereby obtaining the file hash value corresponding to the vehicle-end file.
In a specific implementation, the end file may be as shown in table 1 below:
Col1 Col2
a d
b e
c f
TABLE 1
The calculation manner of the file hash value hash0 can be as follows:
1) Calculating the hash of all the cells in Col1, namely, the hash (a), the hash (b) and the hash (c)
2) Calculation of hash of Col1 hash (Col 1) =hash (hash (a), hash (b), hash (c))
3) Calculating the hash of all the cells in Col2, namely, the hash (d), the hash (e) and the hash (f)
4) Calculation of hash of Col2 hash (Col 2) =hash (hash (d), hash (e), hash (f))
5) All columns of hashes are calculated to obtain a file hash value hash 0=hash (hash (Col 1), hash (Col 2))
Step 203, encrypting the file hash value and the column name number group corresponding to the vehicle-end file by adopting a private key to generate a digital signature;
optionally, step 203 may comprise the sub-steps of:
extracting data column names corresponding to the data columns respectively;
sequencing the data column names according to the sequence of the data columns, and constructing a column name array corresponding to the vehicle-end file;
and encrypting the file hash value and the array number group by adopting the private key to generate a digital signature.
In the embodiment of the invention, after the vehicle-end file is acquired, the data column names corresponding to each data column in the vehicle-end file can be extracted, the data column names are ordered according to the arrangement sequence of each data column, so as to construct a column name array corresponding to the vehicle-end file, and further, a private key corresponding to an automatic driving system is adopted to encrypt the file hash value and the column name array, so that a digital signature corresponding to the automatic driving system is generated.
Step 204, constructing an object mark character string by adopting the file hash value, the array of the names and the digital signature;
step 205, transmitting the meta information file, the object mark character string and the vehicle end file at the current moment to a downstream terminal according to the data transmission flow;
in the embodiment of the present invention, the specific implementation process of steps 204-205 may refer to steps 104-105, which are not described herein.
The downstream terminal stores a plurality of public keys, and the method further comprises:
step 206, when the downstream terminal receives the meta information file, the object mark character string and the vehicle end file, extracting the digital signature to be verified from the object mark character string;
step 207, analyzing the digital signature to be verified by adopting a public key corresponding to the automatic driving system to obtain a first hash value and a column name array to be verified;
in the embodiment of the invention, the downstream terminal can be various terminal devices or cloud servers, and the like, when the downstream terminal receives the meta-information file, the object mark character string and the vehicle-end file, the digital signature to be verified can be extracted from the object mark character string, the public key corresponding to the upstream is selected from the multiple public keys stored in the downstream terminal, and at the moment, the public key corresponding to the automatic driving system is adopted to analyze the digital signature to be verified, so that a first hash value and a corresponding array of the column names to be verified are obtained.
Step 208, performing hash operation step by step on the vehicle-end file according to the array of column names to be verified, and generating a second hash value;
after the to-be-verified column name array is obtained, a corresponding data column can be selected from the vehicle-end file according to the data column names contained in the to-be-verified column name array, hash operation is performed step by step from the cell according to the sequence of the cell-data column, and a second hash value is generated.
If the array of the column names to be verified is all the data columns in the vehicle-end file, after the hash value of each data column is calculated, hash operation is further performed on all the hash values to obtain a second hash value.
Step 209, if the first hash value is equal to the second hash value, determining that the client file is not tampered;
in step 210, if the first hash value is not equal to the second hash value, it is determined that the end file has been tampered.
Further, the method comprises the following steps S11-S14:
s11, when the vehicle-end file is judged not to be tampered and modification information is received, modifying the vehicle-end file according to the modification information, and determining to update the vehicle-end file and a modification data column;
in the embodiment of the invention, if the downstream terminal judges that the vehicle-end file is not tampered and receives the modification information, the user of the downstream terminal needs to modify the vehicle-end file at the moment, and the vehicle-end file can be modified according to the modification information to generate an updated vehicle-end file and a modification data column.
It should be noted that, the modified data column refers to a data column modified in response to modification information, where the modification information may be to modify the content of a certain data column or add a new data column based on the original vehicle-end file.
S12, carrying out hash operation step by step on the modified data column to generate a modified hash value;
after the modified data column is determined, since the downstream terminal modifies the vehicle-end file, a step-by-step hash operation can be performed on the modified data column to generate a modified hash value.
S13, encrypting the modified hash value, the modified column name array corresponding to the modified data column and the digital signature to be verified by adopting a private key corresponding to the downstream terminal, and generating an updated digital signature;
s14, constructing an update object marking character string by adopting the modified hash value, the modified column name array and the update digital signature.
The modified column name array is an array formed by a number of column names corresponding to the modified data columns.
After calculating the modified hash value corresponding to the modified data column, the modified hash value, the modified column name array corresponding to the modified data column and the digital signature to be verified can be further encrypted by adopting the private key corresponding to the downstream terminal to generate an updated digital signature, and the modified hash value, the modified column name array and the updated data signature are adopted again to construct an updated object mark character string.
For example, when the modified hash value is "223123123131231231", the modified column name array is "[" Col3"]", the updated number signature is "xxejfiejifiifeh 123132132", the constructed updated object tag string json string is:
optionally, the method further comprises the steps of:
when the vehicle-end file is judged not to be tampered and the modification information is not received, constructing an updated digital signature by adopting the digital signature to be verified;
and constructing an update object marking character string by adopting the update digital signature.
Specifically, since the modification information is not received, the modification hash value is null at this time, the modification list number group is also null, and after the downstream terminal signs the digital signature to be verified, the updated digital signature is obtained as "xxejfiejifieh 123132133", and then the constructed updated object mark character string json character string is:
further, the method comprises the following steps S21-S23:
s21, if the downstream terminal is not the final terminal, transmitting the update object mark character string and the update vehicle end file to a target terminal corresponding to the downstream terminal according to a data transmission flow;
s22, when the target terminal receives the update object mark character string and the update vehicle end file, determining the update object mark character string as a new object mark character string, determining the target terminal as a new downstream terminal, and taking the update vehicle end file as a new vehicle end file;
S23, the step of extracting the digital signature to be verified from the object mark character string is carried out in a jumping mode until the downstream terminal is the final terminal.
In one example of the invention, the method further comprises the steps of:
if a plurality of digital signatures to be verified exist, selecting target public keys corresponding to the digital signatures to be verified respectively from a plurality of public keys according to a data transmission flow;
and the target public key is used for analyzing the digital signature to be verified.
In the embodiment of the invention, the downstream terminal of each stage knows all nodes and public keys on the whole data transmission flow pipeline, and sequentially analyzes the digital signature to obtain a hash, a column name array and possibly a higher-stage digital signature (the pipeline has three or more stages in total). The hash and column name array are verified using the method described above in steps 206-210, and if there is a higher level digital signature, the higher level public key continues to be used to parse the digital signature.
Optionally, the method further comprises the following steps S31-S35:
s31, when judging that the vehicle-end file is not tampered and receiving the meta-information file, analyzing the meta-information file to obtain a plurality of file names;
s32, judging whether a vehicle-end file corresponding to each file name exists or not;
S33, if yes, adding a terminal identifier corresponding to a downstream terminal and file receiving time corresponding to a vehicle-end file into the meta-information file;
s34, when the downstream terminal sends the vehicle-end file, increasing the file sending time corresponding to the vehicle-end file in the meta-information file;
and S35, if not, outputting an alarm signal.
In the embodiment of the invention, after judging that the vehicle-end file is not tampered, as a plurality of vehicle-end files possibly exist at the same time, analyzing the meta-information file after receiving the meta-information file at the moment to obtain a plurality of file names, further judging whether the vehicle-end file exists according to one-to-one comparison of the file names and the vehicle-end file, if the vehicle-end file corresponding to each file name exists after the comparison, indicating that the upstream terminal does not prune the vehicle-end file at the moment, and increasing the terminal identification corresponding to the downstream terminal and the file receiving time corresponding to the vehicle-end file in the meta-information file. If the comparison shows that any vehicle-end file does not exist, an alarm signal can be output to the cloud.
Further, if the downstream terminal checks that the vehicle-end files exist, if the downstream terminal needs to further transmit the vehicle-end files, the file transmitting time corresponding to each vehicle-end file can be increased in the meta-information file.
After the alarm signal is output, the meta information file can be checked section by section according to the data transmission flow to determine the position between two terminals where the vehicle-end file is lost, the corresponding terminal can be informed to resend the vehicle-end file, and if the vehicle-end file is lost for many times, the cloud end is reported again to inform the technician to further maintain.
In a specific implementation, if multiple terminal ends are required to be passed through by multiple vehicle end files, the implementation may be as follows.
1) After receiving the file, the uploading client (or each link through which the file passes) checks each file in the meta-information to confirm whether the file exists, if not, the alarm is given, otherwise, the meta-information file is updated, and the receiving time of the uploading client is increased (client identification). If the file passes through a plurality of terminals, the identification and the receiving time of each terminal are correspondingly increased.
2) When uploading files, the uploading client uploads each file listed in the meta-information, and each time a file is uploaded, the uploading client increases in the meta-information (client identification, client uploading time). If the file passes through a plurality of terminals, the identification and uploading time of each terminal are correspondingly increased.
3) And uploading the meta-information files at the same time after all the files are uploaded.
In a specific implementation, the final terminal of the data transmission flow is usually a cloud terminal, and after the cloud terminal is in the file, the received vehicle-end file is checked according to the meta-information file, and whether all the vehicle-end files exist or not. If not, an alarm is output.
In the embodiment of the invention, when a vehicle-end file in an automatic driving system is copied, a unique identifier corresponding to the vehicle-end file is created according to a preset sequence, the file names are associated, and then the unique identifier is loaded to a meta-information file until all the vehicle-end files are copied, hash operation is carried out on the vehicle-end file step by step, a file hash value is generated, a private key is adopted to encrypt the file hash value and a column name number group corresponding to the vehicle-end file, a digital signature is generated, the file hash value, the column name number group and the digital signature are adopted, an object mark character string is constructed, and the meta-information file, the object mark character string and the vehicle-end file at the current moment are transmitted to a downstream terminal according to a data transmission flow. Therefore, the anti-tampering function of the vehicle-end file is realized by means of digital signature and combining with a step-by-step calculation hash value and meta-information file, and the safety of data is effectively ensured.
Referring to fig. 3, fig. 3 is a block diagram of a transmission system for a vehicle-end file according to a third embodiment of the present invention.
The embodiment of the invention provides a transmission system of a vehicle-end file, which relates to an automatic driving system and a downstream terminal in a data transmission flow, and comprises the following components:
the meta information loading module 301 is configured to create unique identifiers corresponding to the end files according to a preset sequence and associate file names when the end files of the autopilot system are copied, and then load the unique identifiers to the meta information files until all the end files are copied;
the step-by-step hash operation module 302 is configured to perform hash operation on the vehicle-end file step by step to generate a file hash value;
the digital signature module 303 is configured to encrypt the file hash value and the column name number group corresponding to the vehicle-end file by using a private key, so as to generate a digital signature;
a string construction module 304, configured to construct an object tag string by using the file hash value, the column name array and the digital signature;
the file transmission module 305 is configured to transmit the meta information file, the object tag string, and the terminal file at the current time to the downstream terminal according to the data transmission flow.
Optionally, the meta information loading module 301 is specifically configured to:
When the vehicle-end file of the automatic driving system is copied, determining the current moment as the copying time;
creating unique identifiers corresponding to the vehicle-end files according to a preset sequence;
acquiring a file name and file creation time corresponding to a vehicle-end file;
and loading the unique identification into the meta-information file, and associating the file name, the file creation time and the current copying time until all the vehicle-end files are copied.
Optionally, the vehicle-side file includes a plurality of data columns, each data column including a plurality of cell data; the step-by-step hash operation module 302 is specifically configured to:
calculating initial hash values respectively corresponding to the cell data;
according to the number of columns to which the cell data belong, calculating an intermediate hash value corresponding to each data column by adopting each initial hash value;
and carrying out hash operation by adopting all the intermediate hash values to generate a file hash value corresponding to the vehicle-end file.
Optionally, the digital signature module 303 is specifically configured to:
extracting data column names corresponding to the data columns respectively;
sequencing the data column names according to the sequence of the data columns, and constructing a column name array corresponding to the vehicle-end file;
and encrypting the file hash value and the array number group by adopting the private key to generate a digital signature.
Optionally, the downstream terminal stores a plurality of public keys, and the system further includes:
the signature extraction module is used for extracting a digital signature to be verified from the object mark character string when the downstream terminal receives the meta information file, the object mark character string and the vehicle-end file;
the signature analysis module is used for analyzing the digital signature to be verified by adopting a public key corresponding to the automatic driving system to obtain a first hash value and a column name array to be verified;
the second hash value calculation module is used for carrying out hash operation on the vehicle-end file step by step according to the array of the column names to be verified to generate a second hash value;
the first judging module is used for judging that the vehicle-end file is not tampered if the first hash value is equal to the second hash value;
and the second judging module is used for judging that the vehicle-end file is tampered if the first hash value is not equal to the second hash value.
Optionally, the system further comprises:
the vehicle-end file modification module is used for modifying the vehicle-end file according to the modification information when the vehicle-end file is judged not to be tampered and the modification information is received, and determining to update the vehicle-end file and the modification data column;
the modified hash calculation module is used for carrying out hash operation on the modified data sequence step by step to generate a modified hash value;
The first signature updating module is used for encrypting the modified hash value, the modified column name array corresponding to the modified data column and the digital signature to be verified by adopting a private key corresponding to the downstream terminal to generate an updated digital signature;
the first updating character string construction module is used for constructing an updating object marking character string by adopting the modified hash value, the modified column name array and the updating digital signature.
Optionally, the system further comprises:
the second signature updating module is used for constructing an updated digital signature by adopting the digital signature to be verified when the vehicle-end file is judged not to be tampered and the modification information is not received;
and the second updating character string construction module is used for constructing the updating object marking character string by adopting the updating digital signature.
Optionally, the system further comprises:
the transmission module is used for transmitting the update object mark character string and the update vehicle end file to the target terminal corresponding to the downstream terminal according to the data transmission flow if the downstream terminal is not the final terminal;
the file resetting module is used for determining the update object mark character string as a new object mark character string, determining the target terminal as a new downstream terminal and taking the update vehicle end file as a new vehicle end file when the target terminal receives the update object mark character string and the update vehicle end file;
And the circulation module is used for jumping to execute the step of extracting the digital signature to be verified from the object mark character string until the downstream terminal is the final terminal.
Optionally, the system further comprises:
the target public key selection module is used for selecting target public keys corresponding to the digital signatures to be verified respectively from multiple public keys according to a data transmission flow if the digital signatures to be verified exist;
and the target public key is used for analyzing the digital signature to be verified.
Optionally, the system further comprises:
the meta information file analysis module is used for analyzing the meta information file to obtain a plurality of file names when judging that the vehicle-end file is not tampered and receiving the meta information file;
the file existence judging module is used for judging whether a vehicle-end file corresponding to each file name exists or not;
the meta information file updating module is used for adding a terminal identifier corresponding to a downstream terminal and file receiving time corresponding to a vehicle-end file into the meta information file if the meta information file is the same;
the file sending time increasing module is used for increasing the file sending time corresponding to the vehicle-end file in the meta-information file when the downstream terminal sends the vehicle-end file;
and the alarm output module is used for outputting an alarm signal if not.
The embodiment of the invention also provides electronic equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the computer program when executed by the processor causes the processor to execute the steps of the method for transmitting the vehicle-end file according to any one of the first aspect of the invention.
An embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed, implements a method for transmitting a vehicle-side file according to any one of the first aspects of the present invention.
It will be clear to those skilled in the art that, for convenience and brevity of description, the specific working procedures of the above-described system and module may refer to the corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods may be implemented in other ways. For example, the system embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, system or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (12)

1. The method for transmitting the vehicle-end file is characterized by relating to an automatic driving system and a downstream terminal in a data transmission flow, and comprises the following steps:
when the vehicle-end file of the automatic driving system is copied, creating a unique identifier corresponding to the vehicle-end file according to a preset sequence, associating file names, and loading the unique identifier and the associated file names into a meta-information file until all the vehicle-end files are copied; the vehicle-end file comprises a plurality of data columns;
performing hash operation step by step on the vehicle-end file to generate a file hash value;
encrypting the file hash value and the column name number group corresponding to the vehicle-end file by adopting a private key to generate a digital signature; the column name array is an array formed by data column names corresponding to the data columns respectively;
Constructing an object mark character string by adopting the file hash value, the column name array and the digital signature;
transmitting the meta information file, the object mark character string and the vehicle-end file at the current moment to the downstream terminal according to the data transmission flow;
the downstream terminal stores a plurality of public keys, and the method further comprises:
when the downstream terminal receives the meta information file, the object mark character string and the vehicle-end file, extracting a digital signature to be verified from the object mark character string;
analyzing the digital signature to be verified by adopting a public key corresponding to the automatic driving system to obtain a first hash value and a column name array to be verified;
performing hash operation step by step on the vehicle-end file according to the column name array to be verified to generate a second hash value;
if the first hash value is equal to the second hash value, judging that the vehicle-end file is not tampered;
and if the first hash value is not equal to the second hash value, judging that the vehicle-end file is tampered.
2. The method according to claim 1, wherein when the vehicle-end file of the automatic driving system is copied, the steps of creating unique identifiers corresponding to the vehicle-end files in a preset order, associating file names, and then loading the unique identifiers to meta-information files until all the vehicle-end files are copied include:
When the vehicle-end file of the automatic driving system is copied, determining the current moment as the copying time;
creating unique identifiers corresponding to the vehicle-end files according to a preset sequence;
acquiring a file name and file creation time corresponding to the vehicle-end file;
and loading the unique identifier to a meta-information file, and associating the file name, the file creation time and the current copying time until all the vehicle-end files are copied.
3. The method of claim 1, wherein each of the data columns comprises a plurality of cell data; the step of performing hash operation step by step on the vehicle-end file to generate a file hash value comprises the following steps:
calculating initial hash values corresponding to the cell data respectively;
according to the number of columns to which the cell data belong, calculating an intermediate hash value corresponding to each data column by adopting each initial hash value;
and carrying out hash operation by adopting all the intermediate hash values to generate a file hash value corresponding to the vehicle-end file.
4. A method according to claim 3, wherein the step of encrypting the file hash value and the corresponding array of column names of the vehicle-side file using a private key to generate a digital signature comprises:
Extracting the data column names corresponding to the data columns respectively;
sequencing the data column names according to the sequence of the data columns, and constructing a column name array corresponding to the vehicle-end file;
and encrypting the file hash value and the column name data group by adopting a private key to generate a digital signature.
5. The method according to claim 1, wherein the method further comprises:
when the vehicle-end file is judged not to be tampered and modification information is received, modifying the vehicle-end file according to the modification information, and determining to update the vehicle-end file and a modification data column;
performing hash operation step by step on the modified data column to generate a modified hash value;
encrypting the modified hash value, the modified column name array corresponding to the modified data column and the digital signature to be verified by adopting a private key corresponding to the downstream terminal to generate an updated digital signature;
and constructing an update object marking character string by adopting the modified hash value, the modified column name array and the update digital signature.
6. The method of claim 5, wherein the method further comprises:
when the vehicle-end file is judged not to be tampered and the modification information is not received, constructing an updated digital signature by adopting the digital signature to be verified;
And constructing an update object marking character string by adopting the update digital signature.
7. The method according to claim 5 or 6, characterized in that the method further comprises:
if the downstream terminal is not the final terminal, transmitting the update object mark character string and the update vehicle end file to a target terminal corresponding to the downstream terminal according to the data transmission flow;
when the target terminal receives the update object mark character string and the update vehicle-end file, determining the update object mark character string as a new object mark character string, determining the target terminal as a new downstream terminal, and taking the update vehicle-end file as a new vehicle-end file;
and skipping to execute the step of extracting the digital signature to be verified from the object mark character string until the downstream terminal is a final terminal.
8. The method of claim 7, wherein the method further comprises:
if a plurality of digital signatures to be verified exist, selecting target public keys respectively corresponding to the digital signatures to be verified from a plurality of public keys according to the data transmission flow;
and the target public key is used for analyzing the digital signature to be verified.
9. The method of claim 5, wherein the method further comprises:
when judging that the vehicle-end file is not tampered and receiving a meta-information file, analyzing the meta-information file to obtain a plurality of file names;
judging whether a vehicle-end file corresponding to each file name exists or not;
if yes, adding a terminal identifier corresponding to the downstream terminal and a file receiving time corresponding to the vehicle-end file into the meta-information file;
when the downstream terminal sends the vehicle-end file, increasing file sending time corresponding to the vehicle-end file in the meta-information file;
if not, outputting an alarm signal.
10. A transmission system for a vehicle-side document, which relates to an automatic driving system and a downstream terminal in a data transmission flow, the system comprising:
the meta-information loading module is used for creating unique identifiers corresponding to the vehicle-end files according to a preset sequence when the vehicle-end files of the automatic driving system are copied, and loading the unique identifiers and associated file names into the meta-information files until all the vehicle-end files are copied; the vehicle-end file comprises a plurality of data columns;
the step-by-step hash operation module is used for carrying out hash operation on the vehicle-end file step by step to generate a file hash value;
The digital signature module is used for encrypting the file hash value and the column name number group corresponding to the vehicle-end file by adopting a private key to generate a digital signature; the column name array is an array formed by data column names corresponding to the data columns respectively;
the character string construction module is used for constructing an object marking character string by adopting the file hash value, the column name array and the digital signature;
the file transmission module is used for transmitting the meta information file, the object mark character string and the vehicle-end file at the current moment to a downstream terminal according to the data transmission flow;
the downstream terminal stores a plurality of public keys, and the system further comprises:
the signature extraction module is used for extracting a digital signature to be verified from the object mark character string when the downstream terminal receives the meta information file, the object mark character string and the vehicle-end file;
the signature analysis module is used for analyzing the digital signature to be verified by adopting a public key corresponding to the automatic driving system to obtain a first hash value and a column name array to be verified;
the second hash value calculation module is used for carrying out hash operation on the vehicle-end file step by step according to the array of column names to be verified to generate a second hash value;
The first judging module is used for judging that the vehicle-end file is not tampered if the first hash value is equal to the second hash value;
and the second judging module is used for judging that the vehicle-end file is tampered if the first hash value is not equal to the second hash value.
11. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the method for transmitting a peer file according to any one of claims 1-9.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed, implements a method of transmitting a vehicle-side file according to any one of claims 1-9.
CN202211699720.2A 2022-12-28 2022-12-28 Method, system, equipment and medium for transmitting vehicle-end file Active CN115941208B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211699720.2A CN115941208B (en) 2022-12-28 2022-12-28 Method, system, equipment and medium for transmitting vehicle-end file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211699720.2A CN115941208B (en) 2022-12-28 2022-12-28 Method, system, equipment and medium for transmitting vehicle-end file

Publications (2)

Publication Number Publication Date
CN115941208A CN115941208A (en) 2023-04-07
CN115941208B true CN115941208B (en) 2024-04-02

Family

ID=86654052

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211699720.2A Active CN115941208B (en) 2022-12-28 2022-12-28 Method, system, equipment and medium for transmitting vehicle-end file

Country Status (1)

Country Link
CN (1) CN115941208B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016127516A1 (en) * 2015-02-13 2016-08-18 中兴通讯股份有限公司 File signature method for operating system, file check method, and apparatus
CN113098691A (en) * 2021-03-25 2021-07-09 北京百度网讯科技有限公司 Digital signature method, signature information verification method, related device and electronic equipment
CN113556232A (en) * 2021-06-30 2021-10-26 东风汽车集团股份有限公司 Signature checking method for vehicle cloud communication and file transmission
CN114329622A (en) * 2021-12-20 2022-04-12 北京信安世纪科技股份有限公司 File protection method, verification method, device, equipment and medium
CN114528250A (en) * 2021-12-31 2022-05-24 广州文远知行科技有限公司 Data storage method, device and equipment based on object storage and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016127516A1 (en) * 2015-02-13 2016-08-18 中兴通讯股份有限公司 File signature method for operating system, file check method, and apparatus
CN113098691A (en) * 2021-03-25 2021-07-09 北京百度网讯科技有限公司 Digital signature method, signature information verification method, related device and electronic equipment
CN113556232A (en) * 2021-06-30 2021-10-26 东风汽车集团股份有限公司 Signature checking method for vehicle cloud communication and file transmission
CN114329622A (en) * 2021-12-20 2022-04-12 北京信安世纪科技股份有限公司 File protection method, verification method, device, equipment and medium
CN114528250A (en) * 2021-12-31 2022-05-24 广州文远知行科技有限公司 Data storage method, device and equipment based on object storage and storage medium

Also Published As

Publication number Publication date
CN115941208A (en) 2023-04-07

Similar Documents

Publication Publication Date Title
US10157295B2 (en) System and method for file authenticity certification using blockchain network
CN110785760B (en) Method and system for registering digital documents
CN109542888B (en) Data modification and synchronization method, device, equipment and storage medium of block chain
CN107171810B (en) Verification method and device of block chain
CN107426165B (en) Bidirectional secure cloud storage data integrity detection method supporting key updating
CN111163182B (en) Block chain-based device registration method and apparatus, electronic device, and storage medium
CN112699081A (en) File self-certification method and device based on block chain
CN110321735B (en) Business handling method, system and storage medium based on zero knowledge certification
CN110399424B (en) Block generation method, block generation device, block chain node and storage medium
WO2018165940A1 (en) A system and method for controlling a ledger of transactions
US20190288847A1 (en) Industrial data verification using secure, distributed ledger
CN109784870B (en) Contract management method, contract management device, computer equipment and computer readable storage medium
US20190207748A1 (en) Blockchain storage device
CN110599346A (en) Block chain information acquisition method and related equipment
US10511445B1 (en) Signature compression for hash-based signature schemes
CN112988667A (en) Data storage method and device based on block chain network
CN111339551B (en) Data verification method and related device and equipment
He et al. Public integrity auditing for dynamic regenerating code based cloud storage
CN113448817A (en) Page screen recording method and device and storage medium
CN107733898A (en) A kind of data based on chain of evidence save implementation method, system and equipment from damage
CN111209600A (en) Block chain-based data processing method and related product
CN115941208B (en) Method, system, equipment and medium for transmitting vehicle-end file
CN117371002A (en) Model encryption method, model decryption method, encryption device, and readable storage medium
US20230075524A1 (en) Signature control method, non-transitory computer-readable storage medium for storing signature control program, and information processing device
CN112559546B (en) Database synchronization method, database synchronization device, computer equipment and readable 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
GR01 Patent grant
GR01 Patent grant