Configuration file backup and download method and device, storage medium and computer device

CN115576741BActive Publication Date: 2026-07-07GUANGZHOU WERIDE TECH LTD CO

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU WERIDE TECH LTD CO
Filing Date
2022-09-22
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In existing technologies, the configuration files of autonomous vehicles are easily modified by humans, leading to errors that can negatively impact subsequent algorithm development, optimization, and testing, and may even cause serious road accidents.

Method used

By periodically retrieving the commit records of the configuration repository, the system automatically checks the normality of the configuration files using a preset configuration item check template, and stores them in the cloud after confirming that there are no errors. This includes data type, structure, and semantic checks to ensure the accuracy of the configuration files.

Benefits of technology

This avoids the adverse effects of configuration file anomalies on algorithm development, optimization, and testing, thereby improving development efficiency and the security and reliability of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115576741B_ABST
    Figure CN115576741B_ABST
Patent Text Reader

Abstract

The application provides a configuration file backup and download method and device, a storage medium and a computer device. The configuration file backup method can periodically acquire submission records of a configuration warehouse, and determine whether there is a configuration file that has not been backed up to the cloud in the configuration warehouse according to the latest acquired submission records. If there is, the configuration file that has not been backed up to the cloud can be preprocessed, and a preset configuration item check template is used to check the preprocessed file obtained after preprocessing, so as to determine whether the configurations of each configuration item in the preprocessed file are normal. If each configuration item is configured normally, the configuration file that has not been backed up to the cloud is stored to the cloud to realize backup. In this way, it can be determined whether each configuration item in the configuration file to be backed up is configured normally, so as to avoid the problem that the backed up configuration file has configuration exceptions, and further avoid the adverse effects of abnormal configuration files on subsequent algorithm development, optimization and testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of autonomous driving technology, and in particular to a configuration file backup method, apparatus, storage medium and computer device, as well as a configuration file download method, apparatus, storage medium and computer device. Background Technology

[0002] Autonomous vehicles are equipped with numerous sensors, such as cameras and millimeter-wave radar. Each sensor has its unique calibration parameters. Furthermore, because the various sensors on the same autonomous vehicle require fusion calibration, the sensor parameters on each autonomous vehicle can be considered unique. Moreover, the sensor parameters on each autonomous vehicle may change over time due to algorithm improvements, sensor repairs, and replacements.

[0003] In order to develop, optimize, and accurately test autonomous driving algorithms, it is necessary to track and record the sensor parameters of autonomous vehicles at each time point. This is to enable testing of the autonomous driving algorithm at specific points in time or to verify the correctness of the developed and optimized autonomous driving algorithm.

[0004] Since the sensor parameters of autonomous vehicles are recorded in their configuration files, backing up the configuration files for each vehicle can achieve the goal of backing up these sensor parameters. However, sometimes vehicle configuration files are directly modified by humans, potentially leading to incorrect configuration items or setting incorrect values ​​(e.g., incorrectly setting the braking force to 0). Backing up incorrectly modified configuration files would negatively impact subsequent algorithm development, optimization, and testing, and could even cause unimaginable serious road accidents. Summary of the Invention

[0005] The purpose of this application is to at least address one of the aforementioned technical deficiencies, particularly the technical deficiency of existing technologies that make it easy to back up configuration files with incorrect configurations.

[0006] In a first aspect, embodiments of this application provide a configuration file backup method, the method comprising:

[0007] According to the backup cycle, the commit records of the configuration repository are periodically retrieved. The configuration repository is used to store the configuration files uploaded by the vehicles.

[0008] If it is determined from the latest obtained submission record that there are configuration files stored in the configuration repository that have not been backed up to the cloud, then the configuration files that have not been backed up to the cloud are preprocessed to obtain a preprocessed file, and the preprocessed file is checked based on a preset configuration item check template to determine whether the configuration of each configuration item in the preprocessed file is normal.

[0009] If all configuration items in the preprocessed file are configured correctly, the configuration file that was not backed up to the cloud will be stored in the cloud.

[0010] In one embodiment, the preset configuration item check template includes a preset configuration definition module and a preset semantic check template;

[0011] The step of checking the preprocessed file based on a preset configuration item check template to determine whether the configuration of each configuration item in the preprocessed file is normal includes:

[0012] The preprocessed file is checked based on the preset configuration definition template to determine whether the data type, data structure and value of each configuration item in the preprocessed file are configured correctly.

[0013] If the data type, data structure, and value of each configuration item in the preprocessing file are configured correctly, then a semantic check is performed on each configuration item in the preprocessing file based on the preset semantic check template. If the preprocessing file passes the semantic check, it is determined that the configuration of each configuration item in the preprocessing file is normal. If the preprocessing file fails the semantic check, it is determined that the configuration of any configuration item in the preprocessing file is abnormal.

[0014] If the data type, data structure, and / or value configuration of any configuration item in the preprocessing file is abnormal, then the configuration of any configuration item in the preprocessing file is determined to be abnormal.

[0015] In one embodiment, the cloud includes cloud storage and a cloud database, and the step of storing the configuration file that has not been backed up to the cloud to the cloud includes:

[0016] The configuration files that are not backed up to the cloud are stored in the cloud storage, and the configuration files that are not backed up to the cloud are stored in the cloud database.

[0017] In one embodiment, the step of storing the configuration file that has not been backed up to the cloud to the cloud further includes:

[0018] Extract the submission timestamp and vehicle identifier to be backed up from the latest submission record corresponding to the configuration file that was not backed up to the cloud;

[0019] Obtain the identifier of the file to be backed up corresponding to the configuration file that has not been backed up to the cloud;

[0020] Generate a mapping relationship between the submission timestamp, the vehicle identifier to be backed up, and the file identifier to be backed up, and store the mapping relationship in the cloud database.

[0021] In one embodiment, the step of storing the configuration file that has not been backed up to the cloud to the cloud further includes:

[0022] Extract the path of the file to be backed up and the vehicle identifier to be backed up from the latest submission record that is not backed up to the cloud;

