Automatic driving software upgrading method and device, storage medium and computer device

By acquiring the metadata and version history of the target and local versions of the software, and utilizing hard links and download links, the autonomous driving software can be upgraded efficiently, solving the storage and resource consumption problems caused by the large software size and improving upgrade efficiency.

CN115344284BActive Publication Date: 2026-02-13GUANGZHOU WERIDE TECH LTD CO
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210982955.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-16
Publication Date
2026-02-13
Estimated Expiration
2042-08-16

AI Technical Summary

Technical Problem

During the upgrade process of autonomous driving software, the large size of the software and the high frequency of downloads result in a large amount of system storage space occupied, a large amount of network resources consumed, a large amount of computing resources consumed, and a long time, which affects the efficiency of software distribution.

Method used

By obtaining the metadata of the target version of the software and the version history of the local version of the software, the files to be downloaded and copied are determined. Software upgrades are achieved using hard links and download links, reducing system-level I/O. Only the missing files need to be downloaded, and file transfer is carried out using distributed storage systems and distributed caching systems.

Benefits of technology

It saves system storage space and network resources, improves the efficiency of software upgrades, and reduces the consumption of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115344284B_ABST
    Figure CN115344284B_ABST
Patent Text Reader

Abstract

The application provides an automatic driving software upgrading method and device, a storage medium and a computer device. The method comprises the following steps: obtaining metadata of target version software according to version information of the target version software; obtaining version records of local version software according to version information of the local version software; determining to-be-downloaded files and to-be-copied files based on the metadata and the version records; creating a new storage directory under a system partition; creating a hard link from an original storage directory of each to-be-copied file to the new storage directory according to a file name, a file fingerprint and a relative path of each to-be-copied file; creating a download link according to a file name, a file fingerprint and a storage path of each to-be-downloaded file; and downloading the corresponding to-be-downloaded file to the new storage directory based on the download link of each to-be-downloaded file. The application can save the storage space of the system, save the network resources and computing resources required for downloading, and improve the efficiency of software upgrading of the system partition.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of automatic driving, in particular to an automatic driving software upgrading method and device, a storage medium and a computer device. BACKGROUND

[0002] Automatic driving vehicles need to download different versions of automatic driving software according to different tasks performed, or the automatic driving software is updated in version and also needs to be downloaded.

[0003] However, the volume of automatic driving software is relatively large, usually several tens of Gb, especially the version that needs to be tested by a test vehicle, which often needs to be updated on a large scale, and the frequency of downloading software is high. However, for system partition files, these files are read-only files at runtime and cannot be changed. To implement software upgrading, the automatic driving software needs to be completely downloaded, which occupies a large amount of system storage space on the vehicle side and consumes a large amount of network resources and computing resources, and the required time is relatively long, which is not conducive to efficient distribution of automatic driving software to the vehicle side. SUMMARY

[0004] The embodiments of the present application provide an automatic driving software upgrading method and device, a storage medium and a computer device, which can save the storage space of the system and save the network resources and computing resources required for downloading, and improve the efficiency of software upgrading of the system partition.

[0005] In a first aspect, the present application provides an automatic driving software upgrading method applied to an automatic driving vehicle, and the method comprises:

[0006] obtaining metadata of a target version software according to version information of the target version software; wherein the metadata comprises a file name, a file update time, a file fingerprint and a storage path in a distributed storage system of each file in the target version software;

[0007] obtaining version records of a local version software according to version information of the local version software; the version records comprise a file name, a file update time and a file fingerprint of each file in the local version software;

[0008] determining files to be downloaded and files to be copied based on the metadata and the version records; wherein the files to be copied are files consistent between the target version software and the local version software;

[0009] creating a new storage directory under a system partition;

[0010] creating a hard link from an original storage directory of each file to be copied to the new storage directory according to a file name, a file fingerprint and a relative path of the file to be copied;

[0011] According to the file name, file fingerprint and storage path of each to-be-downloaded file, a download link is created, and the download link is used to download the corresponding to-be-downloaded file from the distributed storage system or a distributed cache system connected with the distributed storage system;

[0012] According to the download link of each to-be-downloaded file, the corresponding to-be-downloaded file is downloaded to the new storage directory.

[0013] In one of the embodiments, the method further comprises:

[0014] If it is judged that the target version software runs normally, each file of the local version software stored in the original storage directory is deleted.

