A simulation calculation acceleration method based on group sorting and related device

Through the simulation calculation acceleration method of group sorting, allocation and sorting calculation groups are used to balance the parallel computing unit, which solves the problem of resource allocation and sequential arrangement in electromagnetic transient simulation calculation of power system and improves the calculation efficiency.

CN117707769BActive Publication Date: 2025-01-10ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311720266.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-14
Publication Date
2025-01-10
Estimated Expiration
2043-12-14

AI Technical Summary

Technical Problem

The existing electromagnetic transient simulation calculation process of power systems fails to fully consider the resource allocation and sequential arrangement of multiple parallel computing units, resulting in insufficient resource utilization of the computing hardware system and difficult to improve computing efficiency.

Method used

Using a simulation calculation acceleration method based on group sorting, by obtaining parallel computing units and controlling computing blocks, grouping the calculation blocks according to the number of inputs and outputs, and putting the calculation group into the parallel computing unit according to the principle of calculation time equalization to realize the resource Balanced allocation.

Benefits of technology

Without affecting the timing of the control calculation block, the calculation efficiency is improved, the computing hardware resources are rationally utilized, and the impact of resource allocation and sequential arrangement on calculation time in electromagnetic transient simulation calculation of power system is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117707769B_ABST
    Figure CN117707769B_ABST
Patent Text Reader

Abstract

The present invention discloses a simulation calculation acceleration method and related devices based on grouping sorting. According to the input quantity and output quantity of each control calculation block, all control calculation blocks are grouped to obtain a plurality of calculation groups. According to the input quantity of each calculation group, each calculation group is sorted as an independent unit. According to the principle of calculation time balance, each calculation group is put into the corresponding parallel calculation unit at one time. It is realized that the control calculation blocks are evenly distributed to the parallel calculation units in the form of combining into calculation groups without affecting the timing of the control calculation blocks. While reasonably using the calculation resources, the calculation efficiency is improved. The technical problem that the existing power system electromagnetic transient simulation calculation process does not fully consider the influence of the resource allocation and sequence arrangement of multiple parallel calculation units on the final calculation time, it is difficult to realize the reasonable use of the calculation hardware system, and it is difficult to improve the calculation efficiency is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power system simulation, and in particular to a simulation calculation acceleration method based on grouping sorting and related devices. Background Art

[0002] Power system simulation calculations rely on the powerful computing power of the computing hardware system in order to accelerate the solution process and realize non-real-time simulation calculations or even real-time simulation calculations. Since the computing hardware system has sufficient computing resources and storage resources, it has obvious advantages over the single computer calculations that were used in the past. However, with the interconnection of regional power grids, the scale of power systems continues to expand, and the widespread use of large-scale new energy and other fast-response power electronic equipment has made the scale and complexity of power system simulation calculations increasingly complex. The data interaction between the various operating sub-units during the calculation process has become more frequent. How to reasonably and efficiently use the computing hardware system for resource acceleration calculations is an issue that needs to be studied urgently.

[0003] The existing power system electromagnetic transient simulation calculation process does not fully consider the impact of resource allocation and sequence arrangement of multiple parallel computing units on the final calculation time, making it difficult to achieve reasonable utilization of the computing hardware system and improve computing efficiency. Summary of the invention

[0004] The present invention provides a simulation calculation acceleration method and related devices based on group sorting, which are used to solve the technical problems that the existing power system electromagnetic transient simulation calculation process does not fully consider the impact of resource allocation and sequence arrangement of multiple parallel computing units on the final calculation time, making it difficult to achieve reasonable utilization of the computing hardware system and difficult to improve computing efficiency.

[0005] In view of this, a first aspect of the present invention provides a simulation calculation acceleration method based on group sorting, comprising the following steps:

[0006] S1, obtaining the parallel computing units and control computing blocks allocated for the simulation;

[0007] S2. Group all control calculation blocks according to the number of inputs and outputs of each control calculation block to obtain a number of calculation groups;

[0008] S3. According to the input quantity of each computing group, each computing group is sorted as an independent unit, and each computing group is placed in the corresponding parallel computing unit at a time according to the principle of computing time balance.

[0009] Optionally, step S2 specifically includes:

[0010] S21. In the control calculation blocks that are not included in the calculation group, determine whether there is a control calculation block without input. If so, find a control calculation block without input and jump to step S22. If not, determine whether the number of control calculation blocks that are not included in the calculation group is greater than 0. If the number of control calculation blocks that are not included in the calculation group is greater than 0, select a control calculation block with the least number of inputs from the control calculation blocks that are not included in the calculation group and jump to step S22. If the number of control calculation blocks that are not included in the calculation group is 0, jump to step S24.

[0011] S22, determine whether the output number of the currently selected control calculation block is 1, if so, jump to step S23, otherwise, add the currently selected control calculation block to the current calculation group, and return to step S21;

[0012] S23, adding the currently selected control calculation block to the current calculation group, and taking the control calculation block output by the currently selected control calculation block as the currently selected control calculation block, and returning to step S22;

[0013] S24. The grouping is completed and several calculation groups are obtained.

[0014] Optionally, step S3 specifically includes:

[0015] S31, set the numbers i of all calculation groups to 0, configure the input quantity of each calculation group to the current input quantity of each calculation group, and jump to step S32;

[0016] S32, select a calculation group with the smallest current input quantity from the calculation group currently numbered 0, set the number i of the selected calculation group to 1, set the current input quantity of the calculation group numbered i to 1 to 0, obtain the calculation groups corresponding to all outputs of the calculation group numbered i to 1, reduce the current input quantity of the calculation group corresponding to the output by 1, and jump to step S33;

[0017] S33, placing the computing group numbered i=1 into the current parallel computing unit, and jumping to step S34;

[0018] S34, determine whether there is a computing group with a current input quantity of 1 among all computing groups corresponding to the outputs of the computing group numbered i as 1. If so, increment i by 1, name the computing group with a current input quantity of 1 found as computing group i, and reduce the current input quantity of the computing groups corresponding to all outputs of computing group i by 1, and jump to step S35. If not, determine whether all computing groups have been placed in parallel computing units. If not, find a computing group with the smallest current input quantity among all computing groups numbered 0 and name it computing group i, and jump to step S36. If all computing groups have been placed in parallel computing units, jump to step S37.

[0019] S35, placing the computing group i into the parallel computing unit where the computing group i-1 is located, and returning to step S34;

[0020] S36, placing the computing group i into the parallel computing unit with the smallest total computing group time among all parallel computing units, and returning to step S34;

[0021] S37, end.

[0022] Optionally, in step S32 and step S34, if the current input quantity minus 1 is less than 0, the current input quantity minus 1 is set to be equal to 0.

[0023] A second aspect of the present invention provides a simulation computing acceleration device based on group sorting, comprising the following modules:

[0024] An acquisition module, used to acquire the parallel computing units and control computing blocks allocated for the simulation;

[0025] A grouping module, used for grouping all control calculation blocks according to the input quantity and output quantity of each control calculation block to obtain a plurality of calculation groups;

[0026] The balanced allocation module is used to sort each computing group as an independent unit according to the input quantity of each computing group, and put each computing group into the corresponding parallel computing unit at a time according to the principle of balanced computing time.

[0027] Optionally, the grouping module is specifically used to perform the following steps:

[0028] S21. In the control calculation blocks that are not included in the calculation group, determine whether there is a control calculation block without input. If so, find a control calculation block without input and jump to step S22. If not, determine whether the number of control calculation blocks that are not included in the calculation group is greater than 0. If the number of control calculation blocks that are not included in the calculation group is greater than 0, select a control calculation block with the least number of inputs from the control calculation blocks that are not included in the calculation group and jump to step S22. If the number of control calculation blocks that are not included in the calculation group is 0, jump to step S24.

[0029] S22, determine whether the output number of the currently selected control calculation block is 1, if so, jump to step S23, otherwise, add the currently selected control calculation block to the current calculation group, and return to step S21;

[0030] S23, adding the currently selected control calculation block to the current calculation group, and taking the control calculation block output by the currently selected control calculation block as the currently selected control calculation block, and returning to step S22;

[0031] S24. The grouping is completed and several calculation groups are obtained.

[0032] Optionally, the balanced allocation module is specifically used to perform the following steps:

[0033] S31, set the numbers i of all calculation groups to 0, configure the input quantity of each calculation group to the current input quantity of each calculation group, and jump to step S32;

[0034] S32, select a calculation group with the smallest current input quantity from the calculation group currently numbered 0, set the number i of the selected calculation group to 1, set the current input quantity of the calculation group numbered i to 1 to 0, obtain the calculation groups corresponding to all outputs of the calculation group numbered i to 1, reduce the current input quantity of the calculation group corresponding to the output by 1, and jump to step S33;

[0035] S33, placing the computing group numbered i=1 into the current parallel computing unit, and jumping to step S34;

[0036] S34, determine whether there is a computing group with a current input quantity of 1 among all computing groups corresponding to the outputs of the computing group numbered i as 1. If so, increment i by 1, name the computing group with a current input quantity of 1 found as computing group i, and reduce the current input quantity of the computing groups corresponding to all outputs of computing group i by 1, and jump to step S35. If not, determine whether all computing groups have been placed in parallel computing units. If not, find a computing group with the smallest current input quantity among all computing groups numbered 0 and name it computing group i, and jump to step S36. If all computing groups have been placed in parallel computing units, jump to step S37.

[0037] S35, placing the computing group i into the parallel computing unit where the computing group i-1 is located, and returning to step S34;

[0038] S36, placing the computing group i into the parallel computing unit with the smallest total computing group time among all parallel computing units, and returning to step S34;

[0039] S37, end.

[0040] Optionally, in step S32 and step S34, if the current input quantity minus 1 is less than 0, the current input quantity minus 1 is set to be equal to 0.

[0041] A third aspect of the present invention provides a simulation computing acceleration device based on group sorting, the device comprising a processor and a memory:

[0042] The memory is used to store program code and transmit the program code to the processor;

[0043] The processor is used to execute the simulation calculation acceleration method based on group sorting as described in any one of the first aspects according to the instructions in the program code.

[0044] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the simulation calculation acceleration method based on group sorting as described in any one of the first aspects.

[0045] It can be seen from the above technical solutions that the simulation calculation acceleration method based on group sorting provided by the present invention has the following advantages:

[0046] The simulation calculation acceleration method based on grouping sorting provided by the present invention groups all control calculation blocks according to the input quantity and output quantity of each control calculation block to obtain a plurality of calculation groups, sorts each calculation group as an independent unit according to the input quantity of each calculation group, and puts each calculation group into the corresponding parallel calculation unit at one time according to the principle of calculation time balance, thereby realizing balanced distribution of control calculation blocks to parallel calculation units in the form of combining into calculation groups without affecting the timing of control calculation blocks, improving calculation efficiency while reasonably utilizing calculation resources, and solving the technical problems that the existing power system electromagnetic transient simulation calculation process does not fully consider the influence of resource allocation and sequence arrangement of multiple parallel calculation units on the final calculation time, making it difficult to reasonably utilize the calculation hardware system and improving calculation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0048] Figure 1 A schematic diagram of a flow chart of a simulation calculation acceleration method based on group sorting provided in an embodiment of the present invention;

[0049] Figure 2 Another schematic diagram of the flow of the simulation calculation acceleration method based on group sorting provided in an embodiment of the present invention;

[0050] Figure 3 A timing relationship diagram of a control calculation block configured for a simulation task provided in an embodiment of the present invention;

[0051] Figure 4 Based on Figure 3 The obtained grouping results;

[0052] Figure 5 It is another flowchart of the simulation calculation acceleration method based on group sorting provided in an embodiment of the present invention;

[0053] Figure 6 It is a schematic diagram of the structure of a simulation computing acceleration device based on group sorting provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] For easier understanding, see Figure 1 The present invention provides an embodiment of a simulation calculation acceleration method based on group sorting, comprising:

[0056] Step S1, obtaining the parallel computing units and control computing blocks allocated for the simulation.

[0057] It should be noted that there are many control calculation blocks in electromagnetic transient simulation calculation, each of which has its own time. Under the premise of ensuring the correct timing sequence, it can be allocated to multiple parallel computing cores (i.e., parallel computing units), including CPU (Central Processing Unit) cores, GPU (Graphics Processing Unit) cores, etc. In the embodiment of the present invention, the parallel computing units and control calculation blocks configured for the simulation task are first obtained.