[0023] From the metadata corresponding to each vehicle identifier, the target metadata corresponding to the vehicle identifier to be backed up is determined. Each of the metadata is stored in the cloud storage, and each of the metadata includes the file path of the latest configuration file corresponding to the corresponding vehicle identifier.

[0024] Modify the file path in the target metadata to the path of the file to be backed up.

[0025] In one embodiment, the steps of storing the configuration file not backed up to the cloud in the cloud storage and storing the configuration file not backed up to the cloud in the cloud database include:

[0026] The file content of the configuration file that has not been backed up to the cloud is processed using a preset hash algorithm to generate the file hash value corresponding to the configuration file that has not been backed up to the cloud;

[0027] Modify the file name of the configuration file that has not been backed up to the cloud based on the file hash value, so that the file name includes the file hash value;

[0028] The modified configuration file that was not backed up to the cloud is stored in the cloud storage, and the modified configuration file that was not backed up to the cloud is stored in the cloud database.

[0029] Secondly, embodiments of this application provide a configuration file download method, the method comprising:

[0030] Download the target configuration file from the cloud storage or the cloud database, and process the file content of the target configuration file using the preset hash algorithm to obtain the calculated hash value corresponding to the target configuration file;

[0031] Determine whether the calculated hash value corresponding to the target configuration file is the same as the file hash value recorded in the file name of the target configuration file, and determine whether there is an anomaly in the download based on the result of the determination.

[0032] Thirdly, embodiments of this application provide a configuration file backup device, the device comprising:

[0033] The record acquisition module is used to periodically acquire the commit records of the configuration repository according to the backup cycle. The configuration repository is used to store the configuration files uploaded by the vehicle.

[0034] The inspection module is used to preprocess the configuration files that have not been backed up to the cloud when it is determined from the latest obtained submission records that there are configuration files stored in the configuration repository that have not been backed up to the cloud, so as to obtain a preprocessed file, and to inspect the preprocessed file based on a preset configuration item inspection template to determine whether the configuration of each configuration item in the preprocessed file is normal.

[0035] The storage module is used to store the configuration file that has not been backed up to the cloud to the cloud, provided that all configuration items in the preprocessed file are configured correctly.

[0036] Fourthly, embodiments of this application provide a configuration file download device, the device comprising:

[0037] The hash value acquisition module is used to download the target configuration file from the cloud storage or the cloud database, and process the file content of the target configuration file using the preset hash algorithm to obtain the hash value corresponding to the target configuration file.

[0038] The download anomaly detection module is used to determine whether the calculated hash value corresponding to the target configuration file is the same as the file hash value recorded in the file name of the target configuration file, and to determine whether there is an anomaly in the download based on the result of the judgment.

[0039] Fifthly, embodiments of this application provide a storage medium storing computer-readable instructions. When executed by one or more processors, the computer-readable instructions cause the one or more processors to perform the steps of the configuration file backup method described in any of the above embodiments or to perform the steps of the configuration file backup method described in any of the above embodiments.

[0040] Sixthly, embodiments of this application provide a computer device, including: one or more processors, and a memory; the memory stores computer-readable instructions, which, when executed by the one or more processors, perform the steps of the configuration file backup method described in any of the above embodiments or perform the steps of the configuration file backup method described in any of the above embodiments.

[0041] In the configuration file backup method, apparatus, storage medium, and computer equipment of this application, the commit records of the configuration repository are periodically retrieved. Based on the latest retrieved commit records, it is determined whether there are any configuration files in the configuration repository that have not been backed up to the cloud. If so, the configuration file not backed up to the cloud can be preprocessed, and a preset configuration item check template is used to check the preprocessed file to determine whether the configuration of each configuration item in the preprocessed file is normal. If all configuration items are configured normally, the configuration file not backed up to the cloud is stored in the cloud to achieve backup. In this way, it is possible to automatically check whether each configuration item in the configuration file to be backed up is configured normally, thereby avoiding configuration anomalies in the backed-up configuration file. This prevents abnormal configuration files from adversely affecting subsequent algorithm development, optimization, and testing, improving the efficiency of algorithm development and optimization, as well as the security and reliability of algorithm testing results.

[0042] In the configuration file download method, apparatus, storage medium, and computer device of this application, since the filename of the configuration file is used to store the corresponding file hash value during backup, the computer device can calculate the hash value of the downloaded configuration file using the hash algorithm employed during backup after downloading the configuration file. The calculated hash value is then compared with the hash value recorded in the filename to determine if there are any download anomalies. This allows for the timely detection of discrepancies between downloaded files and cloud-stored files caused by factors such as network transmission, preventing abnormally downloaded configuration files from negatively impacting subsequent algorithm development, optimization, and testing. This improves the efficiency of algorithm development and optimization, as well as the security and reliability of algorithm testing results. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 This is an application environment diagram of the configuration file backup method and the configuration file download method in one embodiment;

[0045] Figure 2 This is one of the flowcharts illustrating a configuration file backup method in one embodiment;

[0046] Figure 3 This is a second flowchart illustrating a configuration file backup method in one embodiment;

[0047] Figure 4This is one of the flowcharts illustrating a configuration file download method in one embodiment;

[0048] Figure 5 This is a second flowchart illustrating the configuration file download method in one embodiment;

[0049] Figure 6 This is a schematic diagram of the configuration file backup device in one embodiment;

[0050] Figure 7 This is a schematic diagram of the configuration file download device in one embodiment;

[0051] Figure 8 This is a schematic diagram of the structure of a computer device in one embodiment. Detailed Implementation

[0052] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0053] Besides the technical issues mentioned in the background, version control software such as Git and SVN are currently commonly used to back up and track the modification history of configuration files. However, on the one hand, existing version control software is overly feature-rich and lacks a convenient query interface. If you want to retrieve the historical configuration files of a particular autonomous vehicle, the software will check out the repository snapshot from when that historical configuration file was backed up, and then check out all configuration files in the entire repository as the historical version from that backup. This causes the configuration files of other autonomous vehicles to also become the corresponding historical configuration files. On the other hand, existing version control software causes each autonomous vehicle to save the configuration files of other vehicles, significantly consuming the storage space of the autonomous vehicles.

