CN115941208A - 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
CN115941208A
CN115941208A CN202211699720.2A CN202211699720A CN115941208A CN 115941208 A CN115941208 A CN 115941208A CN 202211699720 A CN202211699720 A CN 202211699720A CN 115941208 A CN115941208 A CN 115941208A
Authority
CN
China
Prior art keywords
file
vehicle
hash value
digital signature
vehicle end
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.)
Granted
Application number
CN202211699720.2A
Other languages
Chinese (zh)
Other versions
CN115941208B (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

Images

Landscapes

  • Storage Device Security (AREA)

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 the automatic driving system is copied, a unique identification corresponding to the vehicle end file is created according to a preset sequence, the unique identification is associated with the file name and then loaded to a meta information file until all the vehicle end files are copied, hash operation is performed on the vehicle end file step by step to generate a file hash value, a private key is used for encrypting the file hash value and a list name number group corresponding to the vehicle end file to generate a digital signature, an object marking character string is constructed by using the file hash value, the list name number group and the digital signature, and the meta information file, the object marking 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 digital signature and combination of the way of calculating the hash value and the meta information file step by step, and the safety of data is effectively ensured.

Description

Method, system, equipment and medium for transmitting vehicle-end file
Technical Field
The invention relates to the technical field of data transmission, in particular to a method, a system, equipment and a medium for transmitting a vehicle-end file.
Background
With the continuous development of science and technology, the automatic driving technology is more mature, and in the regulation and control of the automatic driving system, different verification and adjustment are usually required to be carried out on data by a plurality of different technical teams so as to ensure the reliability of the automatic driving system in the driving process.
In the prior art, due to the fact that a plurality of different technical teams are needed to adjust data, the transmission process is numerous, the data volume is large, the situation of data error input or error modification can occur, the misoperation of the data is usually repaired through a manual correction mode under the situation, and the data safety is difficult to effectively guarantee.
Disclosure of Invention
The invention provides a transmission method, a transmission system, transmission equipment and a transmission medium of a vehicle-end file, and solves the technical problem that data safety is difficult to effectively ensure because data which is misoperated needs to be modified manually in the existing data transmission process.
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 process, and comprises the following steps:
when the vehicle end files of the automatic driving system are copied, creating unique identifications corresponding to the vehicle end files according to a preset sequence, associating file names and loading the unique identifications to a meta-information file until all the vehicle end files are copied;
carrying out Hash operation on the vehicle-end file step by step to generate a file Hash value;
encrypting the file hash value and the array name number group corresponding to the vehicle-end file by using a private key to generate a digital signature;
constructing an object marker character string by adopting the file hash value, the array of the column names and the digital signature;
and transmitting the meta information file, the object marking 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, associating a file name, and loading the unique identifier to the meta information file until all the vehicle end files are copied, where the step includes:
when the vehicle end file of the automatic driving system is copied, determining the current moment as the copying time;
creating a unique identifier corresponding to the vehicle end file 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-end file includes a plurality of data columns, and each data column includes a plurality of cell data; the step of performing hash operation on the vehicle-end file step by step to generate a file hash value comprises the following steps:
calculating initial hash values corresponding to the cell data respectively;
calculating a middle hash value corresponding to each data column by adopting each initial hash value according to the number of the columns to which the cell data belong;
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 array name array corresponding to the vehicle-side file by using a private key to generate a digital signature includes:
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 name number 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 marking character string and the vehicle end file, extracting a digital signature to be verified from the object marking character string;
adopting a public key corresponding to the automatic driving system to analyze the digital signature to be verified to obtain a first hash value and a list name array to be verified;
carrying out hash operation on the vehicle-end file step by step according to the array name number 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 an updated vehicle end file and a modified data column;
carrying out hash operation on the modified data sequence step by step 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 using a private key corresponding to the downstream terminal to generate an updated digital signature;
and constructing an updating object marker character string by adopting the modified hash value, the modified column name array and the updating 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, establishing an updated digital signature by using the digital signature to be verified;
and constructing an updating object mark character string by adopting the updating digital signature.
Optionally, the method further comprises:
if the downstream terminal is not the final terminal, transmitting the updated object marker character string and the updated vehicle end file to a target terminal corresponding to the downstream terminal according to the data transmission flow;
when the target terminal receives the updated object marker character string and the updated vehicle end file, determining the updated object marker character string as a new object marker character string, determining the target terminal as a new downstream terminal, and taking the updated 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 marker character string until the downstream terminal is the final terminal.
Optionally, the method further comprises:
if a plurality of digital signatures to be verified exist, selecting a target public key corresponding to each digital signature to be verified from the plurality of public keys according to the data transmission process;
and the target public key is used for analyzing the digital signature to be verified.
Optionally, the method further comprises:
when the vehicle-end file is judged not to be tampered and a meta-information file is received, analyzing the meta-information file to obtain a plurality of file names;
judging whether vehicle end files corresponding to the file names exist or not;
if yes, adding a terminal identifier corresponding to the downstream terminal and file receiving time corresponding to the vehicle end file in the meta information file;
when the downstream terminal sends the vehicle end file, adding file sending time corresponding to the vehicle end file in the meta information file;
if not, an alarm signal is output.
The invention provides a transmission system of vehicle end files, which relates to an automatic driving system and a downstream terminal in a data transmission process, and comprises the following components:
the meta-information loading module is used for creating a unique identifier corresponding to the vehicle-end file according to a preset sequence and loading the unique identifier to the meta-information file after associating file names when the vehicle-end file of the automatic driving system is copied until all the vehicle-end files are copied;
the step-by-step Hash operation module is used for performing 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 array name array 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 marking character string and the vehicle end file at the current moment to a downstream terminal according to the data transmission process.
A third aspect of the present invention provides an electronic device, including a memory and a processor, where 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-side 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 the method of transmitting a vehicle-end file according to any one of the first aspects of the present invention.
According to the technical scheme, the invention has the following advantages:
when a vehicle end file in the automatic driving system is copied, a unique identification corresponding to the vehicle end file is created according to a preset sequence, the unique identification is associated with the file name and then loaded to a meta information file until all the vehicle end files are copied, hash operation is performed on the vehicle end file step by step to generate a file hash value, a private key is used for encrypting the file hash value and a list name number group corresponding to the vehicle end file to generate a digital signature, an object marking character string is constructed by using the file hash value, the list name number group and the digital signature, and the meta information file, the object marking 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 digital signature and combination of the way of calculating the hash value and the meta information file step by step, and the safety of data is effectively ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating steps of a method for transmitting a vehicle-side file according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps 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 vehicle-side files according to a third embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a transmission method, a transmission system, transmission equipment and a transmission medium of a vehicle-end file, which are used for solving the technical problem that the data security is difficult to effectively ensure because the data which are subjected to misoperation need to be modified manually in the existing data transmission process.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for transmitting a vehicle-end 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 process, and comprises the following steps:
step 101, when a vehicle end file of an 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 a 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 types of drive test data or sensing data of the automatic driving system in the driving process.
The data transmission process refers to a data transmission link constructed by a plurality of terminal communication connections, such as from an autopilot system to at least one downstream terminal or cloud.
The meta information file is information about information that allows the server to provide information about the transmitted data, such as HTTP, to enhance the transmitted object language and objects, and also to implement conditional requests and report transaction completions with meta information. The browser receiving the data can determine what content the server sends, what data is expected, whether the complete data is received, and whether there is an error in the process 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, the file copying needs to be carried out in the automatic driving system at first, at this time, when the vehicle end file of the automatic driving system is copied, the unique identifier corresponding to the vehicle end file is created according to the copied sequence and the preset sequence, and after the file name of the vehicle end file is associated, the unique identifier is sequentially loaded and stored to the meta information file until all the vehicle end files are copied.
Note that the replication of the vehicle-side files may be performed in such a manner that a separate replication cycle is set, for example, 0 hour-12 hours is set as the separate replication cycle, and after all the vehicle-side files in the cycle are replicated, the subsequent step 102 is performed.
Step 102, carrying out hash operation on the vehicle-end file step by step to generate a file hash value;
in the embodiment of the invention, hash operation can be performed on the vehicle-end file step by step according to the data structure of the vehicle-end file so as to generate the file hash value.
For example, after the hash operation is performed on the cell data of the lowest layer, the hash operation is performed on the cell rows, and the hash value of the entire table is further subjected to the hash operation to generate the file hash value.
103, encrypting the hash value of the file and the array name number group corresponding to the vehicle-end file by using a private key to generate a digital signature;
because the vehicle-end file generally needs to be modified and data processed at the downstream terminal for multiple times, after the hash value of the file is generated through calculation, the hash value of the file and the array name number group corresponding to the vehicle-end file can be encrypted by adopting a private key corresponding to an automatic driving system, and a digital signature is generated.
In a specific implementation, each data column in the vehicle-end file generally has a corresponding data column name, and a column name array corresponding to the vehicle-end file may be formed by using each data column name.
It should be noted that a digital signature (also called a public key digital signature) is a digital string that can only be generated by a sender of information and cannot be forged by others, and the digital string is also a valid proof of the authenticity of the information sent by the sender of the information. It is a method for authenticating digital information that is similar to 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. The digital signature is an application of asymmetric key encryption technology and digital digest technology.
104, constructing an object marker character string by adopting a file hash value, a column name array and a digital signature;
after the file hash value, the array of column names, and the digital signature are generated, the object marker string can be constructed using the three, for example, a json string.
Specifically, taking the file hash value as 123123123123131231231, the column name arrays as [ "Col1", "Col2" ], and the digital signature as xxejfiejifieh 123132131 as an example, the object marker string may be as follows:
Figure BDA0004023584120000071
and 105, transmitting the meta information file, the object marking 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 process know all data flow directions of the process, and can transmit the data to downstream terminals from the automatic driving system according to the data transmission process after obtaining the meta information file, the object marking character string and the vehicle end file.
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 unique identifier is associated with the file name and then loaded to a meta information file until all the vehicle end files are copied, hash operation is performed on the vehicle end file step by step to generate a file hash value, a private key is used for encrypting the file hash value and a column name number group corresponding to the vehicle end file to generate a digital signature, the file hash value, the column name number group and the digital signature are used for constructing an object marking character string, and the meta information file, the object marking 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 digital signature and combination of the way of calculating the hash value and the meta information file step by step, and the safety of data is effectively ensured.
Referring to fig. 2, fig. 2 is a flowchart illustrating a step of 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 process, and comprises the following steps:
step 201, when a vehicle end file of an 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 a meta-information file until all the vehicle end files are copied;
optionally, step 201 may comprise the following sub-steps:
when a vehicle end file of the automatic driving system is copied, determining the current moment as the copying time;
creating a unique identifier corresponding to the vehicle end file according to a preset sequence;
acquiring a file name and file creation time corresponding to a vehicle-end file;
and loading the unique identifier to 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 files of the automatic driving system are copied, the current time can be determined as the copying time, and the current time is incremented from 1 when each vehicle end file is copied to be used as the unique identifier corresponding to the vehicle end file. And meanwhile, acquiring a file name and file creation time corresponding to the vehicle-side file, loading the unique identifier into the meta-information file for storage, and establishing 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 to obtain a final meta-information file and wait for subsequent further data processing.
Step 202, carrying out hash operation on the vehicle-end file step by step to generate a file hash value;
optionally, the end-of-vehicle file includes a plurality of data columns, each data column includes a plurality of cell data, and step 202 may include the following sub-steps:
calculating initial hash values corresponding to the cell data respectively;
calculating intermediate hash values corresponding to the data columns by adopting the initial hash values according to the number of the columns to which the cell data belongs;
and performing 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 present 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 an MD5 algorithm, may be performed on each cell data to obtain initial hash values respectively corresponding to the cell data, and then hash operations are performed on each initial hash value according to the number of columns to which the cell data belong to calculate intermediate hash values respectively corresponding to each data column. And finally, performing hash operation by adopting all the intermediate hash values to obtain a file hash value corresponding to the vehicle-end file.
In a specific implementation, the vehicle-end file may be as shown in table 1 below:
Col1 Col2
a d
b e
c f
TABLE 1
The file hash value hash0 can be calculated as follows:
1) Calculating the hash of all cells in the Col1, namely the hash (a), the hash (b) and the hash (c)
2) Computing the hash of Col 1-hash (Col 1) = hash (hash (a), hash (b), hash (c))
3) Calculating the hash of all cells in the Col2, namely hash (d), hash (e) and hash (f)
4) Computing the hash of Col 2-hash (Col 2) = hash (hash (d), hash (e), hash (f))
5) Compute hash of all columns, resulting in file hash value hash0= hash (hash (Col 1), hash (Col 2))
Step 203, encrypting the file hash value and the array name number group corresponding to the vehicle-end file by using 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-side file;
and encrypting the file hash value and the array name number group by adopting a private key to generate a digital signature.
In the embodiment of the invention, after the vehicle-end file is obtained, the data column names corresponding to the data columns in the vehicle-end file are extracted, the data column names are sequenced according to the arrangement sequence of the data columns to construct and obtain the column name array corresponding to the vehicle-end file, and the hash value and the column name array of the file are further encrypted by using the private key corresponding to the automatic driving system to generate the digital signature corresponding to the automatic driving system.
Step 204, constructing an object marker character string by adopting a file hash value, a column name array and a digital signature;
step 205, transmitting the meta information file, the object marking character string and the vehicle end file at the current moment to a downstream terminal according to a data transmission flow;
in the embodiment of the present invention, the specific implementation process of steps 204 to 205 may refer to steps 104 to 105, which are not described herein again.
The downstream terminal stores a plurality of public keys, and the method further comprises the following steps:
step 206, when the downstream terminal receives the meta information file, the object marking character string and the vehicle end file, extracting a digital signature to be verified from the object marking character string;
step 207, adopting a public key corresponding to the automatic driving system to analyze the digital signature to be verified to obtain a first hash value and a list name array to be verified;
in the embodiment of the present invention, the downstream terminal may be various terminal devices or a cloud server, and when the downstream terminal receives the meta information file, the object marker string, and the vehicle end file, the digital signature to be verified may be extracted from the object marker string, a public key corresponding to the upstream is selected from a plurality of public keys stored in the public key, and at this time, the public key corresponding to the autopilot system is used, and the public key is used to analyze the digital signature to be verified, so as to obtain the first hash value and the corresponding column name array to be verified.
Step 208, performing hash operation on the vehicle-end file step by step according to the array number to be verified to generate a second hash value;
after the to-be-verified column name array is obtained, corresponding data columns can be selected from the vehicle-end file according to the data column names contained in the to-be-verified column name array, and hash operation is performed step by step from the cell according to the sequence of the cell to the data column, so that 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, further performing hash operation 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 vehicle-end file is not tampered;
and step 210, if the first hash value is not equal to the second hash value, determining that the vehicle-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 the modification information is received, modifying the vehicle end file according to the modification information, and determining to update the vehicle end file and modify the data column;
in the embodiment of the invention, if the downstream terminal determines that the vehicle end file is not tampered and receives the modification information, it indicates that 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 at the moment to generate the updated vehicle end file and the modified data column.
It should be noted that the modified data column refers to a data column modified in response to the modification information, and the modification information may be to modify the content of a certain data column or to add a new data column on the basis of the original vehicle-side file.
S12, carrying out hash operation on the modified data column step by step to generate a modified hash value;
after the modified data column is determined, since the downstream terminal modifies the vehicle-end file, the modified data column can be subjected to hash operation step by step 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 to generate an updated digital signature;
and S14, constructing an updated object marker character string by adopting the modified hash value, the modified column name array and the updated digital signature.
The modified column name array is an array formed by the number column names corresponding to the modified data columns.
After the modified hash value corresponding to the modified data column is calculated, 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 using a 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 used again to construct an updated object marker character string.
For example, if the modified hash value is "223123131231231", the modified column name array is "[" Col3"]", and the updated number signature is "xxejfiejifieh 123132132", then the constructed updated object marker string json string is:
Figure BDA0004023584120000111
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 using the digital signature to be verified;
and constructing an updating object mark character string by adopting the updating digital signature.
Specifically, since no modification information is received, the modified hash value is null, the modified list name array is also null, and the downstream terminal signs the digital signature to be verified to obtain an updated digital signature "xxejfiejifiejfeh 123132133", so that the constructed updated object marker character string json character string is:
Figure BDA0004023584120000121
further, the method comprises the following steps S21-S23:
s21, if the downstream terminal is not the final terminal, transmitting the updated object marker character string and the updated 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 updated object mark character string and the updated vehicle end file, determining the updated object mark character string as a new object mark character string, determining the target terminal as a new downstream terminal, and taking the updated vehicle end file as a new vehicle end file;
and S23, skipping to execute the step of extracting the digital signature to be verified from the object marker character string 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 respectively corresponding to the digital signatures to be verified from the plurality of public keys according to a data transmission process;
and the target public key is used for analyzing the digital signature to be verified.
In the embodiment of the invention, each level of downstream terminals know all nodes and public keys on the pipeline in the whole data transmission process, and sequentially analyze the digital signatures to obtain the hash, the array of column names and possible digital signatures at a higher level (the pipeline has three or more levels in total). The hash and the array of column names are verified using the method in steps 206-210, and if there is a higher level digital signature, the higher level public key is used to parse the digital signature.
Optionally, the method further comprises the following steps S31-S35:
s31, when the vehicle-end file is judged not to be tampered and the meta-information file is received, analyzing the meta-information file to obtain a plurality of file names;
s32, judging whether the vehicle end files corresponding to the file names exist or not;
s33, if yes, adding a terminal identification corresponding to a downstream terminal and file receiving time corresponding to a vehicle end file in the meta information file;
s34, when the downstream terminal sends the vehicle end file, adding 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 the vehicle-end file is judged not to be tampered, because the number of the vehicle-end files may exist simultaneously, at this time, after the meta-information file is received, the meta-information file is analyzed to obtain a plurality of file names, whether the vehicle-end file exists or not is further judged 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, it is indicated that the vehicle-end file is not deleted or reduced by an upstream terminal at this time, and the terminal identification corresponding to a downstream terminal and the file receiving time corresponding to the vehicle-end file can be added in the meta-information file. If any vehicle end file does not exist after comparison, an alarm signal can be output to the cloud end.
Further, if the vehicle end files are checked by the downstream terminal and then are stored, if the vehicle end files need to be further sent, the file sending time corresponding to each vehicle end file can be increased in the meta information file.
It should be noted that after the alarm signal is output, the meta information file may be checked segment by segment according to the data transmission process to determine between which two terminals the vehicle end file is lost, and the corresponding terminals may be informed to retransmit the vehicle end file, and if the vehicle end file is lost for multiple times, the cloud end is reported again to notify the technical staff to perform further maintenance.
In a specific implementation, if a plurality of end-of-vehicle files need to pass through a plurality of terminals, the implementation may be performed in the following manner.
1) After the uploading client (or each link through which the file passes) receives the file, each file in the meta information is checked to determine whether the file exists, if not, an alarm is given, otherwise, the meta information file is updated, and the file is added (client identification and uploading client receiving time). If the file passes through a plurality of terminals, the identification and receiving time of each terminal are correspondingly increased.
2) When uploading files, the uploading client uploads the files according to each file listed in the meta information, and each file is uploaded, and the file is added in the meta information (client identification and client uploading time). And if the file passes through a plurality of terminals, correspondingly increasing the identification and uploading time of each terminal.
3) And after all the files are uploaded, uploading the meta information files at the same time.
In specific implementation, a final terminal of a data transmission process is generally a cloud terminal, and after receiving a file at the cloud terminal, the received vehicle-side file is checked according to the meta-information file to determine whether all the vehicle-side files exist. And if not, outputting an alarm.
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 unique identifier is associated with the file name and then loaded to a meta information file until all the vehicle end files are copied, the vehicle end file is subjected to hash operation step by step to generate a file hash value, the file hash value and a list name number group corresponding to the vehicle end file are encrypted by a private key to generate a digital signature, an object marking character string is constructed by adopting the file hash value, the list name number group and the digital signature, and the meta information file, the object marking 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 digital signature and combination of the way of calculating the hash value and the meta information file step by step, and the safety of data is effectively ensured.
Referring to fig. 3, fig. 3 is a block diagram of a vehicle-side file transmission system 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 process, and comprises the following steps:
the meta information loading module 301 is configured to, when a vehicle end file of the automatic driving system is copied, create a unique identifier corresponding to the vehicle end file according to a preset sequence, associate a file name, and load the unique identifier to the meta information file until all the vehicle end files are copied;
a step-by-step hash operation module 302, 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 hash value of the file and the array name array corresponding to the vehicle-side file by using a private key, and generate a digital signature;
a character string construction module 304, configured to construct an object marker character string by using the file hash value, the array name number group, and the digital signature;
and the file transmission module 305 is configured to transmit the meta information file, the object tag character string, and the vehicle end file at the current time to a downstream terminal according to a data transmission process.
Optionally, the meta-information loading module 301 is specifically configured to:
when a vehicle end file of the automatic driving system is copied, determining the current moment as the copying time;
creating a unique identifier corresponding to the vehicle end file according to a preset sequence;
acquiring a file name and file creation time corresponding to a vehicle end file;
and loading the unique identifier to 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-end file includes a plurality of data columns, and each data column includes a plurality of cell data; the step-by-step hash operation module 302 is specifically configured to:
calculating initial hash values corresponding to the cell data respectively;
calculating intermediate hash values corresponding to the data columns by adopting the initial hash values according to the number of the columns to which the cell data belongs;
and performing 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-side file;
and encrypting the file hash value and the array name number group by adopting a 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 list 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 row name number 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 modify the 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;
and the first updating character string constructing module is used for constructing the updating object marker 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-side file is judged not to be tampered and the modification information is not received;
and the second updating character string constructing 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 updated object marking character string and the updated vehicle end file to a 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 updated object marker character string as a new object marker character string, determining the target terminal as a new downstream terminal and taking the updated vehicle end file as a new vehicle end file when the target terminal receives the updated object marker character string and the updated vehicle end file;
and the circulation module is used for skipping to execute the step of extracting the digital signature to be verified from the object marker 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 a target public key corresponding to each digital signature to be verified from the various public keys according to a data transmission process 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 analyzing module is used for analyzing the meta-information file to obtain a plurality of file names when the vehicle-end file is judged not to be tampered and the meta-information file is received;
the file existence judging module is used for judging whether the vehicle end files corresponding to the file names exist or not;
the meta information file updating module is used for 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 meta information file updating module is used for 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;
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 the alarm signal is not output.
An embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method for transmitting the end-of-vehicle file according to any one of the first aspect of the present invention.
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed, implements the transmission method for the vehicle-side file according to any one of the first aspect of the present invention.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the module described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute 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), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (13)

