Incremental updating method and related device

By using an isolated storage mechanism between the backup buffer and the main buffer in the industrial control system, the problem of lost forced variables during incremental download is solved, enabling rapid determination and setting of forced variables, and ensuring continuous debugging and non-disruptive updates.

CN121900798APending Publication Date: 2026-04-21CHINA TECHENERGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA TECHENERGY
Filing Date
2026-01-09
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

When incrementally downloading data to an industrial control system, forced variables are easily lost, leading to debugging interruptions or logical misjudgments, which existing technologies cannot effectively solve.

Method used

By caching the i-th incremental download file in the backup cache area during the incremental download process, comparing it with the (i-1)-th incremental download file, determining the mandatory variable, and storing it in an independent storage area, the cache area is switched in response to the update timing to ensure that the mandatory variable is not lost.

Benefits of technology

It enables the rapid determination and setting of forced variables during incremental download, avoiding the loss of forced variables and ensuring the continuity of debugging and uninterrupted updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121900798A_ABST
    Figure CN121900798A_ABST
Patent Text Reader

Abstract

The invention discloses an increment updating method and a related device, and the method comprises the steps: storing an ith increment downloading file in a standby cache region for analysis through setting a main cache region and a standby cache region which are isolated from each other; and based on the forced variables in the (i-1) th increment downloading file, determining the forced variables which are kept forced and unchanged in the ith increment downloading process, and recording the forced variables through a variable table. And maintaining a corresponding variable in the ith increment downloading file according to the variable table, setting the corresponding variable in the ith increment downloading file as a forced variable, and independently storing the forced variable to prevent the software from covering the forced variable when calling the ith increment downloading file during running. And switching the standby cache region in which the ith incremental downloading file is stored into the main cache region by executing a cache region switching operation so as to be called by software during operation. Therefore, undisturbed updating of the incremental downloading file is realized, and the forced variable is prevented from being lost after incremental updating.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and in particular to an incremental update method and related apparatus. Background Technology

[0002] Incremental download technology is a key technology for achieving efficient operation and maintenance and dynamic updates in industrial control systems. It enables dynamic optimization and seamless upgrades of control logic by downloading only the modified or added parts. In the commissioning phase of industrial control systems, such as nuclear power plant digital instrumentation and control systems, incremental download technology is a core means to achieve efficient operation and maintenance, real-time logic updates, and reduce the risk of production interruptions.

[0003] In the process of incremental downloading, when using existing industrial control software, such as the programmable logic controller programming tool Codesys, there is a risk of losing the forced variables if they are deleted or modified without being released. After incremental downloading, the forced variables cannot be updated in a timely manner, which can easily lead to debugging interruption or logic misjudgment.

[0004] Therefore, how to avoid the loss of the state of forced variables when incrementally downloading data to an industrial control system is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] To address the aforementioned technical problems, this application provides an incremental update method and related apparatus.

[0006] The embodiments of this application disclose the following technical solutions:

[0007] On one hand, embodiments of this application provide an incremental update method, the method comprising:

[0008] Obtain the i-th incremental download file for the runtime software, wherein the i-th incremental download file is used to identify the i-th algorithm logic change to the runtime software;

[0009] The i-th incremental download file is cached in the spare cache area;

[0010] In the backup cache, the changes of the i-th incremental download file and the (i-1)-th incremental download file are compared to obtain a variable table. The variable table is used to identify the mandatory variables that are required to remain unchanged in the algorithm logic of the runtime software. The (i-1)-th incremental download file is cached in a main cache independent of the backup cache. The main cache is used to respond to the algorithm calls of the runtime software.

[0011] Maintain the corresponding variables in the i-th incremental download file according to the variable table, and store the corresponding variables in an independent storage area in the spare cache area;

[0012] In response to the arrival of an update opportunity, a cache switching operation is performed to identify the standby cache as the new primary cache and the primary cache as the new standby cache.

[0013] On the other hand, embodiments of this application provide an incremental update device, the device comprising: an acquisition unit, a cache unit, a comparison unit, a storage unit, and a switching unit;

[0014] The acquisition unit is used to acquire the i-th incremental download file for the runtime software, and the i-th incremental download file is used to identify the i-th algorithm logic change to the runtime software.

[0015] The caching unit is used to cache the i-th incremental download file to the spare cache area;

