A multi-process parallel evaluation method and system for ultra-large-scale complex systems

By employing a method in ultra-large-scale complex systems where a first-level subprocess retains a global copy of the data and a second-level subprocess evaluates the logic as an opcode, the problems of lock contention and repeated execution are solved. This achieves efficient parallel evaluation and low-intrusive communication, improving system performance and reducing development costs.

CN122086573APending Publication Date: 2026-05-26SHAOXING XINNA TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHAOXING XINNA TECHNOLOGY CO LTD
Filing Date
2026-04-23
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In ultra-large-scale complex systems, the strong global data dependencies lead to lock contention, high thread safety overhead, high code invasiveness, and problems such as high overhead of large object serialization and repeated execution in traditional multi-process communication. It is difficult to simultaneously meet the requirements of secure isolation of global structure access, extremely high parallel performance, low code invasiveness, and avoidance of redundant execution.

Method used

The system employs a first-level child process that retains a copy of the global data structure of the main process. Multiple second-level child processes are created to distribute tasks. The second-level child processes execute the evaluation logic and encode it into opcodes. An inter-process communication channel is built through shared memory and a double-ended queue to transmit the opcodes to the first-level child processes. Finally, the main process parses and updates the global data structure.

Benefits of technology

It achieves lock-free, high-throughput parallel capabilities, reduces IPC bandwidth pressure and memory copying overhead, reduces repetitive execution and development costs, and improves system performance and maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122086573A_ABST
    Figure CN122086573A_ABST
Patent Text Reader

Abstract

This invention relates to a multi-process parallel evaluation method and system for ultra-large-scale complex systems, belonging to the field of computer system performance optimization technology. The method includes the following steps: creating a first-level subprocess under the main process, where the first-level subprocess retains a copy of the global data structure of the main process; creating multiple second-level subprocesses under the first-level subprocess, distributing the tasks to be evaluated to the second-level subprocesses; the second-level subprocesses execute the evaluation logic, encoding the evaluation results and corresponding execution actions into opcodes, transmitting the opcodes to the first-level subprocesses, and finally summarizing them in the main process; the main process parses the opcodes and performs update operations on the global data structure within the main process. This method completely eliminates lock contention in the main process, achieving lock-free high throughput, linearly scaling parallel capabilities with hardware resources, eliminating the need for repeated time-consuming trial steps or environment construction steps, achieving zero redundant execution, extremely low communication overhead, and low invasiveness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer system performance optimization technology, and in particular relates to a multi-process parallel evaluation method and system for ultra-large-scale complex systems. Background Technology

[0002] In ultra-large-scale complex systems such as electronic design automation (multi-process), large-scale optimization solutions, large-scale simulation systems, and graphics computing, the core task often involves calculating, updating, or optimizing tens of thousands of evaluation points. Such evaluation tasks typically face the following significant technical challenges: 1. Strong global data dependency: The evaluation logic usually requires frequent access to and updates of large global data structures (such as netlists, complex graph structures, etc.).

[0003] 2. Significant thread safety overhead: In traditional multi-threaded parallel models, complex locking mechanisms must be introduced to ensure global data consistency. In high-concurrency scenarios, lock contention can lead to severe performance bottlenecks, limiting the improvement of system throughput.

[0004] 3. High code invasiveness: To achieve thread safety, it is often necessary to make large-scale modifications to the original project code (such as locking, atomic operations, etc.), which not only increases development costs, but also puts a huge burden on code maintainability.

[0005] 4. Repetitive computation and communication overhead: Although existing multi-process solutions solve the isolation problem, they usually face the problem of low efficiency in inter-process communication (IPC). Due to the memory isolation between processes, the serialization of large data objects consumes a lot of communication and CPU resources. In addition, consumer processes often need to repeatedly execute some logic to rebuild the context, resulting in a waste of computing resources.

[0006] In summary, existing technologies struggle to simultaneously meet the four core objectives of "secure isolation of global structure access," "extremely high parallel performance," "low code invasiveness," and "avoidance of redundant execution." Therefore, a new technical solution is urgently needed to address these issues. Summary of the Invention

