A configuration processing method for a relay protection simulation platform

By acquiring and verifying the CPU core topology and running task data, configuring the operating system to be dedicated to real-time tasks, and identifying and adjusting the target CPU core, the problem of insufficient real-time performance in the digital twin substation protection simulation platform was solved, and the requirement for low jitter was met.

CN123157435APending Publication Date: 2026-11-24CYG SUNRI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611348081.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing technologies cannot confirm whether the real-time core truly meets the low jitter requirement in digital twin substation protection simulation platforms, making it difficult for the simulation platform to meet the high real-time requirements of relay protection digital twin cyclic tasks.

Method used

By acquiring platform information from the relay protection simulation platform, including CPU core topology data and current running tasks, the operating system is configured to restrict some CPU cores to be dedicated to processing real-time tasks. The target CPU core is determined by verifying the maximum scheduling latency and task interference data of the CPU core, and the environment configuration is iteratively adjusted to ensure low jitter requirements.

Benefits of technology

It improves the real-time performance of relay protection simulation tasks, solves the problem of additional latency caused by missing real-time core verification and improper configuration, and ensures that the target CPU core meets the low jitter requirement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123157435A_ABST
    Figure CN123157435A_ABST
Patent Text Reader

Abstract

This application relates to the field of industrial equipment technology and provides a configuration processing method for a relay protection simulation platform. The method includes: acquiring platform information of the relay protection simulation platform; configuring the operating system execution environment of the relay protection simulation platform based on topology data and multiple currently running tasks, wherein the environment configuration restricts some CPU cores to be dedicated to processing real-time tasks; acquiring the maximum scheduling latency and task interference data of each CPU core running a set periodic task; determining the target CPU core that meets preset conditions among the CPU cores based on the maximum scheduling latency and task interference data of each CPU core running a set periodic task; and reconfiguring the operating system execution environment based on multiple currently running tasks and the target CPU core. This method solves the problem of additional latency caused by the lack of real-time core verification in the prior art, and improves the real-time performance of relay protection simulation tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of industrial equipment technology, and in particular relates to a configuration processing method for a relay protection simulation platform. Background Technology

[0002] The digital twin substation protection simulation platform needs to run a large number of relay protection digital twin device instances on different hardware and platforms, such as general-purpose servers, domestic servers, or embedded boards. Each instance typically includes functional logic such as a management core, protection core, communication core, and interlocking core, and is executed by a scheduling thread at fixed millisecond intervals. The equal intervals of the scheduling threads directly affect the consistency of protection criterion calculation, action timing, interlocking relationships, and data interaction between devices.

[0003] However, in digital twin substation protection simulation platforms, existing technologies cannot confirm whether the real-time core truly meets the low jitter requirement after the environment configuration is completed. This leads to uncontrollable additional delays during the operation of complex simulation tasks, making it difficult for the simulation platform to meet the high real-time requirements of relay protection digital twin cycle tasks. Summary of the Invention

[0004] This application provides a configuration processing method for a relay protection simulation platform, which can ensure that the target CPU core meets the low jitter requirement, solve the problem of missing real-time core verification and additional latency caused by improper configuration in the prior art, and improve the real-time performance of relay protection simulation tasks.

[0005] In a first aspect, embodiments of this application provide a configuration processing method for a relay protection simulation platform, including: Obtain the platform information of the relay protection simulation platform, which includes the topology data of multiple CPU cores and the current running tasks of each CPU core. Based on the topology data and multiple currently running tasks, the operating system environment of the relay protection simulation platform is configured. The environment configuration is used to restrict some CPU cores to be dedicated to processing real-time tasks. With the environment configured successfully, obtain the maximum scheduling latency and task interference data of each CPU core when running a set periodic task. Based on the maximum scheduling latency and task interference data when some CPU cores run set periodic tasks, the target CPU cores that meet the preset conditions are identified among the CPU cores. Based on multiple currently running tasks and target CPU cores, the operating system execution environment is reconfigured.

[0006] In one possible implementation of the first aspect, the operating system execution environment of the relay protection simulation platform is configured based on topology data and multiple currently running tasks, including: Based on topology data and multiple currently running tasks, multiple candidate cores are selected from multiple CPU cores, wherein the number of multiple candidate cores is less than the number of multiple CPU cores. Configure the operating system execution environment of the relay protection simulation platform based on multiple currently running tasks and multiple candidate cores.

[0007] In one possible implementation of the first aspect, based on the maximum scheduling latency and task interference data of each CPU core running a set periodic task, the target CPU cores among the CPU cores that meet preset conditions are determined, including: Detect whether the maximum scheduling latency of each candidate core is less than the set latency threshold, and detect whether the task interference data of each candidate core meets the set interference conditions; If the maximum scheduling delay of at least one candidate core is less than the set delay threshold, and the task interference data of at least one candidate core meets the set interference conditions, then at least one candidate core is identified as the target CPU core. If the maximum scheduling delay of at least one candidate core is detected to be greater than or equal to the set delay threshold, or if the task interference data of at least one candidate core does not meet the set interference conditions, the operating system environment configuration will be adjusted. After adjusting the environment configuration, obtain the maximum scheduling latency and task interference data of each candidate core when running the set periodic task, and return to execute the steps of checking whether the maximum scheduling latency of each candidate core is less than the set latency threshold and checking whether the task interference data of each candidate core meets the set interference conditions, until the number of times the environment configuration is adjusted equals the set number of times. The number of times the environment configuration is adjusted is equal to the number of times the target CPU core is set.

[0008] In one possible implementation of the first aspect, the relay protection simulation platform comprises multiple NUMA nodes, each NUMA node being configured with a common core and at least one candidate core; the operating system environment configuration is adjusted, including: If the task interference data of multiple candidate cores in the target NUMA node does not meet the set interference conditions, and the current load parameter of the common core in the target NUMA node exceeds the set load parameter, then at least one candidate core in the target NUMA node will be adjusted to the common core. The target NUMA node is any NUMA node in the relay protection simulation platform. If the task interference data of only one candidate core in the target NUMA node does not meet the set interference conditions, then the common task running in the candidate core will be migrated to the common core of the target NUMA node. If the maximum scheduling latency of multiple candidate cores is detected to be greater than or equal to the latency threshold, and the set periodic tasks of multiple candidate cores have memory access across NUMA nodes, then the operating system's memory configuration policy will be adjusted. If cache contention is detected among multiple candidate cores for their respective periodic tasks, the operating system's cache configuration strategy will be adjusted.

[0009] In one possible implementation of the first aspect, multiple candidate cores are selected from multiple CPU cores based on topology data and multiple currently running tasks, including: For each NUMA node in the relay protection simulation platform, based on the topology data and the current running task of each CPU core, at least one CPU core is selected from the multiple CPU cores of each NUMA node as the common core of each NUMA node. For each NUMA node in the relay protection simulation platform, the remaining CPU cores of each NUMA node are screened to obtain the candidate cores corresponding to each NUMA node. All candidate cores corresponding to NUMA nodes are identified as multiple candidate cores, and all common cores corresponding to NUMA nodes are identified as multiple common cores.

[0010] In one possible implementation of the first aspect, multiple currently running tasks include real-time tasks and common tasks; based on the multiple currently running tasks and multiple candidate cores, the operating system execution environment configuration of the relay protection simulation platform includes: Migrate common tasks to run on multiple common cores; Multiple candidate cores are configured in isolation. Based on the topology data, configure cache isolation for common tasks and real-time tasks; Based on the topology data, memory affinity configuration is performed for real-time tasks.

[0011] In one possible implementation of the first aspect, topology data is used to characterize the mapping relationship between each CPU core and NUMA nodes and cache resources, and cache isolation configuration is performed for common tasks and real-time tasks based on the topology data, including: For each NUMA node, check whether the common core and candidate core in each NUMA node share the same cache resource; If it is detected that the common core and candidate core in at least one NUMA node share the same cache resource, then the same cache resource is partitioned to obtain the first partition and the second partition. The first partition is used for caching target common tasks, which are common tasks run by the common cores of at least one NUMA node. The second partition is used for caching target real-time tasks, which are real-time tasks run by the candidate cores of at least one NUMA node.

[0012] Secondly, embodiments of this application provide a configuration processing device for a relay protection simulation platform, comprising: The first acquisition module is used to acquire platform information of the relay protection simulation platform. The platform information includes topology data of multiple CPU cores and the current running tasks of each of the multiple CPU cores. The first configuration module is used to configure the operating system environment of the relay protection simulation platform based on the topology data and multiple currently running tasks. The environment configuration is used to restrict some CPU cores to be dedicated to processing real-time tasks. The second acquisition module is used to acquire the maximum scheduling latency and task interference data of each CPU core when running a set periodic task, provided that the environment configuration is successful. The determination module is used to determine the target CPU cores that meet the preset conditions among the CPU cores based on the maximum scheduling delay and task interference data when each CPU core runs a set periodic task. The second configuration module is used to reconfigure the operating system's execution environment based on multiple currently running tasks and target CPU cores.