[0016] The comparison unit is used to compare the changes of the i-th incremental download file and the (i-1)-th incremental download file in the backup cache area to obtain a variable table. The variable table is used to identify the mandatory variables that are required to remain unchanged in the algorithm logic of the runtime software. The (i-1)-th incremental download file is cached in a main cache area that is independent of the backup cache area. The main cache area is used to respond to the algorithm calls of the runtime software.

[0017] The storage unit is used to maintain the corresponding variables in the i-th incremental download file according to the variable table, and store the corresponding variables in an independent storage area in the spare cache area;

[0018] The switching unit is configured to perform a cache switching operation in response to an update time, so as to identify the standby cache as the new main cache and the main cache as the new standby cache.

[0019] Optionally, the acquisition unit is further configured to:

[0020] Perform security verification on the i-th incremental download file;

[0021] When it is determined that the i-th incremental download file meets the security verification requirements, the i-th incremental download file is stored in the persistent storage space.

[0022] Optionally, the switching unit is further configured to:

[0023] When the specified interval of the algorithm's running cycle is reached, the update timing is determined.

[0024] Optionally, the switching unit is further configured to:

[0025] After performing the cache switching operation, if the runtime software determines that the algorithm call is abnormal, a rollback operation is performed to revert the new primary cache to the backup cache, and the new backup cache to the primary cache.

[0026] Optionally, in the i-th incremental download file, the update content for different data scenarios is set separately, and the data scenarios are used to identify different data structures, task parameters and hardware configurations.

[0027] Optionally, the comparison unit is further configured to:

[0028] Continuously compare the changes between the i-th incremental download file and the (i-1)-th incremental download file;

[0029] If variable update information is determined, the variable table is updated according to the variable update information, which is used to identify whether a new mandatory variable has been determined or whether the attributes of the originally determined mandatory variable have been changed.

[0030] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory:

[0031] The memory is used to store computer programs;

[0032] The processor is configured to perform the methods described above according to the computer program.

[0033] On the other hand, embodiments of this application provide a computer-readable storage medium for storing a computer program that, when executed by a computer device, implements the methods described above.

[0034] On the other hand, embodiments of this application provide a computer program product including a computer program, which, when run on a computer device, causes the computer device to perform the methods described above.

[0035] As can be seen from the above technical solution, during the incremental update process, by setting up mutually isolated main and backup caches, the i-th incremental download file is saved to the backup cache for parsing, avoiding disturbance to the ongoing control task during the download file deployment process. The i-th incremental download file stored in the backup cache is compared with the (i-1)-th incremental download file for changes to determine the mandatory variables that must remain unchanged during the i-th incremental download process. These are recorded in a variable table, thus pre-determining the corresponding mandatory variables in the i-th incremental download file based on the (i-1)-th incremental download file, ensuring the accuracy of the mandatory variable settings and improving their efficiency. The corresponding variables in the i-th incremental download file are maintained according to the variable table, thereby pre-setting these variables as mandatory variables. The mandatory variables in the i-th incremental download file are stored independently to prevent the runtime software from overwriting the mandatory variables in the i-th incremental download file when calling it. Furthermore, in response to the arrival of the update time, a cache switching operation is performed to switch the backup cache containing the i-th incremental download file to the primary cache for use by the runtime software. Thus, the above technical solution enables the rapid determination and setting of mandatory variables in the incremental download file, preventing the loss of mandatory variables after the incremental update, and avoiding any impact on the runtime software during the incremental download process, achieving a non-disruptive update. Attached Figure Description

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

[0037] Figure 1 A flowchart illustrating an incremental update method provided in an embodiment of this application;

[0038] Figure 2 A flowchart illustrating an incremental file security verification method provided in this application embodiment;

[0039] Figure 3 This is a schematic diagram of an incremental update device provided in an embodiment of this application. Detailed Implementation

[0040] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0041] In current industrial control systems, full-download updates are time-consuming and can cause system downtime. Incremental downloads, on the other hand, allow for smaller-scale updates without system downtime, reducing update costs. However, during incremental file downloads, existing mandatory variables may be deleted or modified without being released, leading to debugging interruptions or logical errors. While existing technologies can generate download files by reconfiguring variables and input / output (I / O) devices after configuration changes and using Multiprog (an industrial control system programming tool) to parse these files for non-intrusive incremental downloads, this method is currently only suitable for simple variable changes and I / O device modifications. It lacks coverage for complex data scenarios, such as incremental updates of data types, task attributes, hardware configurations, and libraries (user and external libraries).