[0007] This invention provides a multi-process parallel evaluation method and system for ultra-large-scale complex systems to solve the performance bottlenecks caused by global lock contention, the high invasiveness of multi-threaded modification, and the large overhead of large object serialization and repeated execution in traditional multi-process communication.

[0008] To solve the above-mentioned technical problems, the technical solution provided by the present invention is as follows: This invention relates to a multi-process parallel evaluation method for ultra-large-scale complex systems, comprising the following steps: S1. Create a first-level child process under the main process. The first-level child process retains a copy of the global data structure of the main process. S2. Create multiple second-level subprocesses under the first-level subprocess and distribute the tasks to be evaluated to the second-level subprocesses; S3. The second-level subprocess executes the evaluation logic, encodes the evaluation results and corresponding execution actions into opcodes, and transmits the opcodes to the first-level subprocess, which are then aggregated into the main process. S4. The main process parses the opcode and performs update operations on the global data structures within the main process.

[0009] Preferably, the main process is configured with an adapter, and S1 further includes: defining custom business logic in the main process through the adapter, defining data types, task production functions and result consumption functions; In S3, the secondary subprocess calls the production function in the adapter to execute the evaluation logic and generate opcodes; In step S4, the main process calls the consumer function in the adapter to parse the opcode and perform the update operation.

[0010] Preferably, the adapter includes a resource reset interface. After the task to be evaluated in S2 is distributed to the secondary subprocess, the secondary subprocess calls the resource reset interface to clean up or reset the system resource handles inherited from the main process that are not needed in the secondary subprocess.

[0011] Preferably, in step S2, the first-level subprocess integrates a parallel task scheduling library, which automatically schedules the concurrency of the second-level subprocesses and the task allocation strategy according to the number of tasks to be evaluated and the system hardware resources, thereby achieving batch partitioning and load balancing.

[0012] Preferably, the encoding process in S3 is as follows: ignoring redundant intermediate data and unadopted exploratory steps generated during the evaluation process, only extracting the key parameters required to change the state of the global data structure, including the key execution path of the program, the target index, the operation type, and the change value, and compressing and mapping them into the opcode.

[0013] Preferably, when S1 creates a first-level child process under the main process and when S2 creates multiple second-level child processes under the first-level child process, shared memory and double-ended queues are also used to build an inter-process communication channel. In S3, the second-level subprocess transmits the opcode to the first-level subprocess based on the inter-process communication channel.

[0014] Preferably, in step S3, the specific steps for the second-level subprocess to transmit the opcode to the first-level subprocess based on the inter-process communication channel are as follows: S3.1. The second-level child process writes the opcode to the back end of the double-ended queue; S3.2. The first-level child process or the main process reads opcodes in batches from the front of the double-ended queue.

[0015] This invention also relates to a multi-process parallel evaluation system for ultra-large-scale complex systems, comprising: The process management module is used to create first-level child processes under the main process, and to create multiple second-level child processes under the first-level child processes; The evaluation execution module, deployed in the secondary subprocess, is used to execute the evaluation logic and encode the evaluation results and corresponding execution actions into opcodes; The communication transmission module is used to transmit opcodes to the first-level subprocesses, which are then aggregated in the main process. The state update module, deployed in the main process, is used to parse opcodes and perform update operations on the global data structures within the main process.

[0016] Preferably, the main process is configured with an adapter for defining custom business logic within the main process, including defining data types, task production functions, and result consumption functions.

[0017] Preferably, the communication transmission module utilizes shared memory and a double-ended queue to construct an inter-process communication channel.

[0018] Compared with the prior art, the technical solution provided by this invention has the following advantages: 1. In the multi-process parallel evaluation method for ultra-large-scale complex systems involved in this invention, all time-consuming evaluation logic involving global structure access is executed in isolated secondary subprocesses, which completely eliminates the lock contention problem of the main process, realizes lock-free high throughput of the system, and the parallel capability expands linearly with hardware resources.

[0019] 2. The multi-process parallel evaluation method for ultra-large-scale complex systems involved in this invention encodes the evaluation results and corresponding execution actions into opcodes. By utilizing the opcode mechanism, the main process only needs to apply the results and does not need to repeatedly execute time-consuming trial steps or environment construction steps, thus achieving zero repeated execution.