[0013] Thirdly, embodiments of this application provide a relay protection simulation platform, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method as described in any of the first aspects.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as described in any of the first aspects.

[0015] Fifthly, embodiments of this application provide a computer program product that, when run on a relay protection simulation platform, causes the relay protection simulation platform to execute any of the methods described in the first aspect above.

[0016] This application provides a configuration processing method for a relay protection simulation platform. The method includes: acquiring platform information of the relay protection simulation platform, including topology data of multiple CPU cores and the current running tasks of each CPU core; configuring the operating system environment of the relay protection simulation platform based on the topology data and the multiple currently running tasks, wherein the environment configuration restricts some CPU cores to be dedicated to processing real-time tasks; if the environment configuration is successful, acquiring the maximum scheduling latency and task interference data of each CPU core running a set periodic task; determining the target CPU core that meets preset conditions among the CPU cores based on the maximum scheduling latency and task interference data of each CPU core running a set periodic task; and reconfiguring the operating system environment based on the multiple currently running tasks and the target CPU core. Using the above technical solution, if the environment configuration is successful, the final target CPU core is determined by verifying the maximum scheduling latency and task interference data of the CPU cores, and the environment configuration is iteratively adjusted based on the verification results. This ensures that the target CPU core meets the low jitter requirement, solves the problem of missing real-time core verification and additional latency caused by improper configuration in the prior art, and improves the real-time performance of relay protection simulation tasks. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application, 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.

[0018] Figure 1 This is a schematic flowchart of a configuration processing method for a relay protection simulation platform provided in an embodiment of this application; Figure 2 This is a schematic diagram of an architecture for selecting multiple candidate cores according to an embodiment of this application; Figure 3 This is a schematic diagram of a migration configuration architecture provided in one embodiment of this application; Figure 4 This is a schematic diagram of an architecture for cache isolation and NUMA memory affinity configuration provided in one embodiment of this application; Figure 5 This is a flowchart illustrating a configuration processing method for a relay protection simulation platform according to another embodiment of this application; Figure 6 This is a schematic diagram of a process for determining a target CPU core according to an embodiment of this application; Figure 7This is a schematic diagram of an architecture for a standardized real-time environment description output provided in an embodiment of this application; Figure 8 This is a schematic diagram of the architecture of a configuration processing method for a relay protection simulation platform provided in an embodiment of this application; Figure 9 This is a structural block diagram of a configuration processing device for a relay protection simulation platform provided in one embodiment of this application; Figure 10 This is a schematic diagram of the structure of a relay protection simulation platform provided in one embodiment of this application. Detailed Implementation

[0019] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0020] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0021] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0022] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0023] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0024] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0025] It is understandable that general-purpose Linux systems prioritize resource sharing and overall throughput, resulting in situations where hardware interrupts, software interrupts, RCU callbacks, kernel work queues, periodic clock interrupts, system services, logging tasks, container management threads, and other non-real-time tasks run simultaneously on the CPU core. Even with a real-time scheduling policy, low-probability long-tail latency may still occur due to the aforementioned interference sources, CPU frequency variations, deep sleep wake-ups, shared cache contention, and cross-NUMA node access. Furthermore, x86 hybrid core platforms, ARM big.LITTLE platforms, dual-processor multi-NUMA servers, and servers supporting CAT or MPAM cache partitions all differ in their core types, cache sharing structures, memory access distances, and interrupt control methods. However, existing configuration solutions have the following drawbacks: 1. Existing configuration processing solutions typically use fixed core numbers and fixed parameter sets. After migrating to another platform, manual analysis is required again, making it difficult to form a reusable real-time runtime environment construction method. Furthermore, they cannot automatically generate core groups based on the number of physical processors, core types, shared cache structures, and NUMA nodes.

[0026] 2. Existing configuration solutions only isolate the processor core through parameters such as isolcpus, which cannot guarantee that hardware interrupts, RCU callbacks, kernel threads, timers and system services will all leave the real-time core. For multi-NUMA platforms, if all common tasks are concentrated on a single node, it may also cause another node to lack a local common core, increasing cross-node interrupt handling and remote memory access. Therefore, simply isolating the core is not enough to form the required low-jitter environment.

[0027] 3. Existing configuration processing solutions often only set user-mode thread affinity, lacking unified identification, classification, and migration of IRQs, RCU callbacks, kernel threads, work queues, timers, and system tasks. In multi-NUMA platforms, existing configuration processing solutions lack collaborative configuration that ensures "each NUMA node retains a common core, and real-time threads and memory nodes are localized," potentially introducing additional latency through cross-node access.

[0028] 4. In existing configuration processing schemes, cache partitioning, CPU frequency, idle state and clock interrupt configuration are usually implemented independently, lacking a combined generation method constrained by the real-time requirements of relay protection digital twin cycle tasks.

[0029] 5. The existing configuration processing solution lacks a verification step based on set periodic tasks and interference residue detection after the environment is built, and cannot confirm whether the candidate cores truly meet the low jitter requirements.

[0030] 6. The existing configuration processing scheme lacks an automatic correction mechanism after configuration failure, and cannot remove unqualified cores from the candidate cores and regenerate public cores and real-time core groups.

[0031] 7. Existing configuration processing schemes lack standardized outputs, and subsequent device load evaluation or deployment systems cannot directly obtain verified real-time core pool, NUMA mapping, and cache partition results.

[0032] Based on this, the embodiments of this application provide a configuration processing method for a relay protection simulation platform, which can establish the correspondence between the platform topology, real-time interference sources and real-time requirements of periodic tasks, and verify and correct the environment after configuration.

[0033] Figure 1 This is a flowchart illustrating a configuration processing method for a relay protection simulation platform according to an embodiment of this application. It is intended as an example and not a limitation; this method can be applied to relay protection simulation platforms, such as... Figure 1 As shown, the method includes: S101. Obtain the platform information of the relay protection simulation platform.

[0034] The platform information includes topology data of multiple CPU cores, current running tasks of each CPU core, and other related data such as the number of physical processors, the correspondence between physical and logical cores, performance cores and energy efficiency cores or big cores and small cores, memory nodes, L2 / L3 shared cache groups, I / O device ownership nodes, CPU frequency and idle state capabilities, as well as cache resource management capabilities such as CAT, RDT, and MPAM.

[0035] Topology data can be used to characterize the mapping relationship between each CPU core and NUMA nodes and cache resources. For example, it can indicate which CPU cores share the same level of cache resources, which cores belong to the same NUMA node, and their distance from memory.

[0036] Currently running tasks refer to programs or processes executing on a CPU core. These tasks can be categorized into various types, including hardware IRQs, software interrupts, RCU callbacks, kernel threads, work queues, periodic timers, system services, logging tasks, container management threads, and ordinary user-mode tasks. The system can create a record of interference sources by core, or it can record the current core affinity and migration range of each interference source. The type and number of running tasks affect the CPU core's load and real-time performance.

[0037] It should be noted that this embodiment does not simply read the number of CPUs, but simultaneously identifies the physical processors, core types, shared caches, NUMA, I / O affiliation, and the distribution of real-time interference sources to perform subsequent environment configuration processing, achieving joint perception of platform topology and real-time interference sources. In other words, in this embodiment, the core role of environment configuration is jointly determined by "whether the hardware structure is suitable" and "whether the current interference is transferable," avoiding directly using cores in a high IRQ or high kernel activity state as real-time cores.

[0038] S102. Configure the operating system execution environment of the relay protection simulation platform based on the topology data and multiple currently running tasks.

[0039] In the initial configuration phase, a direct approach can be adopted. For example, based on experience or preset rules, the CPU cores can be simply divided into two groups: one group for real-time tasks and the other for non-real-time tasks. For instance, even-numbered cores of the physical CPU can be designated for real-time tasks, and odd-numbered cores for common tasks. This configuration can be achieved by modifying the operating system's boot parameters or using simple scripts to set CPU affinity, thereby "isolating" certain cores and initially realizing core specialization. Alternatively, the operating system execution environment of the relay protection simulation platform can be configured according to the actual situation of the current CPU cores.

[0040] In some embodiments, the operating system execution environment configuration of the relay protection simulation platform is performed based on topology data and multiple currently running tasks, including: Based on topology data and multiple currently running tasks, multiple candidate cores are selected from multiple CPU cores, wherein the number of multiple candidate cores is less than the number of multiple CPU cores. Configure the operating system execution environment of the relay protection simulation platform based on multiple currently running tasks and multiple candidate cores.

[0041] Candidate cores refer to CPU cores among multiple CPU cores that are considered suitable for processing real-time tasks. These cores typically have low load, less task interference, and can be configured by the operating system to be dedicated to real-time tasks.

