Data integrity detection method and distributed system controller

By setting task priority in the data processing system and prioritizing higher priority tasks, the problem of data integrity check occupies processing resources is solved, ensuring timely processing of other tasks in the system and system stability.

CN119781915APending Publication Date: 2025-04-08HANGZHOU KANGJISEN AUTOMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411749724.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

When performing data integrity checks, the prior art may occupy a large amount of processing resources, resulting in slow or suspended processing of other tasks of the equipment, causing negative impacts on the system.

Method used

By setting task priority, create integrity check tasks with the first priority and perform integrity check tasks without unsuccessful higher priority tasks. When higher priority tasks appear, pause the integrity check task to prioritize higher priority tasks.

Benefits of technology

Effectively avoid the integrity check task seizing the processing resources of important tasks, ensuring the timely processing of important tasks, reducing the negative impact of the system, and improving the periodic requirements of task processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781915A_ABST
    Figure CN119781915A_ABST
Patent Text Reader

Abstract

The present application discloses a data integrity detection method and a distributed system controller, which are used to implement data integrity check and reduce the negative impact on the system. The scheme provided by the present application includes: detecting whether there is new data to be checked for integrity; if so, creating an integrity check task with a first priority based on the new data; if there is no unfinished task with a second priority, executing the integrity check task, wherein the first priority is lower than the second priority; during the execution of the integrity check task, if there is a task with a second priority to be executed, pausing the integrity check task and executing the task with the second priority.
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, and in particular to a data integrity detection method and a distributed system controller. Background Art

[0002] Data integrity check can effectively detect incomplete data, and complete data can help reduce anomalies caused during processing. In actual applications, the processing performance of the device is limited, and integrity check often occupies a part of the processing resources, which may cause the processing speed of other tasks of the device to be slow or even suspended, causing negative impact on the system.

[0003] How to implement data integrity check and reduce the negative impact on the system is the technical problem to be solved by this application. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a data integrity detection method and a distributed system controller to implement data integrity checking and reduce negative impacts on the system.

[0005] In a first aspect, a data integrity detection method is provided, comprising: Check whether there is new data to be checked for integrity; If so, creating an integrity check task with a first priority based on the newly added data; If there is no unfinished task with the second priority, executing the integrity check task, wherein the first priority is lower than the second priority; During the execution of the integrity check task, if a task with a second priority to be executed appears, the integrity check task is suspended and the task with the second priority is executed.

[0006] In a second aspect, a distributed system controller is provided, comprising: A detection module detects whether there is new data to be checked for integrity; A creation module, if present, creates an integrity check task with a first priority based on the newly added data; A first execution module, executing the integrity check task if there is no unfinished task with a second priority, wherein the first priority is lower than the second priority; The second execution module is configured to suspend the integrity check task and execute the task with the second priority if a task with the second priority to be executed appears during the execution of the integrity check task.

[0007] According to a third aspect, an electronic device is provided. The electronic device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the method according to the first aspect are implemented.

[0008] According to a fourth aspect, 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 method according to the first aspect are implemented.

[0009] In a fifth aspect, a computer program product is provided, the computer program product comprising a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to execute part or all of the steps of the method of the first aspect.

[0010] In an embodiment of the present application, once new data to be checked for integrity is detected, an integrity check task is created, and the order of task execution is controlled by setting priorities. In the absence of unfinished tasks of higher priority, the integrity check task is executed, so that the integrity check is performed when there are idle resources, avoiding the integrity check from preempting the resources of the task being executed. During the execution of the integrity check task, once a higher priority task to be executed appears, the integrity check is suspended and the higher priority task is processed first. This solution gives priority to the execution of important tasks by setting task priorities, avoiding the integrity check from preempting the processing resources of important tasks and avoiding extending the processing time of important tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1a This is one of the flowcharts of a data integrity detection method according to an embodiment of the present application; Figure 1b It is a schematic diagram of a fast data processing task of a data integrity detection method according to an embodiment of the present application; Figure 2a This is a second flow chart of a data integrity detection method according to an embodiment of the present application; Figure 2b This is a flowchart of a data integrity detection method according to an embodiment of the present application; Figure 2c This is a fourth flow chart of a data integrity detection method according to an embodiment of the present application; Figure 3This is a fifth flow chart of a data integrity detection method according to an embodiment of the present application; Figure 4 This is a sixth flow chart of a data integrity detection method according to an embodiment of the present application; Figure 5 This is a flowchart of a data integrity detection method according to an embodiment of the present application; Figure 6 This is a flowchart of a data integrity detection method according to an embodiment of the present application; Figure 7 It is a structural schematic diagram of a data integrity detection device according to an embodiment of the present application. DETAILED DESCRIPTION

