File processing method and device, computer equipment and storage medium

By receiving file download instructions and the network disconnection processing mechanism, it solves the file processing problems caused by power outages and network disconnections during car OTA upgrades, achieves effective file processing in the case of power outages, and avoids waste of resources and repeated downloads.

CN118612207APending Publication Date: 2024-09-06CHINA FAW CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410517176.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-26
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

During the automotive OTA upgrade process, files cannot be effectively processed when power and network are cut off, resulting in waste of resources and repeated file downloads or incorrect processing.

Method used

By receiving the file download instruction, the current file name encryption value is determined, and when the file name encryption value of the target file is the same as the current file name encryption value, the latest processing flag bit is obtained, and corresponding processing is performed based on the flag bit, including re-executing unfinished processing. Stage and cleanup operations; re-download files from the content delivery network when the network outage exceeds the preset time.

Benefits of technology

This ensures that files can be processed effectively even in the event of a power outage, avoids waste of resources, and ensures the continuity and integrity of file processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118612207A
    Figure CN118612207A
Patent Text Reader

Abstract

The invention relates to a file processing method and device, computer equipment and a storage medium. The method comprises the following steps: receiving a file downloading instruction, and determining a current file name encryption value based on the file downloading instruction; under the condition that the file name encryption value corresponding to the target file is the same as the current file name encryption value, obtaining the latest processing flag bit of the target file; and performing corresponding processing on the target file based on the latest processing flag bit. By adopting the method, the file can be effectively processed under the condition of power failure and network disconnection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a file processing method, device, computer equipment and storage medium. Background Art

[0002] With the development of intelligent automobile technology, OTA (Over-The-Air) has been widely used in vehicles. When the vehicle downloads the OTA upgrade package file to upgrade the controller, a series of processing of the OTA upgrade package file is required.

[0003] At present, there is no clear follow-up solution for the situation where the vehicle is disconnected from the network or power is cut off during the file processing process, which may lead to repeated downloading or incorrect processing of files, resulting in a waste of resources.

[0004] Therefore, in the case of power outage or network disconnection, the traditional technology will make it impossible to effectively process the files. Summary of the invention

[0005] Based on this, it is necessary to provide a file processing method, device, computer equipment and storage medium that can effectively process files in the event of power outages and network disconnection in order to address the above technical problems.

[0006] In a first aspect, the present application provides a file processing method. The method comprises:

[0007] receiving a file download instruction, and determining a current file name encrypted value based on the file download instruction;

[0008] If the encrypted value of the file name corresponding to the target file is the same as the encrypted value of the current file name, obtaining the latest processing flag of the target file;

[0009] Based on the latest processing flag, the target file is processed accordingly.

[0010] In one embodiment, the processing of the target file based on the latest processing flag includes:

[0011] In the case where the latest processing flag is a preset unfinished flag, determining an unfinished processing stage of the target file based on the preset unfinished flag, and re-executing the unfinished processing stage;

[0012] When the number of times the unfinished processing stage is re-executed is greater than the preset number and the latest processing flag is the preset unfinished flag, the target file is cleaned up; wherein the preset unfinished flag includes at least one of incomplete download, incomplete decryption, incomplete integrity check, incomplete decompression or incomplete signature verification.

[0013] In one embodiment, the method further comprises:

[0014] If there is no target file corresponding to a file name whose encrypted value is the same as the current file name encrypted value, downloading the target file from a content distribution network;

[0015] When a network disconnection signal is received and the network disconnection duration is longer than a preset duration, the target file is downloaded again from the content distribution network until the download of the target file is completed.

[0016] In one embodiment, the process of generating the target file includes:

[0017] Obtain an upgrade file, and determine a security verification file based on the upgrade file; wherein the security verification file includes at least one of a hash value file or an encrypted file;

[0018] Constructing a reconstruction file according to the upgrade file and the security verification file;

[0019] compressing the reconstructed file to obtain a compressed file;

