Parallel execution method and device of reactor multi-physics coupling module

By implementing a parallel execution method for the multi-physics coupled modules of the reactor, the problems of low efficiency and resource waste in serial execution are solved, achieving efficient utilization of computing resources and iterative convergence.

CN120954772BActive Publication Date: 2026-07-31NUCLEAR POWER INSTITUTE OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NUCLEAR POWER INSTITUTE OF CHINA
Filing Date
2025-06-25
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

The existing serial execution process of multi-physics coupled modules in reactors is inefficient and wastes a lot of computing resources, resulting in long computation time.

Method used

By analyzing the coupling relationships of each submodule in the reactor multiphysics coupling module, determining the transmission parameters, optimizing resource allocation, obtaining the corresponding number of execution cores, and achieving parallel execution until the computation converges.

Benefits of technology

It improves computational efficiency, reduces server resource idle time, optimizes core allocation and data synchronization, and ensures the convergence of iterative computation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120954772B_ABST
    Figure CN120954772B_ABST
Patent Text Reader

Abstract

This invention discloses a parallel execution method and apparatus for a reactor multiphysics coupling module, relating to the field of nuclear power control and regulation technology. Its main purpose is to solve the problems of low computational efficiency and wasted computational resources in existing serially executed reactor multiphysics coupling modules. The method includes: analyzing the coupling relationships of each sub-module within the reactor multiphysics coupling module to determine the transmission parameters between each sub-module; optimizing resource allocation for each sub-module to obtain the number of execution cores corresponding to each sub-module; executing each sub-module in parallel based on the number of execution cores to obtain coupling data corresponding to each transmission parameter; and after all sub-modules have been executed, transmitting the coupling data to the corresponding coupled sub-modules, enabling the coupled sub-modules to perform iterative calculations based on the coupling data until the calculations converge.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of nuclear power control and regulation technology, and in particular to a method and apparatus for parallel execution of a reactor multi-physics coupling module, a storage medium, and electronic equipment. Background Technology

[0002] A reactor multiphysics coupling module is generally formed by coupling two or more single-discipline calculation submodules. Taking the reactor core physics-thermal coupling module as an example, it is formed by coupling the core neutron dynamics program and the core thermal-hydraulic program as submodules.

[0003] Currently, the execution flow of multi-physics coupled modules in reactors is generally a serial execution flow, which is time-consuming and inefficient. Furthermore, when executing the serial execution flow, each submodule is allocated the same amount of computing resources (resource requests are made based on the maximum number of parallel execution cores required by a single submodule), often resulting in a large amount of computing resources being idle and causing resource waste. Summary of the Invention

[0004] In view of this, the present invention provides a parallel execution method and apparatus for a reactor multi-physics coupling module, the main purpose of which is to solve the problems of low computational efficiency and waste of computational resources in existing serially executed reactor multi-physics coupling modules.

[0005] According to one aspect of the present invention, a method for parallel execution of a reactor multi-physics coupling module is provided, comprising: The coupling relationship of each sub-module in the reactor multi-physics coupling module is analyzed to determine the transmission parameters between each sub-module. Resource optimization configuration is performed on each submodule to obtain the number of execution cores corresponding to each submodule; Based on the number of execution cores, each of the sub-modules is executed in parallel to obtain coupled data corresponding to each of the transmission parameters; After all the sub-modules have been executed, the coupling data is transmitted to the corresponding coupled sub-modules so that the coupled sub-modules can perform iterative calculations based on the coupling data until the calculations converge.

[0006] Furthermore, the process of optimizing resource allocation for each submodule to obtain the number of execution cores corresponding to each submodule includes: Obtain historical data for each submodule, including the configured historical number of execution cores and historical execution time; The historical data is preprocessed, and the preprocessed historical data is integrated into a historical dataset. Train an optimization model based on the historical data set to obtain a target resource optimization model; and determine the corresponding execution core numbers for each sub-module based on the target resource optimization model.

[0007] Further, before parallelly executing each of the sub-modules based on the execution core numbers, the method further includes: Initialize the transfer parameters corresponding to each sub-module; and construct a parameter mapping matrix corresponding to each transfer parameter, so as to perform format conversion processing on the transfer parameters based on the parameter mapping matrix.