[0042] In practical applications, a subset of CPU cores can be selected from all available CPU cores in the relay protection simulation platform based on specific criteria and information. This aims to narrow down the scope of subsequent configuration and testing, thereby improving configuration efficiency. Implementation methods can include: one approach is based on the physical topology of the CPU cores, such as prioritizing CPU cores physically close to critical I / O devices or selecting CPU cores located within specific NUMA nodes to reduce memory access latency. Another approach is based on the current load of the CPU cores, such as excluding CPU cores already handling a large number of non-real-time critical tasks, or selecting CPU cores with lower current loads and more idle time.

[0043] After selecting candidate cores, the operating system can be configured in a series of ways to ensure that these candidate cores can better serve real-time tasks. Specific configuration methods can include setting CPU affinity or scheduler policies to redirect non-real-time tasks and system interrupts to run on non-candidate cores, thereby reducing interference on candidate cores. Alternatively, memory affinity configuration can be implemented to ensure that the memory required by real-time tasks running on candidate cores is allocated within the same NUMA node as that core, avoiding latency caused by cross-NUMA node access. Building on this, by intelligently selecting a smaller number of candidate cores from all CPU cores, subsequent operating system execution environment configuration can be more focused and efficient, avoiding blind or generalized configuration of all CPU cores. This reduces unnecessary resource consumption and configuration complexity, making the initial environment configuration more accurate and laying a solid foundation for subsequent real-time task performance evaluation and target CPU core determination.

[0044] In some embodiments, multiple candidate cores are selected from multiple CPU cores based on topology data and multiple currently running tasks, including: For each NUMA node in the relay protection simulation platform, based on the topology data and the current running task of each CPU core, at least one CPU core is selected from the multiple CPU cores of each NUMA node as the common core of each NUMA node. For each NUMA node in the relay protection simulation platform, the remaining CPU cores of each NUMA node are screened to obtain the candidate cores corresponding to each NUMA node. All candidate cores corresponding to NUMA nodes are identified as multiple candidate cores, and all common cores corresponding to NUMA nodes are identified as multiple common cores.

[0045] The common core refers to the CPU core in the relay protection simulation platform that is mainly used to run non-real-time tasks, system services or general computing tasks. These tasks usually do not have high real-time requirements and can tolerate a certain amount of scheduling delay and task interference.

[0046] It can be assumed that in a relay protection simulation platform, CPU cores are typically distributed across different NUMA nodes, with each NUMA node containing a set of CPU cores and an associated memory controller. This embodiment can select candidate cores for each NUMA node. The selection of common cores can be based on various strategies, such as selecting CPU cores with high current loads or those unsuitable for running real-time tasks. Alternatively, a subset of cores can be pre-designated as common cores, or CPU cores physically distant from the real-time task cores and sharing fewer resources can be selected as common cores based on topology data.

[0047] After selecting a common core for each NUMA node, the remaining CPU cores of each NUMA node can be further screened to obtain candidate cores for each NUMA node. Screening criteria can include, but are not limited to, the core's current load, the type of task running on the core, the core's physical location, and core availability. The screening process can employ heuristic algorithms, rule-based judgments, or performance evaluations. Based on this, by performing a layered and region-based fine-grained selection of CPU cores in the relay protection simulation platform, the resource conflicts and real-time performance degradation that may result from simply selecting candidate cores in a complex multi-core NUMA architecture are resolved. This allows the system to utilize hardware resources more effectively, ensuring better physical and logical isolation of subsequent real-time tasks, avoiding resource contention and performance bottlenecks that may result from blind selection, and significantly improving the real-time performance and reliability of the simulation platform.

[0048] Figure 2 This is a schematic diagram of an architecture for selecting multiple candidate cores according to an embodiment of this application, such as... Figure 2 As shown, for multi-processor or multi-NUMA platforms, this embodiment does not centralize all common tasks to a single node. Instead, it retains at least one common core within each NUMA node. This allows tasks such as hardware interrupts, kernel threads, and system services located on the local node to be preferentially migrated to the local node's common core. The remaining CPU cores are dedicated to processing instance threads as real-time cores, reducing overhead from cross-node wake-ups, remote memory access, and inter-processor interconnects. For example, NUMA0 can be configured with common cores and real-time cores. The real-time cores can be further divided into high-load real-time cores and low-load real-time cores, each carrying different instance threads. Furthermore, system tasks and interference sources from NUMA0 are preferentially migrated and fixed to the local node's common core.

[0049] S103. If the environment configuration is successful, obtain the maximum scheduling delay and task interference data when some CPU cores run set periodic tasks.

[0050] The maximum scheduling delay can be used to characterize the maximum time difference between adjacent cycles when the CPU core is actually running a set cycle task. For example, in the field of relay protection, the interrupt thread of the device usually runs once every 1000 microseconds, that is, the interrupt interval is 1000 microseconds. When the time difference between the actual running record points of two adjacent cycle tasks is 1007 microseconds, the actual trigger interval is 1007 microseconds, and the corresponding scheduling delay is 7 microseconds. In this embodiment, the scheduling delay can be counted separately within a set duration window during testing. For example, the scheduling delay of the CPU core within 1 minute can be counted, and the maximum scheduling delay can be determined.

[0051] Task interference data can be used to quantify the degree to which a task is affected by other tasks or system activities during execution. Interference can come from shared resource contention (such as cache, memory bandwidth), interrupt handling, context switching, etc. These interferences can increase the execution time or jitter of the task.

[0052] After the initial configuration is completed, performance evaluation of the candidate cores designated for real-time tasks is required. For example, a predefined, periodic test task (i.e., a periodic task) can be run on these cores, and the maximum scheduling latency of the test task can be measured using performance counters provided by the operating system or specialized testing tools. Simultaneously, task interference can be roughly assessed by observing whether the test task is frequently interrupted or experiences resource contention from other interfering tasks that should be migrated to the common core during execution. For example, the execution time jitter of the test task can be recorded and used as task interference data.

[0053] S104. Based on the maximum scheduling delay and task interference data when each CPU core runs a set periodic task, determine the target CPU core that meets the preset conditions among the CPU cores.

[0054] After obtaining the aforementioned performance data, filtering can be performed based on preset simple conditions. For example, a fixed maximum scheduling latency threshold and a task interference threshold can be set. Then, all CPU cores initially designated as real-time tasks can be traversed, and those cores whose maximum scheduling latency and task interference data are both lower than or meet these thresholds can be marked as target CPU cores. The core grouping can also be corrected based on the verification results, and the corrected candidate cores can continue to be verified until the termination conditions are met to obtain the final target CPU core. This embodiment does not limit this process.

[0055] S105. Based on multiple currently running tasks and target CPU cores, reconfigure the operating system's execution environment.

[0056] Once the target CPU core is identified, the operating system's environment configuration can be updated based on a list of multiple currently running tasks and the target CPU core, making system resource allocation more precise.

[0057] This embodiment provides a configuration processing method for a relay protection simulation platform. When the environment configuration is successful, the final target CPU core is determined by verifying the maximum scheduling latency and task interference data of the CPU core. Based on the verification results, the environment configuration is iteratively adjusted to ensure that the target CPU core meets the low jitter requirement. This solves the problem of additional latency caused by the lack of real-time core verification and improper configuration in the prior art, and improves the real-time performance of relay protection simulation tasks.

[0058] In some embodiments, the multiple currently running tasks include real-time tasks and common tasks; the operating system execution environment configuration of the relay protection simulation platform is configured according to the multiple currently running tasks and multiple candidate cores, including: Migrate common tasks to run on multiple common cores; Multiple candidate cores are configured in isolation. Based on the topology data, configure cache isolation for common tasks and real-time tasks; Based on the topology data, memory affinity configuration is performed for real-time tasks.

[0059] In specific implementations, the process of configuring the execution environment may include migrating common tasks to multiple common cores for execution. This aims to ensure that common tasks do not consume or interfere with CPU core resources reserved for real-time tasks, thereby providing a relatively clean and low-interference execution environment for real-time tasks. Specifically, at the operating system level, CPU affinity can be set to bind all common tasks to pre-selected common cores, ensuring that the scheduler for these tasks only considers running them on common cores. Alternatively, the task scheduling policy can be modified to set the scheduling priority of common tasks to be lower than that of real-time tasks, forcing them to execute on common cores.

[0060] Figure 3 This is a schematic diagram of a migration configuration architecture provided in one embodiment of this application, as shown below. Figure 3 As shown, this embodiment can generate differentiated migration configurations according to the type of interference source. For example, different types of interference sources can be identified first. After determining the common core target set and the current core distribution, different migration methods and restriction strategies can be generated according to the type of interference source. Thus, through differentiated migration and restriction strategies, hardware interrupts, kernel activities and non-real-time tasks can be stably constrained in the common core set, reducing their chance of entering the real-time core.