[0015] In one of the embodiments, if it is judged that the target version software runs normally, each file of the local version software stored in the original storage directory is deleted, which comprises:

[0016] If the number of times of calling the target version software to complete running reaches a preset number of times, and each time of running does not occur running failure, each file of the local version software stored in the original storage directory is deleted.

[0017] Or,

[0018] If a preset time is reached from the initial calling of the target version software to the current time, and running the target version software does not occur running failure, each file of the local version software stored in the original storage directory is deleted.

[0019] In one of the embodiments, the method further comprises:

[0020] According to the version information of the target version software and a preset metadata file name, a first loading path is generated;

[0021] According to the first loading path, the metadata of the target version software is loaded from the distributed storage system or a distributed cache system connected with the distributed storage system.

[0022] In one of the embodiments, the method further comprises:

[0023] According to the version information of the local version software and a preset version record file name, a second loading path is generated;

[0024] According to the second loading path, the version record is loaded from the distributed storage system or a distributed cache system connected with the distributed storage system.

[0025] In one embodiment, the determining of the files to be downloaded and the files to be copied based on the metadata and the version record comprises:

[0026] If it is determined according to the metadata and the version record that the file fingerprint and the file update time of any file in the target version software are the same as those of one file in the local version software, the file is determined as a file to be copied.

[0027] If it is determined according to the metadata and the version record that the file fingerprint of any file in the target version software is different from that of any file in the local version software, or the file fingerprint of any file in the target version software is the same as that of one file in the local version software but the file update time is different, the file in the target version software is determined as a file to be downloaded.

[0028] In one embodiment, the distributed storage system is an object storage system, and the distributed cache system is a web cache system.

[0029] In a second aspect, the application further provides an automatic driving software upgrading device applied to an automatic driving vehicle, the device comprising:

[0030] a first obtaining module configured to obtain metadata of a target version software according to version information of the target version software, wherein the metadata comprises a file name, a file update time, a file fingerprint of each file in the target version software, and a storage path of the file in a distributed storage system;

[0031] a second obtaining module configured to obtain a version record of a local version software according to version information of the local version software, wherein the version record comprises a file name, a file update time, and a file fingerprint of each file in the local version software;

[0032] a determining module configured to determine files to be downloaded and files to be copied based on the metadata and the version record, wherein the files to be copied are files in the target version software that are consistent with the local version software;

[0033] a storage directory creating module configured to create a new storage directory under a system partition;

[0034] a hard link creating module configured to create a hard link from an original storage directory of each file to be copied to the new storage directory according to a file name, a file fingerprint, and a relative path of the file to be copied;

[0035] The download link creation module is configured to create a download link according to the file name, the file fingerprint and the storage path of each to-be-downloaded file, and the download link is used to download the corresponding to-be-downloaded file from the distributed storage system or a distributed cache system connected to the distributed storage system.

[0036] The file download module is configured to download the corresponding to-be-downloaded file to the new storage directory based on the download link of each to-be-downloaded file.

[0037] In a third aspect, the present application provides a storage medium, wherein the storage medium stores computer readable instructions, and the computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of the automatic driving software upgrading method according to any one of the above embodiments.

[0038] In a fourth aspect, the present application provides a computer device, comprising: one or more processors, and a memory.

[0039] The memory stores computer readable instructions, and the one or more processors execute the computer readable instructions to perform the steps of the automatic driving software upgrading method according to any one of the above embodiments.

[0040] From the above technical solutions, it can be seen that the embodiments of the present application have the following advantages:

[0041] The automatic driving software upgrading method, device, storage medium and computer device provided by the application are applied to an automatic driving vehicle that needs to upgrade the software of a system partition, metadata of target version software and version records of local version software are acquired respectively, the metadata includes the file name, file update time, file fingerprint and storage path in a distributed storage system of each file in the target version software, and the version records include the file name, file update time and file fingerprint of each file in the local version software; the files to be downloaded that are not in the local software version and the files to be copied that already exist in the local software version are determined based on the metadata and the version records, a new storage directory is created under the system partition, a hard link from the original storage directory of the file to be copied to the new storage directory is created, the hard link is used to realize calling, the I / O at the system level is reduced, the download link for downloading the corresponding file to be downloaded from the distributed storage system storing the target version software or the distributed cache system connected with the distributed storage system is created according to the file name, file fingerprint and storage path of the file to be downloaded, the file to be downloaded is downloaded to the new storage directory based on the download link, and the upgrading is completed, that is, only the files missing in the local version software need to be downloaded, the download volume is reduced, at the vehicle end, only the comparison between the metadata and the version records needs to be performed, all the files of the target version software do not need to be read into the local version software for calculation and comparison, the network resources and computing resources required for distributing the automatic driving software to the vehicle are saved, and the software upgrading efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor.