[0012] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application. The numbering of the drawings in this application is only used to distinguish the various steps in the scheme, and is not used to limit the execution order of the various steps. The specific execution order is subject to the description in the specification.

[0013] Distributed Control System (DCS), also known as a distributed control system, can use a real-time operating system (RTOS) to achieve a fast response effect, with the fastest data processing output reaching 10ms.

[0014] In fast processing DCS controller applications, after the configuration and Program Organization Unit (POU) program data are downloaded, it is often necessary to perform a data integrity check on the configuration and POU program. However, fast processing tasks may be running in the controller, and if integrity checks are performed directly, the execution of fast processing tasks may be affected.

[0015] Configuration refers to completing the required software functions in a simple way similar to "building blocks" without writing computer programs. In practical applications, configuration software can monitor and control automation processes and equipment, collect various information from automation processes and equipment, and display the information in a more understandable way such as graphics, so as to analyze, process and store the information, issue control instructions based on the collected information, etc.

[0016] Program Organization Unit refers to programming objects such as programs, function blocks, functions, etc., which can be used to create controller applications. In the application process, POU can be regarded as an independent module, which often contains a group of related function blocks and variables, and can be called and reused by other POUs.

[0017] When the configuration or POU program is downloaded to the controller as new data through the host computer, the controller can perform an integrity check on the new data. After confirming that it is complete, the controller can use the new data. The integrity check of the new data is a relatively time-consuming process. The time required for the check varies depending on the size of the configuration data and POU program data downloaded from the host computer. It takes about 130ms to check each 4MB of data. Based on this check rate, if the integrity check is performed while executing a fast data processing task, it will often occupy the execution resources of the fast data processing task and extend the processing time of the fast data.

[0018] In order to solve the problems existing in the related art, the embodiment of the present application provides a data integrity detection method, which can be applied to electronic devices such as controllers, such as Figure 1a As shown, including: S11: Check whether there is any new data to be checked for integrity.

[0019] In this step, the storage area for storing newly added data may be detected. If a new download task is completed, or data that has not been checked for integrity is added to the storage area, it may be determined that there is newly added data to be checked for integrity.

[0020] S12: If yes, create an integrity check task with the first priority based on the newly added data.

[0021] When there is new data to be checked for integrity, an integrity check task is created based on the new data, and the integrity check task is set to have a first priority. The order of task processing can be controlled by setting priorities, and tasks with higher priorities are processed first when processing resources are limited.

[0022] S13: If there is no unfinished task with the second priority, executing the integrity check task, wherein the first priority is lower than the second priority.

[0023] For the integrity check task with the first priority that has been created, first check whether there is a higher priority task that is being executed or has not yet started. If there is a higher priority task that has not been completed, the higher priority task will be processed first. If there is no higher priority task that has not been completed, the above integrity check task will be executed.

[0024] In the solution provided in the embodiment of the present application, the first priority is lower than the second priority. In practical applications, the priority of task processing can be divided according to actual needs. For example, for the various tasks processed by the controller, the fast data processing task can be set as the highest priority task, and the integrity check task can be set as the second highest priority task. Alternatively, other tasks other than the fast data processing task and the integrity check task can be set as medium priority tasks, and the integrity check can be set as the lowest priority task. Among them, the priority of the task can be divided into multiple levels according to actual needs, so that the corresponding processing priority is set for the task according to the importance of the task, so as to process various tasks in an orderly manner.