[0061] For example, hardware IRQ tasks can be migrated to the corresponding IRQ affinity target core set through interrupt affinity; RCU callback tasks can be migrated to the corresponding RCU callback target core set through callback offloading and callback core configuration; kernel threads and work queues with configurable affinity can be migrated to the kernel thread CPU set; ordinary processes, container main threads, and log tasks are restricted to the system task CPU set through CPU sets or control groups. For non-migratable local interrupts or hardware threads, the system reduces the real-time candidate priority of the corresponding core or removes it from the real-time core pool.

[0062] Isolating multiple candidate cores aims to further enhance their real-time performance, preventing the operating system scheduler from scheduling non-real-time tasks onto these cores or preventing them from being interfered with by other system activities (such as interrupts and timers). Specifically, CPU isolation technology can be used to remove candidate cores from the operating system's general scheduler, making them solely used for running specific real-time tasks. This is typically achieved through kernel boot parameters (such as isolcpus) or specific system calls. Furthermore, interrupt affinity (IRQ affinity) can be configured to bind all hardware and software interrupts to non-candidate cores (i.e., common cores), thereby preventing interrupt handling from interfering with real-time tasks on candidate cores.

[0063] Meanwhile, to reduce cache contention between common tasks and real-time tasks due to shared CPU cache, improve the cache hit rate and execution efficiency of real-time tasks, and reduce the uncertainty of their execution time, this embodiment can utilize the CPU's cache partitioning function. If the hardware supports it, the shared cache (such as L3 cache) can be divided into different regions and allocated to common tasks and real-time tasks respectively. Alternatively, by adjusting the memory access patterns or data structure layout of tasks, access to the same cache line between different types of tasks can be minimized, or optimization can be performed using the cache management API provided by the operating system.

[0064] To ensure that the data and code of real-time tasks are stored in memory regions physically close to the CPU core executing the task (e.g., within the same NUMA node), thereby reducing memory access latency and improving the execution efficiency and determinism of real-time tasks, NUMA affinity configuration can be employed. This involves using operating system APIs (such as the `numactl` command or related system calls) to set the memory allocation strategy for real-time tasks to preferentially use the local memory of their respective NUMA nodes. Alternatively, at application startup, the memory required by the real-time task can be pre-allocated and locked using a memory allocation function, specifying that it resides on the local NUMA node.

[0065] Building upon this foundation, by migrating common tasks to designated common cores and isolating candidate cores, real-time tasks are ensured to run on dedicated and interference-free CPU cores. Simultaneously, by incorporating topology data, cache isolation configurations are applied to common and real-time tasks, and memory affinity configurations are implemented for real-time tasks. This further optimizes resource access efficiency, reduces cache contention and memory access latency, and these measures collectively construct a highly deterministic and low-latency execution environment. This effectively solves the problem of unstable real-time task performance in the relay protection simulation platform, ensuring the accuracy and reliability of simulation results.

[0066] In some embodiments, topology data is used to characterize the mapping relationship between each CPU core, NUMA nodes, and cache resources. Based on the topology data, cache isolation configuration is performed for common tasks and real-time tasks, including: For each NUMA node, check whether the common core and candidate core in each NUMA node share the same cache resource; If it is detected that the common core and candidate core in at least one NUMA node share the same cache resource, then the same cache resource is partitioned to obtain the first partition and the second partition. The first partition is a special area allocated from the cache resources for use by the target common task, which is a common task run by the common core of at least one NUMA node. The second partition is a special area allocated from the cache resources for use by the target real-time task, which is a real-time task run by the candidate core of at least one NUMA node.

[0067] In specific implementations, topology data can be analyzed to identify whether there is cache resource sharing between the common cores responsible for running common tasks and the candidate cores isolated for real-time tasks within the same NUMA node. If cache resource sharing exists, a shared physical cache resource is logically divided into multiple independent regions, each allocated to a specific task or core, preventing mutual interference between different tasks due to cache line contention. One implementation utilizes hardware-provided cache partitioning technology, such as Intel's Cache Allocation Technology (CAT), to program the MSR register to set independent cache capacity or priority for different cores or tasks. Another implementation uses software-level scheduling strategies or virtualization technology to simulate cache partitioning at the operating system level, for example, by limiting the set of cache lines available to specific tasks or by using more refined scheduling algorithms to reduce cache conflicts. Based on this, physical isolation ensures that the cache hit rate and access latency of real-time tasks running on candidate cores remain highly stable and predictable, greatly enhancing the relay protection simulation platform's ability to meet real-time requirements and improving the stability and reliability of the entire system.

[0068] Figure 4 This is a schematic diagram of an architecture for cache isolation and NUMA memory affinity configuration provided in one embodiment of this application, as shown below. Figure 4 As shown, in this embodiment, the cache partition and NUMA memory affinity are not set independently, but are generated together with the core group to avoid real-time threads from frequently accessing remote memory or competing with common tasks for shared cache, even though they are bound to the core.

[0069] On platforms supporting CAT, RDT, or MPAM, the system allocates independent or prioritized cache paths to real-time threads, restricting common tasks to other cache partitions. For example, if hardware allows, the common core and real-time core can be preferentially located in different shared cache groups to physically reduce cache contention. If the common core and real-time core share the same L3 cache, cache resource control technologies such as CAT, RDT, or MPAM can be used to ultimately obtain cache isolation results that include cache group-core mappings. For instance, the shared cache group A of NUMA0 can be divided into different cache resources so that the common core and real-time core can use different cache regions.

[0070] Simultaneously, the memory affinity between real-time threads, CPU cores, and NUMA memory nodes is established. For example, real-time threads 1-3 are fixedly bound to Core 5, and the platform topology determines that Core 5 belongs to NUMA 0. Therefore, the main memory used by real-time threads 1-3 is preferentially allocated from NUMA 0, rather than from other NUMA nodes. This reduces the additional latency caused by the CPU accessing remote memory across NUMA nodes. In the final configuration, Core 5 can be directly recorded as corresponding to NUMA 0, and real-time threads 1-3 running bound to Core 5 can adopt the NUMA 0 local memory strategy.

[0071] Figure 5 This is a flowchart illustrating a configuration processing method for a relay protection simulation platform according to another embodiment of this application. In this embodiment, based on the maximum scheduling delay and task interference data of some CPU cores running set-period tasks, the target CPU cores among the CPU cores that meet preset conditions are further optimized as follows: The method involves detecting whether the maximum scheduling delay of each candidate core is less than a set delay threshold, and detecting whether the task interference data of each candidate core meets set interference conditions. If the maximum scheduling delay of at least one candidate core is less than the set delay threshold, and the task interference data of at least one candidate core meets the set interference conditions, then at least one candidate core is determined as the target CPU core. If the maximum scheduling delay of at least one candidate core is greater than or equal to the set delay threshold, or the task interference data of at least one candidate core does not meet the set interference conditions, then the operating system environment configuration is adjusted. After adjusting the environment configuration, the maximum scheduling delay and task interference data of each candidate core running set-period tasks are obtained, and the steps of detecting whether the maximum scheduling delay of each candidate core is less than the set delay threshold and detecting whether the task interference data of each candidate core meets the set interference conditions are returned, until the number of times the environment configuration is adjusted equals the set number of times. The target CPU core corresponding to the number of times the environment configuration is adjusted equals the set number of times is output. Figure 5 As shown, the method includes: S201. Obtain the platform information of the relay protection simulation platform.

[0072] S202. Configure the operating system execution environment of the relay protection simulation platform based on the topology data and multiple currently running tasks.

[0073] S203. If the environment configuration is successful, obtain the maximum scheduling delay and task interference data when some CPU cores run set periodic tasks.

[0074] S204. Detect whether the maximum scheduling delay of each candidate core is less than the set delay threshold, and detect whether the task interference data of each candidate core meets the set interference conditions. If the maximum scheduling delay of at least one candidate core is less than the set delay threshold, and the task interference data of at least one candidate core meets the set interference conditions, then execute step S205; otherwise, execute steps S206-S209. S205. Identify at least one candidate core as the target CPU core; S206. Check if the number of times the environment configuration has been adjusted is equal to the set number. If not, proceed to steps S207-S208; otherwise, proceed to step S209. S207. Adjust the operating system environment configuration; S208. Obtain the maximum scheduling delay and task interference data when each candidate core runs a set periodic task, and return to check whether the maximum scheduling delay of each candidate core is less than the set delay threshold.

[0075] S209, Output the number of times the environment configuration is adjusted equal to the target CPU core corresponding to the set number of times.

[0076] S210 reconfigures the operating system's execution environment based on multiple currently running tasks and target CPU cores.

[0077] Setting a latency threshold is a pre-defined, acceptable maximum scheduling latency limit used to determine whether candidate cores possess sufficient real-time performance. Setting interference conditions can be used to characterize that residual system interference on candidate cores will not affect the operation of real-time tasks.

