Search

CN-122019552-A - On-demand triggered data updating method and device, electronic equipment and storage medium

CN122019552ACN 122019552 ACN122019552 ACN 122019552ACN-122019552-A

Abstract

The application relates to the technical field of on-demand triggered data updating, and discloses an on-demand triggered data updating method, an on-demand triggered data updating device, electronic equipment and a storage medium, wherein the method comprises the steps of receiving an operation instruction input by a user; the method comprises the steps of obtaining a relevant module for executing an operation instruction, detecting whether a preset local area to be updated has a new version of data packet corresponding to the relevant module, recording the relevant module with the new version of data packet as the relevant module, carrying out increment merging update based on the new version of data packet corresponding to the relevant module to generate the new version of module, and executing the operation instruction based on the new version of module. The method has the advantages that the continuity of user operation and the stability of system operation in the module updating process are guaranteed by pre-storing the new version data packet in the local area to be updated, the new version module is generated by executing increment combination, and then the user instruction is executed based on the new version module, so that the function updating can be immediately effective, and the user experience is greatly improved.

Inventors

  • XIE YANCHUN
  • LI CHANGAN
  • LEI YUNDONG

Assignees

  • 南昌市星纬软件开发有限公司

Dates

Publication Date
20260512
Application Date
20251212

Claims (10)

  1. 1. An on-demand triggered data update method, the method comprising: Receiving an operation instruction input by a user; acquiring a related module for executing the operation instruction; detecting whether a preset local area to be updated has a new version of data packet corresponding to the related module or not, wherein the local area to be updated is used for storing the downloaded new version of data packet; If the new version data packet exists, incremental merging and updating are carried out based on the new version data packet corresponding to the related module so as to generate a new version module; and executing the operation instruction based on the new version module.
  2. 2. The on-demand triggered data updating method according to claim 1, wherein before the step of detecting whether the preset local area to be updated has a new version of data packet corresponding to the relevant module, the method further comprises: Receiving an update index table pushed by a cloud server, wherein the update index table contains version information of each related module; extracting a local data index table, comparing the local data index table with the update index table, and calculating a module needing to be updated and an optimal update strategy; And downloading a new version of data packet based on the optimal updating strategy and storing the new version of data packet in a local area to be updated.
  3. 3. The on-demand triggered data update method of claim 2, wherein before the step of receiving the update index table pushed by the cloud server, further comprises: Reading a diagnosis log file of a user to acquire vehicle operation information of the user; analyzing the time law of user operation equipment according to the vehicle operation information so as to judge the idle time period of the client equipment; and setting the receiving time for receiving the updated index table pushed by the cloud server according to the idle time period.
  4. 4. The on-demand triggered data update method of claim 1, wherein if the new version of data packet is provided, performing incremental merging update based on the new version of data packet corresponding to the relevant module, so as to generate a new version of module, further comprising: Acquiring an expected hash value carried in the new version of data packet and a corresponding preset hash algorithm; performing hash calculation on the new version module based on the preset hash algorithm to obtain a calculated hash value of the new version module; comparing the calculated hash value with the expected hash value; and determining the integrity of the new version of data packet according to the comparison result.
  5. 5. The on-demand triggered data update method of claim 4, further comprising, after the step of determining the integrity of the new version of data packet based on the comparison result: If the calculated hash value is inconsistent with the expected hash value, repeating the step of incremental merging and updating to generate a new version module and performing integrity check again; And when the number of times of repeating the increment merging updating and the integrity checking reaches a preset number of times and the calculated hash value is inconsistent with the expected hash value, stopping further increment merging updating operation and feeding back that the new version of data packet is unqualified.
  6. 6. The on-demand triggered data update method of claim 1, wherein if the new version of data packet is provided, the step of performing incremental merging update based on the new version of data packet corresponding to the relevant module to generate the new version of module comprises: analyzing the new version data packet to obtain the change type of the related module and the target file path of the related module; and performing increment merging and updating according to the change type of the related module and the target file path of the related module to generate a new version module.
  7. 7. The on-demand triggered data update method of claim 6, wherein the step of generating a new version of the module by incremental merge update according to the change type of the related module and the target file path thereof comprises: When the change type is modification, obtaining a patch file corresponding to the related module from the new version data packet, and applying the patch file to a local old version file according to a target file path by adopting a patch tool based on a binary differential algorithm or a unified differential format so as to obtain a corresponding new version module; when the change type is replacement, deleting a local old version of target file according to a target file path, acquiring a corresponding new file in a new version data packet, and copying the new file to the position of the target file to obtain a corresponding new version module; and when the change type is new, acquiring a new file in the new version data packet, and copying the new file to a preset storage path of the local module according to the target file path to obtain a corresponding new version module.
  8. 8. An on-demand triggered data update apparatus, the apparatus comprising: The receiving module is used for receiving an operation instruction input by a user; the acquisition module is used for acquiring a related module for executing the operation instruction; the detection module is used for detecting whether a preset local area to be updated has a new version of data packet corresponding to the relevant module or not, wherein the local area to be updated is used for storing the downloaded new version of data packet; the updating module is used for carrying out increment combination updating based on the new version data packet corresponding to the related module if the new version data packet exists, so as to generate a new version module; And the execution module is used for executing the operation instruction based on the new version module.
  9. 9. A computer readable storage medium, characterized in that a computer program is stored, which, when being executed by a processor, causes the processor to perform the steps of the on-demand triggered data update method as claimed in any one of claims 1 to 7.
  10. 10. An electronic device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the on-demand triggered data update method of any one of claims 1 to 7.