[0042] To avoid the loss of forced variables during incremental downloading in industrial control systems and to maintain the state of forced variables during the incremental downloading process, this application independently stores the i-th download file in a spare cache area during the incremental downloading process. The i-th download file is compared with the (i-1)-th download file to determine the forced variables that need to maintain their forced state. Before the i-th download file is called by the runtime program, the forced variables in the variable table are maintained and independently stored. This enables rapid determination and maintenance of the forced variables in the download file, preventing them from being overwritten when the runtime program calls the i-th download file.

[0043] Existing industrial control software development platforms, such as mainstream nuclear power instrumentation and control software development platforms, mainly run on foreign operating systems, such as real-time operating systems QNX and VxWorks, and non-domestic chips, such as Advanced RISC Machine, Arm, Performance Optimization With Enhanced RISC – Performance Computing, and PowerPC. Their kernel scheduling, memory management, and other modules are closed-source, posing a risk of supply disruption. Furthermore, non-domestic operating systems are difficult to pass domestic security certifications (such as GB / T 20272 EAL4+). This limits the application of existing industrial control software development platforms in high-safety-level scenarios such as nuclear power.

[0044] The method provided in this application is deeply adapted to domestically produced operating systems and chips, ensuring independent control. It is deeply compatible with domestic operating systems such as Helu and Kylin, and domestic chips such as Loongson and Phytium. Simultaneously, the method provided in this application is also compatible with mainstream foreign operating systems, such as VxWorks, and non-domestic chips, such as Arm and PowerPC, and features low CPU load. Based on the IEC61131-3 standard for programmable logic controllers, this invention addresses the high reliability, real-time performance, and domestic requirements of industrial control systems, such as nuclear power plant instrumentation and control systems, achieving a non-disruptive incremental download technology for the entire data scene.

[0045] The embodiments of this application will now be described with reference to the accompanying drawings.

[0046] Please see Figure 1 , Figure 1 This is a flowchart illustrating an incremental update method provided in an embodiment of this application.

[0047] S101: Obtain the i-th incremental download file for the runtime software. The i-th incremental download file is used to identify the i-th algorithm logic change to the runtime software.

[0048] In this embodiment of the application, in the industrial control system, the runtime software, as a basic software platform, is responsible for managing and adapting the underlying operating system, executing communication protocols, parsing engineering files, and scheduling real-time files. The runtime software is responsible for converting the control logic generated by the host software into actual automated operations, acting as a bridge between the host software (such as the design environment) and the physical hardware. The runtime software adopts a modular design, with each module communicating through a standard interface to update the downloaded files. The host computer is responsible for incremental compilation, distinguishing the update content for various scenarios and storing it in the downloaded files. When the host computer initiates a download command, the runtime software of the lower-level machine receives the command along with its configuration information and download method. Each time the algorithm logic is updated, a corresponding increment can be generated based on the changes in the algorithm logic during this update. The increment represents the changes in the algorithm relative to the previous version during this update, such as the algorithm's parameters and calculation logic. The incremental update is used to compile and generate the i-th incremental download file. This incremental download file is a project file containing the incremental update content that can be used by the runtime software for algorithm calls. It identifies the i-th change to the algorithm logic in the runtime software, such as the algorithm's execution logic, runtime cycle, and execution conditions. The runtime software calls the incremental download file to execute the business logic in the industrial control system with the latest algorithm logic. The i-th incremental download file refers to the incremental download file used for this incremental update, where i ≥ 2.

[0049] S102: Cache the i-th incremental download file to the standby cache area.

[0050] In this embodiment, the backup cache is an independent cache for storing the i-th incremental download file. By storing the incremental download file independently, the incremental download file is prevented from being disturbed by the (i-1)-th incremental download file being called by the running software during the incremental download, security verification, parsing and other update processes due to incremental update anomalies.

[0051] S103: In the standby cache, the changes of the i-th incremental download file and the (i-1)-th incremental download file are compared to obtain a variable table. The variable table is used to identify the mandatory variables that are required to remain unchanged in the algorithm logic of the runtime software. The (i-1)-th incremental download file is cached in the main cache, which is independent of the standby cache. The main cache is used to respond to the algorithm calls of the runtime software.