[0020] The compressed file is encrypted to obtain an encrypted file, and the encrypted file is used as the target file.

[0021] In one of the embodiments, the hash value file includes a value obtained by performing a hash value calculation on the upgrade file; the encrypted file includes a public key and a value obtained by encrypting the hash value file using a private key; wherein the public key is used to decrypt the encrypted value of the hash value file.

[0022] In one of the embodiments, the file download instruction is generated based on a download link received by the vehicle from the cloud server.

[0023] In a second aspect, the present application also provides a file processing device. The device comprises:

[0024] A file name encryption value determination module, used to receive a file download instruction and determine a current file name encryption value based on the file download instruction;

[0025] A flag bit acquisition module, used for acquiring the latest processing flag bit of the target file when there is a file name encryption value corresponding to the target file that is the same as the current file name encryption value;

[0026] The file processing module is used to perform corresponding processing on the target file based on the latest processing flag.

[0027] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.

[0028] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any of the above methods when executed by a processor.

[0029] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0030] The above-mentioned file processing method, device, computer equipment and storage medium, by receiving a file download instruction, determine the current file name encryption value based on the file download instruction, and obtain the latest processing flag of the target file when the file name encryption value corresponding to the target file is the same as the current file name encryption value, and perform corresponding processing on the target file based on the latest processing flag. Compared with the traditional technology that will lead to the inability to effectively process files in the event of power outages and network disconnections, the present application determines the current file name encryption value based on each received file download instruction, and determines whether the file name encryption value corresponding to the target file is the same as the current file name encryption value. If there is a same, it means that it is a file that has been processed before, and performs corresponding processing on the target file based on the latest processing flag of the target file, which can ensure that the files that have been processed before can continue to be processed accordingly, and ensure the effective processing of files in the event of power outages and network disconnections. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 An application environment diagram of a file processing method in an embodiment;

[0033] Figure 2 A flowchart of a file processing method provided in an embodiment of the present application;

[0034] Figure 3 A schematic diagram of a process for performing corresponding processing on a target file in one embodiment;

[0035] Figure 4 A schematic diagram of a process for generating a target file in one embodiment;

[0036] Figure 5 A schematic diagram of a reconstruction file provided in one embodiment;

[0037] Figure 6 A structural block diagram of a file processing device provided in an embodiment of the present application;

[0038] Figure 7 This is a diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0040] The file processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Figure 1 The system includes a cloud server, a content distribution network, a master control node and a controller; wherein the cloud server is used to generate the target file; the content distribution network is a distributed network used to interact with the cloud server for files; the master control node and the controller are located on the vehicle side; the master control node is used to obtain the download link from the cloud server side, and generate a file download instruction based on the download link and send it to the controller; the controller is used to download the target file from the content distribution network based on the received file download instruction, or perform other corresponding processing on the target file except downloading.

[0041] In this embodiment, a file processing method is provided. This embodiment uses the method applied to a computer device as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a computer device and a server, and is implemented through the interaction between the computer device and the server.

[0042] Figure 2 Schematic diagram of the flow of the file processing method provided in the embodiment of the present application, the method is applied to a computer device, in one embodiment, such as Figure 2 As shown, the following steps are included:

[0043] S201, receiving a file download instruction, and determining a current file name encryption value based on the file download instruction.

[0044] The file download instruction is used to instruct the controller to process the file. The file download instruction is generated based on the download link received by the vehicle from the cloud server, including the current file name encryption value. The current file name encryption value is the file name encryption value of the file in the currently received download link. Exemplarily, the current file name encryption value is a SHA256 value.

[0045] S202, when there is a file name encryption value corresponding to the target file that is the same as the current file name encryption value, obtain the latest processing flag of the target file.

[0046] The target file is a file to be processed. The latest processing flag is used to indicate the current processing status and stage of the target file.

[0047] It should be understood that at this time the target file is stored in the controller.

[0048] S203, performing corresponding processing on the target file based on the latest processing flag.