[0058] Step S2: group all control calculation blocks according to the number of inputs and outputs of each control calculation block to obtain a number of calculation groups.

[0059] It should be noted that the control calculation blocks have related timing. Each control calculation block may have 0-several inputs (or it can be said to be input control calculation blocks), and may also have 0-several outputs (or it can be said to be output control calculation blocks). It can be parallelized as much as possible under the premise of ensuring the timing. Therefore, the number of inputs (i.e., the number of input control calculation blocks) and the number of outputs (i.e., the number of output control calculation blocks) of each control calculation block can be obtained, and then all control calculation blocks can be grouped to obtain several calculation groups.

[0060] Specifically, Figure 2 As shown, the specific execution process of grouping all control calculation blocks includes the following steps:

[0061] Step S21: among the control calculation blocks not included in the calculation group, determine whether there is a control calculation block without input. If so, find one control calculation block without input and jump to step S22. If not, determine whether the number of control calculation blocks not included in the calculation group is greater than 0. If the number of control calculation blocks not included in the calculation group is greater than 0, select a control calculation block with the least number of inputs from the control calculation blocks not included in the calculation group and jump to step S22. If the number of control calculation blocks not included in the calculation group is 0, jump to step S24.

[0062] Step S22, determine whether the output number of the currently selected control calculation block is 1, if so, jump to step S23, otherwise, add the currently selected control calculation block to the current calculation group, and return to step S21;

[0063] Step S23, adding the currently selected control calculation block to the current calculation group, and taking the control calculation block output by the currently selected control calculation block as the currently selected control calculation block, and returning to step S22;

[0064] Step S24: The grouping is completed and several calculation groups are obtained.

[0065] A specific example is provided in the present invention for illustration. It should be noted that the specific example provided in the present invention is only used to intuitively illustrate the technical solution of the present invention and is not intended to be a specific limitation on the technical solution of the present invention. Figure 3 As shown, A, B, C, D, E, and F are control calculation blocks configured for the simulation task, the number of inputs of A is 0, the number of inputs of B, C, D, E, and F is 1, the number of outputs of A, B, and C is 1, the number of outputs of D is 2, and the number of outputs of E and F is 0. Among A, B, C, D, E, and F, A is a control calculation block without input. When executing step S21, A is found first, and then jumps to step S22. The output of A is 1, so jump to step S23, add A to the current calculation group, and then take B as the currently selected control calculation block and return to execute step S22. When D is executed, since the output number of D is not 1, D is added to the current calculation group (recorded as the first group), and the process returns to step S21. At this time, the control calculation blocks that are not included in the calculation group are E and F. Select one control calculation block from E and F. Take E as an example, jump to step S22, directly add E to the current calculation group (recorded as the second group), and then return to step S21. At this time, the control calculation block that is not included in the calculation group is F. Select F, jump to step S22, and directly add F to the current calculation group (recorded as the third group). The final grouping result is as follows: Figure 4 shown.

[0066] Step S3: sort each computing group as an independent unit according to the input quantity of each computing group, and put each computing group into the corresponding parallel computing unit at a time according to the principle of computing time balance.

[0067] It should be noted that after the control calculation blocks are grouped, the number of groups is obtained. Since the grouping is only for grouping the control calculation blocks, it does not change the original timing relationship and input-output situation between the control calculation blocks. Therefore, the input-output relationship between each calculation group is determined. Therefore, each calculation group can be sorted according to the relationship between the calculation groups, and then each calculation group can be placed in the corresponding parallel calculation unit at a time according to the principle of balanced calculation time to achieve balanced distribution of the calculation groups in the parallel calculation units.

[0068] Specifically, Figure 5 As shown, the specific execution steps of step S3 are:

[0069] Step S31, set the numbers i of all calculation groups to 0, configure the input quantity of each calculation group to the current input quantity of each calculation group, and jump to step S32.

[0070] Step S32: Select a calculation group with the smallest current input quantity from the calculation group currently numbered 0, set the number i of the selected calculation group to 1, set the current input quantity of the calculation group numbered i to 1 to 0, obtain the calculation groups corresponding to all outputs of the calculation group numbered i to 1, subtract 1 from the current input quantity of the calculation group corresponding to the output, and jump to step S33. If the current input quantity is less than 0 after subtracting 1, set the current input quantity after subtracting 1 to 0.