[0052] In this embodiment, the (i-1)th incremental download file is the incremental download file currently used for runtime software calls in the industrial control system. The mandatory variables that must remain unchanged refer to variables that cannot be changed or deleted during the process of the incremental download file being called. By comparing the i-th incremental download file with the (i-1)th incremental download file, based on the original mandatory variables in the (i-1)th incremental download file, the corresponding variables in the i-th incremental download file that need to maintain their mandatory state are determined, and these corresponding variables are saved to a variable table. Thus, while ensuring that the (i-1)th incremental download file can be normally called by the runtime software, the corresponding variables that need to maintain their mandatory state during this incremental update process are determined.

[0053] In this embodiment, the (i-1)th incremental download file is cached in a main cache independent of the backup cache. Since the main cache and backup cache are isolated, the (i-1)th incremental download file runs independently in the main cache, while the download update process takes place in the backup cache. Therefore, during incremental downloading, the download update operation performed on the i-th incremental download file in the backup cache will not disturb the operation of the (i-1)th incremental download file in the main cache. The main cache is used to respond to algorithm calls from the runtime software. During incremental updates, the (i-1)th incremental download file can still independently provide services to the runtime software within the main cache.

[0054] S104: Maintain the corresponding variables in the i-th incremental download file according to the variable table, and store the corresponding variables in the independent storage area in the spare cache area.

[0055] In this embodiment, the forced variables in the (i-1)th incremental download file can be directly obtained using a variable table. By maintaining the variable table, the corresponding variables in the i-th incremental download file that need to be kept in a forced state can be quickly determined, and the corresponding variables in the i-th download file are set as forced variables. Furthermore, based on the variable table dynamic mapping mechanism, the forced variables in the i-th incremental download file are determined in the spare cache area, thereby inheriting the forced state of the unchanged variables in the (i-1)th incremental download file. For changed variables, memory redirection is triggered to determine the address of the variable whose state needs to be changed in the i-th incremental download file. Then, the forced variables in the i-th incremental download file are stored independently to ensure that the forced variables will not be lost or overwritten, thus ensuring debugging continuity.

[0056] S105: In response to the arrival of the update time, perform a cache switching operation to identify the standby cache as the new primary cache and the primary cache as the new standby cache.

[0057] In this embodiment, the update timing is used to indicate the execution of the cache switching operation, so as to avoid the download file being unable to be called by the runtime software due to the cache switching operation, thus affecting the normal operation of the industrial system. After completing the configuration of the forced variable in the i-th incremental download file and storing the forced variable independently, the i-th incremental download file is the latest download file that can be normally called by the runtime software. At this time, in response to reaching the update timing, by marking the standby cache as the new main cache, the runtime program can call the i-th incremental download file to perform business by calling the main cache, that is, calling the new project file that has undergone this algorithm logic change to perform business. At the same time, by marking the main cache as the new standby cache, the incremental download file can be stored and the download result can be returned during the next incremental update.

[0058] Therefore, this application utilizes mutually isolated main and backup caches to store the (i-1)th incremental download file and the ith incremental download file in independent storage spaces. This ensures that the runtime software's calls to the (i-1)th incremental download file and the parsing of the ith incremental download file are independent. The update process of the download file will not affect the original project file being called, thus avoiding disturbance to the ongoing control tasks during the download update. By comparing the ith incremental download file with the (i-1)th incremental download file, the corresponding variables of the mandatory states that need to be maintained in this download update are quickly determined, and these corresponding variables are stored in a variable table, ensuring the accuracy of the mandatory variable settings. Maintaining the ith incremental download file using the variable table and setting the corresponding variables in the ith incremental download file as mandatory variables not only maintains the mandatory states of the corresponding variables but also improves the efficiency of setting mandatory variables. Furthermore, by storing the configured mandatory variables in a separate storage space, it ensures that the incremental download file will not be lost when accessed by the runtime software. In response to the update timing, the main cache and backup cache are switched without affecting the runtime software's operation. Thus, during the incremental update process, the state of the mandatory variables is maintained, preventing them from being modified or deleted after the download update. Additionally, by setting the main cache and backup cache independently, the incremental update process avoids impacting the current runtime software's business execution and prevents disturbances to ongoing control tasks.

[0059] As one possible implementation, a security check is performed on the i-th incremental download file; when it is determined that the i-th incremental download file meets the security check requirements, the i-th incremental download file is stored in persistent storage space.

[0060] In this embodiment, to ensure the security of the download update process, a security check is performed on the incremental download file upon receiving the i-th incremental download file to verify its integrity. The download file undergoing security verification can be a temporary file of the i-th incremental download file. A preliminary security check is performed on the temporary file before writing it. If the security check fails, the temporary file is deleted and exception handling is performed. If the security check passes, the temporary file of the i-th incremental download file is renamed to the official download file, and the incremental download file is parsed.