[0049] Specifically, the corresponding processing of the target file includes at least one of downloading, decryption, integrity verification, decompression or signature verification.

[0050] The file processing method provided in this embodiment receives a file download instruction, determines the current file name encryption value based on the file download instruction, obtains the latest processing flag of the target file when the file name encryption value corresponding to the target file is the same as the current file name encryption value, and performs corresponding processing on the target file based on the latest processing flag. Compared with the traditional technology that will lead to the inability to effectively process the file in the event of power outage and network disconnection, this embodiment determines the current file name encryption value based on each received file download instruction, and determines whether the file name encryption value corresponding to the target file is the same as the current file name encryption value. If there is a same, it means that the file has been processed before, and the target file is processed accordingly based on the latest processing flag of the target file, which can ensure that the previously processed file can continue to be processed accordingly, and ensures the effective processing of the file in the event of power outage and network disconnection.

[0051] In one embodiment, a flowchart of performing corresponding processing on a target file based on the latest processing flag is shown as follows: Figure 3 As shown, including the following:

[0052] S301, when the latest processing flag is a preset unfinished flag, determining an unfinished processing stage of the target file based on the preset unfinished flag, and re-executing the unfinished processing stage.

[0053] S302, when the number of times the unfinished processing stage is re-executed is greater than the preset number and the latest processing flag is the preset unfinished flag, the target file is cleaned up; wherein the preset unfinished flag includes at least one of incomplete download, incomplete decryption, incomplete integrity check, incomplete decompression or incomplete signature verification.

[0054] The preset number of times can be set manually, for example, 5 times.

[0055] In this embodiment, the process of performing corresponding processing on the target file based on the latest processing flag is clearly defined to improve the effectiveness and efficiency of file processing, and when the file processing is not successfully completed after the execution number is greater than the preset number, the target file is cleaned up to avoid waste of resources.

[0056] In one embodiment, the file processing method further includes:

[0057] If there is no target file corresponding to a file name whose encrypted value is the same as the current file name encrypted value, downloading the target file from the content distribution network;

[0058] When a network disconnection signal is received and the network disconnection duration is longer than a preset duration, the target file is downloaded again from the content distribution network until the target file is downloaded completely.

[0059] The preset duration can be set manually, for example, the preset duration is 10 minutes.

[0060] It should be understood that at this time, the target file is stored in the cloud server and the content distribution network. Network disconnection does not affect the file decryption, integrity check, decompression and signature verification in the controller.

[0061] In this embodiment, the process of performing file download processing in the case of network disconnection is clarified, and the target file can continue to be downloaded, thereby ensuring effective processing of the file.

[0062] In one embodiment, a flowchart of the target file generation process is shown as follows: Figure 4 As shown, including the following:

[0063] S401, obtaining an upgrade file, and determining a security verification file based on the upgrade file; wherein the security verification file includes at least one of a hash value file or an encrypted file.

[0064] The upgrade file is manually uploaded to the cloud server. The security verification file is used to subsequently verify the security of the file. The security verification file may also include a script file, which is used to instruct the file to be overwritten.

[0065] S402, constructing a reconstruction file according to the upgrade file and the security verification file.

[0066] Exemplarily, a schematic diagram of a reconstruction file is provided, such as Figure 5 shown. Figure 5 Includes upgrade files and security verification files.

[0067] S403: compress the reconstructed file to obtain a compressed file.

[0068] In some embodiments, a hash value is calculated for the compressed file to obtain a corresponding encrypted value of the file name.

[0069] S404, encrypting the compressed file to obtain an encrypted file, and using the encrypted file as a target file.

[0070] In some embodiments, encrypting the compressed file includes:

[0071] Symmetrically encrypt the compressed file using the preset encryption key.

[0072] In this embodiment, the process of generating the target file is clarified to help clarify the subsequent process of processing the target file.

[0073] In one embodiment, the hash value file includes a value obtained by performing a hash value calculation on the upgrade file; the encrypted file includes a public key and a value obtained by encrypting the hash value file using a private key; wherein the public key is used to decrypt the encrypted value of the hash value file.