[0054] To address the aforementioned issues, this application provides a configuration file backup method, apparatus, storage medium, and computer device. This device can automatically check whether each configuration item in the configuration file to be backed up is configured correctly, thus avoiding configuration errors in the backed-up configuration file. This prevents abnormal configuration files from negatively impacting subsequent algorithm development, optimization, and testing, improving the efficiency of algorithm development and optimization, as well as enhancing the security and reliability of algorithm testing results.

[0055] In some embodiments, the configuration file backup method, apparatus, storage medium, and computer equipment of this application may also store the submission timestamp of the configuration file, the vehicle identifier of the configuration file, and the file identifier of the configuration file in a cloud database, or automatically update the file path of the latest configuration file corresponding to each vehicle identifier in the cloud storage, so that autonomous vehicles and engineers can conveniently, quickly, safely, and reliably obtain the configuration file of a specific vehicle at a specific time point based on the timestamp and vehicle identifier, without having to check out the configuration files of all vehicles as historical versions, and without having each autonomous vehicle store the configuration files of all autonomous vehicles.

[0056] This application also provides a configuration file download method, apparatus, storage medium, and computer device. Since the computer device stores the file hash value corresponding to the configuration file using its filename during backup, after downloading the configuration file, it can use the hash algorithm used during backup to calculate the hash value of the downloaded configuration file and compare the calculated hash value with the hash value recorded in the filename to determine if there is a download anomaly. This allows for timely detection of discrepancies between downloaded files and cloud-stored files caused by network transmission and other factors, preventing abnormally downloaded configuration files from negatively impacting subsequent algorithm development, optimization, and testing. This improves the efficiency of algorithm development and optimization, as well as the security and reliability of algorithm testing results.

[0057] In one embodiment, the configuration file backup method and configuration file download method of this application can be applied to... Figure 1 The application environment shown. For example... Figure 1 As shown, the application environment includes a download device 110, a first server 120, a second server 130, and a cloud 140. The download device 110 refers to a device used to download configuration files, which can be any computer device deployed on any device / location, such as a computer device deployed in an autonomous vehicle, an engineer's personal laptop, or a test server, etc. This application does not impose specific limitations on this.

[0058] For example, in Figure 1 The application environment shown includes multiple download devices 110, some of which are computer devices 112 deployed on autonomous vehicles, while the remaining download devices 110 can be personal laptops 114 of engineers.

[0059] The first server 120 refers to an independent service used to deploy the configuration repository. Its specific implementation can be determined according to actual circumstances, and this application does not impose specific restrictions on it. The second server 130 and the cloud 140 together constitute the vehicle configuration service system. The second server 130 is used to identify configuration files in the configuration repository that have not been backed up to the cloud 140, and to back up the identified unbacked-up configuration files to the cloud 140, thereby achieving configuration file backup. The cloud 140 refers to a device with cloud 140 storage capabilities. It is understood that the specific implementations of the second server 130 and the cloud 140 can be determined according to actual circumstances, and this application does not impose specific restrictions on them. For example, in... Figure 1 In the application environment shown, cloud 140 may include cloud storage 142 and cloud database 144.

[0060] Specifically, different autonomous vehicles are equipped with different configuration files. The computer device 112 deployed on the autonomous vehicle can send its own configuration file to the configuration repository. After verification and inspection, the configuration file can be added to the configuration repository. The second server 130 can periodically scan the configuration repository to determine whether there are any configuration files stored there that have not been backed up to the cloud 140. If so, the configuration file is verified and inspected to ensure that all configuration items are configured correctly. If the configuration file passes the verification and inspection, the second server 130 can store the configuration file in the cloud 140 to achieve configuration file backup.

[0061] In one embodiment, this application provides a configuration file backup method, and the following embodiments apply this method to... Figure 1 The instruction manual will use the second server shown as an example. Figure 2 As shown, the method specifically includes the following steps:

[0062] S202: Periodically retrieve the commit records of the configuration repository according to the backup cycle. The configuration repository is used to store the configuration files uploaded by the vehicle.

[0063] It is understood that the specific duration of the backup cycle can be determined based on the actual situation, and this application does not impose specific restrictions on it. In one example, the backup cycle can be 5 minutes. In other words, the second server can retrieve the commit records of the configuration repository every 5 minutes. This ensures a certain degree of timeliness while avoiding excessively frequent access to the configuration repository, thereby reducing the access pressure on the first server.

[0064] The commit history of the configuration repository can be used to record the file information of each configuration file existing in the configuration repository. The recorded file information includes, but is not limited to, the vehicle identifier, the submitter identifier, the commit timestamp, and the commit notes corresponding to the configuration file. The commit notes can be used to record supplementary information for the configuration file.

[0065] S204: If it is determined from the latest obtained submission record that there are configuration files stored in the configuration repository that have not been backed up to the cloud, then the configuration files that have not been backed up to the cloud are preprocessed to obtain a preprocessed file, and the preprocessed file is checked based on a preset configuration item check template to determine whether the configuration of each configuration item in the preprocessed file is normal.

[0066] The configuration item check template can be a template file and / or program used to check whether the configuration of each configuration item in the configuration file is reasonable and normal.

[0067] Specifically, after periodically obtaining the commit records of the configuration repository, the second server can determine whether the configuration repository stores configuration files that have not been backed up to the cloud (hereinafter referred to as unbacked-up configuration files) based on the latest obtained commit records. It is understood that the second server can use any method to make this determination, and this application does not impose any specific restrictions on this. In one embodiment, the second server can determine the updated files in the configuration repository based on the latest obtained commit records. These updated files refer to files updated during the previous backup cycle. If any updated file is a configuration file for an autonomous vehicle, then it is determined that an unbacked-up configuration file exists in the configuration repository; otherwise, it is determined that no unbacked-up configuration file exists in the configuration repository.