[0025] S14: During the execution of the integrity check task, if a task with a second priority to be executed appears, suspending the integrity check task and executing the task with the second priority.

[0026] During the execution of the integrity check task, if a new higher priority task appears, the currently executing integrity check task is suspended, and the higher priority (ie, second priority) task is started.

[0027] After the second priority task is processed, if there are no other second priority tasks to be processed, the temporarily suspended integrity check task can be continued. Correspondingly, if a new second priority task appears after the integrity check task is restarted, the integrity check task can be suspended again until the task processing is completed.

[0028] Through the solution provided by the embodiment of the present application, the integrity check task can be executed without executing a higher priority task. If a new higher priority task appears, the above integrity check task is suspended to provide processing resources for the higher priority task. This solution is particularly suitable for devices with high requirements for task processing cycles. By setting priorities, it is ensured that the integrity check task will not snatch the processing resources of higher priority tasks, which is conducive to achieving the periodic requirements of task processing.

[0029] The following is a further explanation of this solution with an example. This solution is applied to a controller. First, the controller can perform resource initialization. After the resource initialization is completed, a fast data processing task is created according to actual needs. The fast data processing task scheduling period is, for example, 10ms, which can be used to process bit number data input and output and periodic POU scheduling and other functions.

[0030] In terms of task priority, the fast data processing task is configured with the highest priority, which means that the priority of the fast data processing task is higher than that of other tasks. When a fast data processing task with a higher priority needs to be executed, the fast data processing task can directly seize the processing resources of the ordinary priority task being executed, suspending the ordinary priority task, thereby efficiently executing the fast data processing task to meet the requirements of fast processing and fast output for the fast data processing task.

[0031] The following is an example to illustrate the processing mechanism for tasks of different priorities.

[0032] In one case, assuming that the controller is executing a second priority task, and a first priority task is added to the controller to be executed. In this case, since the first priority is lower than the second priority, the controller will continue to execute the second priority task without interruption.

[0033] In one case, suppose the controller is executing a first priority task and a second priority task is added to the controller. In this case, since the second priority is higher than the first priority, the controller will pause and suspend the currently executing first priority task and start executing the second priority task as soon as possible.

[0034] In one case, the controller is executing a second priority task, and there is a second priority task to be executed and a first priority task to be executed at the same time. After the second priority task currently being executed is processed, the controller will select the second priority task to execute from the two tasks to be executed because the second priority is higher than the first priority.

[0035] For the fast data processing tasks in the embodiments of the present application, various types of tasks may be included in practical applications. Figure 1b Various types of fast data processing tasks are shown. The functions implemented by the fast data processing tasks may include, for example: system data processing, data acquisition, variable processing, periodic POU scheduling processing, diagnosis, redundancy, output, multicast processing, configuration management, etc.

[0036] Through the solution provided by the embodiment of the present application, once new data to be checked for integrity is detected, an integrity check task is created, and the order of task execution is controlled by setting priorities. In the absence of unfinished tasks of higher priority, the integrity check task is executed, so that the integrity check is performed when there are idle resources, avoiding the integrity check from preempting the resources of the task being executed. During the execution of the integrity check task, once a higher priority task to be executed appears, the integrity check is suspended and the higher priority task is processed first. This solution gives priority to the execution of important tasks by setting task priorities, avoiding the integrity check from preempting the processing resources of important tasks and avoiding extending the processing time of important tasks.

[0037] Based on the solution provided in the above embodiment, optionally, Figure 2a As shown, in the above step S11, detecting whether there is new data to be checked for integrity includes: S21: Detecting whether there is newly downloaded data in the temporary data cache based on the data management task.

[0038] In actual applications, the newly added data may be newly downloaded data, which may be stored in a temporary data cache. In this example, a data management task is used to perform a check on the temporary data cache to determine whether there is newly added data to be checked for integrity.