[0074] The value in the hash value file may be a SHA512 value.

[0075] In this embodiment, the contents of the hash value file and the encrypted file are clarified to help clarify the subsequent method of file security verification.

[0076] In one embodiment, the file download instruction is generated based on the download link received by the vehicle side from the cloud server side.

[0077] The download link includes the target file and the encrypted value of the current file name.

[0078] In this embodiment, subsequent processing can be performed through the file download instruction to ensure effective processing of the file in the event of a power outage or network disconnection.

[0079] Here, the file processing method provided by the present application is described in detail in the form of a specific embodiment. First, a target file is generated on the cloud server, including:

[0080] Obtain the upgrade file, determine the security verification file based on the upgrade file, the security verification file includes a script file, a hash value file and an encrypted file; construct a reconstruction file from the upgrade file and the security verification file; compress the reconstruction file to obtain a compressed file; symmetrically encrypt the compressed file using a preset encryption key to obtain an encrypted file, and use the encrypted file as the target file; calculate the hash value of the compressed file to obtain the encrypted value of the file name corresponding to the target file as the current encrypted value of the file name.

[0081] The implementation process of the document processing method includes:

[0082] The main control node on the vehicle side obtains the download link from the cloud server side at a preset time interval; when the download link is obtained, the main control node generates a file download instruction based on the received download link; and sends the file download instruction to the controller.

[0083] The controller receives a file download instruction and determines the current file name encryption value based on the file download instruction; if there is no file name encryption value corresponding to the target file that is the same as the current file name encryption value, that is, the target file is stored in the cloud server and the content distribution network but not stored in the controller, the target file is downloaded from the content distribution network; if a network disconnection signal is received and the network disconnection duration is greater than a preset duration, the target file is downloaded again from the content distribution network until the target file is downloaded, and the target file is decrypted, integrity checked, decompressed and signature verified in the controller in turn.

[0084] When there is a target file whose corresponding file name encryption value is the same as the current file name encryption value, that is, the target file has been stored in the controller, the latest processing flag of the target file is obtained; when the latest processing flag is a preset incomplete flag, the incomplete processing stage of the target file is determined based on the preset incomplete flag, and the incomplete processing stage is re-executed; when the number of times the incomplete processing stage is re-executed is greater than the preset number and the latest processing flag is the preset incomplete flag, the target file is cleaned up; wherein the preset incomplete flag includes at least one of incomplete download, incomplete decryption, incomplete integrity check, incomplete decompression or incomplete signature verification; when the latest processing flag is incomplete download, the target file is downloaded from the content distribution network, and when a network disconnection signal is received and the network disconnection duration is greater than the preset duration, the target file is downloaded again from the content distribution network until the target file is downloaded, and the target file is decrypted, integrity checked, decompressed and signature verified in the controller in sequence.

[0085] Specifically, the target file is downloaded from the content distribution network to the controller. The target file is decrypted by using a preset encryption key. The integrity check is achieved by comparing the encrypted value of the file name obtained by calculating the hash value of the decrypted file with the encrypted value of the file name corresponding to the target file. When the comparison is consistent, the integrity check is considered to be completed. Decompression is the decompression of the decrypted file. The signature verification is achieved by comparing the value encrypted by the private key of the hash value file with the value in the hash value file through the public key. When the comparison is consistent, the signature verification is considered to be completed.

[0086] The file processing method provided in this embodiment determines the current file name encryption value based on each file download instruction received, and determines whether there is a target file whose corresponding file name encryption value is the same as the current file name encryption value. If there is a same, it means that the file has been processed before. The target file is processed accordingly based on the latest processing flag of the target file, which can ensure that the previously processed file can continue to be processed accordingly, ensure the effective processing of files in the event of power outages and network disconnection, and also set a preset number of times and a preset duration to avoid waste of resources.