[0043] Figure 1 For an embodiment, the application environment diagram of the automatic driving software upgrading method;

[0044] Figure 2 For an embodiment, the flowchart of the automatic driving software upgrading method;

[0045] Figure 3 For an embodiment, the flowchart of the step of acquiring the metadata of the target version software according to the version information of the target version software;

[0046] Figure 4 For an embodiment, the flowchart of the step of acquiring the version records of the local version software according to the version information of the local version software;

[0047] Figure 5This is a structural block diagram of an autonomous driving software upgrade device in one embodiment;

[0048] Figure 6 This is a diagram of the internal structure of a computer device in one embodiment. Detailed Implementation

[0049] 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.

[0050] Figure 1 This is a schematic diagram illustrating the application environment of an autonomous driving software upgrade method in one embodiment. For example... Figure 1 As shown, the application environment includes an autonomous vehicle 101 and an autonomous driving cloud platform server 102. The autonomous vehicle 101 communicates with the server 102 via a network. A distributed storage system stores the data that the server 102 needs to process. After compiling autonomous driving software, the content of each file in the software is calculated to generate a file fingerprint for each file. Each file is then stored in the distributed storage system. Metadata for the autonomous driving software is then generated, including the filename, update time, file fingerprint, and storage path in the distributed storage system for each file. When the autonomous vehicle needs to upgrade its software, it downloads the necessary files from the distributed storage system or a distributed caching system connected to the distributed storage system. The server 102 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0051] like Figure 2 As shown, this application provides an autonomous driving software upgrade method for autonomous vehicles. The method includes steps S201-S207, wherein:

[0052] Step S201: Obtain the metadata of the target version software based on the version information of the target version software.

[0053] The metadata includes the file name, file update time, file fingerprint, and storage path in the distributed storage system of each file in the target version software. The version information of the target version software includes a version number of the target version software, and the version number is associated with the metadata, and the metadata can be obtained through the version number. The file fingerprint of each file in the target version software is obtained by calculating the file content by the automatic driving software cloud platform, and the MD5 algorithm (Message-Digest Algorithm), the SHA256 algorithm (Secure Hash Algorithm 256), and the CRC algorithm (Cyclic Redundancy Check) can be used to calculate the file fingerprint. The new version software does not need to be read into the automatic driving vehicle for calculation when synchronizing, and the vehicle end can directly obtain the metadata.

[0054] In one of the embodiments, the distributed storage system is an object storage system, a database, or a file storage system.

[0055] In one of the embodiments, the storage path of each file in the target version software in the distributed storage system is created according to the file fingerprint of each file, so that the storage path is associated with the file fingerprint, and the target file is easily located.

[0056] In step S202, the version record of the local version software is obtained according to the version information of the local version software.

[0057] The version record includes the file name, file update time, and file fingerprint of each file in the local version software. The version record is generated when the local version software is compiled, and can be obtained from the distributed storage system through the version information of the local version software.

[0058] In step S203, the files to be downloaded and the files to be copied are determined based on the metadata and the version record.

[0059] The files to be copied are the files consistent with the local version software in the target version software. Since the files under the system partition cannot be modified at will during running, the files of the local version software cannot be directly processed, and in order to increase the robustness of the system, the same files as in the target version software need to be copied, and the files to be downloaded together constitute the related files of the target version software.

[0060] The file fingerprint is calculated based on the content of the file, but the operation amount of comparing the file fingerprint is greatly reduced compared with directly comparing the file content. By comparing the file fingerprint in the result file and the file fingerprint, the file name and the file update time in the metadata, it can be determined that the missing file of the current version of the autonomous driving software of the autonomous driving vehicle compared with the target version software is the file to be downloaded, and the same file is the file to be copied.

[0061] In one embodiment, if it is determined according to the metadata and the version record that the file fingerprint and the file update time of any file in the target version software and one of the files in the local version software are the same, the file is determined to be the file to be copied; if it is determined according to the metadata and the version record that the file fingerprint of any file in the target version software is different from that of any file in the local version software, or the file fingerprint of any file in the target version software is the same as that of one of the files in the local version software but the file update time is different, the file in the target version software is determined to be the file to be downloaded.