[0078] Specifically, after successful environment configuration, this embodiment can perform performance evaluation on each selected candidate core. This can be achieved by running specific benchmark tasks or real-time testing programs on each candidate core to obtain actual scheduling latency and task interference data, which are then compared with preset thresholds and set interference conditions. For example, a typical cycle interruption task of the relay protection digital twin device can be run, and the actual trigger timestamp of the task can be recorded. Alternatively, system real-time testing tools can be used to assist in verification.

[0079] If the maximum scheduling latency of at least one candidate core is less than a set latency threshold, and the task interference data of at least one candidate core meets the set interference conditions, it means that the real-time performance indicators of the candidate core have reached the preset standard, and the residual interference on the candidate core will not affect the operation of the real-time task. At this time, the candidate core can be considered a "qualified" core suitable for running the real-time task, and the candidate core is determined as the target CPU core. These target CPU cores will be used in subsequent operating system environment configuration to ensure that the real-time task can run stably and efficiently.

[0080] If the maximum scheduling latency of at least one candidate core is detected to be greater than or equal to a set latency threshold, or if the task interference data of at least one candidate core does not meet the set interference conditions, it indicates that the performance of the candidate core fails to meet the real-time requirements, or that residual interference on the candidate core affects the operation of real-time tasks. In this case, this embodiment will not directly discard the candidate core, but will proactively take measures to optimize its operating environment in a targeted manner, aiming to eliminate or mitigate factors that lead to poor performance. Specific adjustment measures include, but are not limited to: reallocating the isolation strategy of CPU cores, such as adjusting the core affinity settings to migrate non-real-time tasks from candidate cores; adjusting the cache allocation strategy to reserve more cache space for real-time tasks; or adjusting the memory access strategy to reduce the latency caused by cross-NUMA node access.

[0081] After each configuration adjustment, the system will remeasure the performance of the candidate cores and perform performance evaluation again until the number of environment configuration adjustments equals the set number. Finally, the candidate core that meets the conditions in the current state (or reaches the optimal state after multiple adjustments) can be used as the final target CPU core output.

[0082] This embodiment provides a configuration processing method for a relay protection simulation platform. After initially selecting candidate cores and configuring the operating system environment, the system does not directly recognize these cores as usable. Instead, it further refines the real-time performance of each candidate core by introducing an iterative performance evaluation and configuration adjustment mechanism. This ensures that real-time tasks in the relay protection simulation platform can run stably on CPU cores that meet stringent performance requirements. This not only compensates for the shortcomings of static configuration based solely on topology and current tasks but also addresses the complex performance bottlenecks that may arise during actual operation. As a result, it ensures the execution quality of real-time tasks in the relay protection simulation platform and significantly improves the accuracy and reliability of simulation results.

[0083] In some embodiments, the relay protection simulation platform includes multiple NUMA nodes, each NUMA node being configured with a common core and at least one candidate core; the operating system environment configuration is adjusted, including: If the task interference data of multiple candidate cores in the target NUMA node does not meet the set interference conditions, and the current load parameter of the common core in the target NUMA node exceeds the set load parameter, then at least one candidate core in the target NUMA node will be adjusted to the common core. The target NUMA node is any NUMA node in the relay protection simulation platform. If the task interference data of only one candidate core in the target NUMA node does not meet the set interference conditions, then the common task running in the candidate core will be migrated to the common core of the target NUMA node. If the maximum scheduling latency of multiple candidate cores is detected to be greater than or equal to the latency threshold, and the set periodic tasks of multiple candidate cores have memory access across NUMA nodes, then the operating system's memory configuration policy will be adjusted. If cache contention is detected among multiple candidate cores for their respective periodic tasks, the operating system's cache configuration strategy will be adjusted.

[0084] Each NUMA node is configured with a common core and at least one candidate core. The common core is typically used to handle non-real-time, general-purpose tasks, while the candidate core is considered for handling tasks with higher real-time requirements.

[0085] This embodiment allows for targeted adjustments to the environment configuration based on the actual situation of candidate cores that do not meet the requirements. For example, if the task interference data of multiple candidate cores in the target NUMA node does not meet the set interference conditions, and the current load parameter of the common core in the target NUMA node exceeds the set load parameter, it means that these candidate cores are subjected to excessive interference when running the set tasks, resulting in performance degradation. At the same time, the common core is already under high load and cannot effectively handle more tasks. In this case, the number of common cores in the target NUMA node can be increased to share the load of the original common cores and alleviate the pressure on the common cores.

[0086] If the task interference data of only one candidate core in the target NUMA node does not meet the set interference conditions, it indicates that the only candidate core in that NUMA node has a performance problem and cannot meet the requirements of real-time tasks. In this case, the common tasks running in the candidate core can be migrated to the common core of the target NUMA node, freeing up the candidate core's runtime resources so that it can focus more on real-time tasks, or providing room for subsequent performance optimization.

[0087] If the maximum scheduling latency of multiple candidate cores is detected to be greater than or equal to the latency threshold, and the tasks of multiple candidate cores have memory access across NUMA nodes, then the operating system's memory configuration strategy needs to be adjusted. For example, tasks and their required data can be allocated to the memory within the same NUMA node as much as possible to reduce cross-NUMA node access, or the memory page size and prefetch strategy can be adjusted.

[0088] If cache contention is detected among various tasks on multiple candidate cores, the operating system's cache configuration strategy can be adjusted. This can include cache partitioning, cache isolation, adjusting cache prefetching strategies, and optimizing data structure layout to reduce false sharing. The aim is to reduce cache conflicts between different tasks and improve cache hit rate. Cache contention can be understood as multiple cores or tasks simultaneously accessing or modifying the same cache line, leading to cache invalidation and data synchronization overhead, thereby reducing system performance.

[0089] Based on this, by taking targeted environmental adjustment measures according to specific performance bottlenecks and system resource conditions, the performance requirements of real-time tasks in the relay protection simulation platform can be guaranteed more effectively, and the overall system resource utilization rate can be optimized.

[0090] Figure 6 This is a flowchart illustrating the process of determining a target CPU core according to an embodiment of this application, as shown below. Figure 6 As shown, after the environment configuration is complete, the system can bind a fixed-configuration reference periodic task (i.e., set a periodic task) to each candidate core, and simultaneously detect interrupt intervals and interference residues. For example, during the verification period, the reference periodic task can be run continuously, recording the timestamp and execution time of each candidate core's task execution. Multiple windows are statistically analyzed in 1-minute intervals to form an evaluation sequence, generating the maximum interrupt interval for each candidate core. Then, interference residues such as IRQ / RCU / kernel threads and non-real-time task residues in each candidate core can be detected, and real-time performance can be determined. Among them, the low jitter judgment criterion can be that the maximum interrupt interval is not greater than 10^10. us If a candidate core meets the real-time and interference residue requirements, it is identified as a qualified real-time core (i.e., the target CPU core). If the maximum interrupt interval of a candidate core exceeds the threshold, or if continuous IRQs, kernel threads, or non-real-time tasks are detected, the common core and migration configuration of the system are modified, such as increasing the number of common cores, re-migrating interference sources, removing unqualified cores, or modifying the cache or memory policy. Subsequently, the candidate cores can be re-divided and verified again until the iteration end condition is met. Then, a standardized real-time environment description that meets the real-time requirements can be output, including the real-time core pool, verification results, and environment configuration description.

[0091] Figure 7This is a schematic diagram of an architecture for outputting a standardized real-time environment description according to an embodiment of this application, such as... Figure 7 As shown, based on information such as core type, NUMA node, and cache group in the platform topology information, qualified real-time cores can be screened. The environment configuration parameters are summarized based on the maximum interrupt interval and residual interference of each target CPU core in the environment verification results. The final output includes not only the core number, core type, NUMA node, and cache group identifier of the real-time core pool, the IRQ and RCU running cores, kernel threads, and system task cores of the common core set, but also an environment configuration list and thread binding candidate rules. For example, the environment configuration list includes IRQ and RCU migration configuration, no-clock interrupt, cache partitioning, and NUMA memory policy. More specifically, it can include the processor to which each core belongs, NUMA node, cache group, available memory nodes, IRQ target set, RCU callback target, kernel task affinity, clock and frequency configuration, and reference task verification results. The thread binding candidate rules include reference periodic task binding cores, priority, and memory node suggestions for subsequent load assessment input. This forms a standardized operating foundation of "available real-time core set, environment configuration list, and thread binding candidate rules," which can serve as the input basis for subsequent device instance load assessment and deployment methods without re-analyzing the underlying environment.