[0087] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0088] Based on the same inventive concept, the embodiment of the present application also provides a file processing device for implementing the file processing method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more file processing device embodiments provided below can refer to the limitations on the file processing method above, and will not be repeated here.

[0089] See also Figure 6 , Figure 6 6 is a structural block diagram of a file processing device provided in an embodiment of the present application. The device 600 includes: a file name encryption value determination module 601, a flag bit acquisition module 602 and a file processing module 603, wherein:

[0090] The file name encryption value determination module 601 is used to receive a file download instruction and determine the current file name encryption value based on the file download instruction;

[0091] The flag bit acquisition module 602 is used to acquire the latest processing flag bit of the target file when there is a file name encryption value corresponding to the target file that is the same as the current file name encryption value;

[0092] The file processing module 603 is used to perform corresponding processing on the target file based on the latest processing flag.

[0093] The file processing device provided by the present embodiment receives a file download instruction through a file name encryption value determination module, determines the current file name encryption value based on the file download instruction, obtains the latest processing flag of the target file through a flag acquisition module when the file name encryption value corresponding to the target file is the same as the current file name encryption value, and performs corresponding processing on the target file through the file processing module based on the latest processing flag. Compared with the conventional technology that will result in the inability to effectively process the file in the event of power outage and network disconnection, the present embodiment determines the current file name encryption value based on each received file download instruction, and determines whether the file name encryption value corresponding to the target file is the same as the current file name encryption value. If there is a same, it means that the file has been processed before, and the target file is processed accordingly based on the latest processing flag of the target file, which can ensure that the previously processed file can continue to be processed accordingly, and ensures the effective processing of the file in the event of power outage and network disconnection.

[0094] Optionally, the file processing module 603 includes:

[0095] A processing stage determining unit, configured to determine an unfinished processing stage of a target file based on a preset unfinished flag, and re-execute the unfinished processing stage when the latest processing flag is a preset unfinished flag;

[0096] A file cleaning unit is used to clean up the target file when the number of times the incomplete processing stage is re-executed is greater than a preset number and the latest processing flag is a preset incomplete flag; wherein the preset incomplete flag includes at least one of incomplete downloading, incomplete decryption, incomplete integrity check, incomplete decompression or incomplete signature verification.

[0097] Optionally, the device 600 further includes:

[0098] A file download module, used for downloading a target file from a content distribution network when there is no target file corresponding to a file name encrypted value that is the same as the current file name encrypted value;

[0099] The re-downloading module is used to re-download the target file from the content distribution network when a network disconnection signal is received and the network disconnection duration is longer than a preset duration, until the target file is downloaded completely.

[0100] Optionally, the device 600 further includes:

[0101] A target file generation module is used to obtain an upgrade file and determine a security verification file based on the upgrade file; wherein the security verification file includes at least one of a hash value file or an encrypted file; construct a reconstruction file based on the upgrade file and the security verification file; compress the reconstruction file to obtain a compressed file; encrypt the compressed file to obtain an encrypted file, and use the encrypted file as the target file.

[0102] Optionally, the hash value file includes a value obtained by performing a hash value calculation on the upgrade file; the encrypted file includes a public key and a value obtained by encrypting the hash value file using a private key; wherein the public key is used to decrypt the encrypted value of the hash value file.

[0103] Optionally, the file download instruction is generated based on a download link received by the vehicle from the cloud server.

[0104] Each module in the above-mentioned file processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.

[0105] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. 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 operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a file processing method is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

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

[0107] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the steps of the file processing method provided in the above embodiment are implemented:

[0108] Receive a file download instruction, and determine a current file name encryption value based on the file download instruction;

[0109] When the encrypted value of the file name corresponding to the target file is the same as the encrypted value of the current file name, the latest processing flag of the target file is obtained;

[0110] Based on the latest processing flag, the target file is processed accordingly.

[0111] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0112] In the case where the latest processing flag is a preset unfinished flag, determining an unfinished processing stage of the target file based on the preset unfinished flag, and re-executing the unfinished processing stage;