[0062] Step S204, a new storage directory is created under the system partition.

[0063] Step S205, a hard link is created from the original storage directory of the file to be copied to the new storage directory according to the file name, the file fingerprint and the relative path of each file to be copied.

[0064] The relative path refers to the relative path of the file under the system partition, and the original storage directory is a storage location for storing the local version software. The hard link is used for calling without real data copying, which can reduce the I / O at the system level and also reduce the occupation of the system memory.

[0065] Step S206, a download link is created according to the file name, the file fingerprint and the storage path of each file to be downloaded.

[0066] In one embodiment, the download link is used to download the corresponding file to be downloaded from the distributed storage system.

[0067] In one embodiment, when the distributed cache system closer to the vehicle end in the architecture is set, the download link is used to download the corresponding file to be downloaded from the distributed cache system connected to the distributed storage system. The distributed cache system can improve the object reading speed, manage the files to be read by the user, and load the recently high-frequency used files into the memory of the distributed cache system to improve the speed of reading the files with high recent usage rate. For the files not cached in the memory, the distributed cache system loads them from the distributed storage system according to the download link. In one embodiment, the distributed cache system is a web cache system.

[0068] Step S207, downloading the corresponding to-be-downloaded file to the new storage directory based on the download link of each to-be-downloaded file.

[0069] The automatic driving software upgrading method provided in the application is applied to an automatic driving vehicle that needs to upgrade the software of a system partition, and the metadata of the target version software and the version record of the local version software are acquired respectively, the metadata including the file name, file update time, file fingerprint and storage path in the distributed storage system of each file in the target version software, and the version record including the file name, file update time and file fingerprint of each file in the local version software; the to-be-downloaded file that is not in the local software version and the to-be-copied file that already exists in the local software version are determined based on the metadata and the version record, a new storage directory is created under the system partition, a hard link from the original storage directory of the to-be-downloaded file to the new storage directory is created, the hard link is used for calling, the I / O at the system level is reduced, the download link for downloading the corresponding to-be-downloaded file from the distributed storage system storing the target version software or the distributed cache system connected with the distributed storage system is created according to the file name, file fingerprint and storage path of the to-be-downloaded file, the to-be-downloaded file is downloaded to the new storage directory based on the download link, and the upgrading is completed, that is, only the file missing in the local version software needs to be downloaded, the download volume is reduced, at the vehicle end, only the comparison between the metadata and the version record needs to be performed, and all the files of the target version software and the local version software do not need to be read in for calculation and comparison, the network resources and computing resources required for distributing the automatic driving software to the vehicle are saved, and the software upgrading efficiency is improved.

[0070] In one of the embodiments, the method further includes:

[0071] If it is determined that the target version software runs normally, the files of the local version software stored in the original storage directory are deleted.

[0072] In this embodiment, the files of the local version software stored in the original storage directory are deleted only when it is determined that the target version software can run normally at the vehicle end, if the target version software cannot run normally during this period, the local version software can be used for fallback, and the stability of system running is ensured.

[0073] In one of the embodiments, when the number of times of calling the target version software to complete running reaches a preset number of times, and no running failure occurs each time, it is determined that the target version software runs normally, and the files of the local version software stored in the original storage directory are deleted.

[0074] In one of the embodiments, when the preset time is reached from the initial call of the target version software to the current time, and the running of the target version software does not have a running failure, it is determined that the running of the target version software is normal, and each file of the local version software stored in the original storage directory is deleted.

[0075] As shown in the figure, Figure 3 In one of the embodiments, the obtaining of the metadata of the target version software according to the version information of the target version software comprises:

[0076] In step S301, a first loading path is generated according to the version information of the target version software and a preset metadata file name.

[0077] According to the preset rule, the file name of the metadata of the arbitrary version software is fixed, but is stored in different paths in the distributed storage system. The relative path of the metadata in the distributed storage system is usually generated by combining the version number and the metadata file name, for example, the version of the target version software is v, and the preset metadata file name is version.txt. The relative path is v / version.txt. The first loading path is generated based on the relative path and the server address published by the cloud platform, for example, https: / / cache.server.com / v / version.txt.

[0078] In step S302, the metadata of the target version software is loaded from the distributed storage system or the distributed cache system connected with the distributed storage system according to the first loading path.

[0079] In one of the embodiments, the first loading path is used to load the metadata from the distributed storage system.