[0008] Further, the method further includes: Configure a calculation completion flag variable for each of the sub-modules, and the calculation completion flag variable is used to identify the execution status of each of the sub-modules; Generate an execution record corresponding to each sub-module based on the calculation completion flag variable and the resource configuration of each sub-module.

[0009] Further, the method further includes: Obtain the execution time of each of the sub-modules corresponding to the previous round of iterative calculation from the execution record and the execution core number , where i is the number of the coupled sub-module and n is the number of the iteration; Based on the execution time and the execution core number dynamically adjust the execution core numbers for processing each of the sub-modules; so as to perform a new round of iterative calculation based on the adjusted execution core numbers.

[0010] Further, the dynamically adjusting the execution core numbers for processing each of the sub-modules based on the execution time and the execution core number includes: Calculate the total time and the average time of the previous round of iterative calculation based on the execution time ; Determine a core number adjustment factor based on the execution core number , the total time and the average time , and the formula is as follows:

[0011] where, when the time variance <A, C = 0; when the time variance >A, C = 1; A is a control threshold; Based on the core number adjustment factor The number of execution cores corresponding to each of the aforementioned sub-modules is dynamically adjusted using the following formula:

[0012] in, Calculate the number of execution cores for the i-th submodule in the n-th iteration.

[0013] Further, after all the sub-modules have finished executing, the coupled data is transmitted to the corresponding coupled sub-modules, so that the coupled sub-modules can perform iterative calculations based on the coupled data until the calculations converge, including: Each of the coupled submodules uses the received coupled data as input data for a new round of iterative calculation to generate a new round of coupled data; Compare the deviation of the coupling data obtained from the two most recent iterations, and determine whether the deviation satisfies the convergence condition; When the deviations of all coupled data satisfy the convergence condition, the reactor multiphysics coupling module calculation is determined to be converged.

[0014] According to another aspect of the present invention, a parallel execution device for a reactor multi-physics coupling module is provided, comprising: The parameter determination module is used to perform coupling relationship analysis on each sub-module in the reactor multi-physics coupling module and determine the transmission parameters between each sub-module. The resource configuration module is used to optimize the resource configuration of each submodule and obtain the number of execution cores corresponding to each submodule. A parallel execution module is used to execute each of the sub-modules in parallel based on the number of execution cores, and obtain coupled data corresponding to each of the transmission parameters; The coupling iteration module is used to transmit the coupling data to the corresponding coupled sub-module after all the sub-modules have been executed, so that the coupled sub-modules can perform iterative calculations based on the coupling data until the calculations converge.

[0015] Furthermore, the resource configuration module is also used for: Obtain historical data for each submodule, including the configured historical number of execution cores and historical execution time; The historical data is preprocessed, and the preprocessed historical data is integrated into a historical dataset. An optimization model is trained based on the historical dataset to obtain a target resource optimization model; and the number of execution cores corresponding to each sub-module is determined based on the target resource optimization model.

[0016] Further, the device further includes a parameter processing module, which is used to initialize the transfer parameters corresponding to each sub-module; and construct a parameter mapping matrix corresponding to each transfer parameter, so as to perform format conversion processing on the transfer parameters based on the parameter mapping matrix.

[0017] Further, the device further includes an identification and recording module, which is used for: Configure a calculation completion flag variable for each of the sub-modules, and the calculation completion flag variable is used to identify the execution status of each of the sub-modules; Generate an execution record corresponding to each sub-module based on the calculation completion flag variable and the resource configuration of each sub-module.

[0018] Further, the resource configuration module further includes a dynamic adjustment unit, which is used for: Obtain the execution time of each sub-module corresponding to the previous round of iterative calculation from the execution record and the number of execution cores , where i is the number of the coupled sub-module and n is the number of the iteration; Based on the execution time and the number of execution cores dynamically adjust the number of execution cores of each sub-module; so as to perform a new round of iterative calculation based on the adjusted number of execution cores.

[0019] Further, the dynamic adjustment unit is further used for: Based on the execution time calculate the total time of the previous round of iterative calculation and the average time ; Based on the number of execution cores , the total time and the average time determine the core number adjustment factor , the formula is as follows:

[0020] where, when the time variance < A, C = 0; when the time variance > A, C = 1; A is the control threshold; Based on the core number adjustment factor dynamically adjust the number of execution cores corresponding to each sub-module, the formula is as follows:

[0021] where, Calculate the number of execution cores for the i-th submodule in the n-th iteration.

[0022] Furthermore, the coupling iteration module is also used for: Each of the coupled submodules uses the received coupled data as input data for a new round of iterative calculation to generate a new round of coupled data; Compare the deviation of the coupling data obtained from the two most recent iterations, and determine whether the deviation satisfies the convergence condition; When the deviations of all coupled data satisfy the convergence condition, the reactor multiphysics coupling module calculation is determined to be converged.

[0023] According to another aspect of the present invention, a storage medium is provided, wherein at least one executable instruction is stored therein, the executable instruction causing a processor to perform an operation corresponding to the parallel execution method of the above-described reactor multi-physics coupling module.

[0024] According to another aspect of the present invention, an electronic device is provided, including a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction that causes the processor to perform operations corresponding to the parallel execution method of the reactor multi-physics coupling module described above.

[0025] By employing the above-described technical solutions, the technical solutions provided by the embodiments of the present invention have at least the following advantages: This invention provides a parallel execution method and apparatus for a reactor multiphysics coupling module. Compared with the prior art, this invention analyzes the coupling relationship of each sub-module in the reactor multiphysics coupling module to determine the transmission parameters between the sub-modules; optimizes the resource configuration of each sub-module to obtain the number of execution cores corresponding to each sub-module; executes each sub-module in parallel based on the number of execution cores to obtain coupling data corresponding to each transmission parameter; after all the sub-modules have been executed, the coupling data is transmitted to the corresponding coupled sub-modules so that the coupled sub-modules can perform iterative calculations based on the coupling data until the calculation converges. This achieves the parallel execution transformation of the original serially executed reactor multiphysics coupling module and solves problems such as core allocation, acquisition of the running status of coupled sub-modules, data synchronization and transmission, and iterative convergence determination, thereby reducing the idle time of server resources and improving computing efficiency.

[0026] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0027] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating a parallel execution method for a reactor multi-physics coupling module provided in an embodiment of the present invention is shown. Figure 2 This diagram illustrates a serial execution flow of a reactor core physical-thermal coupling module according to an embodiment of the present invention. Figure 3 This diagram illustrates a parallel execution flow of a reactor core physical-thermal coupling module according to an embodiment of the present invention. Figure 4 A flowchart illustrating another parallel execution method for a reactor multi-physics coupling module provided in an embodiment of the present invention is shown. Figure 5 This invention provides a schematic diagram of the structure of a parallel execution device for another reactor multi-physics coupling module according to an embodiment of the present invention. Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown. Detailed Implementation

[0028] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0029] This invention provides a method for parallel execution of a reactor multi-physics coupling module, such as... Figure 1 As shown, the method includes: 101. Perform coupling relationship analysis on each sub-module in the reactor multi-physics coupling module to determine the transmission parameters between each sub-module; In this embodiment of the invention, the reactor multi-physics coupling module contains at least two single-discipline calculation submodules. Taking the reactor core physics-thermal coupling module as an example, it is formed by coupling the core neutron dynamics program and the core thermal-hydraulic program as submodules. The current execution end needs to perform coupling relationship analysis on each submodule in the reactor multi-physics coupling module, including analyzing the transmission data between submodules with coupling relationships, thereby determining the transmission parameters between each submodule. For example, if the transmission data of the core neutron dynamics program (hereinafter referred to as the physics submodule) in the reactor core physics-thermal coupling module is the core power field, then the power distribution is used as the transmission parameter of the physics submodule; if the transmission data of the core thermal-hydraulic program (hereinafter referred to as the thermal submodule) in the reactor core physics-thermal coupling module is the temperature field and density field of the core coolant, then the temperature distribution and density distribution are used as the transmission parameters of the thermal submodule, etc. This embodiment of the invention does not impose specific limitations.