1. A method for transmitting vehicle-end files relates to an automatic driving system and a downstream terminal in a data transmission process, and comprises the following steps:
when the vehicle end files of the automatic driving system are copied, creating unique identifiers corresponding to the vehicle end files according to a preset sequence, associating file names and loading the unique identifiers to a meta-information file until all the vehicle end files are copied;
carrying out Hash operation on the vehicle-end file step by step to generate a file Hash value;
encrypting the file hash value and the array name number group corresponding to the vehicle-end file by adopting a private key to generate a digital signature;
constructing an object marker character string by adopting the file hash value, the array of the column names and the digital signature;
and transmitting the meta information file, the object marking character string and the vehicle end file at the current moment to the downstream terminal according to the data transmission flow.
2. The method according to claim 1, wherein the step of creating a unique identifier corresponding to the end file according to a preset sequence and associating a file name and loading the unique identifier to a meta file when the end file of the autopilot system is copied until all the end files are copied comprises:
when the vehicle end file of the automatic driving system is copied, determining the current moment as the copying time;
creating a unique identifier corresponding to the vehicle end file 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 the end-of-vehicle file includes a plurality of data columns, each of the data columns including a plurality of cell data; the step of performing hash operation on the vehicle-end file step by step to generate a file hash value comprises the following steps:
calculating initial hash values corresponding to the cell data respectively;
calculating intermediate hash values corresponding to the data columns by adopting the initial hash values according to the number of the columns to which the cell data belongs;
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. The method according to claim 3, wherein the step of encrypting the file hash value and the array name number group corresponding to the vehicle-side file by using a private key to generate a digital signature comprises:
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 name number group by adopting a private key to generate a digital signature.
5. The method of claim 1, wherein the downstream terminal stores a plurality of public keys, the method further comprising:
when the downstream terminal receives the meta information file, the object marking character string and the vehicle end file, extracting a digital signature to be verified from the object marking character string;
adopting a public key corresponding to the automatic driving system to analyze the digital signature to be verified to obtain a first hash value and a list name array to be verified;
carrying out hash operation on the vehicle-end file step by step according to the array number group 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.
6. The method of claim 5, further comprising:
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 modify a data column;
carrying out hash operation on the modified data sequence step by step 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 using a private key corresponding to the downstream terminal to generate an updated digital signature;
and constructing an updating object marker character string by adopting the modified hash value, the modified column name array and the updating digital signature.
7. The method of claim 5, further comprising:
when the vehicle-end file is judged not to be tampered and the modification information is not received, establishing an updated digital signature by using the digital signature to be verified;
and constructing an updating object marker character string by adopting the updating digital signature.
8. The method according to claim 6 or 7, characterized in that the method further comprises:
if the downstream terminal is not the final terminal, transmitting the updated object marker character string and the updated vehicle end file to a target terminal corresponding to the downstream terminal according to the data transmission flow;
when the target terminal receives the updated object marker character string and the updated vehicle end file, determining the updated object marker character string as a new object marker character string, determining the target terminal as a new downstream terminal, and taking the updated 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 marker character string until the downstream terminal is the final terminal.
9. The method of claim 8, further comprising:
if a plurality of digital signatures to be verified exist, selecting a target public key corresponding to each digital signature to be verified from the plurality of public keys according to the data transmission process;
and the target public key is used for analyzing the digital signature to be verified.
10. The method of claim 6, further comprising:
when the vehicle-end file is judged not to be tampered and a meta-information file is received, analyzing the meta-information file to obtain a plurality of file names;
judging whether vehicle end files corresponding to the file names exist or not;
if yes, adding a terminal identifier corresponding to the downstream terminal and file receiving time corresponding to the vehicle end file in the meta information file;
when the downstream terminal sends the vehicle end file, file sending time corresponding to the vehicle end file is increased in the meta information file;
if not, an alarm signal is output.
11. A transmission system of vehicle-end files relates to an automatic driving system and a downstream terminal in a data transmission process, and comprises:
the meta information loading module is used for creating a unique identifier corresponding to the vehicle end file according to a preset sequence and loading the unique identifier to the meta information file after associating a file name when the vehicle end file of the automatic driving system is copied until all the vehicle end files are copied;
the step-by-step hash operation module is used for performing 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 array name array 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 marking character string and the vehicle end file at the current moment to a downstream terminal according to the data transmission process.
12. An electronic device, comprising 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 perform the steps of the method for transmitting the end-of-vehicle file according to any one of claims 1 to 10.
13. A computer-readable storage medium on which a computer program is stored, the computer program, when executed, implementing a method of transmitting a vehicle-end document according to any one of claims 1-10.
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 true CN115941208A (en) 2023-04-07
CN115941208B 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
CN115941208B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
CN110084377B (en) Method and device for constructing decision tree
CN109542888B (en) Data modification and synchronization method, device, equipment and storage medium of block chain
CN107426165B (en) Bidirectional secure cloud storage data integrity detection method supporting key updating
CN111416808A (en) Cross-block-chain data mutual storage method, device, equipment and storage medium
CN107171810B (en) Verification method and device of block chain
CN112699081A (en) File self-certification method and device based on block chain
CN109543065B (en) Video active identification method combined with block chain
CN110969207B (en) Electronic evidence processing method, device, equipment and storage medium
CN112988667B (en) Data storage method and device based on block chain network
CN114372296B (en) Block chain-based user behavior data auditing method and system
CN107391292B (en) Block chain verification method and system for realizing error correction aiming at data of block body
CN111033491A (en) Storing shared blockchain data based on error correction coding
CN111984725A (en) Validation of measurement data sets in a distributed database
He et al. Public integrity auditing for dynamic regenerating code based cloud storage
CN113448817A (en) Page screen recording method and device and storage medium
CN107463596B (en) Block chain parallel query method and system for setting out-of-chain fault table
CN107733898A (en) A kind of data based on chain of evidence save implementation method, system and equipment from damage
CN113950679A (en) Validating a measurement dataset using speaker consensus
CN111209600A (en) Block chain-based data processing method and related product
CN104394166A (en) Certificate anti-fake authentication system and method for mobile terminal under cloud environment
CN115941208B (en) Method, system, equipment and medium for transmitting vehicle-end file
CN112581129A (en) Block chain transaction data management method and device, computer equipment and storage medium
CN110837657A (en) Data processing method, client, server and storage medium
CN113011543B (en) Travel code generation method, travel code reading method, travel code verification method, mobile terminal and school attendance management system
CN114861163A (en) Abnormal account identification method, device, equipment, storage medium and program product

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