[0068] If configuration files exist in the configuration repository that have not been backed up to the cloud, the second server can perform a verification check on these unbacked-up configuration files to determine if each configuration item in the unbacked-up configuration file is configured correctly. This prevents updating incorrect configuration items or updating the configuration values ​​of configuration items to incorrect values. During the verification check, since the number of configuration files and folder structure may vary for each autonomous vehicle, to eliminate the influence of these variables on the verification check results, the second server can preprocess the unbacked-up configuration file to obtain a preprocessed file corresponding to the unbacked-up configuration file. Then, a pre-set configuration item check template is used to check the preprocessed file for configuration verification.

[0069] It is understood that the second server can implement preprocessing in any way, and this application does not impose specific restrictions on it, as long as it can achieve the above-mentioned effect. In one embodiment, the second server can convert the unbacked-up configuration file into a binary object for subsequent inspection. For example, it can generate a "class" or JSON (JavaScript Object Notation) format in the program based on the unbacked-up configuration file.

[0070] It is understandable that the specific check items and check logic of the configuration item check template can be determined according to the actual situation, and this application does not impose specific restrictions on this.

[0071] S206: If the configuration of each configuration item in the preprocessing file is normal, then the configuration file that has not been backed up to the cloud is stored in the cloud.

[0072] Specifically, if the configuration of each item in the preprocessed file is correct, the unbacked-up configuration file passes the verification check. In this case, the second server can store the unbacked-up configuration file in the cloud to back it up.

[0073] In one embodiment, if at least one configuration item in the preprocessed file is configured abnormally, the second server sends a notification message to the developer or vehicle maintenance personnel to indicate the vehicle's configuration error. Further, this notification message can be generated using the vehicle identifier corresponding to the unbacked-up configuration file.

[0074] In this embodiment, the second server periodically retrieves the commit records of the configuration repository and determines whether there are any configuration files in the repository that have not been backed up to the cloud based on the latest retrieved commit records. If such configuration files exist, they are preprocessed, and a preset configuration item check template is used to check the preprocessed file to determine whether the configuration of each configuration item in the preprocessed file is normal. If all configuration items are configured correctly, the configuration file is stored in the cloud for backup. This automatically checks whether each configuration item in the configuration file to be backed up is configured correctly, avoiding configuration errors in the backed-up configuration file. This prevents abnormal configuration files from adversely affecting subsequent algorithm development, optimization, and testing, improving the efficiency of algorithm development and optimization, as well as the security and reliability of algorithm testing results.

[0075] In one embodiment, the preset configuration item check template includes a preset configuration definition module and a preset semantic check template. The configuration definition template can be used to check whether the configuration value of each configuration item conforms to the preset structure definition. The semantic check template can be used to check whether the configuration value of each configuration item meets semantic requirements. For example, when the configuration item is a brake force gauge, the configured brake force should increase with the increase of the pedal angle. Therefore, under normal circumstances, the brake force gauge should be a monotonically increasing sequence. Thus, the semantic check template can be used to check whether the brake force gauge in the configuration file is a monotonically increasing sequence.

[0076] The step of checking the preprocessed file based on a preset configuration item check template to determine whether the configuration of each configuration item in the preprocessed file is normal includes:

[0077] The preprocessed file is checked based on the preset configuration definition template to determine whether the data type, data structure and value of each configuration item in the preprocessed file are configured correctly.

[0078] If the data type, data structure, and value of each configuration item in the preprocessing file are configured correctly, then a semantic check is performed on each configuration item in the preprocessing file based on the preset semantic check template. If the preprocessing file passes the semantic check, it is determined that the configuration of each configuration item in the preprocessing file is normal. If the preprocessing file fails the semantic check, it is determined that the configuration of any configuration item in the preprocessing file is abnormal.

[0079] If the data type, data structure, and / or value configuration of any configuration item in the preprocessing file is abnormal, then the configuration of any configuration item in the preprocessing file is determined to be abnormal.

[0080] Specifically, the second server can check the preprocessed file based on a pre-set configuration definition template to determine whether the data type, data structure, and value of each configuration item are normal, and then determine whether the configuration value of each configuration item conforms to the preset structure definition. In one embodiment, the configuration definition template can be implemented using Protobuf (ProtocolBuffer, a data exchange format), which can define the data type, data structure, and value range of the values ​​constituting the object.

[0081] If any number of configuration items in the preprocessed file have anomalies in data type, data structure, and / or value, it can be determined that the unbacked-up configuration file has failed the verification check.

[0082] If each configuration item in the preprocessed file is configured correctly in terms of data type, data structure, and value, the checking logic for some configuration items is difficult to define, such as the brake force table mentioned above. Therefore, a preset semantic check template can be used to perform semantic checks on each configuration item to further determine whether there are any abnormal configuration items in the unbacked-up configuration file. If the preprocessed file passes the semantic check, it can be determined that the configuration of each item is normal; conversely, if the preprocessed file fails the semantic check, it can be determined that there are abnormal configuration items in the preprocessed file.

[0083] In this embodiment, the preprocessed file is checked by a preset configuration definition module and a preset semantic check template, which can more comprehensively determine whether there are abnormal configuration items in the configuration file. This further avoids the adverse effects of abnormal configuration files on subsequent algorithm development, optimization, and testing, improves the efficiency of algorithm development and optimization, and enhances the security and reliability of algorithm testing results.

[0084] In one embodiment, such as Figure 1 As shown, the cloud can include cloud storage and cloud databases. Cloud storage is used for autonomous vehicles to download configuration files. For example, an autonomous vehicle can download a client within the vehicle and then use that client to directly download configuration files from cloud storage. Cloud databases allow engineers to access configuration files for autonomous vehicles. For instance, engineers can use HTTP (Hypertext Transfer Protocol) requests to query and download the corresponding configuration files from the cloud database.