[0020] 3. The multi-process parallel evaluation method for ultra-large-scale complex systems involved in this invention encodes the evaluation results and corresponding execution actions into opcodes, and uses shared memory and double-ended queues to build inter-process communication channels. Based on the inter-process communication channels, the opcodes are transmitted, abandoning the traditional large object serialization / deserialization mode, and only transmitting tiny opcodes (such as 64-bit integers or other custom standard layout types), which greatly reduces IPC bandwidth pressure and memory copying overhead, and the communication overhead is extremely low.

[0021] 4. The multi-process parallel evaluation method for ultra-large-scale complex systems involved in this invention is configured with an adapter to customize business logic. Existing single-threaded systems only need a few interface adaptations to access this framework without refactoring the core data structure. This method has low invasiveness and can reduce development costs. Attached Figure Description

[0022] Figure 1 This is a flowchart of the multi-process parallel evaluation method for ultra-large-scale complex systems according to the present invention; Figure 2 This is a flowchart defining the business logic of the adapter. Detailed Implementation

[0023] To further understand the content of the present invention, the present invention will be described in detail with reference to the embodiments. The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0024] Example 1, refer to Appendix Figure 1 As shown, this invention relates to a multi-process parallel evaluation method for ultra-large-scale complex systems, applicable to ultra-large-scale complex software systems such as electronic design automation (EDA), high-performance computing (HPC), and large-scale simulation. The multi-process parallel evaluation method of this invention includes the following steps: S1. A first-level child process is created under the main process. That is, the main process calls the fork() system to create a first-level child process. The first-level child process retains a copy of the global data structure of the main process. During the construction of the first-level child process, the task parallel library is introduced. The created first-level child process fully inherits the memory image of the main process (through the copy-on-write mechanism), ensuring the consistency of the evaluation environment and without additional construction overhead.

[0025] The fork() system call is a fundamental system call in Unix and Linux systems used to create new processes. Calling fork() creates a child process (first-level child process) that is almost identical to the current process (main process). The child process is a copy of the parent process and begins execution from the point after the fork() call. Using the fork() system call to construct a first-level child process is a common technique in this field. The main process is configured with an adapter, through which custom business logic is defined in the main process, including defining data types, task production functions, and result consumption functions; the adapter includes a resource reset interface.

[0026] When creating a first-level child process, an inter-process communication (IPC) channel is built using shared memory and dequeues.

[0027] The method of using shared memory and dequeues to build inter-process communication channels is a common technique in this field. Its underlying mechanism is based on POSIX mmap (memory mapping), which maps files or anonymous memory objects to the virtual address spaces of each process, thereby achieving cross-process physical memory sharing.

[0028] At the software implementation level, this channel utilizes the managed shared memory technology from the industry-standard library Boost.Interprocess. It constructs a double-ended queue in the shared memory segment using the boost::interprocess::deque container, and employs interprocess mutexes and condition variables for synchronization. This type of technology has mature applications in distributed computing, high-performance middleware, and EDA simulation systems, and is a commonly used solution in this field.

[0029] S2. A multi-threaded task distribution mechanism is built within the first-level subprocess to distribute tasks to be evaluated to the second-level subprocesses: The first-level subprocess integrates a task parallelism library—Thread Building Block (TBB)—and creates N worker threads according to the evaluation requirements. Each worker thread corresponds to and manages a second-level subprocess, forming a one-to-one evaluation unit. During the task distribution phase, the first-level subprocess utilizes the automatic scheduling mechanism of the task parallelism library to perform concurrent management and task allocation for the worker threads. After receiving a task, the worker thread drives its corresponding second-level subprocess to execute the specific evaluation logic. Through this mechanism, the system utilizes the task parallelism library to load balance the scheduling of worker threads, indirectly achieving batch partitioning and concurrency optimization of the evaluation tasks for the second-level subprocesses.

[0030] The TBB library, developed by Intel, is a C++ parallel programming tool library. It employs a task-parallel model, abstracting underlying thread management through a high-level API, allowing developers to focus on algorithm logic rather than thread synchronization details. Its core mechanisms include a work-stealing scheduler for dynamic load balancing and components such as parallel algorithms (e.g., parallel_for, parallel_reduce) and concurrent containers (e.g., concurrent_vector). Building second-level child processes using the TBB library is a common practice in this field. When creating second-level child processes, shared memory and deques are also used to build inter-process communication (IPC) channels.