[0061] The incremental download file that passes the security check is stored in the persistent storage space. The persistent storage space is a separate storage space independent of the memory used to store the incremental download file. The purpose of storing the i-th incremental download file in the independent storage space is to avoid the loss of the incremental download file due to the deletion of the file in memory when the industrial control system fails or restarts.

[0062] Please see Figure 2 , Figure 2 This is a flowchart illustrating an incremental file download security verification method provided in this application embodiment. After incremental download begins, a temporary file of the incremental download file is first downloaded to a file buffer, and a security verification of the incremental download file is performed to ensure its integrity. If the incremental download file passes the security verification, it is written to persistent storage space, such as flash memory. If the security verification fails, the incremental download file download fails.

[0063] Therefore, by performing security verification on the i-th incremental download file, the integrity of the download file during the incremental download process is ensured, enabling the incremental download file to be parsed successfully. By placing the security-verified incremental download file in persistent storage, the loss of the incremental download file is prevented during abnormal operation or restart of the industrial control system.

[0064] One possible implementation is to determine when an update is needed when a specified interval of the algorithm's running cycle is reached.

[0065] In this embodiment, the algorithm execution cycle refers to the execution cycle in which the runtime software calls the algorithm in the downloaded file and runs it completely once. The specified interval is the time interval used for updating the downloaded file within one execution cycle. By setting the specified interval, the updating and switching of the downloaded file is scheduled at a time that does not conflict with the runtime software's call to the algorithm in the downloaded file, such as before the algorithm is called or after one algorithm call is completed. Preferably, the specified interval of the algorithm execution cycle is set to t≤50ms. After the downloaded file is parsed, an atomic hot switching operation is performed. Specifically, the atomic hot switching operation involves designating the spare cache area containing the parsed i-th incremental downloaded file as the main cache area, thereby updating the entire i-th incremental downloaded file to the system for the runtime software to call the algorithm.

[0066] Therefore, by setting a specified interval in the algorithm's running cycle and determining the update timing based on the specified interval, the algorithm in the download file is prevented from being called by the runtime software when the backup cache is identified as the main cache after the incremental download file is parsed and the cache is switched, which would cause the runtime software's business execution to be interrupted. The download file is updated without disturbing the industrial control system, ensuring the production continuity of the download update process.

[0067] As one possible implementation, after performing a cache switching operation, if the runtime software determines that the algorithm call is abnormal, a rollback operation is performed to revert the new primary cache to a backup cache and the new backup cache to a primary cache.

[0068] In this embodiment, after performing a cache switching operation, the new primary cache is the primary cache storing the i-th incremental download file, and the new primary cache is used to respond to algorithm calls from runtime software. The new backup cache is the original primary cache storing the (i-1)-th incremental download file. After performing the cache switching operation, the primary cache storing the (i-1)-th incremental download file is marked as the new backup cache, and the new backup cache saves the (i-1)-th incremental download file after performing the cache switching operation. The rollback operation refers to rolling back the new primary cache to the backup cache, restoring the new backup cache storing the (i-1)-th incremental download file as the current primary cache responding to runtime software calls, and simultaneously deleting the i-th incremental download file from the new primary cache, and marking the new primary cache as the backup cache.

[0069] If the i-th incremental download file in the current main cache cannot respond normally to the algorithm call of the runtime software, the runtime software will determine that the algorithm call is abnormal. To ensure the normal execution of the runtime software's business, a rollback operation is performed, and the backup cache containing the (i-1)-th incremental download file is re-established as the main cache, using the (i-1)-th incremental download file to provide algorithm calls for the runtime software.

[0070] Therefore, by performing a rollback operation when an algorithm call anomaly is detected, if the current incremental download file cannot respond to the runtime software's algorithm calls, the original incremental download file can be used to provide algorithm calls for the runtime software. This avoids the runtime software failing to run properly due to algorithm call anomalies after a buffer switch operation. By performing a rollback operation when an algorithm call anomaly occurs, the continuity of runtime software operation is ensured when download update anomalies occur, thereby improving the reliability of the industrial control system.

[0071] As one possible implementation, in the i-th incremental download file, the update content for different data scenarios is set separately. The data scenario is used to identify different data structures, task parameters and hardware configurations.