[0092] Figure 8 This is a schematic diagram of the architecture of a configuration processing method for a relay protection simulation platform provided in one embodiment of this application, as shown below. Figure 8 As shown, this embodiment takes platform information and periodic task requirements as input, and sequentially completes the core role division, interference source migration, low-jitter environment configuration, caching and NUMA collaborative configuration, and periodic task setting verification. Based on the verification results, the core grouping and environment configuration are corrected, ultimately forming a verified real-time core pool and environment configuration list. Each step uses the output of the previous stage as the input for the next stage. Specific steps include: S1 acquires platform information and periodic task requirements: Platform information includes the number of physical processors, the relationship between CPU cores and logical processors, core types, NUMA nodes, shared cache relationships, and CPU real-time capabilities. Core types are the processor's hardware attributes, including performance cores, energy-efficient cores, large cores, small cores, or homogeneous processor cores. Periodic task requirements are generated by the relay protection digital twin simulation system based on the device type or set periodic tasks. These requirements constrain candidate core selection and environmental verification, and may include, for example, preset cycles, maximum allowable interrupt intervals, real-time priorities, execution time budgets, memory locality requirements, and cache resource requirements.

[0093] S2 performs platform topology awareness and real-time interference source identification: Based on the platform information obtained in step S1, the correspondence between processor cores, NUMA nodes and shared caches is established. At the same time, the currently running IRQs, RCU callbacks, kernel threads, work queues and system and non-real-time tasks on each core are identified to form a set of platform topology information (i.e. topology data) and a real-time interference source-core mapping relationship (i.e. real-time interference source distribution).

[0094] Based on the platform topology information set and real-time interference source distribution obtained in step S2, S3 divides the system into a common core set and a candidate core set. First, at least one common core is reserved in each NUMA node to carry the system tasks of this node and the migrateable real-time interference sources. Then, the remaining cores are filtered based on core type, shared cache relationship, and non-migrateable interference conditions to form a candidate core set.

[0095] S4 takes the common core set and candidate core set formed in step S3 as input to generate migration configuration and low-jitter running parameters. Migrationable IRQs, RCU callbacks, kernel threads, work queues, and system and non-real-time tasks are migrated or restricted to run on the common core. At the same time, low-jitter configurations such as core isolation, periodic clock interrupts, CPU performance status, and timer migration are implemented on candidate cores to reduce the interference of operating system background activities on candidate cores.

[0096] Based on the low-interference core operating environment formed in step S4, S5 implements cache isolation and NUMA memory affinity configuration according to the NUMA node to which the core belongs and the shared cache relationship. For platforms that support cache resource partitioning, cache resources that are mutually isolated or have different priorities are configured for common tasks and real-time tasks; at the same time, periodic tasks running on candidate cores are made to preferentially use the local memory of the NUMA node to which the core belongs, so as to reduce shared cache contention and cross-NUMA remote memory access.

[0097] After completing the above configuration, S6 binds a fixed-configuration reference cycle task to each candidate core, collects the maximum scheduling latency within each statistical window, and simultaneously detects residual interference such as IRQ, RCU callback, kernel threads, non-real-time tasks, and remote memory access on the candidate core.

[0098] S7 determines whether the candidate cores meet the preset real-time requirements based on the verification results of step S6. For candidate cores that meet the scheduling delay and interference residue criteria, they are identified as qualified real-time cores; for cores that do not meet the requirements (i.e., unqualified cores), the number of common cores can be adjusted according to the source of the anomaly, the interference source can be relocated, the cache partition or NUMA memory policy can be modified, and the verification can be re-executed; for cores with persistent interference that cannot be migrated or that still cannot meet the real-time requirements after multiple corrections, they are removed from the candidate core set.

[0099] After all candidate cores have been verified, S8 outputs the final qualified real-time core pool and environment configuration list. The environment configuration list includes at least the common core set, the qualified real-time core set, core-NUMA node mapping, core-shared cache mapping, IRQ target common core, RCU and kernel task affinity configuration, cache partitioning, NUMA memory policy, and the real-time verification results of each core.

[0100] The configuration processing method of this embodiment is described below as an example: First, platform information can be obtained, such as reading the processor and memory topology after system startup to determine the correspondence between processor sockets, cores, logical processors, NUMA nodes and shared cache groups; reading kernel version, scheduling policy, CPU frequency driver, idle state, real-time patch status and cache partition capabilities; reading hardware interrupt table, soft interrupt statistics, RCU callback settings, kernel thread and work queue affinity, and system service CPU set.

[0101] Next, core roles are generated. For example, the system can first select at least one common core on each NUMA node. Common cores are prioritized as those that do not undertake reference real-time tasks, have full I / O access capabilities, and have low migration costs. The remaining cores are sorted according to core type, cache sharing relationship, non-migratable interrupts, and current interference level to form candidate cores. If both common cores and real-time cores must exist within the same cache group, this is handled through cache partitioning or by lowering the priority of the real-time core.

[0102] Low-jitter parameters can then be configured, including system-generated boot and runtime configurations based on the candidate kernel set. Boot-time configurations may include real-time kernel isolation, cycleless clock interrupts, RCU callback offloading, default IRQ affinity, and kernel thread CPU set; runtime configurations may include real-time task runtime throttling, timer migration, CPU performance modes, deep idle states, cache partitioning, memory policies, and container CPU set. Specific parameter names vary depending on the Linux distribution and processor architecture and do not constitute a limitation on the scope of protection.

[0103] Next, containerization scenarios can be configured. For example, for containerized digital twin devices, the container main process and ordinary threads are first started on the common core, and only the periodic real-time threads created inside the application are migrated to the specified real-time core. Container memory allocation is restricted to the NUMA node to which the real-time core belongs. This method avoids container startup, file loading, logging and communication threads occupying the real-time core.

[0104] Environmental verification can then be performed, such as running a scheduled task on the candidate core. The task's cycle, execution time, and priority are set according to the typical scheduling thread of the relay protection digital twin device. Each statistical window records the maximum actual interrupt interval and simultaneously reads the IRQ, soft interrupt, kernel thread, and non-real-time process execution records on that core. When the interrupt interval meets the threshold and the residual interference is zero or lower than the set limit, the core is added to the qualified real-time core pool.

[0105] Finally, multi-platform implementation is possible. For example, in an x86 hybrid core platform, separate candidate sets of performance cores and energy-efficient cores can be established; in an ARM big.LITTLE platform, small cores can be prioritized for common tasks and big cores for periodic tasks; in a dual-socket Xeon or multi-NUMA server, each NUMA node retains a local common core and binds real-time threads and memory nodes to the same NUMA node; and in platforms that support MPAM or CAT, cache partitioning can be further implemented.

[0106] Furthermore, this embodiment also verifies whether the operating environment construction method can identify real-time interference sources on different processor architectures and operating system platforms, complete the division of common cores and real-time cores, and form a low-jitter real-time core pool that can stably run the cycle threads of the relay protection digital twin device.

[0107] The test uses a fixed set periodic task and a fixed load. After the environment is built, the maximum scheduling delay of the interrupt thread of the relay protection digital twin simulation program is recorded every minute. The running status is statistically analyzed over 6 hours, and the IRQ, kernel thread, non-real-time task and remote memory access on the real-time core are checked.

[0108] Among them, the verification of the hybrid core x86 platform: For example, on a certain industrial control computer, the performance core and the energy efficiency core can be identified first, and system tasks, hardware interrupts and non-real-time threads can be centralized to run on a common core; then, real-time thread fixed core binding, scheduling priority setting, performance status configuration and kernel interference suppression are implemented for candidate cores.

[0109] Experimental results show that when using only a single optimization measure, candidate cores may still be affected by kernel tasks, frequency changes, or other background activities, resulting in significant fluctuations in maximum scheduling latency. After completing the core role division and various environment configurations, the representative maximum scheduling latency of periodic tasks set on the performance core can be controlled within approximately 5–9 microseconds, demonstrating stable millisecond-level periodic operation capabilities.

[0110] Regarding the verification of a dual-socket NUMA server platform: On a dual-socket server, a common core is maintained in both NUMA nodes, and hardware interrupts, RCU callbacks, kernel threads, and system tasks are restricted to run on the corresponding common core. Periodic tasks are bound to candidate cores, and the memory they use is allocated to the NUMA node where the target core resides to reduce the additional latency introduced by cross-node memory access.

[0111] Experimental results show that after core isolation, system task migration, and NUMA localization configuration, the statistical results of the scheduled tasks on the candidate cores remain within 20 microseconds, with the main scheduling latency concentrated in the range of approximately 6–10 microseconds. Both candidate cores in the two NUMA nodes are able to form a relatively stable periodic operating environment.

[0112] Regarding verification on resource-constrained ARM platforms: Smaller cores can be prioritized for handling system tasks and non-real-time tasks, while larger cores are selected as candidate cores. Periodic tasks can be fixedly bound to larger cores for execution, and their periodic scheduling can be continuously statistically analyzed.

[0113] Experimental results show that the platform can complete millisecond-level cycle operation under single-core, single-task conditions, but the scheduling latency distribution is more dispersed. Among them, about 63% of the statistical results are within 20 microseconds, about 32% of the statistical results are in the range of 21 to 60 microseconds, and there are still a small number of scheduling latencies exceeding 60 microseconds. The maximum scheduling latency of the window can reach 100 microseconds.