[0080] In one of the embodiments, when the distributed cache system closer to the vehicle end in the architecture is arranged, the first loading path is used to download the corresponding metadata from the distributed cache system connected with the distributed storage system. The distributed cache system can improve the object reading speed, and can manage the files to be read by the user, and load the recently high-frequency used files into the memory of the distributed cache system, so as to improve the reading speed of the files with high recent usage rate. For the files not cached in the memory, the distributed cache system loads them from the distributed storage system according to the first loading path. In one of the embodiments, the distributed cache system is a web cache system.

[0081] As shown in the figure, Figure 4 In one of the embodiments, the obtaining of the version record of the local version software according to the version information of the local version software comprises:

[0082] Step S401, generating the second loading path according to the version information of the local version software and the preset version record file name.

[0083] According to the preset rule, the file name of the version record of the arbitrary version software is fixed, but is stored in different paths in the distributed storage system. The relative path of the version record in the distributed storage system is usually generated by combining the version number and the version record file name. For example, the version of the local version software is x, and the preset version record file name is record.txt. The relative path is x / record.txt. The second loading path is generated based on the relative path and the server address published by the cloud platform, such as https: / / cache.server.com / x / record.txt.

[0084] Step S402, loading the version record from the distributed storage system or the distributed cache system connected with the distributed storage system according to the second loading path.

[0085] In one of the embodiments, the second loading path is used to load the version record from the distributed storage system.

[0086] In one of the embodiments, when the distributed cache system that is closer to the vehicle end in the topology is arranged in the architecture, the second loading path is used to download the corresponding version record from the distributed cache system connected with the distributed storage system. The distributed cache system can improve the object reading speed, and can manage the files to be read by the user, and load the recently high-frequency used files into the memory of the distributed cache system, so as to improve the reading speed of the files with high recent usage rate. For the files that are not cached in the memory, the distributed cache system loads them from the distributed storage system according to the second loading path. In one of the embodiments, the distributed cache system is a web cache system.

[0087] It should be understood that, although each step in the flowchart involved in each of the above embodiments is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each of the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or stages in other steps.

[0088] The automatic driving software upgrading device provided by the embodiments of the present application is described below, and the automatic driving software upgrading device described below can be correspondingly referred to the automatic driving software upgrading method described above.

[0089] As shown in Figure 5 The embodiments of the present application provide an automatic driving software upgrading device 500 applied to an automatic driving vehicle, and the device comprises:

[0090] A first obtaining module 501 is configured to obtain metadata of a target version software according to version information of the target version software, wherein the metadata comprises a file name, a file update time, a file fingerprint of each file in the target version software, and a storage path of the file in a distributed storage system;

[0091] A second obtaining module 502 is configured to obtain version records of a local version software according to version information of the local version software, wherein the version records comprise a file name, a file update time, and a file fingerprint of each file in the local version software;

[0092] A determining module 503 is configured to determine files to be downloaded and files to be copied based on the metadata and the version records, wherein the files to be copied are files consistent between the target version software and the local version software;

[0093] A storage directory creating module 504 is configured to create a new storage directory under a system partition;

[0094] A hard link creating module 505 is configured to create a hard link from an original storage directory of each file to be copied to the new storage directory according to a file name, a file fingerprint, and a relative path of the file to be copied;

[0095] A download link creating module 506 is configured to create a download link according to a file name, a file fingerprint, and a storage path of each file to be downloaded, wherein the download link is used to download the corresponding file to be downloaded from the distributed storage system or a distributed cache system connected to the distributed storage system;

[0096] A file downloading module 507 is configured to download the corresponding file to be downloaded to the new storage directory based on the download link of each file to be downloaded.

[0097] In one of the embodiments, the automatic driving software upgrading device further comprises:

[0098] A version file deleting module is configured to delete each file of the local version software stored in the original storage directory when it is determined that the target version software is running normally.

[0099] In one of the embodiments, the version file deletion module is configured to perform:

[0100] when the number of times of calling the target version software to complete running reaches the preset number of times of running, and no running failure occurs in each running, deleting each file of the local version software stored in the original storage directory;

[0101] or,

[0102] when the preset time is reached from the initial calling of the target version software to the current time, and no running failure occurs in running the target version software, deleting each file of the local version software stored in the original storage directory.

[0103] In one of the embodiments, the first acquisition module includes:

[0104] a first path generation unit configured to generate a first loading path according to the version information of the target version software and a preset metadata file name;