[0085] The step of storing the configuration files not backed up to the cloud includes: storing the configuration files not backed up to the cloud in the cloud storage, and storing the configuration files not backed up to the cloud in the cloud database. Specifically, to enable both autonomous vehicles and engineers to download configuration files from the cloud, during backup, the second server can back up the configuration files to both cloud storage and the cloud database, allowing autonomous vehicles to download configuration files from the cloud storage and engineers to download configuration files from the cloud database. This facilitates subsequent algorithm development, optimization, and testing.

[0086] In one embodiment, the step of storing the configuration file that has not been backed up to the cloud to the cloud further includes:

[0087] Extract the submission timestamp and vehicle identifier to be backed up from the latest submission record corresponding to the configuration file that was not backed up to the cloud;

[0088] Obtain the identifier of the file to be backed up corresponding to the configuration file that has not been backed up to the cloud;

[0089] Generate a mapping relationship between the submission timestamp, the vehicle identifier to be backed up, and the file identifier to be backed up, and store the mapping relationship in the cloud database.

[0090] The submission timestamp can be either the timestamp when the configuration file not backed up to the cloud was submitted to the configuration repository, or the timestamp corresponding to the latest update of the configuration file not backed up to the cloud. The second server can use the later of the timestamp at the time of submission and the timestamp at the time of the latest update as the submission timestamp for the unbacked-up configuration file. The vehicle identifier to be backed up refers to the vehicle identifier of the autonomous vehicle corresponding to the unbacked-up configuration file. The file identifier to be backed up refers to the file identifier that can uniquely identify the configuration file to be backed up, which can be, but is not limited to, a file path, file ID, or file name.

[0091] When performing file backups, if the second server needs to store unbacked-up configuration files in the cloud database, it can generate a mapping relationship between the submission timestamp, the vehicle identifier to be backed up, and the file identifier to be backed up for that unbacked-up configuration file, and store this mapping relationship in the cloud database. This facilitates subsequent configuration file queries. When querying configuration files, engineers can accurately download the required configuration file from the cloud database based on the vehicle identifier and the timestamp corresponding to the target configuration file, without needing to retrieve and store configuration files for other vehicles, thus improving query efficiency and accuracy.

[0092] It is understood that when establishing a mapping relationship, in addition to the three types of file information mentioned above, the second server can also establish a mapping relationship based on other file information. For example, it can also establish a mapping relationship based on changing personnel identifiers / submitting personnel identifiers. This application does not impose specific restrictions on this, as long as the mapping relationship includes at least the submission timestamp, the vehicle identifier to be backed up, and the file identifier to be backed up.

[0093] In one embodiment, the step of storing the configuration file that has not been backed up to the cloud to the cloud further includes:

[0094] Extract the path of the file to be backed up and the vehicle identifier to be backed up from the latest submission record that is not backed up to the cloud;

[0095] From the metadata corresponding to each vehicle identifier, the target metadata corresponding to the vehicle identifier to be backed up is determined. Each of the metadata is stored in the cloud storage, and each of the metadata includes the file path of the latest configuration file corresponding to the corresponding vehicle identifier.

[0096] Modify the file path in the target metadata to the path of the file to be backed up.

[0097] The path to be backed up can be the file path corresponding to the configuration file. The specific meaning of the vehicle identifier to be backed up can be found in the above embodiments, and will not be repeated here.

[0098] Specifically, since autonomous vehicles typically download their latest configuration files from cloud storage, to simplify the download process, cloud storage can store metadata corresponding to each vehicle identifier and record the file path of the latest configuration file for the autonomous vehicle through this metadata. Therefore, if a second server needs to store an unbacked-up configuration file in cloud storage, the latest configuration file corresponding to the vehicle identifier to be backed up will change. In this case, the second server needs to update the corresponding metadata so that the updated metadata records the file path of the latest configuration file corresponding to that vehicle identifier. Specifically, the second server can extract the file path (i.e., the file path to be backed up) and the vehicle identifier (i.e., the vehicle identifier to be backed up) corresponding to the unbacked-up configuration file from the latest submitted record. Based on the vehicle identifier to be backed up, the second server determines the metadata corresponding to the vehicle identifier to be backed up from multiple metadata stored in cloud storage; this metadata is the target metadata. The second server can then modify the file path in the target metadata to the file path to be backed up to update the metadata.

[0099] In one embodiment, for each metadata, in addition to recording the file path of the corresponding latest configuration file, the metadata may also record information such as the file version and file hash value of the latest configuration file.

[0100] In this way, when performing configuration file queries, autonomous vehicles can accurately download the configuration files needed by engineers from the cloud database based on the vehicle identifier, without having to detect and store the configuration files of other vehicles, thereby improving query efficiency and accuracy.

[0101] In one embodiment, the steps of storing the configuration file not backed up to the cloud in the cloud storage and storing the configuration file not backed up to the cloud in the cloud database include:

[0102] The file content of the configuration file that has not been backed up to the cloud is processed using a preset hash algorithm to generate the file hash value corresponding to the configuration file that has not been backed up to the cloud;

[0103] Modify the file name of the configuration file that has not been backed up to the cloud based on the file hash value, so that the file name includes the file hash value;

[0104] The modified configuration file that was not backed up to the cloud is stored in the cloud storage, and the modified configuration file that was not backed up to the cloud is stored in the cloud database.

[0105] Specifically, during backup, the second server can use a preset hash algorithm to process the contents of the unbacked-up configuration file to generate a file hash value corresponding to the unbacked-up configuration file. In one embodiment, the second server can calculate the file hash value based on each configuration item in the configuration file to improve accuracy. In another embodiment, the second server can use MD5 (Message Digest Algorithm) to calculate the file hash value.

[0106] After obtaining the file hash value, the second server can modify the filename of the unbacked-up configuration file so that the modified filename includes the file hash value. For example, the second server can directly change the filename to the file hash value, or add the file hash value to the original filename. After the name modification, the second server will back up the modified unbacked-up configuration file, ensuring that the filenames of the configuration files stored in both cloud storage and the cloud database include the file hash value.

[0107] In this way, after engineers and autonomous vehicles download the configuration file, they can use the file hash value included in the file name of the configuration file to verify whether the downloaded configuration file is consistent with the configuration file stored in the cloud. This avoids the adverse effects of abnormally downloaded configuration files on subsequent algorithm development, optimization, and testing, improves the efficiency of algorithm development and optimization, and enhances the security and reliability of algorithm testing results.