[0031] After the task to be evaluated is distributed to the second-level child process, the second-level child process calls the resource reset interface to clean up or reset the system resource handles inherited from the main process that are not needed in the second-level child process.

[0032] S3. The second-level subprocess executes the evaluation logic. As the actual "producer", it calls the production function in the adapter to evaluate an action (which is computationally intensive). The second-level subprocess encodes the evaluation result and the corresponding execution action into an opcode. During this process, the subprocess can safely read global data structures to perform complex evaluation calculations without locking.

[0033] In the coding process, redundant intermediate data and unadopted exploratory steps generated during the evaluation process are ignored. Only the key parameters required to change the state of the global data structure are extracted. The key parameters include the key execution path of the program, the target index, the operation type and the change value. These parameters are compressed and mapped into the opcode. The opcode may contain a combination of encodings of "consumer process execution path", "step size", "direction" and "target node ID".

[0034] The encoding and parsing methods of the opcodes follow a conjugate customization principle. Specifically, this invention does not pre-define a fixed communication protocol, but allows users to customize a set of mapping and consumption rules through the adapter, based on the actual execution logic. These rules can draw on the construction methods of virtual machine bytecode or binary instruction sets (ISAs) to abstract complex evaluation results into concise instruction words. This custom mechanism without a fixed format enables developers to dynamically define opcode bit fields for specific business scenarios (such as netlist flipping, parameter tuning, etc.), thereby achieving a high degree of decoupling between computational logic and the transmission framework.

[0035] For example, in a preferred custom mapping instance, the opcode is a 64-bit unsigned integer, with the first 8 bits defined as the operation type instruction (e.g., 0x01 represents attribute update, 0x02 represents topology deletion), the middle 32 bits defined as the target index of the global data structure, and the last 24 bits defined as the incremental value or status feature of the change.

[0036] The opcode is transmitted to the first-level child process through an inter-process communication channel. The specific steps are as follows: S3.1. The second-level child process writes the opcode to the back end of the double-ended queue; S3.2. The first-level child process or the main process reads opcodes in batches from the front of the double-ended queue.

[0037] After the first-level child process obtains the opcode, it uses the cross-process tool of the Boost library to return the opcode to the main process (consumer process), and then summarizes the opcodes.

[0038] S4. The main process, acting as a "consumer," reads the opcode from the queue, calls the consumer function in the adapter to parse the opcode, applies it to the global data structure, and then performs an update operation on the global data structure within the main process. The main process directly locates the specific memory location based on the opcode for fast updates (e.g., update(idx, value)), avoiding repeated execution of complex evaluation calculation logic, resulting in minimal computation.

[0039] Example 2: This example provides extensibility through the C++ template class EvalArenaAdapter (C++ program class name, meaning "evaluation field adapter"). The steps for customizing business logic through the adapter are as follows: Figure 2 As shown, it includes: (1) For the calculation logic of the evaluation point, define the producer function producer(idx), where idx represents the index number of the evaluation point. Based on the producer function, the generated opcode OpCode can be returned. (2) Define the consumer function consume(idx, OpCode) and define how the main process handles the returned index and opcode OpCode pair; (3) Selectively define the logic resetInChildPs() in the child process to clean up the main process resources (such as closing file handles and network connections) to enhance robustness.

[0040] Use the well-implemented adapter to build an MpEvalArena instance and start parallel evaluation.

[0041] Example 3: This example describes a multi-process parallel evaluation system for ultra-large-scale complex systems that implements the steps of the example, comprising: The process management module is used to create first-level child processes under the main process, and to create multiple second-level child processes under the first-level child processes; The evaluation execution module, deployed in the secondary subprocess, is used to execute evaluation logic. The evaluation results and corresponding execution actions are encoded as opcodes.

[0042] The communication transmission module is used to transmit opcodes to the first-level subprocesses and finally aggregate them to the main process; the communication transmission module utilizes shared memory and a double-ended queue to build an inter-process communication channel.

[0043] The state update module, deployed in the main process, is used to parse opcodes and perform update operations on the global data structures within the main process.