[0114] This result demonstrates that on resource-constrained platforms, thread-based core binding alone is insufficient to guarantee stable, low-jitter operation for all large cores. This embodiment, through core-by-core verification, can remove cores exhibiting persistent high jitter or non-migratable interference from the real-time core pool, avoiding the direct identification of all large cores as qualified real-time cores based solely on core type.

[0115] Regarding the verification of multi-core ARM server platforms: On a certain server, firstly, based on the dual NUMA structure, a common core is reserved, and IRQ, kernel threads, system work queues and non-real-time tasks are migrated to the common core; then, real-time kernel, no clock interrupt, RCU callback migration, performance mode, cache resource partitioning and NUMA memory affinity are configured for the candidate cores.

[0116] With each candidate core bound to only one scheduled task, the vast majority of statistical results remained within 10 microseconds, with approximately 95% of representative scheduling latencies concentrated between 4 and 8 microseconds. Compared to test results without a fully configured environment, the scheduling latency distribution significantly converged, and the consistency among candidate cores was improved.

[0117] This experiment demonstrates that core isolation can only reduce interference from ordinary process scheduling. It needs to be combined with IRQ migration, kernel background task restrictions, cache resource partitioning, and NUMA local memory access to form a stable, low-jitter real-time core pool on a multi-core ARM server. Cache isolation and NUMA affinity configuration are effective in reducing occasional scheduling latency caused by shared cache contention and remote memory access.

[0118] As can be seen from the above description, unlike the existing technical solutions that set several Linux parameters, the configuration processing method of this embodiment forms a closed loop of "platform topology acquisition - interference source identification - periodic task requirement acquisition - core role generation - differentiated migration configuration - cache and NUMA collaborative configuration - reference task verification - group correction - real-time core pool output". It can generate environment configuration according to specific platform structure and real-time task requirements, and determine the final usable real-time core through running verification. Specifically, this implementation generates a low-jitter Linux operating environment based on the platform's actual topology and the distribution of interference sources, avoiding cross-platform failures caused by using fixed core numbers and parameters for core groups; it reduces operating system interference on candidate cores by implementing differentiated migration for IRQs, RCUs, kernel threads, work queues, system tasks, and container threads; it reduces cross-node access and shared cache contention by retaining a common core on each NUMA node and coordinating the configuration of real-time threads, caches, and memory nodes; it ensures that the output real-time core pool is supported by actual operating data, rather than being inferred solely from static configurations, by setting periodic task verification and core group correction; it outputs a verified real-time core pool, common core pool, core-NUMA-cache mapping, and real-time environment configuration list, which can directly provide underlying resources for device instance evaluation and full-site protection device deployment; it is applicable to X86, ARM, general-purpose Linux, and domestic Linux platforms, improving the replicability and engineering deployment efficiency of the digital twin relay protection simulation operating environment.

[0119] Corresponding to the configuration processing method for the relay protection simulation platform in the above embodiments, Figure 9 This is a structural block diagram of a configuration processing device for a relay protection simulation platform provided in one embodiment of this application. For ease of explanation, only the parts related to the embodiment of this application are shown.

[0120] Reference Figure 9 The device includes: The first acquisition module 301 is used to acquire platform information of the relay protection simulation platform. The platform information includes topology data of multiple CPU cores and the current running tasks of each of the multiple CPU cores. The first configuration module 302 is used to configure the operating system of the relay protection simulation platform according to the topology data and multiple currently running tasks. The environment configuration is used to restrict some CPU cores to be dedicated to processing real-time tasks. The second acquisition module 303 is used to acquire the maximum scheduling delay and task interference data of each CPU core when running a set periodic task, provided that the environment configuration is successful. The determination module 304 is used to determine the target CPU cores that meet the preset conditions among the CPU cores based on the maximum scheduling delay and task interference data when each of the CPU cores runs a set periodic task. The second configuration module 305 is used to reconfigure the operating system execution environment based on multiple currently running tasks and target CPU cores.

[0121] This embodiment provides a configuration processing device for a relay protection simulation platform. A first acquisition module acquires platform information of the relay protection simulation platform, including topology data of multiple CPU cores and the current running tasks of each CPU core. A first configuration module configures the operating system environment of the relay protection simulation platform based on the topology data and the multiple currently running tasks. This environment configuration restricts some CPU cores to processing real-time tasks. A second acquisition module, assuming successful environment configuration, acquires the maximum scheduling latency and task interference data of each CPU core running a set periodic task. A determination module, based on the maximum scheduling latency and task interference data of each CPU core running a set periodic task, determines a target CPU core that meets preset conditions. The second configuration module then reconfigures the operating system execution environment based on the multiple currently running tasks and the target CPU core. Using this device, under the condition that the environment is successfully configured, the final target CPU core is determined by verifying the maximum scheduling latency and task interference data of the CPU core. Based on the verification results, the environment configuration is iteratively adjusted to ensure that the target CPU core meets the low jitter requirement. This solves the problem of missing real-time core verification and additional latency caused by improper configuration in the prior art, and improves the real-time performance of relay protection simulation tasks.

[0122] Optionally, the first configuration module includes: The selection unit is used to select multiple candidate cores from multiple CPU cores based on topology data and multiple currently running tasks, wherein the number of multiple candidate cores is less than the number of multiple CPU cores. The configuration unit is used to configure the operating system execution environment of the relay protection simulation platform based on multiple currently running tasks and multiple candidate cores.

[0123] Optionally, the determined module includes: The detection unit is used to detect whether the maximum scheduling delay of each candidate core is less than a set delay threshold, and to detect whether the task interference data of each candidate core meets the set interference conditions. The determining unit is used to determine at least one candidate core as the target CPU core if the maximum scheduling delay of at least one candidate core is less than a set delay threshold and the task interference data of at least one candidate core meets the set interference conditions. The adjustment unit is used to adjust the operating system environment configuration if the maximum scheduling delay of at least one candidate core is detected to be greater than or equal to a set delay threshold, or if the task interference data of at least one candidate core does not meet the set interference conditions. The return unit is used to obtain the maximum scheduling delay and task interference data of each candidate core when running a set periodic task after adjusting the environment configuration, and to return to the execution steps of checking whether the maximum scheduling delay of each candidate core is less than the set delay threshold and checking whether the task interference data of each candidate core meets the set interference conditions, until the number of times the environment configuration is adjusted equals the set number of times. The output unit is used to output the target CPU core when the number of times the environment configuration is adjusted equals the set number of times.

[0124] Optionally, the relay protection simulation platform includes multiple NUMA nodes, each NUMA node being configured with a common core and at least one candidate core; the adjustment unit is specifically used for: If the task interference data of multiple candidate cores in the target NUMA node does not meet the set interference conditions, and the current load parameter of the common core in the target NUMA node exceeds the set load parameter, then at least one candidate core in the target NUMA node will be adjusted to the common core. The target NUMA node is any NUMA node in the relay protection simulation platform. If the task interference data of only one candidate core in the target NUMA node does not meet the set interference conditions, then the common task running in the candidate core will be migrated to the common core of the target NUMA node. If the maximum scheduling latency of multiple candidate cores is detected to be greater than or equal to the latency threshold, and the set periodic tasks of multiple candidate cores have memory access across NUMA nodes, then the operating system's memory configuration policy will be adjusted. If cache contention is detected among multiple candidate cores for their respective periodic tasks, the operating system's cache configuration strategy will be adjusted.

[0125] Optionally, the selected unit is specifically used for: For each NUMA node in the relay protection simulation platform, based on the topology data and the current running task of each CPU core, at least one CPU core is selected from the multiple CPU cores of each NUMA node as the common core of each NUMA node. For each NUMA node in the relay protection simulation platform, the remaining CPU cores of each NUMA node are screened to obtain the candidate cores corresponding to each NUMA node. All candidate cores corresponding to NUMA nodes are identified as multiple candidate cores, and all common cores corresponding to NUMA nodes are identified as multiple common cores.

[0126] Optionally, the multiple currently running tasks include real-time tasks and common tasks; the configuration unit includes: The migration subunit is used to migrate common tasks to run on multiple common cores; The isolation processing subunit is used to configure and isolate multiple candidate cores. The cache configuration subunit is used to configure cache isolation for common tasks and real-time tasks based on topology data. The memory configuration subunit is used to perform memory affinity configuration for real-time tasks based on topology data.

[0127] Optionally, the topology data is used to characterize the mapping relationship between each CPU core and NUMA nodes and cache resources, and the cache configuration subunit is specifically used for: For each NUMA node, check whether the common core and candidate core in each NUMA node share the same cache resource; If it is detected that the common core and candidate core in at least one NUMA node share the same cache resource, then the same cache resource is partitioned to obtain the first partition and the second partition. The first partition is used for caching target common tasks, which are common tasks run by the common cores of at least one NUMA node. The second partition is used for caching target real-time tasks, which are real-time tasks run by the candidate cores of at least one NUMA node.