[0039] In the above step S12, creating an integrity check task with a first priority based on the newly added data includes: S22: Creating the integrity check task with the first priority based on the data management task through a semaphore trigger.

[0040] In this step, if the data management task detects that there is new data to be checked for integrity in the temporary data cache, a semaphore is used to trigger the creation of an integrity check task with a first priority for the new data.

[0041] See also Figure 2b As shown in the flowchart, the above data management task can be implemented through configuration management. Once the data management task detects that there is new data to be checked for integrity, the data integrity check is triggered by a semaphore. For example, if the new data is configuration data or POU program data, a configuration download completion semaphore can be sent to the configuration and POU program data check through the data management task to trigger the integrity check task with the first priority through the semaphore. Accordingly, after the data check task is executed, the integrity check result can be fed back to the configuration management through, for example, a configuration data check completion semaphore.

[0042] See also Figure 2c The flowchart shown in FIG. 1 triggers the start of the configuration and POU data integrity check based on the signal sent by the above data management task. In the process of creating the integrity check task with the first priority, the newly added data is first queried from the temporary data cache to determine whether the configuration download has been completed. If there is newly added configuration data, an integrity check task with the first priority is created based on the newly added configuration data to perform the configuration and POU data integrity check. Subsequently, it is determined whether the configuration check has been completed. If the check result indicates that the data is complete, a configuration data check complete signal is sent.

[0043] In the solution provided in the embodiment of the present application, a data management task is used to detect whether there is new data that needs to be checked for data integrity, and then a data integrity check task is created through a semaphore trigger, thereby achieving effective detection of the new data and creation of an integrity check task for the new data, thereby treating the integrity check as a separate processing task and executing the integrity check of the new data when no higher priority task is executed.

[0044] Based on the solution provided in the above embodiment, optionally, Figure 3 As shown, in the above step S13, executing the integrity check task includes: S31: Allocate processing resources to execute the integrity check task.

[0045] In this step, the processing resources necessary for executing the task processing are allocated to the integrity check task. For example, a corresponding amount of processing resources are allocated according to the capacity of the newly added data. Alternatively, processing resources are allocated to perform the integrity check at a preset processing speed, for example, ensuring that the processing speed is 130ms per check of 4MB of data. For another example, a preset amount of processing resources is allocated according to the type of the newly added data.

[0046] Wherein, in the above step S14, pausing the integrity check task and executing the task with the second priority level includes: S32: Allocate at least part of the processing resources used to execute the integrity check task to execute the task with the second priority.

[0047] In this step, the integrity check task is suspended to allocate the processing resources originally used to process the integrity check task, and the allocated processing resources are provided to the second priority task that needs to be executed. In actual applications, the second priority task can seize all or part of the processing resources used by the integrity check task. The amount of processing resources actually called can be determined according to the processing requirements of the second priority task.

[0048] Through the solution provided in the embodiment of the present application, when there is a second-priority task that needs to be executed, the processing resources of the first-priority task being executed will be deployed to ensure that the second-priority task has sufficient processing resources to use, thereby ensuring the processing efficiency of the second-priority task, which is particularly suitable for technical scenarios that have strict requirements on the task processing cycle.

[0049] Based on the solution provided in the above embodiment, optionally, the method is applied to a distributed control system DCS controller, and the DCS controller applies a real-time operating system RTOS.

[0050] Among them, Figure 4 As shown, after the above step S13, that is, after executing the integrity check task, it also includes: S41: If the integrity check of the newly added data passes, the newly added data in the temporary data cache is stored in the storage data area of ​​the DCS controller.

[0051] In the FreeRTOS system, the priority of a task can be configured, for example, through configMAX_PRIORITIES in the FreeRTOSConfig.h file. Among them, configMAX_PRIORITIES determines the highest priority that the user can use. For example, the actual priority range that can be used is 0 to configMAX_PRIORITIES – 1. For task priority, the smaller the configured priority value, the lower the priority of the task. The processing priority value of the idle task can be 0.