[0030] 102. Perform resource optimization and configuration on each submodule to obtain the number of execution cores corresponding to each submodule; In this embodiment of the invention, in order to improve the utilization of computing resources, the current execution end performs resource optimization configuration processing on each sub-module before executing the corresponding tasks, thereby obtaining the number of execution cores corresponding to each sub-module. The resource optimization configuration processing can be performed based on factors such as grid size and model complexity, or on execution conditions, etc., and this embodiment of the invention does not impose specific limitations.

[0031] 103. Based on the number of execution cores, each of the sub-modules is executed in parallel to obtain coupled data corresponding to each of the transmission parameters; In traditional reactor core physics-thermal coupling modules, the physics submodule and the thermal submodule are executed sequentially, such as... Figure 2 As shown, the specific execution steps are as follows: 1) Execute the physics submodule to obtain the core power distribution; 2) Transfer the core power to the core thermal submodule; 3) Execute the core thermal submodule to calculate the core coolant temperature, density field, etc.; 4) Transfer the core coolant temperature and density field to the core physics submodule; 5) Execute the core physics submodule and density field to calculate the new core power distribution; 6) Iterate until convergence.

[0032] However, in this embodiment of the invention, the current execution end executes each sub-module in parallel based on the number of execution cores of each sub-module determined in step 102, and obtains coupled data corresponding to each of the aforementioned transmission parameters. For example... Figure 3 As shown, the physical and thermal sub-modules in the reactor core physical-thermal coupling module are executed in parallel, and the resulting coupling data includes core power, coolant temperature and density, etc. The embodiments of the present invention do not impose specific limitations.

[0033] It should be noted that, in order to meet the data input requirements of each submodule, before the current execution end executes each submodule in parallel based on the number of execution cores, the method further includes: The transmission parameters corresponding to each sub-module are initialized; and a parameter mapping matrix corresponding to each transmission parameter is constructed so that the transmission parameters are format-converted based on the parameter mapping matrix. Specifically, the coupled data is first stored in the corresponding grid to form a physical field according to a unified format, and then the physical field is converted between different coupled sub-module grids using a predetermined parameter mapping matrix. The physical field can be represented by an array, and this embodiment of the invention does not impose specific limitations.

[0034] 104. After all the sub-modules have been executed, the coupling data is transmitted to the corresponding coupled sub-modules so that the coupled sub-modules can perform iterative calculations based on the coupling data until the calculations converge.

[0035] In this embodiment of the invention, taking the physical submodule and thermal submodule in the reactor core physical-thermal coupling module as an example, after both the physical submodule and the thermal submodule have been executed, the current execution terminal transmits the coupled data core power field obtained by the physical submodule to the thermal submodule with the coupling relationship, and at the same time transmits the coupled data coolant temperature and density field obtained by the thermal submodule to the physical submodule with the coupling relationship.

[0036] Next, each of the coupled submodules will use the received coupled data as input data for a new round of iterative calculations to generate new coupled data; such as Figure 3 As shown, taking the physics submodule and thermal submodule in the reactor core physics-thermal coupling module as an example, when the physics submodule receives the coolant temperature and density field transmitted from the thermal submodule, it updates the coolant temperature and density field of the input model; when the thermal submodule receives the power field transmitted from the physics submodule, it updates the power field of the input model; the updated data are used as input data for a new round of iterative calculation to generate a new round of coupling data.

[0037] After a new round of iterative calculations is completed, the current execution terminal needs to compare the deviations of the coupling data obtained from the two most recent iterative calculations and determine whether the deviations meet the convergence conditions. Taking the physical and thermal sub-modules in the reactor core physics-thermal coupling module as an example, the current execution terminal needs to compare the power deviation, coolant temperature deviation, and coolant density deviation obtained from the two most recent iterative calculations. This embodiment of the invention does not impose specific limitations. When the comparison result shows that the deviations of all coupling data meet the convergence conditions, the reactor multi-physics coupling module calculation is determined to have converged. Taking the physical and thermal sub-modules in the reactor core physics-thermal coupling module as an example, when the power deviation, coolant temperature deviation, and coolant density deviation all converge, the iterative calculation stops.