[0071] Step S33, put the computing group numbered i=1 into the current parallel computing unit, and jump to step S34.

[0072] Step S34: Determine whether there is a calculation group with a current input quantity of 1 among the calculation groups corresponding to all outputs of the calculation group numbered i as 1. If yes, increment i by 1, name the calculation group with a current input quantity of 1 found as calculation group i, and subtract 1 from the current input quantity of the calculation groups corresponding to all outputs of calculation group i, and jump to step S35. If not, determine whether all calculation groups have been placed in parallel computing units. If not, find a calculation group with the smallest current input quantity among all current calculation groups numbered 0 and name it calculation group i, and jump to step S36. If all calculation groups have been placed in parallel computing units, jump to step S37. If the current input quantity is less than 0 after subtracting 1, the current input quantity after subtracting 1 is equal to 0.

[0073] Step S35, place computing group i into the same parallel computing unit as computing group i-1, and return to step S34.

[0074] Step S36, placing computing group i into the parallel computing unit with the smallest total computing group time among all parallel computing units, and returning to step S34.

[0075] Step S37, end.

[0076] The simulation calculation acceleration method based on grouping sorting provided by the present invention groups all control calculation blocks according to the input quantity and output quantity of each control calculation block to obtain a plurality of calculation groups, sorts each calculation group as an independent unit according to the input quantity of each calculation group, and puts each calculation group into the corresponding parallel calculation unit at one time according to the principle of calculation time balance, thereby realizing balanced distribution of control calculation blocks to parallel calculation units in the form of combining into calculation groups without affecting the timing of control calculation blocks, improving calculation efficiency while reasonably utilizing calculation resources, and solving the technical problems that the existing power system electromagnetic transient simulation calculation process does not fully consider the influence of resource allocation and sequence arrangement of multiple parallel calculation units on the final calculation time, making it difficult to reasonably utilize the calculation hardware system and improving calculation efficiency.

[0077] For easier understanding, see Figure 6 The present invention provides an embodiment of a simulation computing acceleration device based on group sorting, comprising the following modules:

[0078] An acquisition module, used to acquire the parallel computing units and control computing blocks allocated for the simulation;

[0079] A grouping module, used for grouping all control calculation blocks according to the input quantity and output quantity of each control calculation block to obtain a plurality of calculation groups;

[0080] The balanced allocation module is used to sort each computing group as an independent unit according to the input quantity of each computing group, and put each computing group into the corresponding parallel computing unit at a time according to the principle of balanced computing time.

[0081] The grouping module is specifically used to perform the following steps:

[0082] S21. In the control calculation blocks that are not included in the calculation group, determine whether there is a control calculation block without input. If so, find a control calculation block without input and jump to step S22. If not, determine whether the number of control calculation blocks that are not included in the calculation group is greater than 0. If the number of control calculation blocks that are not included in the calculation group is greater than 0, select a control calculation block with the least number of inputs from the control calculation blocks that are not included in the calculation group and jump to step S22. If the number of control calculation blocks that are not included in the calculation group is 0, jump to step S24.

[0083] S22, determine whether the output number of the currently selected control calculation block is 1, if so, jump to step S23, otherwise, add the currently selected control calculation block to the current calculation group, and return to step S21;

[0084] S23, adding the currently selected control calculation block to the current calculation group, and taking the control calculation block output by the currently selected control calculation block as the currently selected control calculation block, and returning to step S22;

[0085] S24. The grouping is completed and several calculation groups are obtained.

[0086] The balanced allocation module is specifically used to perform the following steps:

[0087] S31, set the numbers i of all calculation groups to 0, configure the input quantity of each calculation group to the current input quantity of each calculation group, and jump to step S32;

[0088] S32, select a calculation group with the smallest current input quantity from the calculation group currently numbered 0, set the number i of the selected calculation group to 1, set the current input quantity of the calculation group numbered i to 1 to 0, obtain the calculation groups corresponding to all outputs of the calculation group numbered i to 1, reduce the current input quantity of the calculation group corresponding to the output by 1, and jump to step S33;