[0052] In the scenario of executing multiple tasks, multiple tasks are processed in order based on the processing priority configured for each task. For example, the task with the highest priority is selected for execution first, and the RTOS can detect changes in task status through hardware interrupts. When a high-priority task is to be executed, the RTOS can directly interrupt the currently executing task and execute the above-mentioned higher-priority task to be processed, thereby realizing the preemption of processing resources of low-priority tasks by high-priority tasks.

[0053] For lower priority tasks whose processing resources are preempted, RTOS can save the context of the lower priority task, which may include register status, program counter, etc. And restore the context of the higher priority task to be executed, so as to achieve priority processing of high priority tasks.

[0054] In the embodiment of the present application, in the DCS controller, the priority of the configuration data check task is lower than the priority of the fast data processing task. After the configuration is downloaded, it can be temporarily stored in the temporary cache. A configuration download completion signal is sent to the configuration data check task through the fast processing task. After the configuration data check task receives the configuration download completion signal, it can start to perform integrity checks on the configuration and POU program data in the temporary cache. This integrity check can be interrupted by a high-priority data processing task, so as not to affect the scheduling cycle of fast data processing.

[0055] When the integrity check of the configuration and POU program data is completed, a configuration data check completion signal can be sent to the configuration management in the fast data processing. After receiving the configuration data check completion signal, the configuration management processing in the fast data processing task uses the data in the configuration temporary cache to update the data in the controller configuration operation data area, thereby storing the newly added data in the temporary data cache to the storage data area of ​​the DCS controller, so that the DCS controller can use the newly added data that has been checked for integrity.

[0056] Based on the solution provided in the above embodiment, optionally, Figure 5 As shown, in the above step S41, storing the newly added data in the temporary data cache to the storage data area of ​​the DCS controller includes: S51: triggering the data management task through a semaphore via the integrity check task to store the newly added data in the temporary data cache into the storage data area of ​​the DCS controller.

[0057] See also Figure 2b As shown in the flow chart, after ensuring the integrity of the newly added data through the integrity check task, the data management task is triggered by the semaphore to transfer the newly added data in the temporary data cache to the DCS controller, so that the DCS controller can flexibly use the newly added data that has been integrity checked.

[0058] Based on the solution provided in the above embodiment, optionally, the newly added data includes configuration data and / or program organization unit POU program data.

[0059] Among them, Figure 6 As shown, in the above step S41, storing the newly added data in the temporary data cache to the storage data area of ​​the DCS controller includes: S61: storing the configuration data in the configuration data area of ​​the DCS controller, and / or storing the POU program data in the POU program data area of ​​the DCS controller.

[0060] In the solution provided in the embodiment of the present application, the newly added data may specifically be configuration data or POU program data. In this step, different data are transferred to corresponding data areas. Among them, the DCS controller may include a configuration data area and a POU program data area. In the step of performing the transfer, the data is transferred to the data area in the DCS controller according to the type of data, so that the DCS controller can efficiently call the required configuration data or POU program data.

[0061] In the solution provided in the embodiment of the present application, based on the multi-tasking and task priority settings of the operating system, the integrity check and transfer of newly added data can be effectively realized. After the configuration or POU program is downloaded, an integrity check task can be created accordingly, and the above integrity check task can be executed without executing a higher priority task. Once a higher priority task (such as a fast data processing task) appears, the integrity check task being executed can be suspended, thereby ensuring that the high priority task is processed immediately and effectively, avoiding negative impacts on the fast data processing task, and is conducive to ensuring the scheduling cycle of the fast processing task. This solution is particularly suitable for controllers that have strict requirements on the processing cycle, and can realize the integrity detection of newly added data without the fast data processing task being sensed.

[0062] In order to solve the problems existing in the related art, the embodiment of the present application further provides a distributed system controller 70, such as Figure 7 As shown, including: A detection module 71 detects whether there is new data to be checked for integrity; A creation module 72, if present, creates an integrity check task with a first priority based on the newly added data; A first execution module 73 executes the integrity check task if there is no unfinished task with the second priority, wherein the first priority is lower than the second priority; The second execution module 74 is configured to suspend the integrity check task and execute the task with the second priority if a task with the second priority to be executed appears during the execution of the integrity check task.