[0038] Furthermore, as a refinement and extension of the specific implementation of the above embodiments, in order to make preliminary and reasonable allocation of computing resources for the reactor multiphysics coupling module, another parallel execution method for the reactor multiphysics coupling module is provided, such as... Figure 4 As shown, the steps involve optimizing resource configuration for each submodule to obtain the number of execution cores corresponding to each submodule, including: 201. Obtain historical data for each submodule, including the configured historical execution core count and historical execution time; 202. Perform data preprocessing on the historical data, and integrate the preprocessed historical data into a historical dataset; In this embodiment of the invention, the current execution end analyzes and processes the historical execution status of the reactor multi-physics coupling module. For example, it acquires historical data of each sub-module in the reactor multi-physics coupling module. The historical data includes the configured historical execution core count and historical execution time, etc., which are not specifically limited in this embodiment. Next, the acquired historical data is preprocessed, such as identifying and deleting obviously erroneous or abnormal data points, for example, data records with negative execution time or zero execution core count; for missing data, interpolation methods or average, median, etc. can be used to fill in the gaps; duplicate data is deleted, etc., which are not specifically limited in this embodiment. Then, the preprocessed historical data is integrated into a historical dataset.

[0039] 203. Train an optimization model based on the historical dataset to obtain a target resource optimization model; and determine the number of execution cores corresponding to each sub-module based on the target resource optimization model.

[0040] In this embodiment of the invention, the current execution end trains an optimization model based on a historical dataset. The optimization model can use gradient descent-based optimization algorithms, such as stochastic gradient descent (SGD) or the Adam optimizer; alternatively, machine learning models such as decision trees, random forests, and support vector machines (SVM) can be used. This embodiment of the invention does not impose specific limitations. The trained target resource optimization model is then obtained, possessing the ability to find the optimal number of execution cores. The current execution end uses the trained target resource optimization model to determine the number of execution cores corresponding to each sub-module. This obtained number of execution cores serves as the initial value for the number of execution cores in each sub-module, achieving the first optimization of the number of execution cores for the reactor's multi-physics coupling modules.

[0041] Furthermore, as a refinement and extension of the specific implementation of the above embodiments, in order to facilitate the analysis of the execution status of each sub-module, another parallel execution method for reactor multi-physics coupling modules is provided, the method further including: Configure a calculation completion flag variable for each of the sub-modules, the calculation completion flag variable being used to identify the execution status of each of the sub-modules; Based on the calculation completion flag variable and the resource configuration of each submodule, an execution record corresponding to each submodule is generated.

[0042] In this embodiment of the invention, the current execution end configures a calculation completion flag variable for each submodule, such as variable x, variable y, etc., and this embodiment of the invention does not make specific limitations. The calculation completion flag variable is used to identify the execution status of each submodule. For example, when the calculation completion flag variable x=0, it indicates execution is in progress; when the calculation completion flag variable x=1, it indicates execution is complete; when the calculation completion flag variable x=?, it indicates an execution error, etc., this embodiment of the invention does not make specific limitations.

[0043] It should be noted that the current execution end also generates execution records corresponding to each submodule based on the completion flag variables of each submodule and the resource configuration of each submodule. These execution records may include the number of execution cores, execution start time, execution end time, total execution time, input data, etc., but this embodiment of the invention does not impose specific limitations on these details.

[0044] Furthermore, as a refinement and extension of the specific implementation of the above embodiments, in order to dynamically adjust resources during iterative calculations, another parallel execution method for reactor multi-physics coupling modules is provided, the method further comprising: (1) Obtain the execution time of each sub-module corresponding to the previous iteration calculation from the execution record. and number of execution cores , where i is the number of the coupled submodule and n is the number of the iteration number; (2) Based on the execution time Calculate the total time of the previous round of iterative calculation and the average time , and the specific formula is as follows:

[0045]

[0046] Where, N represents the number of coupled sub-modules.

[0047] (3) Based on the number of execution cores , the total time and the average time to determine the core number adjustment factor , and the formula is as follows:

[0048] Where, the value of C is determined by the time variance . When the time variance < A, C = 0; when the time variance > A, C = 1; A is a control threshold and can be set according to user experience. Where, the time variance is calculated as follows:

[0049] (4) Based on the core number adjustment factor to dynamically adjust the execution core numbers corresponding to each of the sub-modules, and the formula is as follows:

[0050] Where, is the execution core number of the i-th sub-module in the n-th round of iterative calculation.

[0051] It should be noted that this embodiment realizes the dynamic allocation of the execution core numbers of each coupled sub-module, so that the calculation times of each sub-module are as close as possible, which can effectively reduce the waiting time of the sub-modules with low complexity, thereby realizing the second optimization of the execution core numbers of the reactor multi-physics coupling modules.

[0052] This invention provides a parallel execution method for a reactor multiphysics coupling module. Compared with the prior art, this invention analyzes the coupling relationships of each sub-module in the reactor multiphysics coupling module to determine the transmission parameters between the sub-modules; optimizes resource allocation for each sub-module to obtain the number of execution cores corresponding to each sub-module; executes each sub-module in parallel based on the number of execution cores to obtain coupling data corresponding to each transmission parameter; after all the sub-modules have been executed, the coupling data is transmitted to the corresponding coupled sub-modules so that the coupled sub-modules can perform iterative calculations based on the coupling data until the calculations converge. This achieves the parallel execution transformation of the original serially executed reactor multiphysics coupling module and solves problems such as core allocation, acquisition of the running status of coupled sub-modules, data synchronization and transmission, and iterative convergence determination, thereby reducing the idle time of server resources and improving computational efficiency.

[0053] As a response to the above Figure 1 The implementation of the method shown in this invention provides a parallel execution device for a reactor multi-physics coupling module, such as... Figure 5 As shown, the device includes: The parameter determination module 31 is used to perform coupling relationship analysis on each sub-module in the reactor multi-physics coupling module and determine the transmission parameters between each sub-module. Resource configuration module 32 is used to perform resource optimization configuration processing on each sub-module to obtain the number of execution cores corresponding to each sub-module; Parallel execution module 33 is used to execute each of the sub-modules in parallel based on the number of execution cores to obtain coupled data corresponding to each of the transmission parameters; The coupling iteration module 34 is used to transmit the coupling data to the corresponding coupled sub-module after all the sub-modules have been executed, so that the coupled sub-modules can perform iterative calculation processing based on the coupling data until the calculation converges.

[0054] Furthermore, the resource configuration module 32 is also used for: Obtain historical data for each submodule, including the configured historical number of execution cores and historical execution time; The historical data is preprocessed, and the preprocessed historical data is integrated into a historical dataset. An optimization model is trained based on the historical dataset to obtain a target resource optimization model; and the number of execution cores corresponding to each sub-module is determined based on the target resource optimization model.

[0055] Further, the device further includes a parameter processing module, which is configured to initialize the transfer parameters corresponding to each sub-module; and construct a parameter mapping matrix corresponding to each transfer parameter, so as to perform format conversion processing on the transfer parameters based on the parameter mapping matrix.

[0056] Further, the device further includes an identification and recording module, which is configured to: Configure a calculation completion flag variable for each of the sub-modules, where the calculation completion flag variable is used to identify the execution status of each of the sub-modules; Generate an execution record corresponding to each sub-module based on the calculation completion flag variable and the resource configuration of each sub-module.

[0057] Further, the resource configuration module 32 further includes a dynamic adjustment unit, which is configured to: Obtain the execution time of each sub-module corresponding to the previous round of iterative calculation from the execution record and the number of execution cores , where i is the number of the coupled sub-module and n is the number of the iteration times; Based on the execution time and the number of execution cores dynamically adjust the number of execution cores of each sub-module; so as to perform a new round of iterative calculation based on the adjusted number of execution cores.

[0058] Further, the dynamic adjustment unit is further configured to: Calculate the total time of the previous round of iterative calculation based on the execution time and the average time ; ; Determine a core number adjustment factor based on the number of execution cores , the total time and the average time , the formula is as follows: The formula is as follows:

[0059] where, when the time variance < A, C = 0; when the time variance > A, C = 1; A is a control threshold; Dynamically adjust the number of execution cores corresponding to each sub-module based on the core number adjustment factor , the formula is as follows:

[0060] where, Calculate the number of execution cores for the i-th submodule in the n-th iteration.