[0089] S33, placing the computing group numbered i=1 into the current parallel computing unit, and jumping to step S34;

[0090] S34, determine whether there is a computing group with a current input quantity of 1 among all computing groups corresponding to the outputs of the computing group numbered i as 1. If so, increment i by 1, name the computing group with a current input quantity of 1 found as computing group i, and reduce the current input quantity of the computing groups corresponding to all outputs of computing group i by 1, and jump to step S35. If not, determine whether all computing groups have been placed in parallel computing units. If not, find a computing group with the smallest current input quantity among all computing groups numbered 0 and name it computing group i, and jump to step S36. If all computing groups have been placed in parallel computing units, jump to step S37.

[0091] S35, placing the computing group i into the parallel computing unit where the computing group i-1 is located, and returning to step S34;

[0092] S36, placing the computing group i into the parallel computing unit with the smallest total computing group time among all parallel computing units, and returning to step S34;

[0093] S37, end.

[0094] In step S32 and step S34, if the current input quantity after decrementing by 1 is less than 0, the current input quantity after decrementing by 1 is set to be equal to 0.

[0095] The present invention provides an embodiment of a simulation computing acceleration device based on group sorting, the device comprising a processor and a memory:

[0096] The memory is used to store program code and transmit the program code to the processor;

[0097] The processor is used to execute the simulation calculation acceleration method based on group sorting provided in the present invention according to the instructions in the program code.

[0098] The present invention provides an embodiment of a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the simulation calculation acceleration method based on group sorting provided in the present invention.

[0099] The simulation computing acceleration device, equipment and computer-readable storage medium based on group sorting provided in the present invention are used to execute the simulation computing acceleration method based on group sorting provided in the present invention. The principles and technical effects achieved are the same as those of the simulation computing acceleration method based on group sorting provided in the present invention, and will not be repeated here.

[0100] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A simulation calculation acceleration method based on group sorting, characterized in that: The following steps are involved: S1, obtaining the parallel computing units and control computing blocks allocated for the simulation; S2. Group all control calculation blocks according to the number of inputs and outputs of each control calculation block to obtain a number of calculation groups; S3. According to the input quantity of each computing group, each computing group is sorted as an independent unit, and each computing group is placed in the corresponding parallel computing unit at a time according to the principle of computing time balance; Step S2 specifically includes: S21. In the control calculation blocks that are not included in the calculation group, determine whether there is a control calculation block without input. If so, find a control calculation block without input and jump to step S22. If not, determine whether the number of control calculation blocks that are not included in the calculation group is greater than 0. If the number of control calculation blocks that are not included in the calculation group is greater than 0, select a control calculation block with the least number of inputs from the control calculation blocks that are not included in the calculation group and jump to step S22. If the number of control calculation blocks that are not included in the calculation group is 0, jump to step S24. S22, determine whether the output number of the currently selected control calculation block is 1, if so, jump to step S23, otherwise, add the currently selected control calculation block to the current calculation group, and return to step S21; S23, adding the currently selected control calculation block to the current calculation group, and taking the control calculation block output by the currently selected control calculation block as the currently selected control calculation block, and returning to step S22; S24. The grouping is completed and several calculation groups are obtained.

2. The simulation calculation acceleration method based on group sorting according to claim 1 is characterized in that: Step S3 specifically includes: S31, set the numbers i of all calculation groups to 0, configure the input quantity of each calculation group to the current input quantity of each calculation group, and jump to step S32; S32, select a calculation group with the smallest current input quantity from the calculation group currently numbered 0, set the number i of the selected calculation group to 1, set the current input quantity of the calculation group numbered i to 1 to 0, obtain the calculation groups corresponding to all outputs of the calculation group numbered i to 1, reduce the current input quantity of the calculation group corresponding to the output by 1, and jump to step S33; S33, placing the computing group numbered i=1 into the current parallel computing unit, and jumping to step S34; S34, determine whether there is a computing group with a current input quantity of 1 among all computing groups corresponding to the outputs of the computing group numbered i as 1. If so, increment i by 1, name the computing group with a current input quantity of 1 found as computing group i, and reduce the current input quantity of the computing groups corresponding to all outputs of computing group i by 1, and jump to step S35. If not, determine whether all computing groups have been placed in parallel computing units. If not, find a computing group with the smallest current input quantity among all computing groups numbered 0 and name it computing group i, and jump to step S36. If all computing groups have been placed in parallel computing units, jump to step S37. S35, placing the computing group i into the parallel computing unit where the computing group i-1 is located, and returning to step S34; S36, placing the computing group i into the parallel computing unit with the smallest total computing group time among all parallel computing units, and returning to step S34; S37, end.