[0108] In one example, such as Figure 3 As shown, the configuration file backup method of this application may include the following steps:

[0109] S302: Perform initialization operations, such as connecting to the configuration repository, connecting to the cloud database, obtaining the cloud storage client, and starting the HTTP service;

[0110] S304: Scan the configuration repository when the backup cycle arrives;

[0111] S306: Determine whether each configuration file in the configuration repository has been updated. If not, proceed to step S308; if yes, proceed to step S310.

[0112] S308: Wait until the next backup cycle arrives, and proceed to step S304;

[0113] S310: Perform predefined structural validation and semantic checks on the updated configuration file and obtain the check results. For the specific implementation of this step, please refer to the above embodiments, which will not be repeated here.

[0114] S312; Based on the check results, determine whether the updated pre-configuration file has passed the verification check. If not, proceed to step S314; if yes, proceed to step S316. This can prevent updating incorrect configuration items or updating the configuration value of the configuration item to an incorrect value.

[0115] S314: Prompt the developer or vehicle maintenance personnel to indicate the abnormal vehicle configuration and proceed to step S308;

[0116] S316: Calculate the file hash value corresponding to the updated configuration file using a preset hash algorithm;

[0117] S318, Modify the file name of the updated configuration file according to the file hash value, so that the modified file name includes the file hash value;

[0118] S320: Upload the renamed configuration file to cloud storage and cloud database so that autonomous vehicles can directly download the configuration file through the client, and engineers can query and download the corresponding configuration file through the HTTP interface. Furthermore, when uploading the configuration file to cloud storage, the corresponding metadata can be modified, as detailed in the above embodiments; when uploading the configuration file to the cloud database, a corresponding mapping relationship can be established and uploaded to the cloud database, as detailed in the above embodiments.

[0119] In one embodiment, this application also provides a configuration file download method, which is based on the configuration file backup method described in the above embodiments. The configuration file download method of the following embodiments can be applied to... Figure 1 The computer devices shown are, for example, those configured in autonomous vehicles or an engineer's personal laptop. Figure 4 As shown, the method specifically includes the following steps:

[0120] S402: Download the target configuration file from the cloud storage or the cloud database, and process the file content of the target configuration file using the preset hash algorithm to obtain the calculated hash value corresponding to the target configuration file;

[0121] S404: Determine whether the calculated hash value corresponding to the target configuration file is the same as the file hash value recorded in the file name of the target configuration file, and determine whether there is an anomaly in the download based on the result of the determination.

[0122] The target configuration file refers to the configuration file that the computer device needs to download, such as the latest configuration file corresponding to a certain vehicle identifier or the configuration file of a certain autonomous vehicle at a specific time.

[0123] Specifically, after downloading the target configuration file from cloud storage or a cloud database, the computer device can use the same hash algorithm as the second server to calculate the hash value corresponding to the downloaded target configuration file (i.e., calculate the hash value). If the calculated hash value matches the file hash value recorded in the filename of the target configuration file, it indicates that the downloaded target configuration file is consistent with the configuration file stored in the cloud; otherwise, it indicates that the downloaded target configuration file is inconsistent with the configuration file stored in the cloud. Therefore, the computer device can determine whether there is an anomaly in the download by judging whether the calculated hash value is the same as the file hash value recorded in the filename.

[0124] In this way, inconsistencies between downloaded files and cloud-stored files caused by factors such as network transmission can be detected in a timely manner, avoiding the adverse effects of abnormally downloaded configuration files on subsequent algorithm development, optimization, and testing. This improves the efficiency of algorithm development and optimization, as well as the security and reliability of algorithm testing results.

[0125] In one example, if the configuration file download method is executed on the computer equipment of an autonomous vehicle, the configuration file download method may include... Figure 5 The steps shown are as follows:

[0126] S502: Based on the vehicle's identification, retrieve and download the target metadata corresponding to this vehicle from cloud storage.

[0127] S504: Compare the file information recorded in the target metadata with the file information stored in the vehicle's local cache to determine whether a configuration file needs to be downloaded. If yes, proceed to step S506; otherwise, proceed to step S514. Extract the version number and file hash value of the latest configuration file corresponding to the vehicle from the target metadata and compare it with the file information stored in the local cache. If the version recorded in the target metadata is the same as the version recorded in the local cache, it is determined that no configuration file download is needed and the process ends; if the version recorded in the target metadata is different from the version recorded in the local cache, it is determined that the configuration file needs to be downloaded.

[0128] S506: Extract the file path of the latest configuration file from the target metadata, and download the latest configuration file of this vehicle based on the extracted file path.

[0129] S508: Uses the same hash algorithm as the second server to calculate the hash value corresponding to the downloaded configuration file.

[0130] S510: Compare the calculated hash value with the hash value recorded in the file name. If they are the same, proceed to step S514; otherwise, proceed to step S512.

[0131] S512: Records download information locally and in the error log, and uploads the error log to cloud storage, so that the second server can send prompt information to the engineer based on the error log stored in the cloud storage.

[0132] S514: End.

[0133] The configuration file backup device provided in the embodiments of this application is described below. The configuration file backup device described below can be referred to in correspondence with the configuration file backup method described above.

[0134] In one embodiment, this application provides a configuration file backup device 600. For example... Figure 6 As shown, the device 600 includes a recording acquisition module 610, an inspection module 620, and a storage module 630. Wherein:

[0135] The record acquisition module 610 is used to periodically acquire the commit records of the configuration repository according to the backup cycle, wherein the configuration repository is used to store the configuration files uploaded by the vehicle.

[0136] The inspection module 620 is used to preprocess the configuration file that has not been backed up to the cloud when it is determined from the latest obtained submission record that there is a configuration file stored in the configuration repository that has not been backed up to the cloud, so as to obtain a preprocessed file, and to inspect the preprocessed file based on a preset configuration item inspection template to determine whether the configuration of each configuration item in the preprocessed file is normal.