[0105] a metadata acquisition unit configured to load metadata of the target version software from the distributed storage system or a distributed cache system connected with the distributed storage system according to the first loading path.

[0106] In one of the embodiments, the second acquisition module includes:

[0107] a second path generation unit configured to generate a second loading path according to the version information of the local version software and a preset version record file name;

[0108] a version record acquisition unit configured to load the version record from the distributed storage system or the distributed cache system connected with the distributed storage system according to the second loading path.

[0109] In one of the embodiments, the determination module is configured to perform:

[0110] if it is determined according to the metadata and the version record that the file fingerprint and the file update time of any file in the target version software are the same as those of one of the files in the local version software, the file is determined as a to-be-copied file;

[0111] if it is determined according to the metadata and the version record that the file fingerprint of any file in the target version software is different from that of any file in the local version software, or the file fingerprint of any file in the target version software is the same as that of one of the files in the local version software but the file update time is different, the file in the target version software is determined as a to-be-downloaded file.

[0112] The division of each module in the automatic driving software upgrading apparatus is merely for illustration, and in other embodiments, the automatic driving software upgrading apparatus can be divided into different modules as needed to complete all or part of the functions of the automatic driving software upgrading apparatus. Each module in the automatic driving software upgrading apparatus can be implemented in whole or in part by software, hardware, and a combination thereof. Each module can be embedded in or independent of a processor in the computer device in hardware form, or can be stored in a memory in the computer device in software form to be called and executed by the processor to perform the operations corresponding to each module.

[0113] In one embodiment, the application further provides a storage medium having computer readable instructions stored therein, which, when executed by one or more processors, causes the one or more processors to perform the following steps:

[0114] obtain metadata of the target version software according to the version information of the target version software; wherein the metadata includes the file name, file update time, file fingerprint of each file in the target version software, and the storage path thereof in the distributed storage system;

[0115] obtain version records of the local version software according to the version information of the local version software; the version records include the file name, file update time, and file fingerprint of each file in the local version software;

[0116] determine files to be downloaded and files to be copied based on the metadata and the version records; wherein the files to be copied are files consistent between the target version software and the local version software;

[0117] create a new storage directory under the system partition;

[0118] create a hard link from the original storage directory of each file to be copied to the new storage directory according to the file name, file fingerprint, and relative path of each file to be copied;

[0119] create a download link according to the file name, file fingerprint, and storage path of each file to be downloaded; the download link is used to download the corresponding file to be downloaded from the distributed storage system or a distributed cache system connected to the distributed storage system;

[0120] download the corresponding file to be downloaded to the new storage directory based on the download link of each file to be downloaded.

[0121] In one embodiment, the computer readable instructions, when executed by the processor, further implement the following steps:

[0122] If it is determined that the target version software runs normally, delete each file of the local version software stored in the original storage directory.

[0123] In one of the embodiments, the computer readable instructions, when executed by the processor, further implement the following steps:

[0124] If the number of times of calling the target version software to complete running reaches a preset number of times of running, and each time of running does not have running failure, delete each file of the local version software stored in the original storage directory.

[0125] Or,

[0126] If a preset time is reached from the first time of calling the target version software to run to the current time, and the target version software does not have running failure, delete each file of the local version software stored in the original storage directory.

[0127] In one of the embodiments, the computer readable instructions, when executed by the processor, further implement the following steps:

[0128] Generate a first loading path according to the version information of the target version software and a preset metadata file name;

[0129] Load metadata of the target version software from the distributed storage system or a distributed cache system connected with the distributed storage system according to the first loading path.

[0130] In one of the embodiments, the computer readable instructions, when executed by the processor, further implement the following steps:

[0131] Generate a second loading path according to the version information of the local version software and a preset version record file name;

[0132] Load the version record from the distributed storage system or the distributed cache system connected with the distributed storage system according to the second loading path.

[0133] In one of the embodiments, the computer readable instructions, when executed by the processor, further implement the following steps:

[0134] If it is determined that any file of the target version software and one of the files of the local version software have the same file fingerprint and file update time according to the metadata and the version record, the file is determined as a file to be copied;

[0135] If it is determined according to the metadata and the version record that any file in the target version software is different from any file in the local version software in file fingerprint, or any file in the target version software is the same as one file in the local version software in file fingerprint but different in file update time, the file in the target version software is determined as a file to be downloaded.