[0128] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0129] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0130] Figure 10 This is a schematic diagram of the structure of a relay protection simulation platform provided in one embodiment of this application, as shown below. Figure 10 As shown, the relay protection simulation platform 500 of this embodiment includes: at least one processor 502 ( Figure 10 (Only one is shown in the diagram) a processor, a memory 501, and a computer program 503 stored in the memory 501 and executable on at least one processor 502, wherein the processor 502 executes the computer program 503 to implement the steps in any of the above-described configuration processing method embodiments.

[0131] The relay protection simulation platform 500 can be a desktop computer, laptop, handheld computer, or cloud server, etc. This relay protection simulation platform may include, but is not limited to, a processor 502 and a memory 501. Those skilled in the art will understand that... Figure 10 This is merely an example of the relay protection simulation platform 500 and does not constitute a limitation on the relay protection simulation platform 500. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0132] The processor 502 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0133] In some embodiments, memory 501 can be an internal storage unit of the relay protection simulation platform 500, such as a hard disk or memory of the relay protection simulation platform 500. In other embodiments, memory 501 can also be an external storage device of the relay protection simulation platform 500, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the relay protection simulation platform 500. Furthermore, memory 501 can include both internal storage units and external storage devices of the relay protection simulation platform 500. Memory 501 is used to store operating systems, applications, boot loaders, data, and other programs, such as program code for computer programs. Memory 501 can also be used to temporarily store data that has been output or will be output.

[0134] This application also provides a computer-readable storage medium storing a computer program, which, when executed by processor 502, can implement the steps in the above-described method embodiments.

[0135] This application provides a computer program product that, when run on a relay protection simulation platform, enables the relay protection simulation platform to implement the steps described in the above-mentioned method embodiments.

[0136] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by the processor 502, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include at least: any entity or device capable of carrying the computer program code to the device / relay protection simulation platform, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, such as a USB flash drive, a portable hard drive, a magnetic disk, or an optical disk.

[0137] The technical features of the various embodiments described above in this application can be combined arbitrarily without conflict. For the sake of brevity, this specification does not describe all possible combinations, but as long as these combinations do not violate the technical spirit of this application, they should all be considered within the scope of this application. Based on the content disclosed in this application, those skilled in the art can reasonably combine, delete, or replace the technical features of the above embodiments according to actual needs, and such modifications and variations all fall within the protection scope of this application.

[0138] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0139] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0140] In the embodiments provided in this application, it should be understood that the disclosed device / relay protection simulation platform and method can be implemented in other ways. For example, the device / relay protection simulation platform embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0141] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0142] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A configuration processing method for a relay protection simulation platform, characterized in that, The method includes: Obtain the platform information of the relay protection simulation platform, which includes the topology data of multiple CPU cores and the current running tasks of each CPU core. Based on the topology data and multiple currently running tasks, the operating system of the relay protection simulation platform is configured with an environment that restricts some CPU cores to be dedicated to processing real-time tasks. If the environment configuration is successful, obtain the maximum scheduling latency and task interference data of each of the CPU cores when running a set periodic task; Based on the maximum scheduling delay and task interference data of each of the CPU cores running a set periodic task, the target CPU cores that meet the preset conditions are determined among the CPU cores. Based on the multiple currently running tasks and the target CPU core, the operating system execution environment is reconfigured.

2. The configuration processing method as described in claim 1, characterized in that, The step of configuring the operating system execution environment of the relay protection simulation platform based on the topology data and multiple currently running tasks includes: Based on the topology data and the multiple currently running tasks, multiple candidate cores are selected from the multiple CPU cores, wherein the number of multiple candidate cores is less than the number of multiple CPU cores; The operating system execution environment of the relay protection simulation platform is configured based on the multiple currently running tasks and the multiple candidate cores.

3. The configuration processing method as described in claim 2, characterized in that, The step of determining the target CPU core that meets preset conditions among the CPU cores based on the maximum scheduling latency and task interference data when each of the CPU cores runs a set periodic task includes: Detect whether the maximum scheduling delay of each candidate core is less than a set delay threshold, and detect whether the task interference data of each candidate core meets the set interference conditions; If the maximum scheduling delay of at least one of the candidate cores is less than the set delay threshold, and the task interference data of at least one of the candidate cores meets the set interference conditions, then at least one of the candidate cores is determined as the target CPU core. If the maximum scheduling delay of at least one of the candidate cores is detected to be greater than or equal to the set delay threshold, or if the task interference data of at least one of the candidate cores does not meet the set interference condition, then the environment configuration of the operating system is adjusted. After adjusting the environment configuration, the maximum scheduling delay and task interference data of each candidate core when running a set periodic task are obtained, and the steps of detecting whether the maximum scheduling delay of each candidate core is less than a set delay threshold and detecting whether the task interference data of each candidate core meets the set interference conditions are returned, until the number of times the environment configuration is adjusted is equal to the set number of times. The number of times the environment configuration is adjusted is equal to the number of times the target CPU core is set.

4. The configuration processing method as described in claim 3, characterized in that, The relay protection simulation platform comprises multiple NUMA nodes, each NUMA node being configured with a common core and at least one candidate core; the adjustment of the operating system environment configuration includes: If the task interference data of multiple candidate cores in the target NUMA node does not meet the set interference conditions, and the current load parameter of the common core in the target NUMA node exceeds the set load parameter, then at least one candidate core in the target NUMA node will be adjusted to a common core. The target NUMA node is any NUMA node in the relay protection simulation platform. If it is detected that the task interference data of only one candidate core in the target NUMA node does not meet the set interference conditions, then the common task running in the candidate core will be migrated to the common core of the target NUMA node. If the maximum scheduling latency of multiple candidate cores is detected to be greater than or equal to the latency threshold, and each set periodic task of multiple candidate cores has a situation of cross-NUMA node memory access, then the memory configuration strategy of the operating system is adjusted. If cache contention is detected among the various periodic tasks of multiple candidate cores, the operating system's cache configuration strategy is adjusted.

5. The configuration processing method as described in claim 2, characterized in that, The step of selecting multiple candidate cores from multiple CPU cores based on the topology data and multiple currently running tasks includes: For each NUMA node in the relay protection simulation platform, based on the topology data and the current running task of each CPU core, at least one CPU core is selected from the multiple CPU cores of each NUMA node as the common core of each NUMA node. For each NUMA node in the relay protection simulation platform, the remaining CPU cores of each NUMA node are screened to obtain the candidate cores corresponding to each NUMA node. All candidate cores corresponding to NUMA nodes are identified as multiple candidate cores, and all common cores corresponding to NUMA nodes are identified as multiple common cores.

6. The configuration processing method as described in claim 5, characterized in that, The multiple currently running tasks include real-time tasks and common tasks; the configuration of the operating system execution environment of the relay protection simulation platform based on the multiple currently running tasks and the multiple candidate cores includes: Migrate the aforementioned public tasks to run on the multiple public cores; Multiple candidate cores are configured to be isolated. Based on the topology data, cache isolation configuration is performed for the common task and the real-time task; Based on the topology data, the real-time task is configured with memory affinity.

7. The configuration processing method as described in claim 6, characterized in that, The topology data is used to characterize the mapping relationship between each CPU core, NUMA nodes, and cache resources. The step of configuring cache isolation for the common tasks and the real-time tasks based on the topology data includes: For each NUMA node, detect whether the common core and candidate core in each NUMA node share the same cache resource; If it is detected that the common core and candidate core in at least one of the NUMA nodes share the same cache resource, then the same cache resource is partitioned to obtain a first partition and a second partition. The first partition is used for caching target common tasks, which are common tasks run by the common cores of at least one of the NUMA nodes. The second partition is used for caching target real-time tasks, which are real-time tasks run by the candidate cores of at least one of the NUMA nodes.

8. A configuration processing device for a relay protection simulation platform, characterized in that, The device includes: The first acquisition module is used to acquire platform information of the relay protection simulation platform. The platform information includes topology data of multiple CPU cores and the current running tasks of each of the multiple CPU cores. The first configuration module is used to configure the operating system environment of the relay protection simulation platform according to the topology data and multiple currently running tasks. The environment configuration is used to restrict some of the CPU cores to be dedicated to processing real-time tasks. The second acquisition module is used to acquire the maximum scheduling delay and task interference data of each of the CPU cores when running a set periodic task, provided that the environment configuration is successful. The determination module is used to determine the target CPU cores among the CPU cores that meet the preset conditions based on the maximum scheduling delay and task interference data when each of the CPU cores runs a set periodic task. The second configuration module is used to reconfigure the execution environment of the operating system based on the plurality of currently running tasks and the target CPU core.

9. A relay protection simulation platform, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it causes the relay protection simulation platform to implement the method as described in any one of claims 1-7.

10. A computer program product, characterized in that, When the computer program product is run on a terminal device, it causes the terminal device to perform the method as described in any one of claims 1-7.