[0137] Storage module 630 is used to store the configuration file that has not been backed up to the cloud to the cloud when all configuration items in the preprocessed file are configured normally.

[0138] In one embodiment, the preset configuration item check template includes a preset configuration definition module and a preset semantic check template. The check module 620 includes a definition check unit, a semantic check unit, and a configuration anomaly determination unit. The definition check unit checks the preprocessed file based on the preset configuration definition template to determine whether the data type, data structure, and values ​​of each configuration item in the preprocessed file are configured correctly. The semantic check unit performs a semantic check on each configuration item in the preprocessed file based on the preset semantic check template if the data type, data structure, and values ​​of each configuration item in the preprocessed file are configured correctly. If the preprocessed file passes the semantic check, it determines that the configuration of each configuration item in the preprocessed file is normal; if the preprocessed file fails the semantic check, it determines that any configuration item in the preprocessed file is configured abnormally. The configuration anomaly determination unit determines that any configuration item in the preprocessed file is configured abnormally if the data type, data structure, and / or value of any configuration item in the preprocessed file is configured abnormally.

[0139] In one embodiment, the cloud includes cloud storage and a cloud database. Storage module 630 includes a file storage unit for storing configuration files not backed up to the cloud in the cloud storage and storing the configuration files not backed up to the cloud in the cloud database.

[0140] In one embodiment, the storage module 630 includes a first information acquisition unit, a second information acquisition unit, and a mapping storage unit. The first information acquisition unit extracts the submission timestamp and the vehicle identifier to be backed up corresponding to the configuration file not backed up to the cloud from the latest acquired submission record. The second information acquisition unit acquires the file identifier to be backed up corresponding to the configuration file not backed up to the cloud. The mapping storage unit generates a mapping relationship between the submission timestamp, the vehicle identifier to be backed up, and the file identifier to be backed up, and stores the mapping relationship in the cloud database.

[0141] In one embodiment, the storage module 630 includes a third information acquisition unit, a target metadata determination unit, and a metadata modification unit. The third information acquisition unit extracts the path to be backed up and the vehicle identifier to be backed up corresponding to the configuration file not backed up to the cloud from the latest acquired submission record. The target metadata determination unit determines the target metadata corresponding to the vehicle identifier to be backed up from the metadata corresponding to each vehicle identifier. All of these metadata are stored in the cloud storage, and each metadata includes the file path of the latest configuration file corresponding to the corresponding vehicle identifier. The metadata modification unit modifies the file path in the target metadata to the path to be backed up.

[0142] In one embodiment, the file storage unit includes a hash value calculation unit, a name modification unit, and a modified file storage unit. The hash value calculation unit processes the file content of the configuration file not backed up to the cloud using a preset hash algorithm to generate a file hash value corresponding to the configuration file not backed up to the cloud. The name modification unit modifies the file name of the configuration file not backed up to the cloud based on the file hash value, so that the file name includes the file hash value. The modified file storage unit stores the modified configuration file not backed up to the cloud in the cloud storage and stores the modified configuration file not backed up to the cloud in the cloud database.

[0143] The configuration file download device provided in the embodiments of this application is described below. The configuration file download device described below can be referred to in correspondence with the configuration file download method described above.

[0144] In one embodiment, this application provides a configuration file downloading device 700. For example... Figure 7 As shown, the device 700 includes a hash value calculation and acquisition module 710 and a download anomaly detection module 720. Wherein:

[0145] The hash value acquisition module 710 is used to download the target configuration file from the cloud storage or the cloud database, and process the file content of the target configuration file using the preset hash algorithm to obtain the hash value corresponding to the target configuration file.

[0146] The download anomaly detection module 720 is used to determine whether the calculated hash value corresponding to the target configuration file is the same as the file hash value recorded in the file name of the target configuration file, and to determine whether there is an anomaly in the download based on the result of the detection.

[0147] In one embodiment, this application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the configuration file backup method as described in any of the above embodiments or the steps of the configuration file download method as described in any of the above embodiments.

[0148] In one embodiment, this application also provides a computer device. The computer device stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the configuration file backup method as described in any of the foregoing embodiments or the steps of the configuration file download method as described in any of the foregoing embodiments.

[0149] Indicatively, Figure 8This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. In one example, the computer device can be a server. (Refer to...) Figure 8 The computer device 900 includes a processing component 902, which further includes one or more processors, and memory resources represented by memory 901 for storing instructions executable by the processing component 902, such as an application under test. The application under test stored in memory 901 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 902 is configured to execute instructions to perform the steps of the configuration file backup method as described in any of the above embodiments or the configuration file download method as described in any of the above embodiments.

[0150] The computer device 900 may also include a power supply component 903 configured to perform power management of the computer device 900, a wired or wireless network interface 904 configured to connect the computer device 900 to a network, and an input / output (I / O) interface 905. The computer device 900 may operate on an operating system stored in memory 901, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.

[0151] Those skilled in the art will understand that the internal structure of the computer device shown in this application is merely a block diagram of a portion of the structure related to the solution of this application, and does not constitute a limitation on the computer device to be tested and applied thereto. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0152] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. In this document, "a," "an," "the," "the," and "its" may also include plural forms unless the context clearly indicates otherwise. "Multiple" refers to at least two, such as 2, 3, 5, or 8, etc. "And / or" includes any and all combinations of the related listed items.

[0153] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.