[0136] In one embodiment, the present application also provides a computer device having computer readable instructions stored therein, and the one or more processors execute the computer readable instructions to perform the following steps:

[0137] obtain metadata of the target version software according to version information of the target version software; wherein the metadata comprises file name, file update time, file fingerprint of each file in the target version software and storage path of the file in the distributed storage system;

[0138] obtain version record of the local version software according to version information of the local version software; wherein the version record comprises file name, file update time and file fingerprint of each file in the local version software;

[0139] determine files to be downloaded and files to be copied based on the metadata and the version record; wherein the files to be copied are files in the target version software consistent with the local version software;

[0140] create a new storage directory under a system partition;

[0141] create a hard link from the original storage directory of each file to be copied to the new storage directory according to file name, file fingerprint and relative path of each file to be copied;

[0142] create a download link according to file name, file fingerprint and storage path of each file to be downloaded; the download link is used to download the corresponding file to be downloaded from the distributed storage system or a distributed cache system connected to the distributed storage system;

[0143] download the corresponding file to be downloaded to the new storage directory based on the download link of each file to be downloaded.

[0144] In one embodiment, the processor executes the computer readable instructions to further perform the following steps:

[0145] if it is determined that the target version software runs normally, delete each file of the local version software stored in the original storage directory.

[0146] In one embodiment, the processor executes the computer readable instructions to further perform the following steps:

[0147] if the number of times of calling the target version software to complete running reaches the preset number of times of running and no running failure occurs in each running, deleting each file of the local version software stored in the original storage directory;

[0148] or,

[0149] if the preset time is reached from the first time of calling the target version software to run to the current time and no running failure occurs in running the target version software, deleting each file of the local version software stored in the original storage directory.

[0150] In one of the embodiments, the processor, when executing the computer readable instructions, further performs the following steps:

[0151] generating a first loading path according to the version information of the target version software and a preset metadata file name;

[0152] loading metadata of the target version software from the distributed storage system or a distributed cache system connected with the distributed storage system according to the first loading path.

[0153] In one of the embodiments, the processor, when executing the computer readable instructions, further performs the following steps:

[0154] generating a second loading path according to the version information of the local version software and a preset version record file name;

[0155] loading the version record from the distributed storage system or the distributed cache system connected with the distributed storage system according to the second loading path.

[0156] In one of the embodiments, the processor, when executing the computer readable instructions, further performs the following steps:

[0157] if it is determined according to the metadata and the version record that the file fingerprint and the file update time of any file in the target version software are the same as those of one of the files in the local version software, the file is determined as a to-be-copied file;

[0158] if it is determined according to the metadata and the version record that the file fingerprint of any file in the target version software is different from that of any file in the local version software, or the file fingerprint of any file in the target version software is the same as that of one of the files in the local version software but the file update time is different, the file in the target version software is determined as a to-be-downloaded file.

[0159] In one of the embodiments, a computer device, which can be a terminal, has an internal structure as shown inFigure 6 The computer device shown in the figure includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be achieved through WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies. The computer program is executed by the processor to implement an automatic driving software upgrading method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.

[0160] Those skilled in the art can understand that, Figure 6 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0161] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0162] Finally, it should be noted that in this document, relational terms such as first and second and the like can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without limitation, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0163] Furthermore, the terms "first", "second", etc. are used herein for descriptive purposes only and are not to be construed as indicating or implying relative importance or an ordered sequence. Accordingly, features identified as "first", "second", etc. can include at least one of the features, explicitly or implicitly.

[0164] The various embodiments described in this specification are presented for the purpose of illustration and description. Each of the embodiments highlights a different aspect of the disclosure, and the embodiments can be combined as needed. The same or similar parts are referenced by the same or similar reference numerals.

[0165] The above description of disclosed embodiments is intended to be illustrative and not restrictive. Many modifications, additions and deletions can be made to the disclosed embodiments without departing from the spirit or scope of the disclosure. Accordingly, it is intended that the scope of the disclosure be limited only by the claims appended hereto.

Claims