[0063] Through the device provided by the embodiment of the present application, once new data to be checked for integrity is detected, an integrity check task is created, and the order of task execution is controlled by setting priorities. In the absence of unfinished tasks of higher priority, the integrity check task is executed, so that the integrity check is performed when there are idle resources, avoiding the integrity check from preempting the resources of the task being executed. During the execution of the integrity check task, once a higher priority task to be executed appears, the integrity check is suspended and the higher priority task is processed first. This solution gives priority to the execution of important tasks by setting task priorities, avoiding the integrity check from preempting the processing resources of important tasks and avoiding extending the processing time of important tasks.

[0064] Among them, the above modules in the device provided by the embodiment of the present application can also implement the method steps provided by the above method embodiment. Alternatively, the device provided by the embodiment of the present application can also include other modules in addition to the above modules to implement the method steps provided by the above method embodiment. And the device provided by the embodiment of the present application can achieve the technical effects that can be achieved by the above method embodiment.

[0065] Preferably, an embodiment of the present application also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, each process of the above-mentioned data integrity detection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0066] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned data integrity detection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0067] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. The computer program can be operated to enable a computer to execute part or all of the steps of the above-mentioned data integrity detection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0068] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0069] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device for implementing the functions specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.

[0070] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0071] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0072] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0073] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0074] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0075] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0076] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0077] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A data integrity detection method, characterized in that: include: Check whether there is new data to be checked for integrity; If so, creating an integrity check task with a first priority based on the newly added data; If there is no unfinished task with the second priority, executing the integrity check task, wherein the first priority is lower than the second priority; During the execution of the integrity check task, if a task with a second priority to be executed appears, the integrity check task is suspended and the task with the second priority is executed.

2. The method according to claim 1, characterized in that Check whether there is any new data to be checked for integrity, including: Based on the data management task, detect whether there is any newly downloaded data in the temporary data cache; The step of creating an integrity check task with a first priority based on the newly added data includes: The integrity check task with the first priority is created based on the data management task through a semaphore trigger.

3. The method according to claim 1, characterized in that Executing the integrity check task includes: deploying processing resources to perform the integrity checking task; The step of pausing the integrity check task and executing the task with the second priority level includes: At least a portion of the processing resources used to execute the integrity checking task are deployed to execute the task having the second priority.

4. The method according to claim 2, characterized in that The method is applied to a distributed control system DCS controller, and the DCS controller uses a real-time operating system RTOS; After the integrity check task is performed, the method further includes: If the integrity check of the newly added data passes, the newly added data in the temporary data cache is stored in the storage data area of ​​the DCS controller.

5. The method according to claim 4, characterized in that Storing the newly added data in the temporary data cache to the storage data area of ​​the DCS controller includes: The data management task is triggered by the integrity check task through a semaphore to store the newly added data in the temporary data cache into the storage data area of ​​the DCS controller.

6. The method according to claim 4, characterized in that The newly added data includes configuration data and / or program organization unit POU program data; The step of storing the newly added data in the temporary data cache to the storage data area of ​​the DCS controller includes: The configuration data is stored in a configuration data area of ​​the DCS controller, and / or the POU program data is stored in a POU program data area of ​​the DCS controller.

7. A distributed system controller, characterized in that: include: A detection module detects whether there is new data to be checked for integrity; A creation module, if present, creates an integrity check task with a first priority based on the newly added data; A first execution module, executing the integrity check task if there is no unfinished task with a second priority, wherein the first priority is lower than the second priority; The second execution module is configured to suspend the integrity check task and execute the task with the second priority if a task with the second priority to be executed appears during the execution of the integrity check task.

8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the method according to any one of claims 1 to 6 when executed by the processor.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and 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, characterized in that The computer program product comprises a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform the steps of the method according to any one of claims 1 to 6.