[0072] In this embodiment, the i-th incremental download file includes update content for different data scenarios, which records data changes and device changes. Data changes may include data structures (e.g., structs, multidimensional arrays), user libraries, and external libraries, as well as changes in task parameters (e.g., task execution cycle, task priority). Device changes include changes in hardware configuration. Update content for multiple data scenarios is distinguished within a single incremental download file using data tags or a specific storage method.

[0073] Therefore, by identifying the updated content for different data scenarios, accurate differentiation of incremental download content for different data scenarios is achieved, thereby improving the accuracy of obtaining incremental download content for different data scenarios. Incremental updates of incremental download content for different data scenarios are performed through a single incremental download file, enabling incremental download updates for all data scenarios of the runtime software. This covers the vast majority of data scenario changes in industrial control systems, significantly reducing the need for full downloads during the update process.

[0074] Based on the methods provided in the above embodiments, this application implements a non-disruptive incremental download method for applications in all data scenarios. The methods provided in the above embodiments enable secure and reliable software deployment on domestically developed operating systems and chip platforms. Their core advantages are: 1) Support for incremental download functionality across all scenarios, adaptable to various industrial control systems in nuclear power systems; 2) Employing non-disruptive update technology to ensure zero disturbance to ongoing control tasks during software deployment; 3) Implementing retention after incrementing forced variables, avoiding the risk of losing the state of forced variables; 4) Achieving stable operation on independently controllable operating systems and chip architectures through domestic adaptation and optimization, meeting the special requirements of high security and high reliability for industrial control systems in nuclear power systems.

[0075] Please see Figure 3 , Figure 3 This is a schematic diagram of an incremental update device provided in an embodiment of this application. The device includes: an acquisition unit 301, a cache unit 302, a comparison unit 303, a storage unit 304, and a switching unit 305.

[0076] The acquisition unit 301 is used to acquire the i-th incremental download file for the runtime software, and the i-th incremental download file is used to identify the i-th algorithm logic change to the runtime software.

[0077] The cache unit 302 is used to cache the i-th incremental download file to the spare cache area;

[0078] The comparison unit 303 is used to compare the changes of the i-th incremental download file and the (i-1)-th incremental download file in the spare cache area to obtain a variable table. The variable table is used to identify the mandatory variables that are required to remain unchanged in the algorithm logic of the runtime software. The (i-1)-th incremental download file is cached in a main cache area that is independent of the spare cache area. The main cache area is used to respond to the algorithm call of the runtime software.

[0079] The storage unit 304 is used to maintain the corresponding variables in the i-th incremental download file according to the variable table, and store the corresponding variables in an independent storage area in the spare cache area;

[0080] The switching unit 305 is configured to perform a cache switching operation in response to an update time, so as to identify the standby cache as the new main cache and the main cache as the new standby cache.

[0081] As one possible implementation, the acquisition unit is further configured to:

[0082] Perform security verification on the i-th incremental download file;

[0083] When it is determined that the i-th incremental download file meets the security verification requirements, the i-th incremental download file is stored in the persistent storage space.

[0084] As one possible implementation, the switching unit is further configured to:

[0085] When the specified interval of the algorithm's running cycle is reached, the update timing is determined.

[0086] As one possible implementation, the switching unit is further configured to:

[0087] After performing the cache switching operation, if the runtime software determines that the algorithm call is abnormal, a rollback operation is performed to revert the new primary cache to the backup cache, and the new backup cache to the primary cache.

[0088] As one possible implementation, in the i-th incremental download file, the update content for different data scenarios is set separately, and the data scenarios are used to identify different data structures, task parameters and hardware configurations.

[0089] As one possible implementation, the comparison unit is further configured to:

[0090] Continuously compare the changes between the i-th incremental download file and the (i-1)-th incremental download file;

[0091] If variable update information is determined, the variable table is updated according to the variable update information, which is used to identify whether a new mandatory variable has been determined or whether the attributes of the originally determined mandatory variable have been changed.

[0092] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory:

[0093] The memory is used to store computer programs;

[0094] The processor is configured to perform the methods described above according to the computer program.

[0095] On the other hand, embodiments of this application provide a computer-readable storage medium for storing a computer program that, when executed by a computer device, implements the methods described above.

[0096] On the other hand, embodiments of this application provide a computer program product including a computer program, which, when run on a computer device, causes the computer device to perform the methods described above.