[0061] Furthermore, the coupling iteration module 34 is also used for: Each of the coupled submodules uses the received coupled data as input data for a new round of iterative calculation to generate a new round of coupled data; Compare the deviation of the coupling data obtained from the two most recent iterations, and determine whether the deviation satisfies the convergence condition; When the deviations of all coupled data satisfy the convergence condition, the reactor multiphysics coupling module calculation is determined to be converged.

[0062] This invention provides a parallel execution device for a reactor multiphysics coupling module. Compared with the prior art, this invention analyzes the coupling relationships of each sub-module in the reactor multiphysics coupling module to determine the transmission parameters between each sub-module; optimizes resource allocation for each sub-module to obtain the number of execution cores corresponding to each sub-module; executes each sub-module in parallel based on the number of execution cores to obtain coupling data corresponding to each transmission parameter; after all sub-modules have been executed, the coupling data is transmitted to the corresponding coupled sub-modules so that the coupled sub-modules can perform iterative calculations based on the coupling data until the calculation converges. This achieves the parallel execution transformation of the original serially executed reactor multiphysics coupling module and solves problems such as core allocation, acquisition of the running status of coupled sub-modules, data synchronization and transmission, and iterative convergence determination, thereby reducing the idle time of server resources and improving computational efficiency.

[0063] According to one embodiment of the present invention, a storage medium is provided, the storage medium storing at least one executable instruction, the computer-executable instruction being able to execute the parallel execution method of the reactor multiphysics coupling module in any of the above method embodiments.

[0064] Figure 6 The diagram illustrates the structure of an electronic device according to an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the electronic device.

[0065] like Figure 6 As shown, the electronic device may include: a processor 602, a communications interface 604, a memory 606, and a communications bus 608.

[0066] The processor 602, communication interface 604, and memory 606 communicate with each other via communication bus 608.

[0067] Communication interface 604 is used to communicate with other network elements such as clients or other servers.

[0068] The processor 602 is used to execute program 610, specifically to execute the relevant steps of the parallel execution method of the above-mentioned reactor multi-physics coupling module.

[0069] Specifically, program 610 may include program code that includes computer operation instructions.

[0070] Processor 602 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The electronic device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0071] Memory 606 is used to store program 610. Memory 606 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0072] Specifically, program 610 can be used to cause processor 602 to perform the following operations: The coupling relationship of each sub-module in the reactor multi-physics coupling module is analyzed to determine the transmission parameters between each sub-module. Resource optimization configuration is performed on each submodule to obtain the number of execution cores corresponding to each submodule; Based on the number of execution cores, each of the sub-modules is executed in parallel to obtain coupled data corresponding to each of the transmission parameters; After all the sub-modules have been executed, the coupling data is transmitted to the corresponding coupled sub-modules so that the coupled sub-modules can perform iterative calculations based on the coupling data until the calculations converge.

[0073] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0074] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for parallel execution of a reactor multi-physics coupling module, characterized in that, include: The coupling relationship of each sub-module in the reactor multi-physics coupling module is analyzed to determine the transmission parameters between each sub-module. Resource optimization configuration is performed on each submodule to obtain the number of execution cores corresponding to each submodule; Based on the number of execution cores, each of the sub-modules is executed in parallel to obtain coupled data corresponding to each of the transmission parameters; After all the sub-modules have been executed, the coupling data is transmitted to the corresponding coupled sub-modules so that the coupled sub-modules can perform iterative calculations based on the coupling data until the calculations converge. The method further includes: configuring a computation completion flag variable for each of the sub-modules, the computation completion flag variable being used to identify the execution status of each of the sub-modules; and generating an execution record corresponding to each sub-module based on the computation completion flag variable and the resource configuration of each of the sub-modules. The method further includes: obtaining the execution time of each sub-module corresponding to the previous iteration calculation from the execution record. and number of execution cores Where i is the number of the coupled submodule and n is the number of iterations; based on the execution time and number of execution cores The number of execution cores for each of the sub-modules is dynamically adjusted to enable a new round of iterative calculations based on the adjusted number of execution cores. the execution time and the number of execution cores dynamically adjusting the number of execution cores of each of the sub-modules, comprising: based on the execution time the total time of the previous iteration calculation and the average time ; Based on the number of execution cores The total time and the average time Determine the core number adjustment factor The formula is as follows: wherein, when the time variance when the time variance​ Where N represents the number of coupled submodules; based on the core number adjustment factor The number of execution cores corresponding to each of the sub-modules is dynamically adjusted according to the following formula: wherein, calculates the number of execution cores of the ith sub-module for the nth iteration.