[0044] The adapter, configured in the main process, is used to define custom business logic within the main process, including defining data types, task generation functions, and result consumption functions.

[0045] The present invention has been described in detail above with reference to the embodiments, but the content described is only a preferred embodiment of the present invention and should not be considered as limiting the scope of the present invention. All equivalent changes and improvements made in accordance with the scope of the present invention should still fall within the patent coverage of the present invention.

Claims

1. A multi-process parallel evaluation method for ultra-large-scale complex systems, characterized in that, Includes the following steps: S1. Create a first-level child process under the main process. The first-level child process retains a copy of the global data structure of the main process. S2. Create multiple second-level subprocesses under the first-level subprocess and distribute the tasks to be evaluated to the second-level subprocesses; S3. The second-level subprocess executes the evaluation logic, encoding the evaluation result and the corresponding execution action into opcodes; The opcode is then transmitted to the first-level child process and finally aggregated in the main process; S4. The main process parses the opcode and performs update operations on the global data structures within the main process.

2. The multi-process parallel evaluation method for ultra-large-scale complex systems according to claim 1, characterized in that: The main process is configured with an adapter, and S1 further includes: defining custom business logic in the main process through the adapter, defining data types, task production functions and result consumption functions; In S3, the secondary subprocess calls the production function in the adapter to execute the evaluation logic and generate opcodes; In step S4, the main process calls the consumer function in the adapter to parse the opcode and perform the update operation.

3. The multi-process parallel evaluation method for ultra-large-scale complex systems according to claim 2, characterized in that: The adapter includes a resource reset interface. After the task to be evaluated in S2 is distributed to the secondary subprocess, the secondary subprocess calls the resource reset interface to clean up or reset the system resource handles inherited from the main process that are not needed in the secondary subprocess.

4. The multi-process parallel evaluation method for ultra-large-scale complex systems according to claim 1, characterized in that: In S2, the first-level subprocess integrates a parallel task scheduling library, which automatically schedules the concurrency of the second-level subprocesses and the task allocation strategy according to the number of tasks to be evaluated and the system hardware resources, so as to achieve batch partitioning and load balancing.

5. The multi-process parallel evaluation method for ultra-large-scale complex systems according to claim 1, characterized in that: The encoding process in S3 is as follows: ignoring redundant intermediate data and unadopted exploratory steps generated during the evaluation process, only extracting the key parameters required to change the state of the global data structure. The key parameters include the program's key execution path, target index, operation type, and change value, and compressing and mapping them into the opcode.

6. The multi-process parallel evaluation method for ultra-large-scale complex systems according to claim 1, characterized in that: When S1 creates a first-level child process under the main process and when S2 creates multiple second-level child processes under the first-level child process, it also uses shared memory and double-ended queues to build an inter-process communication channel. In S3, the second-level subprocess transmits the opcode to the first-level subprocess based on the inter-process communication channel.

7. The multi-process parallel evaluation method for ultra-large-scale complex systems according to claim 6, characterized in that: In step S3, the specific steps for the second-level subprocess to transmit the opcode to the first-level subprocess based on the inter-process communication channel are as follows: S3.

1. The second-level child process writes the opcode to the back end of the double-ended queue; S3.

2. The first-level child process or the main process reads opcodes in batches from the front of the double-ended queue.

8. A multi-process parallel evaluation system for ultra-large-scale complex systems, characterized in that: It includes: The process management module is used to create first-level child processes under the main process, and to create multiple second-level child processes under the first-level child processes; The evaluation execution module, deployed in the secondary subprocess, is used to execute the evaluation logic and encode the evaluation results and corresponding execution actions into opcodes; The communication transmission module is used to transmit opcodes to the first-level subprocesses, which are then aggregated in the main process. The state update module, deployed in the main process, is used to parse opcodes and perform update operations on the global data structures within the main process.

9. The multi-process parallel evaluation system for ultra-large-scale complex systems according to claim 8, characterized in that: The main process is configured with an adapter for defining custom business logic within the main process, including defining data types, task generation functions, and result consumption functions.

10. The multi-process parallel evaluation system for ultra-large-scale complex systems according to claim 8, characterized in that: The communication transmission module described above utilizes shared memory and a double-ended queue to construct an inter-process communication channel.