[0097] Therefore, this application utilizes mutually isolated main and backup caches to store the (i-1)th incremental download file and the ith incremental download file in independent storage spaces. This ensures that the runtime software's calls to the (i-1)th incremental download file and the parsing of the ith incremental download file are independent. The update process of the download file will not affect the original project file being called, thus avoiding disturbance to the ongoing control tasks during the download update. By comparing the ith incremental download file with the (i-1)th incremental download file, the corresponding variables of the mandatory states that need to be maintained in this download update are quickly determined, and these corresponding variables are stored in a variable table, ensuring the accuracy of the mandatory variable settings. Maintaining the ith incremental download file using the variable table and setting the corresponding variables in the ith incremental download file as mandatory variables not only maintains the mandatory states of the corresponding variables but also improves the efficiency of setting mandatory variables. Furthermore, by storing the configured mandatory variables in a separate storage space, it ensures that the incremental download file will not be lost when accessed by the runtime software. In response to the update timing, the main cache buffer and the backup cache buffer are switched without affecting the runtime software's operation. Thus, during the incremental update process, the state of the mandatory variables is maintained, preventing them from being modified or deleted after the download update. Additionally, by setting the main cache buffer and the backup cache buffer independently, the incremental update process avoids impacting the business execution of the currently running software and prevents disturbances to ongoing control tasks.

[0098] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.

[0099] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0100] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0101] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0102] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

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

Claims

1. An incremental update method, characterized in that, The method includes: Obtain the i-th incremental download file for the runtime software, wherein the i-th incremental download file is used to identify the i-th algorithm logic change to the runtime software; The i-th incremental download file is cached in the spare cache area; In the backup cache, the changes of the i-th incremental download file and the (i-1)-th incremental download file are compared to obtain a variable table. The variable table is used to identify the mandatory variables that are required to remain unchanged in the algorithm logic of the runtime software. The (i-1)-th incremental download file is cached in a main cache independent of the backup cache. The main cache is used to respond to the algorithm calls of the runtime software. Maintain the corresponding variables in the i-th incremental download file according to the variable table, and store the corresponding variables in an independent storage area in the spare cache area; In response to the arrival of an update opportunity, a cache switching operation is performed to identify the standby cache as the new primary cache and the primary cache as the new standby cache.

2. The method according to claim 1, characterized in that, The method further includes: Perform security verification on the i-th incremental download file; When it is determined that the i-th incremental download file meets the security verification requirements, the i-th incremental download file is stored in the persistent storage space.

3. The method according to claim 1, characterized in that, The method further includes: When the specified interval of the algorithm's running cycle is reached, the update timing is determined.

4. The method according to claim 1, characterized in that, The method further includes: After performing the cache switching operation, if the runtime software determines that the algorithm call is abnormal, a rollback operation is performed to revert the new primary cache to the backup cache, and the new backup cache to the primary cache.

5. The method according to claim 1, characterized in that, In the i-th incremental download file, the update content for different data scenarios is set separately. The data scenarios are used to identify different data structures, task parameters, and hardware configurations.

6. An incremental update device, characterized in that, The device includes: an acquisition unit, a cache unit, a comparison unit, a storage unit, and a switching unit; The acquisition unit is used to acquire the i-th incremental download file for the runtime software, and the i-th incremental download file is used to identify the i-th algorithm logic change to the runtime software. The caching unit is used to cache the i-th incremental download file to the spare cache area; The comparison unit is used to compare the changes of the i-th incremental download file and the (i-1)-th incremental download file in the backup cache area to obtain a variable table. The variable table is used to identify the mandatory variables that are required to remain unchanged in the algorithm logic of the runtime software. The (i-1)-th incremental download file is cached in a main cache area that is independent of the backup cache area. The main cache area is used to respond to the algorithm calls of the runtime software. The storage unit is used to maintain the corresponding variables in the i-th incremental download file according to the variable table, and store the corresponding variables in an independent storage area in the spare cache area; The switching unit is configured to perform a cache switching operation in response to an update timeout, so as to identify the standby cache as the new main cache and the main cache as the new standby cache.

7. A computer device, characterized in that, The computer device includes a processor and memory: The memory is used to store computer programs; The processor is configured to perform the method according to any one of claims 1-5 according to the computer program.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that, when executed by a computer device, performs the method described in any one of claims 1-5.

9. A computer program product comprising a computer program, which, when run on a computer device, causes the computer device to perform the method of any one of claims 1-5.