2. The method according to claim 1, characterized in that, The process of optimizing resource allocation for each submodule to obtain the number of execution cores corresponding to each submodule includes: Obtain historical data for each submodule, including the configured historical number of execution cores and historical execution time; The historical data is preprocessed, and the preprocessed historical data is integrated into a historical dataset. An optimization model is trained based on the historical dataset to obtain a target resource optimization model; and the number of execution cores corresponding to each sub-module is determined based on the target resource optimization model.

3. The method according to claim 1, characterized in that, Before executing each of the sub-modules in parallel based on the number of execution cores, the method further includes: The transmission parameters corresponding to each submodule are initialized; and a parameter mapping matrix corresponding to each transmission parameter is constructed so that the transmission parameters are format converted based on the parameter mapping matrix.

4. The method according to any one of claims 1 to 3, characterized in that, After all the sub-modules have completed execution, the coupled data is transmitted to the corresponding coupled sub-modules, so that the coupled sub-modules can perform iterative calculations based on the coupled data until the calculations converge, including: Each of the coupled submodules uses the received coupled data as input data for a new round of iterative calculation to generate a new round of coupled data; Compare the deviation of the coupling data obtained from the two most recent iterations, and determine whether the deviation satisfies the convergence condition; When the deviations of all coupled data satisfy the convergence condition, the reactor multiphysics coupling module calculation is determined to be converged.

5. A parallel execution device of a reactor multi-physics coupling module, characterized in that, include: The parameter determination module is used to perform coupling relationship analysis on each sub-module in the reactor multi-physics coupling module and determine the transmission parameters between each sub-module. The resource configuration module is used to optimize the resource configuration of each submodule and obtain the number of execution cores corresponding to each submodule. A parallel execution module is used to execute each of the sub-modules in parallel based on the number of execution cores, and obtain coupled data corresponding to each of the transmission parameters; The coupling iteration module is used to transmit the coupling data to the corresponding coupled sub-module after all the sub-modules have been executed, so that the coupled sub-modules can perform iterative calculations based on the coupling data until the calculations converge. The parallel execution device of the reactor multi-physics coupling module further includes an identification and recording module, which is used to: configure a calculation completion flag variable for each of the sub-modules, and the calculation completion flag variable is used to identify the execution status of each of the sub-modules; Based on the calculation completion flag variable and the resource configuration of each sub-module, an execution record corresponding to each sub-module is generated; The resource configuration module further comprises a dynamic adjustment unit, configured to: acquire execution time of each sub-module corresponding to a previous round of iteration calculation from the execution record and the number of execution cores , i is the number of the coupling sub-module, and n is the number of iteration times. based on the execution time and the number of execution cores dynamically adjusting the number of execution cores of each of the sub-modules; and performing a new round of iteration calculation based on the adjusted number of execution cores. The dynamic adjustment unit is also used for: based on the execution time computing the total time of the last iteration calculation and the average time ; Based on the number of execution cores The total time and the average time Determine the core number adjustment factor The formula is as follows: Where, when the time variance < A, C = 0; when the time variance > A, C = 1; A is a control threshold; the calculation formula of the time variance is as follows: Where N represents the number of coupled submodules; Based on the core number adjustment factor The number of execution cores corresponding to each of the aforementioned sub-modules is dynamically adjusted using the following formula: in, Calculate the number of execution cores for the i-th submodule in the n-th iteration.

6. A storage medium storing at least one executable instruction that performs an operation corresponding to the parallel execution method of the reactor multiphysics coupling module as described in any one of claims 1-4.

7. An electronic device, comprising a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction that causes the processor to perform the operation corresponding to the parallel execution method of the reactor multiphysics coupling module as described in any one of claims 1-4.