[0113] When the number of times the unfinished processing stage is re-executed is greater than the preset number and the latest processing flag is the preset unfinished flag, the target file is cleaned up; wherein the preset unfinished flag includes at least one of incomplete download, incomplete decryption, incomplete integrity check, incomplete decompression or incomplete signature verification.

[0114] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0115] If there is no target file corresponding to a file name whose encrypted value is the same as the current file name encrypted value, downloading the target file from the content distribution network;

[0116] When a network disconnection signal is received and the network disconnection duration is longer than a preset duration, the target file is downloaded again from the content distribution network until the target file is downloaded completely.

[0117] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0118] Obtain an upgrade file, and determine a security verification file based on the upgrade file; wherein the security verification file includes at least one of a hash value file or an encrypted file;

[0119] Build the reconstruction file based on the upgrade file and security verification file;

[0120] Compress the reconstructed file to obtain a compressed file;

[0121] The compressed file is encrypted to obtain an encrypted file, and the encrypted file is used as the target file.

[0122] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0123] The hash value file includes a value obtained by performing hash value calculation on the upgrade file; the encrypted file includes a public key and a value obtained by encrypting the hash value file using a private key; wherein the public key is used to decrypt the encrypted value of the hash value file.

[0124] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0125] The file download instruction is generated based on the download link received by the vehicle from the cloud server.

[0126] The implementation principle and technical effects of the above embodiment are similar to those of the above method embodiment and will not be repeated here.

[0127] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the file processing method provided in the above embodiment are implemented:

[0128] Receive a file download instruction, and determine a current file name encryption value based on the file download instruction;

[0129] When the encrypted value of the file name corresponding to the target file is the same as the encrypted value of the current file name, the latest processing flag of the target file is obtained;

[0130] Based on the latest processing flag, the target file is processed accordingly.

[0131] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0132] In the case where the latest processing flag is a preset unfinished flag, determining an unfinished processing stage of the target file based on the preset unfinished flag, and re-executing the unfinished processing stage;

[0133] When the number of times the unfinished processing stage is re-executed is greater than the preset number and the latest processing flag is the preset unfinished flag, the target file is cleaned up; wherein the preset unfinished flag includes at least one of incomplete download, incomplete decryption, incomplete integrity check, incomplete decompression or incomplete signature verification.

[0134] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0135] If there is no target file corresponding to a file name whose encrypted value is the same as the current file name encrypted value, downloading the target file from the content distribution network;

[0136] When a network disconnection signal is received and the network disconnection duration is longer than a preset duration, the target file is downloaded again from the content distribution network until the target file is downloaded completely.

[0137] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0138] Obtain an upgrade file, and determine a security verification file based on the upgrade file; wherein the security verification file includes at least one of a hash value file or an encrypted file;

[0139] Build the reconstruction file based on the upgrade file and security verification file;

[0140] Compress the reconstructed file to obtain a compressed file;

[0141] The compressed file is encrypted to obtain an encrypted file, and the encrypted file is used as the target file.

[0142] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0143] The hash value file includes a value obtained by performing hash value calculation on the upgrade file; the encrypted file includes a public key and a value obtained by encrypting the hash value file using a private key; wherein the public key is used to decrypt the encrypted value of the hash value file.

[0144] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0145] The file download instruction is generated based on the download link received by the vehicle from the cloud server.

[0146] The implementation principle and technical effects of the above embodiment are similar to those of the above method embodiment and will not be repeated here.

[0147] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps of the file processing method provided in the above embodiment:

[0148] Receive a file download instruction, and determine a current file name encryption value based on the file download instruction;

[0149] When the encrypted value of the file name corresponding to the target file is the same as the encrypted value of the current file name, the latest processing flag of the target file is obtained;

[0150] Based on the latest processing flag, the target file is processed accordingly.

[0151] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0152] In the case where the latest processing flag is a preset unfinished flag, determining an unfinished processing stage of the target file based on the preset unfinished flag, and re-executing the unfinished processing stage;