[0154] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for backing up configuration files, characterized in that, The method includes: According to the backup cycle, the commit records of the configuration repository are periodically retrieved. The configuration repository is used to store the configuration files uploaded by the vehicles. If it is determined from the latest obtained submission record that there are configuration files stored in the configuration repository that have not been backed up to the cloud, then the configuration files that have not been backed up to the cloud are preprocessed to obtain a preprocessed file, and the preprocessed file is checked based on a preset configuration item check template to determine whether the configuration of each configuration item in the preprocessed file is normal; wherein, the preset configuration item check template includes a preset configuration definition template and a preset semantic check template. If all configuration items in the preprocessed file are configured correctly, then the configuration file that was not backed up to the cloud will be stored in the cloud. The step of checking the preprocessed file based on a preset configuration item check template to determine whether the configuration of each configuration item in the preprocessed file is normal includes: The preprocessed file is checked based on the preset configuration definition template to determine whether the data type, data structure and value of each configuration item in the preprocessed file are configured correctly. If the data type, data structure, and value of each configuration item in the preprocessing file are configured correctly, then a semantic check is performed on each configuration item in the preprocessing file based on the preset semantic check template to check whether the configuration value of each configuration item meets the semantic requirements. If the preprocessing file passes the semantic check, it is determined that the configuration of each configuration item in the preprocessing file is normal. If the preprocessing file fails the semantic check, it is determined that the configuration of any configuration item in the preprocessing file is abnormal. If the data type, data structure, and / or value configuration of any configuration item in the preprocessing file is abnormal, then the configuration of any configuration item in the preprocessing file is determined to be abnormal.

2. The configuration file backup method according to claim 1, characterized in that, The cloud includes cloud storage and cloud database, and the step of storing the configuration files that have not been backed up to the cloud to the cloud includes: The configuration files that are not backed up to the cloud are stored in the cloud storage, and the configuration files that are not backed up to the cloud are stored in the cloud database.

3. The configuration file backup method according to claim 2, characterized in that, The step of storing the configuration file that has not been backed up to the cloud to the cloud further includes: Extract the submission timestamp and vehicle identifier to be backed up from the latest submission record corresponding to the configuration file that was not backed up to the cloud; Obtain the identifier of the file to be backed up corresponding to the configuration file that has not been backed up to the cloud; Generate a mapping relationship between the submission timestamp, the vehicle identifier to be backed up, and the file identifier to be backed up, and store the mapping relationship in the cloud database.

4. The configuration file backup method according to claim 2, characterized in that, The step of storing the configuration file that has not been backed up to the cloud to the cloud further includes: Extract the path of the file to be backed up and the vehicle identifier to be backed up from the latest submission record that is not backed up to the cloud; From the metadata corresponding to each vehicle identifier, the target metadata corresponding to the vehicle identifier to be backed up is determined. Each of the metadata is stored in the cloud storage, and each of the metadata includes the file path of the latest configuration file corresponding to the corresponding vehicle identifier. Modify the file path in the target metadata to the path of the file to be backed up.

5. The configuration file backup method according to any one of claims 2 to 4, characterized in that, The steps of storing the configuration files that have not been backed up to the cloud in the cloud storage and storing the configuration files that have not been backed up to the cloud in the cloud database include: The file content of the configuration file that has not been backed up to the cloud is processed using a preset hash algorithm to generate the file hash value corresponding to the configuration file that has not been backed up to the cloud; Modify the file name of the configuration file that has not been backed up to the cloud based on the file hash value, so that the file name includes the file hash value; The modified configuration file that was not backed up to the cloud is stored in the cloud storage, and the modified configuration file that was not backed up to the cloud is stored in the cloud database.

6. A configuration file download method based on the configuration file backup method of claim 5, characterized in that, The method includes: Download the target configuration file from the cloud storage or the cloud database, and process the file content of the target configuration file using the preset hash algorithm to obtain the calculated hash value corresponding to the target configuration file; Determine whether the calculated hash value corresponding to the target configuration file is the same as the file hash value recorded in the file name of the target configuration file, and determine whether there is an anomaly in the download based on the result of the determination.

7. A configuration file backup device, characterized in that, The device includes: The record acquisition module is used to periodically acquire the commit records of the configuration repository according to the backup cycle. The configuration repository is used to store the configuration files uploaded by the vehicle. The inspection module is used to preprocess the configuration files that have not been backed up to the cloud when it is determined from the latest obtained commit records that there are configuration files stored in the configuration repository that have not been backed up to the cloud, so as to obtain a preprocessed file, and to inspect the preprocessed file based on a preset configuration item inspection template to determine whether the configuration of each configuration item in the preprocessed file is normal; wherein, the preset configuration item inspection template includes a preset configuration definition template and a preset semantic inspection template; The storage module is used to store the configuration file that has not been backed up to the cloud to the cloud when all configuration items in the preprocessed file are configured normally. The inspection module includes: A definition check unit is used to check the preprocessed file based on the preset configuration definition template to determine whether the data type, data structure and value of each configuration item in the preprocessed file are configured correctly. The semantic checking unit is used to perform semantic checks on each configuration item in the preprocessing file based on the preset semantic checking template if the data type, data structure and value of each configuration item in the preprocessing file are configured normally, so as to check whether the configuration value of each configuration item meets the semantic requirements. If the preprocessing file passes the semantic check, it is determined that the configuration of each configuration item in the preprocessing file is normal. If the preprocessing file fails the semantic check, it is determined that the configuration of any configuration item in the preprocessing file is abnormal. The configuration anomaly determination unit is used to determine that any configuration item in the preprocessing file is configured abnormally if the data type, data structure, and / or value configuration of any configuration item in the preprocessing file is abnormal.

8. A configuration file downloading apparatus based on the configuration file downloading method of claim 6, characterized in that, The device includes: The hash value acquisition module is used to download the target configuration file from the cloud storage or the cloud database, and process the file content of the target configuration file using the preset hash algorithm to obtain the hash value corresponding to the target configuration file. The download anomaly detection module is used to determine whether the calculated hash value corresponding to the target configuration file is the same as the file hash value recorded in the file name of the target configuration file, and to determine whether there is an anomaly in the download based on the result of the judgment.

9. A storage medium, characterized in that, The storage medium stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the configuration file backup method as described in any one of claims 1 to 5 or the steps of the configuration file download method as described in claim 6.

10. A computer device, characterized in that, include: One or more processors, and memory; The memory stores computer-readable instructions, which, when executed by the one or more processors, perform the steps of the configuration file backup method as described in any one of claims 1 to 5 or the steps of the configuration file download method as described in claim 6.