CN115016947A - Load distribution method, device, equipment and medium - Google Patents

Load distribution method, device, equipment and medium Download PDF

Info

Publication number
CN115016947A
CN115016947A CN202210935522.5A CN202210935522A CN115016947A CN 115016947 A CN115016947 A CN 115016947A CN 202210935522 A CN202210935522 A CN 202210935522A CN 115016947 A CN115016947 A CN 115016947A
Authority
CN
China
Prior art keywords
grid
target
initial
partition
fused
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210935522.5A
Other languages
Chinese (zh)
Other versions
CN115016947B (en
Inventor
王新建
付云峰
李锦�
唐静
张建
龚小权
王建涛
李明
周乃春
张耀冰
程锋
牟斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Computational Aerodynamics Institute of China Aerodynamics Research and Development Center
Original Assignee
Computational Aerodynamics Institute of China Aerodynamics Research and Development Center
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Computational Aerodynamics Institute of China Aerodynamics Research and Development Center filed Critical Computational Aerodynamics Institute of China Aerodynamics Research and Development Center
Priority to CN202210935522.5A priority Critical patent/CN115016947B/en
Publication of CN115016947A publication Critical patent/CN115016947A/en
Application granted granted Critical
Publication of CN115016947B publication Critical patent/CN115016947B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a load distribution method, a device, equipment and a medium, and relates to the technical field of scientific computing research of unstructured grids. The method comprises the following steps: carrying out grid fusion processing on initial grid units in an initial grid constructed based on a load task to obtain a target grid; determining the partition weight of each fused grid unit in the target grid; dividing the fused grid unit to a corresponding target partition based on the partition weight; and performing region segmentation on the initial grid based on the target partitions to obtain segmented regions corresponding to the target partitions, and then respectively sending the load tasks corresponding to the initial grid units in each segmented region to corresponding computing nodes for processing. By the scheme, the load tasks corresponding to different partition areas can be more balanced, and the acceleration effect of processing the load tasks can be improved.

Description

Load distribution method, device, equipment and medium
Technical Field
The invention relates to the technical field of science and computation research of unstructured grids, in particular to a load distribution method, a device, equipment and a medium.
Background
At present, fluid mechanics calculation is widely applied to a plurality of industrial fields, but calculation usually needs a huge number of grids, and calculation is time-consuming. Parallel partitioning and multiple mesh fusion are two major acceleration techniques. The parallel partition is to divide the grid corresponding to the load task into a plurality of areas, and to respectively deliver the grids in different areas to different computing nodes for computing so as to reduce the computing time on the wall. The multi-grid fusion technology is to fuse the fine grids to obtain coarse grids, and the coarse grids can quickly eliminate low-frequency errors, so that the effect of accelerating convergence is achieved through alternate calculation of the coarse grids and the fine grids. However, the parallel partition and the multiple grids are simultaneously applied, so that the problem of using the sequence is solved, namely, the multiple grids are fused firstly or the parallel partition is carried out firstly, if a parallel partition priority strategy is adopted, the grid number of the fine grids in each area can be basically the same, namely, the load is balanced, but the implementation of some non-structural grid multiple fusion methods can be interfered, and further, the acceleration effect and the calculation robustness of the multiple grids are reduced; if multiple grids are considered preferentially, due to the fact that the grid fusion rates of all regions of the unstructured grids are greatly different, the calculation load on the fine grids is seriously unbalanced when the coarse grids are directly used for carrying out parallel partitioning, and therefore the overall acceleration effect is seriously reduced.
In summary, how to improve the acceleration effect of processing load task is a problem to be solved in the art.
Disclosure of Invention
In view of the above, the present invention provides a load distribution method, apparatus, device and medium, which can improve the acceleration effect of processing a load task. The specific scheme is as follows:
in a first aspect, the present application discloses a load distribution method, including:
carrying out grid fusion processing on initial grid units in an initial grid constructed based on a load task to obtain a target grid;
determining the partition weight of each fused grid unit in the target grid;
dividing the fused grid unit to a corresponding target partition based on the partition weight;
and performing region segmentation on the initial grid based on the target partitions to obtain segmented regions corresponding to the target partitions, and then respectively sending the load tasks corresponding to the initial grid units in each segmented region to corresponding computing nodes for processing.
Optionally, the determining the partition weight of each fused grid unit in the target grid includes:
determining the initial cell number of the initial grid cell corresponding to each fused grid cell in the target grid, and determining the partition weight of each fused grid cell based on the initial cell number.
Optionally, the determining the partition weight of each fused grid cell in the target grid includes:
and determining the partition weight of each fused grid unit in the target grid by using a recursive algorithm.
Optionally, before dividing the fused grid unit into corresponding target partitions based on the partition weight, the method further includes:
and calling a METIS library to determine a first mapping relation between each fused grid unit and the corresponding target partition based on the partition weight and the preset load requirement so as to divide the fused grid units into the corresponding target partitions based on the first mapping relation and the partition weight.
Optionally, the invoking a METIS library to determine a first mapping relationship between each fused grid unit and the corresponding target partition based on the partition weight and the preset load requirement includes:
determining the number of target units of the fused grid units and the number of the fused grid units adjacent to each fused grid unit;
and calling a METIS library to determine a first mapping relation between each fused grid unit and the corresponding target partition based on the partition weight, the preset load requirement, the number of the target units and the number of the fused grid units adjacent to each fused grid unit.
Optionally, the performing region segmentation on the initial mesh based on the target partition includes:
calculating a second mapping relation between the fused grid unit and the initial grid unit;
and performing region segmentation on the initial grid based on the first mapping relation, the second mapping relation and the target partition.
Optionally, the grid fusion processing on the initial grid unit in the initial grid constructed based on the load task to obtain the target grid includes:
and carrying out grid fusion processing on the initial grid unit in the initial grid constructed based on the load task by utilizing a preset grid fusion algorithm and a preset non-overlapping fusion condition to obtain the target grid.
In a second aspect, the present application discloses a load distribution apparatus comprising:
the fusion processing module is used for carrying out grid fusion processing on initial grid units in the initial grid constructed based on the load task to obtain a target grid;
a weight determination module, configured to determine a partition weight of each fused grid cell in the target grid;
the partition module is used for dividing the fused grid unit into corresponding target partitions based on the partition weight;
a segmentation module, configured to perform region segmentation on the initial mesh based on the target partitions to obtain segmented regions corresponding to the target partitions;
and the sending module is used for respectively sending the load tasks corresponding to the initial grid units in each divided region to corresponding computing nodes for processing.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the load distribution method disclosed in the foregoing.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program realizes the steps of the load distribution method disclosed in the foregoing when being executed by a processor.
Therefore, the method and the device perform grid fusion processing on the initial grid unit in the initial grid constructed based on the load task to obtain the target grid; determining the partition weight of each fused grid unit in the target grid; dividing the fused grid unit to a corresponding target partition based on the partition weight; and performing region segmentation on the initial grid based on the target partitions to obtain segmented regions corresponding to the target partitions, and then respectively sending the load tasks corresponding to the initial grid units in each segmented region to corresponding computing nodes for processing. Therefore, the grid fusion processing is firstly carried out, the partition weight of each fused grid unit is determined, the fused grid units are divided into corresponding target partitions based on the partition weights, and then the initial grids are subjected to region division based on the target partitions, so that the obtained number of the initial grid units contained in each divided region is balanced, balanced load tasks are respectively sent to corresponding computing nodes to be processed, and the acceleration effect of the computing nodes for processing the load tasks is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a load distribution method disclosed herein;
FIG. 2 is a schematic diagram of a specific load distribution disclosed herein;
FIG. 3 is a schematic diagram of a specific mesh fusion disclosed herein;
FIG. 4 is a flow chart of a specific load sharing method disclosed herein;
FIG. 5 is a schematic view of a load distribution apparatus according to the present disclosure;
fig. 6 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, fluid mechanics calculation is widely applied to a plurality of industrial fields, but calculation usually needs a huge number of grids, and calculation is time-consuming. Parallel partitioning and multiple mesh fusion are two major acceleration techniques. The parallel partition is to divide the grid corresponding to the load task into a plurality of areas, and to respectively deliver the grids in different areas to different computing nodes for computing so as to reduce the computing time on the wall. The multi-grid fusion technology is to fuse the fine grids to obtain coarse grids, and the coarse grids can quickly eliminate low-frequency errors, so that the effect of accelerating convergence is achieved through alternate calculation of the coarse grids and the fine grids. However, the parallel partition and the multiple grids are simultaneously applied, so that the problem of using the sequence is solved, namely, the multiple grids are fused firstly or the parallel partition is carried out firstly, if a parallel partition priority strategy is adopted, the grid number of the fine grids in each area can be basically the same, namely, the load is balanced, but the implementation of some non-structural grid multiple fusion methods can be interfered, and further, the acceleration effect and the calculation robustness of the multiple grids are reduced; if multiple grids are considered preferentially, because the grid fusion rates of all areas of the unstructured grids are greatly different, the calculation load on the fine grids is seriously unbalanced by directly developing parallel partitions based on the coarse grids, and therefore the overall acceleration effect is seriously reduced.
Therefore, the load distribution scheme is correspondingly provided, and the acceleration effect of processing the load task is improved.
Referring to fig. 1, an embodiment of the present application discloses a load distribution method, including:
step S11: and carrying out grid fusion processing on the initial grid unit in the initial grid constructed based on the load task to obtain the target grid.
In this embodiment, it can be understood that the initial grid is the finest grid, and the finest initial grid is fused based on the preset grid fusion requirement, so as to obtain the coarsest target grid meeting the preset grid fusion requirement. It should be noted that NNW-FlowStar software may be adopted to fuse a plurality of initial grid cells in the initial grid into one grid cell in the next-layer grid, for example, based on a preset grid fusion requirement, two times of fusion need to be performed, as shown in a specific load distribution schematic diagram shown in fig. 2, where the initial grid is grid 0, the next-layer grid is grid 1, the target grid is grid 2, grid 0 includes 4011 initial grid cells, and fusion processing is performed on the 4011 initial grid cells to obtain a new grid cell including the target grid cell and the target grid cell including 4011 initial grid cellsMesh 1 of 592 mesh units, fusing, and then performing mesh fusion processing on the 592 mesh units to obtain a target mesh including 71 fused mesh units, wherein when initial mesh units are fused, for example, a specific mesh fusion diagram shown in fig. 3, 8 initial mesh units, that is, m, in the initial mesh may be fused 1 0 、m 2 0 、m 3 0 、m 4 0 、m 5 0 、m 6 0 、m 7 0 、m 8 0 And performing fusion to obtain a certain grid unit in the grid 1.
Step S12: and determining the partition weight of each fused grid unit in the target grid.
In this embodiment, the determining the partition weight of each fused grid cell in the target grid includes: and determining the partition weight of each fused grid unit in the target grid by using a recursive algorithm.
Step S13: and dividing the fused grid unit into corresponding target partitions based on the partition weight.
In this embodiment, before dividing the fused grid unit into corresponding target partitions based on the partition weights, the method further includes: and calling a METIS library to determine a first mapping relation between each fused grid unit and the corresponding target partition based on the partition weight and the preset load requirement so as to divide the fused grid units into the corresponding target partitions based on the first mapping relation and the partition weight. For example, in fig. 2, 71 fused grid cells in the grid 2 are divided into 4 target partitions, and the 4 target partitions respectively include 12 fused grid cells, 14 fused grid cells, 30 fused grid cells, and 15 fused grid cells.
In this embodiment, the determining, by using the METIS library, a first mapping relationship between each fused grid cell and the corresponding target partition based on the partition weight and the preset load requirement includes: determining the number of target cells of the fused grid cells and each fused grid cellThe grid cells after the fusion of the adjacent elements are numbered; and calling a METIS library to determine a first mapping relation between each fused grid unit and the corresponding target partition based on the partition weight, the preset load requirement, the number of the target units and the number of the fused grid units adjacent to each fused grid unit. It is understood that, for example, if the target grid is the L-th grid, the partition weight w of each fused grid cell is determined i L Number of target cells N of L-th layer mesh L And inputting the number of the fused grid unit adjacent to each fused grid unit into a METIS library as shown in the following formula:
Figure DEST_PATH_IMAGE001
in the formula, m i L Denotes the ith grid cell, w, of the L-th grid j L And the partition weight of the jth grid unit of the L-th grid is represented.
In this embodiment, the partition weight w of each fused grid cell is used i L Number of target cells N of L-th layer mesh L After the number of the fused grid unit adjacent to each fused grid unit is input into the METIS library, the METIS library outputs a first mapping relation between each fused grid unit and the corresponding target partition, as shown in the following formula:
Figure 83782DEST_PATH_IMAGE002
in the formula, Z k Represents the kth target partition, Zn, of the L-th grid k L The kth target partition of the L-th grid contains the number of L-th grid cells, m p L Denotes the p grid cell, m, in the L grid q L Representing the q-th grid cell in the L-th grid.
Step S14: and performing region segmentation on the initial grid based on the target partitions to obtain segmented regions corresponding to the target partitions, and then respectively sending the load tasks corresponding to the initial grid units in each segmented region to corresponding computing nodes for processing.
In this embodiment, the performing the region segmentation on the initial mesh based on the target partition includes: calculating a second mapping relation between the fused grid unit and the initial grid unit; and performing region segmentation on the initial grid based on the first mapping relation, the second mapping relation and the target partition. For example, as shown in fig. 2, grid 0 is divided into 4 divided regions based on 4 target partitions, the first mapping relationship, and the second mapping relationship, where the 4 divided regions respectively include 1010 initial grid cells, 1000 initial grid cells, and 991 initial grid cells, that is, the initial grid cells are divided into 4 relatively balanced divided regions, and thus, load tasks corresponding to the divided regions are distributed in a balanced manner.
Therefore, the method and the device perform grid fusion processing on the initial grid unit in the initial grid constructed based on the load task to obtain the target grid; determining the partition weight of each fused grid unit in the target grid; dividing the fused grid unit to a corresponding target partition based on the partition weight; and performing region segmentation on the initial grid based on the target partitions to obtain segmented regions corresponding to the target partitions, and then respectively sending the load tasks corresponding to the initial grid units in each segmented region to corresponding computing nodes for processing. Therefore, the grid fusion processing is firstly carried out, the partition weight of each fused grid unit is determined, the fused grid units are divided into corresponding target partitions based on the partition weights, and then the initial grids are subjected to region division based on the target partitions, so that the obtained number of the initial grid units contained in each divided region is balanced, balanced load tasks are respectively sent to corresponding computing nodes to be processed, and the acceleration effect of the computing nodes for processing the load tasks is further improved.
Referring to fig. 4, an embodiment of the present application discloses a specific load distribution method, including:
step S21: and carrying out grid fusion processing on the initial grid unit in the initial grid constructed based on the load task by utilizing a preset grid fusion algorithm and a preset non-overlapping fusion condition to obtain the target grid.
In this embodiment, for example, the initial grid is a layer 0 grid, and the grid cell set M thereof 0 Comprises the following steps:
Figure DEST_PATH_IMAGE003
in the formula, N 0 Represents a total of N of the 0 th layer grids 0 A grid cell, m i 0 Represents the ith grid cell of the layer 0 grid.
In this embodiment, any one of the preset mesh fusion algorithms is used to perform mesh fusion processing on the layer 0 mesh, for example, the preset mesh fusion algorithm is a full-coverage direct imaging multiple mesh fusion algorithm, the layer 0 mesh is subjected to mesh fusion processing to obtain a layer 1 mesh, and a mesh unit set M of the layer 1 mesh is obtained 1 Comprises the following steps:
Figure 735344DEST_PATH_IMAGE004
in the formula, N 1 Representing a total of N of the layer 1 mesh 1 A grid cell, m i 1 Denotes the ith grid cell of the layer 1 grid, where it is understood that m i 1 From n in the 0 th layer mesh i 0 The grid cells are fused, namely:
Figure DEST_PATH_IMAGE005
in the formula, m p 0 Denotes the p grid cell, m, in the 0 th grid q 0 Representing the q-th grid cell in the layer 0 grid.
In this embodiment, when the mesh is fused, each mesh unit is required to satisfy a preset non-overlapping fusion condition, where the preset non-overlapping fusion condition is:
Figure 108556DEST_PATH_IMAGE006
in this embodiment, it can be understood that the L-th grid is fused from the L-1-th grid, and the L-th grid has N total L A unit cell, wherein the ith grid cell is m i L ,m i L From n to i L-1 The L-1 layer grid cells are fused, and the formula is shown as follows:
Figure DEST_PATH_IMAGE007
in the formula, m p L-1 Denotes the p-th grid cell, m, in the L-1-th grid q L-1 Representing the q-th grid cell in the L-1 th grid.
In this embodiment, in the process of merging the L-1 th layer mesh into the L-th layer mesh, the preset non-overlapping merging condition is also satisfied, which is shown as the following formula:
Figure 690716DEST_PATH_IMAGE008
step S22: determining the initial cell number of the initial grid cell corresponding to each fused grid cell in the target grid, and determining the partition weight of each fused grid cell based on the initial cell number.
In this embodiment, the initial cell number of the initial grid cell corresponding to each fused grid cell in the target grid is determined, for example, the target grid is the coarsest L-th grid, m i L Is the ith grid cell of the L-th grid and consists of n i L-1 Fusing the L-1 layer grid cells, and determining m based on a recursive method i L The number of cells of the corresponding layer 0 mesh, and then m is determined based on the number of cells of the layer 0 mesh i L Partition weight value w i L The recursive algorithm and the partition weight calculation formula are as follows:
Figure DEST_PATH_IMAGE009
in the formula, w i L Represents the partition weight, w, of the ith grid cell in the L-th grid j L-1 Represents the partition weight, w, of the jth trellis cell in the L-1 th trellis i 0 Representing the partition weight of the ith grid cell in the 0 th grid.
Step S23: and dividing the fused grid unit into corresponding target partitions based on the partition weight.
In this embodiment, a first mapping relationship between the fused grid unit and the corresponding target partition is determined by using the METIS library based on the partition weight, and then the fused grid unit is divided into the corresponding target partition by using the first mapping relationship.
Step S24: and performing region segmentation on the initial grid based on the target partitions to obtain segmented regions corresponding to the target partitions, and then respectively sending the load tasks corresponding to the initial grid units in each segmented region to corresponding computing nodes for processing.
In this embodiment, for example, the target grid is an L-th grid, the initial grid is a 0-th grid, before the region of the initial grid is divided based on the target partition, the fusion processing and the first mapping relationship between the L-th grids obtained based on the 0-th grid are required to be used to calculate the second mapping relationship between each grid cell in the L-th grid and the initial grid, and further to calculate the mapping relationship between the target region and the initial grid, the mapping relationship between each target partition in the L-th grid and each grid cell in the L-1-th grid may be calculated first, then the mapping relationship between each grid cell in the L-1-th grid and each grid cell in the L-2-th grid is calculated, …, and so on, the mapping relationship between each grid cell in the 1-th grid and each grid cell in the 0-th grid is calculated, and then determining the mapping relation between each target partition in the L-th layer grid and each grid unit in the 0-th layer grid so as to perform region segmentation on the initial grid by using the mapping relation between each target partition in the L-th layer grid and each grid unit in the 0-th layer grid.
Therefore, according to the method and the device, the finest initial grid can be fused according to the preset grid fusion requirement to obtain the coarsest target grid, then the partition weight of each fused grid unit in the target grid is calculated based on the number of the initial units corresponding to each fused grid unit, and the target grid is partitioned based on the partition weight, so that the number of the initial grid units contained in a plurality of partitioned areas obtained by subsequently partitioning the initial grid into areas is approximately the same, further the load tasks distributed to the computing nodes are more balanced, and the speed of processing the load tasks by the computing nodes is increased.
Referring to fig. 5, an embodiment of the present application discloses a load distribution apparatus, including:
the fusion processing module 11 is configured to perform mesh fusion processing on initial mesh cells in an initial mesh constructed based on a load task to obtain a target mesh;
a weight determination module 12, configured to determine a partition weight of each fused grid cell in the target grid;
a partition module 13, configured to partition the fused grid cells into corresponding target partitions based on the partition weights;
a segmentation module 14, configured to perform region segmentation on the initial mesh based on the target partitions to obtain segmented regions corresponding to the target partitions;
a sending module 15, configured to send the load task corresponding to the initial grid unit in each of the divided regions to a corresponding computing node for processing.
Therefore, the method and the device perform grid fusion processing on the initial grid unit in the initial grid constructed based on the load task to obtain the target grid; determining the partition weight of each fused grid unit in the target grid; dividing the fused grid unit to a corresponding target partition based on the partition weight; and performing region segmentation on the initial grid based on the target partitions to obtain segmented regions corresponding to the target partitions, and then respectively sending the load tasks corresponding to the initial grid units in each segmented region to corresponding computing nodes for processing. Therefore, the grid fusion processing is firstly carried out, the partition weight of each fused grid unit is determined, the fused grid units are divided into corresponding target partitions based on the partition weights, and then the initial grids are subjected to area division based on the target partitions, so that the number of the initial grid units contained in each divided area is balanced, balanced load tasks are respectively sent to corresponding computing nodes to be processed, and the acceleration effect of the computing nodes for processing the load tasks is further improved.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The method specifically comprises the following steps: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the load distribution method executed by the electronic device disclosed in any of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor for processing a calculation operation related to machine learning.
In addition, the storage 22 is used as a carrier for storing resources, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., the resources stored thereon include an operating system 221, a computer program 222, data 223, etc., and the storage may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling hardware devices and computer programs 222 on the electronic device, so as to implement operations and processing of the mass data 223 in the memory 22 by the processor 21, and may be Windows, Unix, Linux, or the like. The computer programs 222 may further include computer programs that can be used to perform other specific tasks in addition to the computer programs that can be used to perform the load distribution method performed by the electronic device disclosed in any of the foregoing embodiments. The data 223 may include data received by the electronic device and transmitted from an external device, or may include data collected by the input/output interface 25 itself.
Further, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored, and when the computer program is loaded and executed by a processor, the method steps executed in the load distribution process disclosed in any of the foregoing embodiments are implemented.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The load distribution method, device, apparatus and medium provided by the present invention are described in detail above, and the principle and the implementation of the present invention are explained in this document by applying specific examples, and the description of the above examples is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method of load distribution, comprising:
carrying out grid fusion processing on initial grid units in an initial grid constructed based on a load task to obtain a target grid;
determining the partition weight of each fused grid unit in the target grid;
dividing the fused grid unit to a corresponding target partition based on the partition weight;
and performing region segmentation on the initial grid based on the target partitions to obtain segmented regions corresponding to the target partitions, and then respectively sending the load tasks corresponding to the initial grid units in each segmented region to corresponding computing nodes for processing.
2. The method according to claim 1, wherein the determining the partition weight of each merged grid cell in the target grid comprises:
determining the initial cell number of the initial grid cell corresponding to each fused grid cell in the target grid, and determining the partition weight of each fused grid cell based on the initial cell number.
3. The method according to claim 1, wherein the determining the partition weight of each merged grid cell in the target grid comprises:
and determining the partition weight of each fused grid unit in the target grid by using a recursive algorithm.
4. The load distribution method according to claim 1, wherein before dividing the merged grid cell into corresponding target partitions based on the partition weights, further comprising:
and calling a METIS library to determine a first mapping relation between each fused grid unit and the corresponding target partition based on the partition weight and the preset load requirement so as to divide the fused grid units into the corresponding target partitions based on the first mapping relation and the partition weight.
5. The method according to claim 4, wherein the determining the first mapping relationship between each of the merged grid cells and the corresponding target partition by invoking a METIS library based on the partition weight and a preset load requirement includes:
determining the number of target units of the fused grid units and the number of the fused grid units adjacent to each fused grid unit;
and calling a METIS library to determine a first mapping relation between each fused grid unit and the corresponding target partition based on the partition weight, the preset load requirement, the number of the target units and the number of the fused grid units adjacent to each fused grid unit.
6. The method of claim 5, wherein the performing region segmentation on the initial mesh based on the target partition comprises:
calculating a second mapping relation between the fused grid unit and the initial grid unit;
and performing region segmentation on the initial grid based on the first mapping relation, the second mapping relation and the target partition.
7. The method according to any one of claims 1 to 6, wherein the performing mesh fusion processing on the initial mesh cells in the initial mesh constructed based on the load task to obtain the target mesh comprises:
and carrying out grid fusion processing on the initial grid unit in the initial grid constructed based on the load task by utilizing a preset grid fusion algorithm and a preset non-overlapping fusion condition to obtain the target grid.
8. A load distribution apparatus, comprising:
the fusion processing module is used for carrying out grid fusion processing on initial grid units in the initial grid constructed based on the load task to obtain a target grid;
a weight determination module, configured to determine a partition weight of each fused grid cell in the target grid;
the partition module is used for dividing the fused grid unit into corresponding target partitions based on the partition weight;
a segmentation module, configured to perform region segmentation on the initial mesh based on the target partitions to obtain segmented regions corresponding to the target partitions;
and the sending module is used for respectively sending the load task corresponding to the initial grid unit in each divided area to a corresponding computing node for processing.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to carry out the steps of the load distribution method according to any of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program realizes the steps of the load distribution method according to any of claims 1 to 7 when executed by a processor.
CN202210935522.5A 2022-08-05 2022-08-05 Load distribution method, device, equipment and medium Active CN115016947B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210935522.5A CN115016947B (en) 2022-08-05 2022-08-05 Load distribution method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210935522.5A CN115016947B (en) 2022-08-05 2022-08-05 Load distribution method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN115016947A true CN115016947A (en) 2022-09-06
CN115016947B CN115016947B (en) 2022-10-21

Family

ID=83065445

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210935522.5A Active CN115016947B (en) 2022-08-05 2022-08-05 Load distribution method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115016947B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116229022A (en) * 2023-05-09 2023-06-06 苏州数算软云科技有限公司 Non-connected grid segmentation method and device, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180137223A1 (en) * 2016-11-16 2018-05-17 Saudi Arabian Oil Company Parallel reservoir simulation with accelerated aquifer calculation
CN110929456A (en) * 2019-11-13 2020-03-27 西安交通大学 Equivalent particle load balancing and accelerating method for parallel computing by moving particle method
CN111932318A (en) * 2020-09-21 2020-11-13 腾讯科技(深圳)有限公司 Region division method and device, electronic equipment and computer readable storage medium
CN112712271A (en) * 2020-12-31 2021-04-27 国网山东省电力公司青岛供电公司 Power grid meshing evaluation method, system, medium and electronic equipment
CN113744408A (en) * 2021-08-31 2021-12-03 北京航空航天大学 Grid generation method, device and storage medium
CN113850032A (en) * 2021-12-02 2021-12-28 中国空气动力研究与发展中心计算空气动力研究所 Load balancing method in numerical simulation calculation
WO2022001134A1 (en) * 2020-06-28 2022-01-06 浪潮电子信息产业股份有限公司 Load balancing method, apparatus and device for parallel model training task, and storage medium
CN113901661A (en) * 2021-10-11 2022-01-07 中国石油大学(华东) Load balancing method, device, equipment and storage medium
CN114595052A (en) * 2021-06-08 2022-06-07 北京航空航天大学 Distributed communication load balancing method based on graph partitioning algorithm
CN114816739A (en) * 2022-04-13 2022-07-29 电子科技大学 On-chip network increment task mapping method for load balancing

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180137223A1 (en) * 2016-11-16 2018-05-17 Saudi Arabian Oil Company Parallel reservoir simulation with accelerated aquifer calculation
CN110929456A (en) * 2019-11-13 2020-03-27 西安交通大学 Equivalent particle load balancing and accelerating method for parallel computing by moving particle method
WO2022001134A1 (en) * 2020-06-28 2022-01-06 浪潮电子信息产业股份有限公司 Load balancing method, apparatus and device for parallel model training task, and storage medium
CN111932318A (en) * 2020-09-21 2020-11-13 腾讯科技(深圳)有限公司 Region division method and device, electronic equipment and computer readable storage medium
CN112712271A (en) * 2020-12-31 2021-04-27 国网山东省电力公司青岛供电公司 Power grid meshing evaluation method, system, medium and electronic equipment
CN114595052A (en) * 2021-06-08 2022-06-07 北京航空航天大学 Distributed communication load balancing method based on graph partitioning algorithm
CN113744408A (en) * 2021-08-31 2021-12-03 北京航空航天大学 Grid generation method, device and storage medium
CN113901661A (en) * 2021-10-11 2022-01-07 中国石油大学(华东) Load balancing method, device, equipment and storage medium
CN113850032A (en) * 2021-12-02 2021-12-28 中国空气动力研究与发展中心计算空气动力研究所 Load balancing method in numerical simulation calculation
CN114816739A (en) * 2022-04-13 2022-07-29 电子科技大学 On-chip network increment task mapping method for load balancing

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JAGDISH CHANDRA PATNI等: "Distributed load balancing model for grid computing environment", 《2015 1ST INTERNATIONAL CONFERENCE ON NEXT GENERATION COMPUTING TECHNOLOGIES》 *
唐翠微: "稳定且负载均衡的移动Ad Hoc网络加权分簇算法", 《计算机系统应用》 *
李梓杨 等: "基于负载感知的数据流动态负载均衡策略", 《计算机应用》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116229022A (en) * 2023-05-09 2023-06-06 苏州数算软云科技有限公司 Non-connected grid segmentation method and device, electronic equipment and storage medium
CN116229022B (en) * 2023-05-09 2023-08-04 苏州数算软云科技有限公司 Non-connected grid segmentation method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115016947B (en) 2022-10-21

Similar Documents

Publication Publication Date Title
US11521067B2 (en) Decentralized distributed deep learning
Ningning et al. Fog computing dynamic load balancing mechanism based on graph repartitioning
US11055139B2 (en) Smart accelerator allocation and reclamation for deep learning jobs in a computing cluster
CN109191287B (en) Block chain intelligent contract fragmentation method and device and electronic equipment
CN111782359B (en) Distributed computing system task allocation method and related equipment
KR20210108749A (en) Accelerator, method for operating the same and accelerator system including the same
CN115016947B (en) Load distribution method, device, equipment and medium
KR20210148586A (en) Scheduler, method for operating the same and accelerator system including the same
US20120204183A1 (en) Associative distribution units for a high flowrate synchronizer/schedule
JP2024536659A (en) Task execution method, apparatus, storage medium and electronic device
CN114429195A (en) Performance optimization method and device for hybrid expert model training
CN107038244A (en) A kind of data digging method and device, a kind of computer-readable recording medium and storage control
CN109408722B (en) Community division method and device, computing equipment and storage medium
CN115879543A (en) Model training method, device, equipment, medium and system
CN114996198B (en) Cross-processor data transmission method, device, equipment and medium
WO2023050807A1 (en) Data processing method, apparatus, and system, electronic device, and storage medium
CN110325984B (en) System and method for hierarchical community detection in graphics
KR20220104658A (en) Method, apparatus and computer program for managing virtualized resources
Biswas et al. Portable parallel programming for the dynamic load balancing of unstructured grid applications
CN114564292A (en) Distributed gridding processing method, device, equipment and medium for data
JP2001099921A (en) Parallel multi-target tracking device
US20200285556A1 (en) Throughput estimation device and throughput estimation system
Foussoul et al. Fully-Dynamic Load Balancing
CN117520461B (en) Distribution method, device, equipment and medium of logic fragments
Shabanov et al. Scaling of supercomputer calculations on unstructured surface computational meshes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Wang Xinjian

Inventor after: Zhang Yaobing

Inventor after: Cheng Feng

Inventor after: Mou Bin

Inventor after: Fu Yunfeng

Inventor after: Li Jin

Inventor after: Tang Jing

Inventor after: Zhang Jian

Inventor after: Gong Xiaoquan

Inventor after: Wang Jiantao

Inventor after: Li Ming

Inventor after: Zhou Naichun

Inventor before: Wang Xinjian

Inventor before: Zhang Yaobing

Inventor before: Cheng Feng

Inventor before: Mou Bin

Inventor before: Fu Yunfeng

Inventor before: Li Jin

Inventor before: Tang Jing

Inventor before: Zhang Jian

Inventor before: Gong Xiaoquan

Inventor before: Wang Jiantao

Inventor before: Li Ming

Inventor before: Zhou Naichun