1. An automatic driving software upgrading method, characterized by, The method is applied to an autonomous vehicle and comprises the following steps: Obtaining metadata of the target version software according to version information of the target version software; wherein the metadata comprises a file name, a file update time, a file fingerprint and a storage path in a distributed storage system of each file in the target version software, and the storage path of each file in the target version software in the distributed storage system is created according to the file fingerprint of each file; Obtaining version records of the local version software according to version information of the local version software; the version records comprise a file name, a file update time and a file fingerprint of each file in the local version software; Based on the metadata and the version records, determining files to be downloaded and files to be copied; wherein the files to be copied are files in the target version software which have the same file fingerprint and file update time as those in the local version software; and the files to be downloaded are files in the target version software which have different file fingerprints or the same file fingerprint but different file update times as those in the local version software; Creating a new storage directory under a system partition; Creating a hard link from an original storage directory of each file to be copied to the new storage directory according to a file name, a file fingerprint and a relative path of each file to be copied; the hard link is used for calling; Creating a download link according to a file name, a file fingerprint and a storage path of each file to be downloaded; the download link is used for downloading a corresponding file to be downloaded from the distributed storage system or a distributed cache system connected with the distributed storage system; Downloading the corresponding file to be downloaded to the new storage directory based on the download link of each file to be downloaded; The method further comprises the following steps: If it is judged that the target version software runs normally, deleting each file of the local version software stored in the original storage directory.

2. The automatic driving software upgrading method of claim 1, wherein, The step of deleting each file of the local version software stored in the original storage directory if it is judged that the target version software runs normally comprises the following steps: If the number of times of calling the target version software to complete running reaches a preset number of times and each time of running does not have a running fault, then deleting each file of the local version software stored in the original storage directory; Or, If a preset time is reached from the first time of calling the target version software to run to the current time and the target version software does not have a running fault, then deleting each file of the local version software stored in the original storage directory.

3. The automatic driving software upgrading method of claim 1, wherein, The step of obtaining metadata of the target version software according to version information of the target version software comprises the following steps: Generating a first loading path according to the version information of the target version software and a preset metadata file name; Loading the metadata of the target version software from the distributed storage system or a distributed cache system connected with the distributed storage system according to the first loading path.

4. The automatic driving software upgrading method of claim 1, wherein, The step of obtaining version records of the local version software according to version information of the local version software comprises the following steps: Generating a second loading path according to the version information of the local version software and a preset version record file name; loading the version record from the distributed storage system or a distributed cache system connected with the distributed storage system according to the second loading path.

5. The automatic driving software upgrading method of claim 1, wherein, The distributed storage system is an object storage system, and the distributed cache system is a web cache system.

6. An automatic driving software upgrading apparatus characterized by comprising: The device is applied to an autonomous vehicle, and the device comprises: A first obtaining module is configured to obtain metadata of a target version software according to version information of the target version software, wherein the metadata comprises a file name, a file update time, a file fingerprint of each file in the target version software, and a storage path of each file in the target version software in a distributed storage system, and the storage path of each file in the distributed storage system is created according to the file fingerprint of each file. A second obtaining module is configured to obtain a version record of a local version software according to version information of the local version software, wherein the version record comprises a file name, a file update time, and a file fingerprint of each file in the local version software. A determining module is configured to determine files to be downloaded and files to be copied based on the metadata and the version record, wherein the files to be copied are files in the target version software that have the same file fingerprint and file update time as those in the local version software, and the files to be downloaded are files in the target version software that have different file fingerprints or the same file fingerprint but different file update times as those in the local version software. A storage directory creating module is configured to create a new storage directory under a system partition. A hard link creating module is configured to create a hard link from an original storage directory of each file to be copied to the new storage directory according to a file name, a file fingerprint, and a relative path of each file to be copied, wherein the hard link is used for calling. A download link creating module is configured to create a download link according to a file name, a file fingerprint, and a storage path of each file to be downloaded, wherein the download link is used for downloading a corresponding file to be downloaded from the distributed storage system or a distributed cache system connected with the distributed storage system. A file downloading module is configured to download a corresponding file to be downloaded to the new storage directory based on a download link of each file to be downloaded. The device further comprises: A version file deleting module is configured to delete each file of the local version software stored in the original storage directory when it is determined that the target version software is running normally.

7. A storage medium characterized by: The storage medium stores computer readable instructions, and the computer readable instructions are executed by one or more processors to cause the one or more processors to perform the steps of the autonomous driving software upgrading method in any one of claims 1 to 5.

8. A computer device, comprising: comprise: one or more processors and a memory; The memory stores computer readable instructions, and the one or more processors execute the computer readable instructions to perform the steps of the autonomous driving software upgrading method in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Version management file caching method, device and system, and related equipment

    CN112612413A

  • Firmware upgrading method and device

    CN113721968A