3. The simulation calculation acceleration method based on group sorting according to claim 2 is characterized in that: In step S32 and step S34, if the current input quantity after decrementing by 1 is less than 0, the current input quantity after decrementing by 1 is set to be equal to 0.

4. A simulation computing acceleration device based on group sorting, characterized in that: Includes the following modules: An acquisition module, used to acquire the parallel computing units and control computing blocks allocated for the simulation; A grouping module, used for grouping all control calculation blocks according to the input quantity and output quantity of each control calculation block to obtain a plurality of calculation groups; The balanced allocation module is used to sort each computing group as an independent unit according to the input quantity of each computing group, and put each computing group into the corresponding parallel computing unit at a time according to the principle of balanced computing time; The grouping module is specifically used to perform the following steps: S21. In the control calculation blocks that are not included in the calculation group, determine whether there is a control calculation block without input. If so, find a control calculation block without input and jump to step S22. If not, determine whether the number of control calculation blocks that are not included in the calculation group is greater than 0. If the number of control calculation blocks that are not included in the calculation group is greater than 0, select a control calculation block with the least number of inputs from the control calculation blocks that are not included in the calculation group and jump to step S22. If the number of control calculation blocks that are not included in the calculation group is 0, jump to step S24. S22, determine whether the output number of the currently selected control calculation block is 1, if so, jump to step S23, otherwise, add the currently selected control calculation block to the current calculation group, and return to step S21; S23, adding the currently selected control calculation block to the current calculation group, and taking the control calculation block output by the currently selected control calculation block as the currently selected control calculation block, and returning to step S22; S24. The grouping is completed and several calculation groups are obtained.

5. The simulation computing acceleration device based on group sorting according to claim 4 is characterized in that: The balanced allocation module is specifically used to perform the following steps: S31, set the numbers i of all calculation groups to 0, configure the input quantity of each calculation group to the current input quantity of each calculation group, and jump to step S32; S32, select a calculation group with the smallest current input quantity from the calculation group currently numbered 0, set the number i of the selected calculation group to 1, set the current input quantity of the calculation group numbered i to 1 to 0, obtain the calculation groups corresponding to all outputs of the calculation group numbered i to 1, reduce the current input quantity of the calculation group corresponding to the output by 1, and jump to step S33; S33, placing the computing group numbered i=1 into the current parallel computing unit, and jumping to step S34; S34, determine whether there is a computing group with a current input quantity of 1 among all computing groups corresponding to the outputs of the computing group numbered i as 1. If so, increment i by 1, name the computing group with a current input quantity of 1 found as computing group i, and reduce the current input quantity of the computing groups corresponding to all outputs of computing group i by 1, and jump to step S35. If not, determine whether all computing groups have been placed in parallel computing units. If not, find a computing group with the smallest current input quantity among all computing groups numbered 0 and name it computing group i, and jump to step S36. If all computing groups have been placed in parallel computing units, jump to step S37. S35, placing the computing group i into the parallel computing unit where the computing group i-1 is located, and returning to step S34; S36, placing the computing group i into the parallel computing unit with the smallest total computing group time among all parallel computing units, and returning to step S34; S37, end.

6. The simulation computing acceleration device based on group sorting according to claim 5, characterized in that: In step S32 and step S34, if the current input quantity after decrementing by 1 is less than 0, the current input quantity after decrementing by 1 is set to be equal to 0.

7. A simulation computing acceleration device based on group sorting, the device comprising a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the simulation calculation acceleration method based on group sorting according to any one of claims 1-3 according to the instructions in the program code.

8. A computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, wherein the program code is used to execute the simulation calculation acceleration method based on group sorting according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Kernel parallel computing method and device for power market transaction services

    CN108536645A