[0153] When the number of times the unfinished processing stage is re-executed is greater than the preset number and the latest processing flag is the preset unfinished flag, the target file is cleaned up; wherein the preset unfinished flag includes at least one of incomplete download, incomplete decryption, incomplete integrity check, incomplete decompression or incomplete signature verification.

[0154] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0155] If there is no target file corresponding to a file name whose encrypted value is the same as the current file name encrypted value, downloading the target file from the content distribution network;

[0156] When a network disconnection signal is received and the network disconnection duration is longer than a preset duration, the target file is downloaded again from the content distribution network until the target file is downloaded completely.

[0157] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0158] Obtain an upgrade file, and determine a security verification file based on the upgrade file; wherein the security verification file includes at least one of a hash value file or an encrypted file;

[0159] Build the reconstruction file based on the upgrade file and security verification file;

[0160] Compress the reconstructed file to obtain a compressed file;

[0161] The compressed file is encrypted to obtain an encrypted file, and the encrypted file is used as the target file.

[0162] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0163] The hash value file includes a value obtained by performing hash value calculation on the upgrade file; the encrypted file includes a public key and a value obtained by encrypting the hash value file using a private key; wherein the public key is used to decrypt the encrypted value of the hash value file.

[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0165] The file download instruction is generated based on the download link received by the vehicle from the cloud server.

[0166] The implementation principle and technical effects of the above embodiment are similar to those of the above method embodiment and will not be repeated here.

[0167] It should be noted that the data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) are all data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0168] 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, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this 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 memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access 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 and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0169] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0170] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A file processing method, characterized in that: The method comprises: receiving a file download instruction, and determining a current file name encrypted value based on the file download instruction; If the encrypted value of the file name corresponding to the target file is the same as the encrypted value of the current file name, obtaining the latest processing flag of the target file; Based on the latest processing flag, the target file is processed accordingly.

2. The method according to claim 1, characterized in that The processing of the target file based on the latest processing flag bit includes: In the case where the latest processing flag is a preset unfinished flag, determining an unfinished processing stage of the target file based on the preset unfinished flag, and re-executing the unfinished processing stage; When the number of times the unfinished processing stage is re-executed is greater than the preset number and the latest processing flag is the preset unfinished flag, the target file is cleaned up; wherein the preset unfinished flag includes at least one of incomplete download, incomplete decryption, incomplete integrity check, incomplete decompression or incomplete signature verification.

3. The method according to claim 1, characterized in that The method further comprises: If there is no target file corresponding to a file name whose encrypted value is the same as the current file name encrypted value, downloading the target file from a content distribution network; When a network disconnection signal is received and the network disconnection duration is longer than a preset duration, the target file is downloaded again from the content distribution network until the download of the target file is completed.

4. The method according to claim 1, characterized in that The process of generating the target file includes: Obtain an upgrade file, and determine a security verification file based on the upgrade file; wherein the security verification file includes at least one of a hash value file or an encrypted file; Constructing a reconstruction file according to the upgrade file and the security verification file; compressing the reconstructed file to obtain a compressed file; The compressed file is encrypted to obtain an encrypted file, and the encrypted file is used as the target file.

5. The method according to claim 4, characterized in that The hash value file includes a value obtained by performing hash value calculation on the upgrade file; the encrypted file includes a public key and a value obtained by encrypting the hash value file using a private key; wherein the public key is used to decrypt the encrypted value of the hash value file.

6. The method according to any one of claims 1 to 5, characterized in that: The file download instruction is generated based on the download link received by the vehicle from the cloud server.

7. A file processing device, characterized in that: The device comprises: A file name encryption value determination module, used to receive a file download instruction and determine a current file name encryption value based on the file download instruction; A flag bit acquisition module, used for acquiring the latest processing flag bit of the target file when there is a file name encryption value corresponding to the target file that is the same as the current file name encryption value; The file processing module is used to perform corresponding processing on the target file based on the latest processing flag.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Process management method and management platform for infotainment system

    CN120935163A