Description

On-demand triggered data updating method and device, electronic equipment and storage medium Technical Field The present invention relates to the field of on-demand triggered data update technologies, and in particular, to an on-demand triggered data update method, an on-demand triggered data update device, an electronic device, and a storage medium. Background With the complexity of an automobile electronic control system, the diagnosis equipment generally needs to support tens or hundreds of automobile types and functional modules, the existing updating mechanism mostly adopts a full-package updating mode, and even if the modules are only slightly changed, complete new version files are required to be downloaded, so that for the modules with larger volumes or maintenance workshops with limited network conditions, the full-package updating is time-consuming and occupies a large amount of flow, and the full-package updating needs to be downloaded again once network fluctuation occurs in the updating process, so that the success rate is low, and the operation efficiency of users is affected. In order to reduce bandwidth occupation, a background silence updating mode is mostly adopted in the prior art, and a module file is directly replaced after updating is completed, so that process interruption or abnormality is easily caused when a user is still operating equipment. Disclosure of Invention Based on this, it is necessary to provide an on-demand data updating method, an on-demand data updating device, an electronic device and a storage medium, which solve the existing on-demand data updating problem. An on-demand triggered data update method, the method comprising: Receiving an operation instruction input by a user; acquiring a related module for executing the operation instruction; detecting whether a preset local area to be updated has a new version of data packet corresponding to the related module or not, wherein the local area to be updated is used for storing the downloaded new version of data packet; If the new version data packet exists, incremental merging and updating are carried out based on the new version data packet corresponding to the related module so as to generate a new version module; and executing the operation instruction based on the new version module. Further, before the step of detecting whether the preset local area to be updated has the new version of the data packet corresponding to the relevant module, the method further includes: Receiving an update index table pushed by a cloud server, wherein the update index table contains version information of each related module; extracting a local data index table, comparing the local data index table with the update index table, and calculating a module needing to be updated and an optimal update strategy; And downloading a new version of data packet based on the optimal updating strategy and storing the new version of data packet in a local area to be updated. Further, before the step of receiving the update index table pushed by the cloud server, the method further includes: Reading a diagnosis log file of a user to acquire vehicle operation information of the user; analyzing the time law of user operation equipment according to the vehicle operation information so as to judge the idle time period of the client equipment; and setting the receiving time for receiving the updated index table pushed by the cloud server according to the idle time period. Further, if the new version data packet is provided, the step of generating a new version module by performing incremental merging update based on the new version data packet corresponding to the relevant module further includes: Acquiring an expected hash value carried in the new version of data packet and a corresponding preset hash algorithm; performing hash calculation on the new version data packet based on the preset hash algorithm to obtain a calculated hash value of a new version module; comparing the calculated hash value with the expected hash value; and determining the integrity of the new version of data packet according to the comparison result. Further, after the step of determining the integrity of the new version data packet according to the comparison result, the method further includes: If the calculated hash value is inconsistent with the expected hash value, repeating the step of incremental merging and updating to generate a new version module and performing integrity check again; And when the number of times of repeating the increment merging updating and the integrity checking reaches a preset number of times and the calculated hash value is inconsistent with the expected hash value, stopping further increment merging updating operation and feeding back that the new version of data packet is unqualified. Further, if the new version data packet is provided, performing incremental merging update based on the new version data packet corresponding to the related module