CN117113727B - Interactive numerical simulation equipment configuration method and device and electronic equipment - Google Patents

Interactive numerical simulation equipment configuration method and device and electronic equipment Download PDF

Info

Publication number
CN117113727B
CN117113727B CN202311354795.1A CN202311354795A CN117113727B CN 117113727 B CN117113727 B CN 117113727B CN 202311354795 A CN202311354795 A CN 202311354795A CN 117113727 B CN117113727 B CN 117113727B
Authority
CN
China
Prior art keywords
target
layer
simulation
under
region
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.)
Active
Application number
CN202311354795.1A
Other languages
Chinese (zh)
Other versions
CN117113727A (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.)
Shandong Ecological Environment Monitoring Center
3Clear Technology Co Ltd
Original Assignee
Shandong Ecological Environment Monitoring Center
3Clear Technology Co Ltd
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 Shandong Ecological Environment Monitoring Center, 3Clear Technology Co Ltd filed Critical Shandong Ecological Environment Monitoring Center
Priority to CN202311354795.1A priority Critical patent/CN117113727B/en
Publication of CN117113727A publication Critical patent/CN117113727A/en
Application granted granted Critical
Publication of CN117113727B publication Critical patent/CN117113727B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a device configuration method and device for interactive numerical simulation and electronic equipment, wherein the method comprises the following steps: determining a grid division result of each layer of target nested region based on the target region indication information in the acquired target simulation setting data and the spatial resolution of each layer of target nested region; calculating a target calculation number and a target communication number respectively based on the grid division result of each layer of target nesting area and the iteration times of each layer of target nesting area under the target numerical model; calculating the operation time length under each equipment configuration scheme based on the unit time consumption data, the target calculation number and the target communication number under each equipment configuration scheme; a target device configuration scheme is selected from the plurality of device configuration schemes based on the run time and the desired calculated time under each device configuration scheme. The embodiment of the invention can conveniently determine the configuration scheme of the target equipment, thereby improving the estimation efficiency and reducing the consumption of test resources.

Description

Interactive numerical simulation equipment configuration method and device and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for configuring an interactive numerical simulation device, and an electronic device.
Background
At present, the atmospheric numerical simulation is widely used, wherein the atmospheric numerical simulation refers to the simulation of the movement and change of the atmosphere through a mathematical model and a computer so as to predict weather, air quality, climate change and the like in a certain period of time; because the numerical model software for executing the numerical model needs to solve a complex atmospheric diffusion and pollution chemical reaction equation set, the operation calculation amount of the numerical model software is larger; therefore, in order to shorten the simulation calculation time to meet the timeliness requirement of business application, most of weather/air quality numerical model software is MPI (Massage Passing Interface, information transfer interface) parallel programs, and multiple calculation nodes (i.e. devices) and multiple processes are supported to run in parallel, so that the overall running time is reduced. Correspondingly, when a plurality of devices are adopted for numerical simulation, the number of the required devices is determined; however, in the prior art, the equipment quantity configuration is generally determined for a model system (i.e., model software) with specific simulation area and spatial resolution after a plurality of groups of test experiments are performed in the early stage of system construction, so that the system construction is performed according to the determined equipment quantity configuration, and the system construction does not need to be adjusted and changed again; for model configuration of different simulation areas and spatial resolutions, corresponding multiple groups of tests need to be carried out again, so that when the simulation areas or the spatial resolutions are changed, a target device configuration scheme (i.e. the number of the adapted devices) is difficult to determine quickly, and a large amount of test resources are consumed. Based on this, how to conveniently determine the target device configuration scheme, so as to improve the estimation efficiency and reduce the test resource consumption becomes a research hotspot.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a device configuration method, apparatus, and electronic device for interactive numerical simulation, so as to solve the problems that when a plurality of corresponding groups of tests need to be performed again for different simulation areas and spatial resolutions, and the simulation areas or spatial resolutions change, it is difficult to quickly determine a target device configuration scheme (i.e., the number of adapted devices), and a large amount of test resources need to be consumed; that is, the embodiment of the invention can conveniently determine the configuration scheme of the target device, thereby improving the estimation efficiency and reducing the consumption of test resources.
According to an aspect of the present invention, there is provided a device configuration method of interactive numerical simulation, the method comprising:
acquiring target simulation setting data, wherein the target simulation setting data comprises target region indication information of a target simulation region, spatial resolution of each layer of target nesting region in M layers of target nesting regions and expected calculation duration, and M is a positive integer; wherein the target simulation setting data is acquired through a data setting operation performed by a target object;
determining a grid division result of each layer of target nested region based on the target region indication information and the spatial resolution of each layer of target nested region respectively;
Determining the iteration times of each layer of target nested region under a target numerical model, and respectively calculating the target calculation number and the target communication number based on the grid division result of each layer of target nested region and the iteration times of each layer of target nested region under the target numerical model;
determining unit time consumption data under each equipment configuration scheme in a plurality of equipment configuration schemes, and calculating operation duration under each equipment configuration scheme based on the unit time consumption data, the target calculation quantity and the target communication quantity under each equipment configuration scheme respectively, wherein one unit time consumption data comprises unit calculation quantity time consumption and unit communication quantity time consumption under the corresponding equipment configuration scheme;
and selecting a target equipment configuration scheme from the plurality of equipment configuration schemes based on the operation time length under each equipment configuration scheme and the expected calculation time length, wherein the target equipment configuration scheme is used for indicating the number of equipment adapted when the target simulation scene under the target simulation setting data carries out numerical simulation through the target numerical model.
According to another aspect of the present invention, there is provided an apparatus configuration device for interactive numerical simulation, the device comprising:
The system comprises an acquisition unit, a calculation unit and a calculation unit, wherein the acquisition unit is used for acquiring target simulation setting data, the target simulation setting data comprises target region indication information of a target simulation region, spatial resolution of each layer of target nesting region in M layers of target nesting regions and expected calculation time length, and M is a positive integer; wherein the target simulation setting data is acquired through a data setting operation performed by a target object;
the processing unit is used for determining a grid division result of each layer of target nested region based on the target region indication information and the spatial resolution of each layer of target nested region respectively;
the processing unit is further used for determining the iteration times of each layer of target nested region under the target numerical model, and respectively calculating the target calculation quantity and the target communication quantity based on the grid division result of each layer of target nested region and the iteration times of each layer of target nested region under the target numerical model;
the processing unit is further configured to determine unit time consumption data under each device configuration scheme in the multiple device configuration schemes, and calculate an operation duration under each device configuration scheme based on the unit time consumption data under each device configuration scheme, the target calculation number and the target communication number, where one unit time consumption data includes unit calculation number time consumption and unit communication number time consumption under the corresponding device configuration scheme;
The processing unit is further configured to select a target device configuration scheme from the multiple device configuration schemes based on the operation duration and the expected calculation duration under the respective device configuration schemes, where the target device configuration scheme is used to indicate the number of devices adapted when the target simulation scenario under the target simulation setting data performs numerical simulation through the target numerical model.
According to another aspect of the invention there is provided an electronic device comprising a processor, and a memory storing a program, wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the above mentioned method.
According to another aspect of the present invention there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the above mentioned method.
According to the embodiment of the invention, after the target simulation setting data are acquired, the grid division result of each layer of target nested area is determined based on the target area indication information and the spatial resolution of each layer of target nested area, wherein the target simulation setting data comprise the target area indication information of the target simulation area, the spatial resolution of each layer of target nested area in M layers of target nested areas and expected calculation time length, and M is a positive integer. Then, the iteration times of each layer of target nested region under the target numerical model can be determined, and the target calculation number and the target communication number are calculated respectively based on the grid division result of each layer of target nested region and the iteration times of each layer of target nested region under the target numerical model; further, unit time consumption data under each device configuration scheme in the multiple device configuration schemes can be determined, and the operation duration under each device configuration scheme is calculated based on the unit time consumption data, the target calculation number and the target communication number under each device configuration scheme, wherein one unit time consumption data comprises the unit calculation number time consumption and the unit communication number time consumption under the corresponding device configuration scheme. Based on this, a target device configuration scheme for indicating the number of devices adapted when the target simulation scenario under the target simulation setting data is numerically simulated by the target numerical model may be selected from the plurality of device configuration schemes based on the operation time length and the expected calculation time length under the respective device configuration schemes. Therefore, when the configuration scheme of the target equipment is determined, multiple groups of tests do not need to be carried out again, and the configuration scheme of the target equipment can be determined conveniently, so that the estimation efficiency is improved, the consumption of test resources can be reduced effectively, and the calculation resources are saved; in addition, the target simulation setting data may be acquired through a data setting operation performed by the target object, so that device configuration of the interactive numerical simulation may be realized.
Drawings
Further details, features and advantages of the invention are disclosed in the following description of exemplary embodiments with reference to the following drawings, in which:
FIG. 1 illustrates a flow diagram of a device configuration method for interactive numerical simulation according to an exemplary embodiment of the present invention;
FIG. 2 illustrates a schematic diagram of a horizontal grid of nesting areas, according to an exemplary embodiment of the present invention;
FIG. 3 illustrates a flow diagram of another method of device configuration for interactive numerical simulation in accordance with an exemplary embodiment of the present invention;
FIG. 4 illustrates a flow diagram of yet another method of device configuration for interactive numerical simulation in accordance with an exemplary embodiment of the present invention;
FIG. 5 shows a schematic block diagram of an interactive numerical simulated device configuration apparatus according to an exemplary embodiment of the invention;
fig. 6 shows a block diagram of an exemplary electronic device that can be used to implement an embodiment of the invention.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While the invention is susceptible of embodiment in the drawings, it is to be understood that the invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided to provide a more thorough and complete understanding of the invention. It should be understood that the drawings and embodiments of the invention are for illustration purposes only and are not intended to limit the scope of the present invention.
It should be understood that the various steps recited in the method embodiments of the present invention may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the invention is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below. It should be noted that the terms "first," "second," and the like herein are merely used for distinguishing between different devices, modules, or units and not for limiting the order or interdependence of the functions performed by such devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those skilled in the art will appreciate that "one or more" is intended to be construed as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of such messages or information.
It should be noted that, the execution body of the device configuration method for interactive numerical simulation provided by the embodiment of the present invention may be one or more electronic devices, which is not limited in the present invention; the electronic device may be a terminal (i.e. a client) or a server, and when the execution body includes a plurality of electronic devices and the plurality of electronic devices include at least one terminal and at least one server, the device configuration method for interactive numerical simulation provided by the embodiment of the present invention may be executed jointly by the terminal and the server. Accordingly, the terminals referred to herein may include, but are not limited to: smart phones, tablet computers, notebook computers, desktop computers, smart watches, smart voice interaction devices, smart appliances, vehicle terminals, aircraft, and so on. The server mentioned herein may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing (cloud computing), cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network ), and basic cloud computing services such as big data and artificial intelligence platforms, and so on.
Based on the above description, the embodiments of the present invention propose an interactive numerical simulation device configuration method that can be executed by the above-mentioned electronic device (terminal or server); alternatively, the device configuration method of the interactive numerical simulation may be performed by the terminal and the server together. For convenience of explanation, the device configuration method for executing the interactive numerical simulation by the electronic device will be described below; as shown in fig. 1, the device configuration method of the interactive numerical simulation may include the following steps S101 to S105:
s101, acquiring target simulation setting data, wherein the target simulation setting data comprises target region indication information of a target simulation region, spatial resolution of each layer of target nesting region in M layers of target nesting regions and expected calculation time length, and M is a positive integer.
Wherein the target area indication information is used for indicating a target simulation area; optionally, the target area indication information may be longitude and latitude information (such as longitude and latitude coordinates of any two diagonal points in the target simulation area) for indicating the target simulation area, or may be an area identifier of the target simulation area, etc.; the invention is not limited in this regard. Alternatively, an area identifier may be an area name, an area number, or the like, which is not limited by the present invention. Alternatively, the target simulation area may be any area, such as an area of a province or an area of a city, which is not limited in the present invention. Optionally, the number of the target simulation areas may be one or more, and when the number of the target simulation areas is one, each layer of target nested areas may correspond to the same target simulation area, where the area sizes of each layer of target nested areas are the same; when the number of the target simulation areas is plural, one target simulation area may correspond to at least one layer of target nesting area, so that any two layers of target nesting areas may correspond to different target simulation areas or may correspond to the same target simulation area, and at this time, the area sizes of any two layers of target nesting areas may be the same or may be different, and so on.
Alternatively, the spatial resolution of a layer of nested region may be 3km (kilometers), may be 9km, may be 27km, etc.; the invention is not limited in this regard. Wherein one spatial resolution may be used to indicate the distance between adjacent grid points in the corresponding nesting area (e.g., 3km or 9km, etc.). Alternatively, the desired calculation time period (i.e., the desired operation time) may be 2 hours, 3 hours, or the like, which is not limited by the present invention.
In the embodiment of the present invention, the electronic apparatus may respond to the data setting operation performed by the target object (i.e., the user) and take the simulation setting data indicated by the data setting operation as the target simulation setting data, that is, the target simulation setting data may be acquired through the data setting operation performed by the target object. In this case, the electronic device may display the data setting interface, so that the target object may perform a data setting operation on the data setting interface, so that the target object may customize the target simulation setting data through the data setting operation, that is, may customize the spatial resolution of the target simulation area, each layer of the target nesting area, the desired calculation time period, and the like. Optionally, when the target simulation setting data further includes the number of nesting areas, the target object may further define the number of nesting areas; or the electronic equipment can determine the value of M according to the number of the spatial resolutions in the target simulation setting data, and the like; the invention is not limited in this regard. Optionally, the electronic device may also receive a data setting instruction, and use the simulation setting data indicated by the data setting instruction as target simulation setting data, where the data setting instruction may be an instruction sent by a foreground device in the interactive simulation system to the electronic device when detecting a data setting operation performed by the target object, where the foreground device and the electronic device referred to herein may be different devices in the interactive simulation system.
Alternatively, the electronic device may also support voice input, and then the target object may perform a data setting operation by means of voice input, so as to implement setting of the target analog setting data. Alternatively, the target object may be any object, which is not limited in the present invention.
Alternatively, the electronic device may acquire the data download link and download the analog setting data using the data download link, thereby taking the analog setting data downloaded based on the data download link as the target analog setting data, and so on.
S102, determining a grid division result of each layer of target nested region based on the target region indication information and the spatial resolution of each layer of target nested region.
Specifically, for any target nesting region in the M-layer target nesting region, the electronic device may determine a region size (i.e., a region size) of the target simulation region based on the target region indication information, where one region size includes a region lateral length and a region longitudinal length of the corresponding simulation region; in this case, the electronic device may determine the meshing result of any one of the target nested regions based on the region lateral length and the region longitudinal length of the target simulation region, and the spatial resolution of any one of the target nested regions. It should be understood that, when the number of the target simulation areas is plural, the electronic device may determine the area size of the corresponding target simulation area (i.e., the area size of any target nesting area) based on the target area indication information of the target simulation area corresponding to any target nesting area, where one area size may also refer to the area lateral length and the area longitudinal length of the corresponding nesting area; in this case, the electronic device may determine the meshing result of any target nesting region based on the region lateral length and the region longitudinal length of the target simulation region corresponding to any target nesting region (i.e., the region lateral length and the region longitudinal length of any target nesting region), and the spatial resolution of any target nesting region. For ease of illustration, the following description will take a target simulation area as an example.
Optionally, the electronic device may further determine central point position information of any target nesting area based on the target area indication information, and start to spread outwards from the central point indicated by the central point position information according to the spatial resolution of any target nesting area until grid division of any target nesting area is completed, so as to obtain a grid division result of any target nesting area.
Wherein one meshing result may be used to indicate the number of horizontal meshes (i.e., nx×ny) and the number of vertical layers (NZ) of the corresponding nesting region; wherein, a horizontal grid number can be determined based on a horizontal grid Number (NX) and a vertical grid Number (NY), i.e. a horizontal grid number can be used for indicating the horizontal grid number and the vertical grid number of the corresponding nested region, that is, a grid division result can comprise the horizontal grid number, the vertical grid number and the vertical layer number of the corresponding nested region; specifically, the number of transverse grids of any target nesting region may be a division result between the region transverse length of the target simulation region and the spatial resolution of any target nesting region, and the number of longitudinal grids of any target nesting region may be a division result between the region longitudinal length of the target simulation region and the spatial resolution of any target nesting region. For example, as shown in fig. 2, the number of horizontal grids and the number of vertical grids of one nesting region may be 6 and 5, respectively, and the number of horizontal grids of the nesting region may be 6×5.
Optionally, the number of vertical layers in a mesh division result may be a preset number of vertical layers, and the preset number of vertical layers may be empirically set, or may be set according to actual requirements, which is not limited in the present invention; in this case, the vertical number of layers per layer of nested region is the same; alternatively, the vertical layer number of each layer of the target nesting region may be set by the target object through the data setting operation, that is, the target simulation setting data may further include the vertical layer number of each layer of the target nesting region, so that the meshing result of any target nesting region may be determined based on the target region indication information, the spatial resolution of any target nesting region, and the vertical layer number, and so on.
S103, determining the iteration times of each layer of target nested region under the target numerical model, and respectively calculating the target calculation number and the target communication number based on the grid division result of each layer of target nested region and the iteration times of each layer of target nested region under the target numerical model.
Wherein the target numerical model may include at least one of: NAQPMS (Nested Air Quality Prediction Model System, nested grid air quality mode system), CMAQ (Community Multiscale Air Quality Modeling System, third generation air quality prediction and assessment system), CAMx (Comprehensive Air Quality Model Extensions, an atmospheric pollution calculation model based on atmospheric chemistry for ozone, particulate matter, etc.), WRFCHEM (a new generation of regional air quality mode that is fully coupled online), WRF (Weather Research and Forecasting Model, weather prediction mode), etc., as the invention is not limited in this regard.
S104, determining unit time consumption data under each device configuration scheme in the device configuration schemes, and calculating the operation duration under each device configuration scheme based on the unit time consumption data, the target calculation number and the target communication number under each device configuration scheme, wherein one unit time consumption data comprises the unit calculation number time consumption and the unit communication number time consumption under the corresponding device configuration scheme.
In the embodiment of the invention, one device configuration scheme corresponds to one device number, that is, one device configuration scheme is used for indicating one device number, and the device numbers indicated by the device configuration schemes can be different. Illustratively, the plurality of device configuration schemes may include, but are not limited to: a device configuration scheme for indicating a device number of 1, a device configuration scheme for indicating a device number of 2, a device configuration scheme for indicating a device number of 3, … …, a device configuration scheme for indicating a device number of Q, and the like; the invention is not limited in this regard. Wherein Q may be an integer greater than 1. Alternatively, the device (i.e., the computing node) mentioned herein may be a terminal, a server, or the like, which is not limited by the present invention. Alternatively, the interactive simulation system may include Q devices to implement numerical simulation by determining the number of devices adapted from the Q devices.
It should be appreciated that for any of a plurality of device configurations, the unit time consuming data under any device configuration may refer to: invoking a target numerical model to carry out unit time consumption data required by numerical simulation through the equipment with the equipment number being the equipment number indicated by any equipment configuration scheme (namely the equipment with the equipment number indicated by any equipment configuration scheme); accordingly, the time-consuming number of unit calculations under any device configuration scheme may refer to: the time consumption of unit calculation amount required by invoking the target numerical model to perform numerical simulation through the equipment with the equipment amount being the equipment amount indicated by any equipment configuration scheme can be referred to as unit communication amount time consumption under any equipment configuration scheme: and calling the target numerical model to carry out the unit communication quantity required by numerical simulation through the equipment with the equipment quantity being the equipment quantity indicated by any equipment configuration scheme. Alternatively, the unit calculation amount time may refer to calculation time required for the unit calculation amount, the unit calculation amount may refer to calculation amount of a single grid and a single time integration step (i.e., a single integration process), that is, the unit calculation amount may refer to calculation amount of one grid in one iteration process; alternatively, the unit communication quantity time consumption may refer to a communication time consumption required for the unit communication quantity, the unit communication quantity may refer to a communication quantity of a single grid overlapping surface and a single time integration step, that is, the unit communication quantity may refer to a communication quantity of one grid overlapping surface in an iterative process, and one grid overlapping surface may be an intersection surface of two grids.
S105, selecting a target device configuration scheme from a plurality of device configuration schemes based on the operation time length and the expected calculation time length under each device configuration scheme, wherein the target device configuration scheme is used for indicating the number of devices adapted when the target simulation scene under the target simulation setting data is subjected to numerical simulation through the target numerical model.
The target simulation scenario refers to a simulation scenario in which the simulation setting data is the target simulation setting data, the simulation scenario referred to herein may also be referred to as a pollution emission control scenario, and the target simulation scenario may also be referred to as a custom simulation scenario. In the embodiment of the present invention, the number of devices adapted to the target simulation scenario when the target simulation scenario performs numerical simulation through the target numerical model may also be referred to as the number of devices adapted to the target simulation scenario, that is, the number of devices adapted to perform numerical simulation on the target simulation scenario through the target numerical model.
In one embodiment, if at least one device configuration scheme with an operation duration smaller than or equal to the expected calculation duration exists in the plurality of device configuration schemes, the operation duration under the target device configuration scheme is smaller than or equal to the expected calculation duration, and the operation duration under the critical device configuration scheme is greater than the expected calculation duration; the critical device configuration scheme refers to any device configuration scheme with the number of devices smaller than that of devices indicated by the target device configuration scheme, or may refer to a device configuration scheme with the largest indicated number of devices in a screening device configuration scheme set, where the screening device configuration scheme set may include all device configuration schemes with operation duration longer than expected calculation duration in multiple device configuration schemes.
Optionally, the electronic device may first select the at least one device configuration scheme from the plurality of device configuration schemes, then select a device configuration scheme with the smallest number of devices from the at least one device configuration scheme, and use the selected device configuration scheme as the target device configuration scheme, that is, the number of devices indicated by the target device configuration scheme is the smallest value among the number of devices indicated by each device configuration scheme in the at least one device configuration scheme.
In another embodiment, if at least one device configuration scheme with the operation duration smaller than or equal to the expected calculation duration does not exist in the multiple device configuration schemes, that is, the operation duration under each device configuration scheme is greater than the expected calculation duration, in this case, the electronic device may use the device configuration scheme with the smallest operation duration in the multiple device configuration schemes as the target device configuration scheme, that is, the operation duration under the target device configuration scheme is smaller than the operation duration under any device configuration scheme except the target device configuration scheme in the multiple device configuration schemes.
In yet another embodiment, the electronic device may sequentially traverse each device configuration scheme of the plurality of device configuration schemes in order of from the small number of devices to the large number of devices, and take the currently traversed device configuration scheme as the current device configuration scheme, in which case, if the operation duration under the current device configuration scheme is less than or equal to the expected calculation duration, the electronic device may take the current device configuration scheme as the target device configuration scheme and complete the traversal (i.e. stop the traversal); if the current device configuration scheme is the last device configuration scheme (i.e. the number of devices indicated by the current device configuration scheme is the maximum value of the number of devices indicated by each device configuration scheme) to be traversed in the multiple device configuration schemes, the current device configuration scheme is taken as the target device configuration scheme, and the traversing is completed. It should be understood that the number of devices indicated by the device configuration scheme in the last traversal process is less than the number of devices indicated by the current device configuration scheme, and the electronic device may complete the traversal after selecting the target device configuration scheme.
According to the embodiment of the invention, after the target simulation setting data are acquired, the grid division result of each layer of target nested area is determined based on the target area indication information and the spatial resolution of each layer of target nested area, wherein the target simulation setting data comprise the target area indication information of the target simulation area, the spatial resolution of each layer of target nested area in M layers of target nested areas and expected calculation time length, and M is a positive integer. Then, the iteration times of each layer of target nested region under the target numerical model can be determined, and the target calculation number and the target communication number are calculated respectively based on the grid division result of each layer of target nested region and the iteration times of each layer of target nested region under the target numerical model; further, unit time consumption data under each device configuration scheme in the multiple device configuration schemes can be determined, and the operation duration under each device configuration scheme is calculated based on the unit time consumption data, the target calculation number and the target communication number under each device configuration scheme, wherein one unit time consumption data comprises the unit calculation number time consumption and the unit communication number time consumption under the corresponding device configuration scheme. Based on this, a target device configuration scheme for indicating the number of devices adapted when the target simulation scenario under the target simulation setting data is numerically simulated by the target numerical model may be selected from the plurality of device configuration schemes based on the operation time length and the expected calculation time length under the respective device configuration schemes. Therefore, when the configuration scheme of the target equipment is determined, multiple groups of tests do not need to be carried out again, and the configuration scheme of the target equipment can be determined conveniently, so that the estimation efficiency is improved, the consumption of test resources can be reduced effectively, and the calculation resources are saved; in addition, the target simulation setting data may be acquired through a data setting operation performed by the target object, so that device configuration of the interactive numerical simulation may be realized.
Based on the above description, the embodiment of the invention also provides a more specific device configuration method for interactive numerical simulation. Accordingly, the device configuration method of the interactive numerical simulation may be performed by the above-mentioned electronic device (terminal or server); alternatively, the device configuration method of the interactive numerical simulation may be performed by the terminal and the server together. For convenience of explanation, the device configuration method for executing the interactive numerical simulation by the electronic device will be described below; referring to fig. 3, the device configuration method of the interactive numerical simulation may include the following steps S301 to S309:
s301, acquiring target simulation setting data, wherein the target simulation setting data comprises target region indication information of a target simulation region, spatial resolution of each layer of target nesting region in M layers of target nesting regions and expected calculation time length, and M is a positive integer.
S302, determining a grid division result of each layer of target nested region based on the target region indication information and the spatial resolution of each layer of target nested region.
S303, determining the iteration times of each layer of target nested region under the target numerical model, and respectively calculating the target calculation number and the target communication number based on the grid division result of each layer of target nested region and the iteration times of each layer of target nested region under the target numerical model.
In one embodiment, the target simulation setup data may further include a simulation duration for each layer of target nesting area; based on the above, when determining the iteration times of each layer of target nested region under the target numerical model, the electronic device may determine a reference time integral step length and a reference spatial resolution corresponding to the target numerical model, and calculate a time integral step length of each layer of target nested region under the target numerical model based on the reference time integral step length, the reference spatial resolution and the spatial resolution of each layer of target nested region; specifically, for the mth layer target nesting area in the M layer target nesting area, the electronic device may calculate a time integration step length of the mth layer target nesting area under the target numerical model by using formula 1.1, M e [1, M ]:
dtm_d=dt× DXm _d/DX 1.1
Wherein, dtm_d is the time integration step length of the m-th layer target nested region under the target numerical model, DT is the reference time integration step length, DX is the reference spatial resolution, DXm _d is the spatial resolution of the m-th layer target nested region. Illustratively, dt1_d may represent a time integration step of the layer 1 target nesting region under the target numerical model, and dx1_d may represent a spatial resolution of the layer 1 target nesting region.
Further, the iteration times of each layer of target nested region under the target numerical model can be determined based on the time integral step length of each layer of target nested region under the target numerical model and the simulation time length of each layer of target nested region. Specifically, for the mth layer target nesting area in the M layer target nesting areas, the electronic device may calculate the iteration number of the mth layer target nesting area under the target numerical model by adopting formula 1.2:
num_t_m= FTm _d×3600/dtm_d 1.2
Wherein num_t_m is the iteration number of the mth layer target nesting region under the target numerical model, FTm _d is the simulation duration of the mth layer target nesting region, wherein the unit of the time integration step length can be seconds, and the formula 1.2 is illustrated by taking the unit of the simulation duration of the mth layer target nesting region as an example; alternatively, when the unit of the analog time length of the m-th layer target nest area is seconds, equation 1.2 may not be multiplied by 3600 to convert the unit of the analog time length from hours to seconds.
In the embodiment of the present invention, the reference time integration step length and the reference spatial resolution may be determined based on reference analog setting data, where the reference analog setting data includes the spatial resolution of each layer of reference nesting area in N layers of reference nesting areas, and N is a positive integer; based on the above, when determining the reference time integration step length and the reference spatial resolution corresponding to the target numerical model, the electronic device may select a layer of reference nesting region from the N layers of reference nesting regions, and use the spatial resolution of the selected reference nesting region as the reference spatial resolution corresponding to the target numerical model; then, the time integral step length of the selected reference nested region under the target numerical model can be determined, and the time integral step length of the selected reference nested region under the target numerical model is used as the reference time integral step length corresponding to the target numerical model. Optionally, the time integral step length of any reference nested region under the target numerical model may be a multiplication result between a step length coefficient corresponding to the target numerical model and the spatial resolution of any reference nested region, or may be a preset time integral step length corresponding to the target numerical model; the invention is not limited in this regard; alternatively, the step size coefficient or the preset time integration step size corresponding to a numerical model may be set empirically, or may be set according to actual requirements, which is not limited in the present invention.
For example, taking WRF, NAQPMS, CMAQ, CAMx and WRFCHEM as target numerical models, respectively, assume WRF, CMAQ, CAMx and WRFCHEM have step coefficients of 6, 540/27, 600/27 and 6, respectively, and assume that the predetermined time integration step corresponding to NAQPMS is 300; in this case, when the target numerical model is WRF, the reference time integration step dt=6×dx; dt=300 (independent of DX) when the target numerical model is NAQPMS; when the target numerical model is CMAQ, dt=540×dx/27; when the target numerical model is CAMx, dt=600×dx/27; when the target numerical model is WRFCHEM, dt=6×dx, and so on.
In another embodiment, the target simulation setting data may also include an iteration number of each layer of the target nested region under the target numerical model, based on which, when determining the iteration number of each layer of the target nested region under the target numerical model, the electronic device may determine the iteration number of each layer of the target nested region under the target numerical model from the target simulation setting data. In yet another embodiment, the target simulation setting data may also include a time integration step size of each layer of the target nesting area under the target numerical model and a simulation duration of each layer of the target nesting area, based on which, in determining the number of iterations of each layer of the target nesting area under the target numerical model, the electronic device may determine the time integration step size of each layer of the target nesting area under the target numerical model from the target simulation setting data, and determine the number of iterations of each layer of the target nesting area under the target numerical model based on the time integration step size of each layer of the target nesting area under the target numerical model and the simulation duration of each layer of the target nesting area, and so on.
Further, when the target calculation amount and the target communication amount are calculated based on the mesh division result of each layer of target nesting area and the iteration number of each layer of target nesting area under the target numerical model, the electronic device can determine the mesh amount in any one of the target nesting areas based on the mesh division result of any one of the target nesting areas, and calculate the area calculation total amount under any one of the target nesting areas by adopting the mesh amount in any one of the target nesting areas and the iteration number of any one of the target nesting areas under the target numerical model, so as to realize the calculation target calculation amount, wherein the target calculation amount is the sum of the area calculation total amount under each layer of target nesting area. Specifically, the mesh division result of any target nesting area may be used to indicate the number of transverse meshes, the number of longitudinal meshes and the number of vertical layers of any nesting area, so that the electronic device may determine the number of meshes of any target nesting area by using the number of transverse meshes, the number of longitudinal meshes and the number of vertical layers of any target nesting area, that is, the number of meshes of any target nesting area may be equal to the multiplication result between the number of transverse meshes, the number of longitudinal meshes and the number of vertical layers of any target nesting area.
In the embodiment of the invention, the electronic equipment can carry out multiplication operation on the grid number in any target nested region and the iteration times of any target nested region under the target numerical model so as to obtain the region calculation total amount under any target nested region; at this time, ncm_d= NXm _d× NYm _d× NZm _d×num_t_m, where ncm_d may represent the total amount of region computation under the mth layer target nesting region, NXm _d may represent the number of transverse meshes of the mth layer target nesting region, NYm _d may represent the number of longitudinal meshes of the mth layer target nesting region, and NZm _d may represent the number of vertical layers of the mth layer target nesting region. Alternatively, if the number of vertical layers in each layer of the target nesting area is the same, NZ or nz_d may be used to represent the number of vertical layers in each layer of the target nesting area.
Based on the calculation, the electronic equipment can perform summation operation on the total calculation amount of the area under each layer of target nested area so as to obtain the target calculation amount; for example, assume that M has a value of 2, where NC may be equal to NC1_d+NC2_d, where NC may represent the target calculation amount.
Correspondingly, the electronic device can determine the communication quantity in any target nesting region based on the mesh division result of any target nesting region, and calculate the regional communication quantity in any target nesting region by adopting the communication quantity in any target nesting region and the iteration times of any target nesting region under the target numerical model so as to calculate the target communication quantity, wherein the target communication quantity is the sum of the regional communication quantity in each layer of target nesting region. Specifically, the electronic device may determine the communication quantity in any target nesting area by using the number of transverse grids, the number of longitudinal grids and the number of vertical layers in any target nesting area, and perform multiplication operation on the communication quantity in any target nesting area and the iteration number of any target nesting area under the target numerical model, so as to obtain the total area communication quantity under any target nesting area; in this case, nnm_d= (NXm _d× NYm _d+ NXm _d× NZm _d+ NYm _d× NZm _d) ×num_t_m, where nnm_d may represent the total amount of area communication under the m-th layer target nesting area.
Based on the method, the electronic equipment can perform summation operation on the total area communication quantity under each layer of target nested area so as to obtain target communication quantity; for example, assume that M has a value of 2, where NN may be equal to nn1_d+nn2_d, where NN may represent the target total amount of communication.
S304, acquiring reference simulation setting data, wherein the reference simulation setting data comprises reference region indication information of a reference simulation region and spatial resolution of each layer of reference nesting region in N layers of reference nesting regions, and N is a positive integer.
Optionally, the reference analog setting data may be downloaded based on a reference download link, may be selected from a plurality of analog setting data stored in the electronic device itself, may be randomly generated, and so on; the invention is not limited in this regard. Alternatively, the reference area indication information may be longitude and latitude information for indicating a reference analog area, or may be an area identifier of the reference analog area, which is not limited in the present invention; alternatively, the reference analog region may be any analog region, which is not limited in the present invention. Alternatively, the number of reference analog regions may be one or more; when the number of the reference simulation areas is one, each layer of reference nesting area can correspond to the same reference simulation area; when the number of the reference simulation areas is plural, any two layers of reference nested areas may correspond to the same reference simulation area, may correspond to different reference simulation areas, and so on.
S305, determining a grid division result of each layer of reference nested region based on the reference region indication information and the spatial resolution of each layer of reference nested region.
Similarly, the electronic device may determine the region size of the reference simulation region based on the reference region indication information, thereby determining the meshing result of each layer of reference nesting region based on the region size of the reference simulation region and the spatial resolution of each layer of reference nesting region. Optionally, when the number of the reference simulation areas is plural, for any reference nesting area in the N-layer reference nesting areas, the electronic device may determine an area size of any reference nesting area (i.e., an area size of the reference simulation area corresponding to any reference nesting area) based on the reference area indication information of the reference simulation area corresponding to any reference nesting area, thereby determining a meshing result of any reference nesting area based on the area size and the spatial resolution of any reference nesting area. For ease of illustration, a reference simulation area will be described as an example.
Optionally, the electronic device may further determine central point position information of any reference nesting area based on the reference area indication information, and start to spread outwards from the central point indicated by the central point position information according to the spatial resolution of any reference nesting area until grid division of any reference nesting area is completed, so as to obtain a grid division result of any reference nesting area.
S306, determining reference calculation time consumption and reference communication time consumption of each device configuration scheme in the plurality of device configuration schemes, wherein the reference calculation time consumption and the reference communication time consumption of one device configuration scheme are statistical results of numerical simulation on the reference simulation scene under the reference simulation setting data through the target numerical model under the corresponding device configuration scheme.
Specifically, for any one of the multiple device configuration schemes, after the P devices (i.e., P devices) call the target numerical model to perform numerical simulation on the reference simulation scenario, the electronic device may count reference calculation time and reference communication time for performing numerical simulation on the reference simulation scenario by the target numerical model under any one device configuration scheme, so as to obtain reference calculation time and reference communication time for any one device configuration scheme, where P may be equal to the number of devices indicated by any one device configuration scheme.
For example, assuming that the number of devices indicated by any device configuration scheme is 2, the embodiment of the present invention may invoke the target numerical model to perform numerical simulation on the reference simulation scenario through 2 devices, so that after the 2 devices complete numerical simulation on the reference simulation scenario, the electronic device may count the reference calculation time consumption and the reference communication time consumption of any device configuration scheme.
Optionally, the target numerical model may include a plurality of buried points, so that the device performing numerical simulation may monitor the calculation module and the communication module in the target numerical model through each buried point, so as to output at least one calculation time data corresponding to the calculation module and at least one communication time data corresponding to the communication module in the numerical simulation process. Optionally, the calculation time data may include a calculation time length required for executing the calculation module once, or may include a start calculation time and an end calculation time for executing the calculation module once, which is not limited in the embodiment of the present invention; alternatively, the communication time data may include a communication duration required for executing the primary communication module, or may include a start communication time and an end communication time for executing the primary communication module, which is not limited in the present invention; the difference between the ending calculation time and the starting calculation time in one calculation time data is the calculation time length corresponding to the corresponding calculation time data, and the difference between the ending communication time and the starting communication time in one communication time data is the communication time length corresponding to the corresponding communication time data.
Based on the above, the electronic device may acquire at least one calculation time data and at least one communication time data output by any one device of the P devices, so as to count reference calculation time consumption and reference communication time consumption of performing numerical simulation on the reference simulation scenario through the target numerical model under any device configuration scheme. Specifically, the electronic device may determine at least one calculation time length corresponding to any device based on at least one calculation time data output by any device, and perform a summation operation on at least one calculation time length corresponding to any device, so as to obtain reference calculation time consumption of performing numerical simulation on a reference simulation scenario through a target numerical model under any device configuration scheme, so as to obtain reference calculation time consumption of any device configuration scheme; correspondingly, at least one communication duration corresponding to any equipment can be determined based on at least one communication time data output by any equipment, and summation operation is carried out on at least one communication duration corresponding to any equipment to obtain reference communication time consumption of any equipment configuration scheme.
Optionally, the electronic device may also use at least one calculation time data and at least one communication time data output by each device in the plurality of devices included in the P devices, and count a reference calculation time and a reference communication time for performing numerical simulation on the reference simulation scenario through the target numerical model under any device configuration scheme; in this case, the electronic device may determine at least one calculation duration and at least one communication duration corresponding to each device in the plurality of devices, respectively, so as to count calculation duration summation operation results and communication duration summation operation results corresponding to each device in the plurality of devices, so as to perform average operation on calculation duration summation operation results corresponding to each device in the plurality of devices, obtain reference calculation time consumption of any device configuration scheme, perform average operation on communication duration summation operation results corresponding to each device in the plurality of devices, obtain reference communication time consumption of any device configuration scheme, and so on.
By way of example, assuming that the plurality of device configuration schemes includes a device configuration scheme for indicating a number of devices 1, a device configuration scheme for indicating a number of devices 2, and a device configuration scheme for indicating a number of devices 3, and assuming that the simulation duration of the reference simulation scenario is 6 hours, the embodiment of the present invention may test the running time of 6 hours using 1 device, 2 devices, and 3 devices, respectively, thereby counting reference calculation time periods CT1, CT2, CT3 of 3 sets of tests, respectively, and counting reference communication time periods NT1, NT2, NT3 of 3 sets of tests, respectively. In an embodiment of the present invention, CTq may represent a reference computation time of a Q-th device configuration scheme of the plurality of device configuration schemes, NTq may represent a reference communication time of the Q-th device configuration scheme, Q e [1, Q ], Q being equal to the number of device configuration schemes of the plurality of device configuration schemes.
S307, determining unit time consumption data under each device configuration scheme based on the reference calculation time consumption and the reference communication time consumption of each device configuration scheme and the grid division result of each layer of reference nesting area, wherein one unit time consumption data comprises unit calculation quantity time consumption and unit communication quantity time consumption under the corresponding device configuration scheme.
In the embodiment of the invention, the reference simulation setting data can also comprise the simulation duration of each layer of reference nesting area; based on the above, when determining unit time consumption data under each device configuration scheme based on reference calculation time consumption and reference communication time consumption of each device configuration scheme and grid division result of each layer of reference nesting region, the electronic device may determine a time integration step size of each layer of reference nesting region under the target numerical model; specifically, for the nth layer reference nesting area in the nth layer reference nesting area, the electronic device may determine a time integration step size of the nth layer reference nesting area under the target numerical model based on a step size coefficient corresponding to the target numerical model and a spatial resolution of the nth layer reference nesting area, where DTn (i.e., a time integration step size of the nth layer reference nesting area under the target numerical model) may be equal to a×dxn, where a is a step size coefficient corresponding to the target numerical model, DXn is a spatial resolution of the nth layer reference nesting area, and N e [1, N ]. Optionally, the electronic device may also determine a time integration step of the nth layer reference nesting area under the target numerical model based on a preset time integration step corresponding to the target numerical model, and so on.
Then, the electronic device may calculate the unit calculation amount time consuming under each device configuration scheme based on the reference calculation time consuming of each device configuration scheme, the mesh division result and the simulation duration of each layer of reference nesting region, and the time integration step length of each layer of reference nesting region under the target numerical model. Specifically, for the q-th device configuration scheme in the multiple device configuration schemes, the electronic device may use formula 1.3, and the unit calculation amount of calculating the q-th device configuration scheme is time-consuming:
UCTq= CTq/Σ (NXn× NYn × NZn × FTn ×3600/DTn) 1.3
Wherein, the UCTq is the unit calculation amount time consuming of the q-th device configuration scheme, CTq is the reference calculation time consuming of the q-th device configuration scheme, NXn is the transverse grid amount of the n-th layer reference nesting area, NYn is the longitudinal grid amount of the n-th layer reference nesting area, NZn is the vertical layer number of the n-th layer reference nesting area, and FTn is the simulation time length of the n-th layer reference nesting area. Alternatively, NZ may be used to represent the number of vertical layers in each layer of the reference nesting area when the number of vertical layers in each layer of the reference nesting area is the same. It should be understood that equation 1.3 is illustrated by taking the unit of analog time length as an example of hours, and the invention is not limited thereto; for example, equation 1.3 may not be multiplied by 3600 when the unit of analog time length is seconds. The nxn× NYn × NZn × FTn ×3600/DTn may refer to a total amount of area calculation under an nth layer of reference nesting area, that is, the electronic device may perform a summation operation on the total amount of area calculation under each layer of reference nesting area in the N layer of reference nesting area to obtain a reference calculation amount, and perform a division operation on the reference calculation time consumption and the reference calculation amount of the q-th device configuration scheme to obtain a unit calculation amount time consumption of the q-th device configuration scheme (that is, a unit calculation amount time consumption under the q-th device configuration scheme).
Correspondingly, the electronic device can calculate the time consumption of the unit communication quantity under each device configuration scheme based on the reference communication time consumption of each device configuration scheme, the grid division result and the simulation time length of each layer of reference nesting area and the time integration step length of each layer of reference nesting area under the target numerical model, so as to determine the unit time consumption data under each device configuration scheme. Specifically, for the q-th device configuration scheme in the multiple device configuration schemes, the electronic device may use equation 1.4, and it takes time to calculate the unit communication number of the q-th device configuration scheme:
untq= NTq/Σ ((nxn× NYn +nxn× NZn + NYn × NZn) × FTn ×3600/DTn) formula 1.4
Where UNTq is the unit communication quantity time consuming of the q-th device configuration scheme, and NTq is the reference communication time consuming of the q-th device configuration scheme. It should be understood that equation 1.4 is illustrated by way of example in terms of hours of analog time duration, and the invention is not limited in this regard; for example, equation 1.4 may not be multiplied by 3600 when the unit of analog time length is seconds. Wherein, (nxn× NYn +nxn× NZn + NYn × NZn) × FTn ×3600/DTn may refer to a total amount of area communication under the N-th layer reference nesting area, that is, the electronic device may perform a summation operation on the total amount of area communication under each layer of reference nesting area in the N-th layer reference nesting area to obtain a reference communication number, and perform a division operation on the reference communication time consumption and the reference communication number of the q-th device configuration scheme, thereby obtaining a unit communication number time consumption of the q-th device configuration scheme (that is, a unit communication number time consumption under the q-th device configuration scheme).
In other embodiments, the unit time consumption data under each device configuration scheme may also be stored in the storage space of the electronic device itself, that is, the electronic device may store the unit time consumption data under each device configuration scheme; in this case, the electronic device may determine the unit time consumption data under each device configuration scheme from the unit time consumption data stored in the electronic device, that is, the electronic device may directly determine the unit time consumption data under each device configuration scheme; alternatively, the electronic device may directly obtain the unit time consumption data under each device configuration scheme from other devices storing the unit time consumption data under each device configuration scheme, so as to determine the unit time consumption data under each device configuration scheme, and so on. In this case, the electronic apparatus may not perform steps S304 to S307.
Alternatively, the electronic device may store the reference computation time and the reference communication time of each device configuration scheme, and the meshing result of each layer of the reference nesting area, and then the electronic device may directly determine the reference computation time and the reference communication time of each device configuration scheme, and determine the meshing result of each layer of the reference nesting area, thereby determining unit time consumption data under each device configuration scheme, and so on, based on the reference computation time and the reference communication time of each device configuration scheme, and the meshing result of each layer of the reference nesting area. In this case, the electronic apparatus may not perform step S304 and step S305, and so on.
S308, calculating the operation time length under each equipment configuration scheme based on the unit time consumption data, the target calculation number and the target communication number under each equipment configuration scheme.
Specifically, for any one of the multiple device configuration schemes, the electronic device may multiply the unit computation time consumption and the target computation time consumption under the any one device configuration scheme to obtain a target computation time consumption under the any one device configuration scheme, where one target computation time consumption refers to a computation time required for performing numerical simulation on the target simulation scene according to the corresponding device configuration scheme and the target numerical model, that is, one target computation time consumption refers to a computation time required for performing numerical simulation on the target simulation scene by invoking the target numerical model by the device corresponding to the corresponding device configuration scheme, that is, refers to a computation time (that is, a computation time required for performing numerical simulation on the target simulation scene by invoking the target numerical model by the device with the number of devices indicated by the corresponding device configuration scheme). In this case, the target calculation time in the q-th device configuration scheme CTq _d=nc×ucctq.
Correspondingly, the electronic device may multiply the unit communication number time consumption and the target communication number under any device configuration scheme to obtain a target communication time consumption under any device configuration scheme, where one target communication time consumption refers to a communication time required for performing numerical simulation on a target simulation scenario according to the corresponding device configuration scheme and the target numerical model, that is, one target communication time consumption refers to a communication time required for invoking the target numerical model by a device corresponding to the corresponding device configuration scheme to perform numerical simulation on the target simulation scenario, that is, refers to a communication time (that is, a communication duration) required for invoking the target numerical model to perform numerical simulation on the target simulation scenario by a device with the number of devices being the number of devices indicated by the corresponding device configuration scheme. In this case, the target communication time in the q-th device configuration scheme NTq _d=nn×untq.
Further, the electronic device may perform a summation operation on the target computation time consumption and the target communication time consumption under any device configuration scheme, so as to obtain the operation duration under any device configuration scheme, as shown in fig. 4. In this case, the operation duration TTq = CTq _d+ NTq _d in the q-th device configuration scheme.
S309, selecting a target device configuration scheme from a plurality of device configuration schemes based on the operation time length and the expected calculation time length under each device configuration scheme, wherein the target device configuration scheme is used for indicating the number of devices adapted when the target simulation scene under the target simulation setting data performs numerical simulation through the target numerical model.
Optionally, the electronic device may further perform numerical simulation on the target simulation scenario through the target numerical model based on the target device configuration scheme, where the number of scheduled devices is the number of devices indicated by the target device configuration scheme (i.e., the number of devices indicated by the target device configuration scheme); that is, the electronic device may cause the number of devices indicated by the target device configuration scheme to numerically simulate the target simulation scenario through the target numerical model.
In summary, the electronic device may be a device in an interactive simulation system, and the embodiment of the present invention may be actually applied in the interactive simulation system; when a user (i.e., a target object) of the system self-defines a simulation area, a spatial resolution and a simulation time length (i.e., target simulation setting data are set), the electronic device can automatically estimate the number of devices adapted by the self-defined scene simulation according to the expected calculation time length expected by the target object. Then, the simulation cases (namely, target simulation scenes) of the user are operated by the estimated equipment number (namely, the equipment number indicated by the target equipment configuration scheme), the technical barriers of the equipment number set by the user are broken, and meanwhile, the functions of maximizing the utilization efficiency of computing resources and minimizing the case simulation time are achieved. Therefore, the embodiment of the invention can enable the interactive simulation system to support the functions of flexibly carrying out the size setting, the spatial resolution setting, the simulation scene setting, the meteorological/air quality simulation at any time and the like of the simulation area of the numerical model, thereby controlling the operation of the numerical model system (namely controlling the number of the devices to carry out the numerical simulation) in an interactive mode through a foreground (such as the data setting interface mentioned above), greatly reducing the use threshold of the numerical model and improving the use flexibility.
According to the embodiment of the invention, after the target simulation setting data are acquired, the grid division result of each layer of target nested area is determined based on the target area indication information and the spatial resolution of each layer of target nested area, wherein the target simulation setting data comprise the target area indication information of the target simulation area, the spatial resolution of each layer of target nested area in the M layers of target nested areas and expected calculation time; and determining the iteration times of each layer of target nested region under the target numerical model, so as to respectively calculate the target calculation number and the target communication number based on the grid division result of each layer of target nested region and the iteration times of each layer of target nested region under the target numerical model. Correspondingly, after the reference simulation setting data are acquired, determining a grid division result of each layer of reference nesting area based on the reference area indication information and the spatial resolution of each layer of reference nesting area respectively, wherein the reference simulation setting data comprise the reference area indication information of the reference simulation area and the spatial resolution of each layer of reference nesting area in the N layers of reference nesting areas; and determining reference calculation time consumption and reference communication time consumption of each device configuration scheme in the plurality of device configuration schemes, wherein the reference calculation time consumption and the reference communication time consumption of one device configuration scheme are statistical results of numerical simulation on the reference simulation scene under the reference simulation setting data through the target numerical model under the corresponding device configuration scheme. Based on the above, the unit time consumption data under each device configuration scheme can be determined based on the reference calculation time consumption and the reference communication time consumption of each device configuration scheme and the grid division result of each layer of reference nesting area, and the operation duration under each device configuration scheme is calculated based on the unit time consumption data, the target calculation number and the target communication number under each device configuration scheme respectively, wherein one unit time consumption data comprises the unit calculation number time consumption and the unit communication number time consumption under the corresponding device configuration scheme; further, a target device configuration scheme may be selected from the plurality of device configuration schemes based on the operation time length and the expected calculation time length under each device configuration scheme, where the target device configuration scheme is used to indicate the number of devices adapted when the target simulation scenario under the target simulation setting data performs numerical simulation through the target numerical model. Therefore, the embodiment of the invention designs the analog computation amount conversion relation with different analog region sizes and different spatial resolutions, and can quickly and automatically estimate the optimal equipment quantity configuration according to the self-defined analog scene on the basis of a set of known reference operation test results (such as unit time-consuming data under each equipment configuration scheme), thereby conveniently determining the target equipment configuration scheme, improving the estimation efficiency, effectively reducing the consumption of test resources, saving the calculation resources and reducing the test estimation threshold.
Based on the description of the related embodiments of the device configuration method of the interactive numerical simulation, the embodiments of the present invention further provide a device configuration apparatus of the interactive numerical simulation, where the device configuration apparatus of the interactive numerical simulation may be a computer program (including program code) running in an electronic device; as shown in fig. 5, the device configuration apparatus of the interactive numerical simulation may include an acquisition unit 501 and a processing unit 502. The device configuration means of the interactive numerical simulation may perform the device configuration method of the interactive numerical simulation shown in fig. 1 or 3, i.e. the device configuration means of the interactive numerical simulation may run the above-mentioned units:
an obtaining unit 501, configured to obtain target simulation setting data, where the target simulation setting data includes target area indication information of a target simulation area, spatial resolution of each layer of target nesting area in M layers of target nesting areas, and a desired calculation duration, and M is a positive integer; wherein the target simulation setting data is acquired through a data setting operation performed by a target object;
a processing unit 502, configured to determine a meshing result of the target nesting area of each layer based on the target area indication information and the spatial resolution of the target nesting area of each layer, respectively;
The processing unit 502 is further configured to determine an iteration number of the target nested region of each layer under a target numerical model, and calculate a target calculation number and a target communication number based on a mesh division result of the target nested region of each layer and the iteration number of the target nested region of each layer under the target numerical model;
the processing unit 502 is further configured to determine unit time consumption data under each device configuration scheme of the multiple device configuration schemes, and calculate an operation duration under each device configuration scheme based on the unit time consumption data under each device configuration scheme, the target calculation number, and the target communication number, where one unit time consumption data includes unit calculation number time consumption and unit communication number time consumption under the corresponding device configuration scheme;
the processing unit 502 is further configured to select a target device configuration scheme from the multiple device configuration schemes based on the operation duration and the expected calculation duration under the respective device configuration schemes, where the target device configuration scheme is used to indicate the number of devices adapted when the target simulation scenario under the target simulation setting data performs numerical simulation through the target numerical model.
In one embodiment, the processing unit 502, when determining unit time-consuming data under each of the plurality of device configurations, may be specifically configured to:
acquiring reference simulation setting data, wherein the reference simulation setting data comprises reference region indication information of a reference simulation region and spatial resolution of each layer of reference nesting region in N layers of reference nesting regions, and N is a positive integer;
determining a grid division result of each layer of reference nesting area based on the reference area indication information and the spatial resolution of each layer of reference nesting area respectively;
determining reference calculation time consumption and reference communication time consumption of each device configuration scheme in a plurality of device configuration schemes, wherein the reference calculation time consumption and the reference communication time consumption of one device configuration scheme are statistical results of numerical simulation on the reference simulation scene under the reference simulation setting data through the target numerical model under the corresponding device configuration scheme;
and determining unit time consumption data under each device configuration scheme based on the reference calculation time consumption and the reference communication time consumption of each device configuration scheme and the grid division result of each layer of reference nesting area.
In another embodiment, the reference simulation setting data further includes a simulation duration of the reference nesting area of each layer; the processing unit 502 may be specifically configured to, when determining the unit time consumption data under each device configuration scheme based on the reference calculation time consumption and the reference communication time consumption of each device configuration scheme and the meshing result of the reference nesting area of each layer:
determining the time integral step length of each layer of reference nesting area under the target numerical model;
calculating the time consumption of unit calculation quantity under each equipment configuration scheme based on the reference calculation time consumption of each equipment configuration scheme, the grid division result and the simulation time length of each layer of reference nesting region and the time integration step length of each layer of reference nesting region under the target numerical model;
and calculating the time consumption of the unit communication quantity under each equipment configuration scheme based on the reference communication time consumption of each equipment configuration scheme, the grid division result and the simulation time length of each layer of reference nesting region and the time integration step length of each layer of reference nesting region under the target numerical model so as to determine the unit time consumption data under each equipment configuration scheme.
In another embodiment, when the processing unit 502 calculates the operation duration under each device configuration scheme based on the unit time consumption data, the target calculation number and the target communication number under each device configuration scheme, the processing unit may be specifically configured to:
multiplying the time consumption of the unit calculation quantity under any equipment configuration scheme and the target calculation quantity aiming at any equipment configuration scheme in the plurality of equipment configuration schemes to obtain the target calculation time consumption under any equipment configuration scheme, wherein one target calculation time consumption refers to the calculation time required by carrying out numerical simulation on the target simulation scene according to the corresponding equipment configuration scheme and the target numerical model;
multiplying the unit communication quantity time consumption and the target communication quantity under any equipment configuration scheme to obtain target communication time consumption under any equipment configuration scheme, wherein one target communication time consumption refers to communication time required by carrying out numerical simulation on the target simulation scene according to the corresponding equipment configuration scheme and the target numerical model;
and carrying out summation operation on the target calculation time consumption and the target communication time consumption under any equipment configuration scheme to obtain the operation time length under any equipment configuration scheme.
In another embodiment, the target simulation setting data further includes a simulation duration of the target nesting area of each layer; the processing unit 502 may be specifically configured to, when determining the iteration number of the target nested region of each layer under the target numerical model:
determining a reference time integration step length and a reference spatial resolution corresponding to a target numerical model, and calculating the time integration step length of each layer of target nested region under the target numerical model based on the reference time integration step length, the reference spatial resolution and the spatial resolution of each layer of target nested region;
and determining the iteration times of each layer of target nested region under the target numerical model based on the time integral step length of each layer of target nested region under the target numerical model and the simulation time length of each layer of target nested region.
In another embodiment, the reference time integration step and the reference spatial resolution are determined based on reference analog setting data including the spatial resolution of each of N layers of reference nesting areas, N being a positive integer; the processing unit 502 may be specifically configured to, when determining the reference time integration step size and the reference spatial resolution corresponding to the target numerical model:
Selecting a layer of reference nesting area from the N layers of reference nesting areas, and taking the spatial resolution of the selected reference nesting area as the reference spatial resolution corresponding to the target numerical model;
and determining the time integral step length of the selected reference nesting region under the target numerical model, and taking the time integral step length of the selected reference nesting region under the target numerical model as the corresponding reference time integral step length of the target numerical model.
In another embodiment, the processing unit 502 may be specifically configured to, when calculating the target calculation number and the target communication number based on the mesh division result of the target nesting area of each layer and the iteration number of the target nesting area of each layer under the target numerical model, respectively:
determining the grid number in any target nested region based on the grid division result of any target nested region aiming at any target nested region in the M layers of target nested regions, and calculating the total area calculation amount in any target nested region by adopting the grid number in any target nested region and the iteration number of any target nested region under the target numerical model so as to realize the calculated target calculation amount, wherein the target calculation amount is the sum of the area calculation amounts in each layer of target nested region;
And determining the communication quantity in any target nesting region based on the mesh division result of any target nesting region, and calculating the regional communication total quantity in any target nesting region by adopting the communication quantity in any target nesting region and the iteration times of any target nesting region under the target numerical model so as to realize calculation of the target communication quantity, wherein the target communication quantity is the sum of the regional communication total quantity in each layer of target nesting region.
According to one embodiment of the invention, the steps involved in the method of fig. 1 or 3 may be performed by the units of the device configuration apparatus of the interactive numerical simulation of fig. 5. For example, step S101 shown in fig. 1 may be performed by the acquisition unit 501 shown in fig. 5, and steps S102 to S105 may each be performed by the processing unit 502 shown in fig. 5. As another example, step S301 shown in fig. 3 may be performed by the acquisition unit 501 shown in fig. 5, steps S302-S309 may each be performed by the processing unit 502 shown in fig. 5, and so on.
According to another embodiment of the present invention, each unit in the device configuration apparatus for interactive numerical simulation shown in fig. 5 may be separately or completely combined into one or several other units, or some unit(s) thereof may be further split into a plurality of units with smaller functions, which may achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present invention. The above units are divided based on logic functions, and in practical applications, the functions of one unit may be implemented by a plurality of units, or the functions of a plurality of units may be implemented by one unit. In other embodiments of the present invention, any of the interactive numerical simulation device configuration apparatuses may also include other units, and in practical applications, these functions may also be implemented with assistance from other units, and may be implemented by cooperation of multiple units.
According to another embodiment of the present invention, a device configuration apparatus of an interactive numerical simulation as shown in fig. 5 may be constructed by running a computer program (including program code) capable of executing the steps involved in the respective methods as shown in fig. 1 or 3 on a general-purpose electronic device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and the like, and a storage element, and a device configuration method of an interactive numerical simulation implementing an embodiment of the present invention. The computer program may be recorded on, for example, a computer storage medium, and loaded into and run in the above-described electronic device through the computer storage medium.
According to the embodiment of the invention, after the target simulation setting data are acquired, the grid division result of each layer of target nested area is determined based on the target area indication information and the spatial resolution of each layer of target nested area, wherein the target simulation setting data comprise the target area indication information of the target simulation area, the spatial resolution of each layer of target nested area in M layers of target nested areas and expected calculation time length, and M is a positive integer. Then, the iteration times of each layer of target nested region under the target numerical model can be determined, and the target calculation number and the target communication number are calculated respectively based on the grid division result of each layer of target nested region and the iteration times of each layer of target nested region under the target numerical model; further, unit time consumption data under each device configuration scheme in the multiple device configuration schemes can be determined, and the operation duration under each device configuration scheme is calculated based on the unit time consumption data, the target calculation number and the target communication number under each device configuration scheme, wherein one unit time consumption data comprises the unit calculation number time consumption and the unit communication number time consumption under the corresponding device configuration scheme. Based on this, a target device configuration scheme for indicating the number of devices adapted when the target simulation scenario under the target simulation setting data is numerically simulated by the target numerical model may be selected from the plurality of device configuration schemes based on the operation time length and the expected calculation time length under the respective device configuration schemes. Therefore, when the configuration scheme of the target equipment is determined, multiple groups of tests do not need to be carried out again, and the configuration scheme of the target equipment can be determined conveniently, so that the estimation efficiency is improved, the consumption of test resources can be reduced effectively, and the calculation resources are saved; in addition, the target simulation setting data may be acquired through a data setting operation performed by the target object, so that device configuration of the interactive numerical simulation may be realized.
Based on the description of the method embodiment and the apparatus embodiment, the exemplary embodiment of the present invention further provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor. The memory stores a computer program executable by the at least one processor for causing the electronic device to perform a method according to an embodiment of the invention when executed by the at least one processor.
The exemplary embodiments of the present invention also provide a non-transitory computer readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is for causing the computer to perform a method according to an embodiment of the present invention.
The exemplary embodiments of the invention also provide a computer program product comprising a computer program, wherein the computer program, when being executed by a processor of a computer, is for causing the computer to perform a method according to an embodiment of the invention.
Referring to fig. 6, a block diagram of an electronic device 600 that may be a server or a client of the present invention will now be described, which is an example of a hardware device that may be applied to aspects of the present invention. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the electronic device 600 are connected to the I/O interface 605, including: an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. The input unit 606 may be any type of device capable of inputting information to the electronic device 600, and the input unit 606 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device. The output unit 607 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. Storage unit 608 may include, but is not limited to, magnetic disks, optical disks. The communication unit 609 allows the electronic device 600 to exchange information/data with other devices through a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above. For example, in some embodiments, the device configuration method of the interactive numerical simulation may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 600 via the ROM 602 and/or the communication unit 609. In some embodiments, the computing unit 601 may be configured by any other suitable means (e.g., by means of firmware) to perform the device configuration method of the interactive numerical simulation.
Program code for carrying out methods of the present invention may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It is also to be understood that the foregoing is merely illustrative of the present invention and is not to be construed as limiting the scope of the invention, which is defined by the appended claims.

Claims (7)

1. A device configuration method for interactive numerical simulation, comprising:
acquiring target simulation setting data, wherein the target simulation setting data comprises target region indication information of a target simulation region, spatial resolution of each layer of target nesting region in M layers of target nesting regions and expected calculation time length, and the target simulation setting data also comprises simulation time length of each layer of target nesting region, and M is a positive integer; wherein the target simulation setting data is acquired through a data setting operation performed by a target object;
determining a grid division result of each layer of target nested region based on the target region indication information and the spatial resolution of each layer of target nested region respectively;
Determining the iteration times of each layer of target nested region under the target numerical model, including:
determining a reference time integration step length and a reference spatial resolution corresponding to a target numerical model, and calculating the time integration step length of each layer of target nested region under the target numerical model based on the reference time integration step length, the reference spatial resolution and the spatial resolution of each layer of target nested region; determining the iteration times of each layer of target nested region under the target numerical model based on the time integral step length of each layer of target nested region under the target numerical model and the simulation time length of each layer of target nested region;
calculating a target calculation number and a target communication number respectively based on the mesh division result of each layer of target nested region and the iteration times of each layer of target nested region under the target numerical model;
determining unit time consumption data under each device configuration scheme in the plurality of device configuration schemes comprises:
acquiring reference simulation setting data, wherein the reference simulation setting data comprises reference region indication information of a reference simulation region and spatial resolution of each layer of reference nesting region in N layers of reference nesting regions, the reference simulation setting data also comprises simulation duration of each layer of reference nesting region, and N is a positive integer; determining a grid division result of each layer of reference nesting area based on the reference area indication information and the spatial resolution of each layer of reference nesting area respectively; determining reference calculation time consumption and reference communication time consumption of each device configuration scheme in a plurality of device configuration schemes, wherein the reference calculation time consumption and the reference communication time consumption of one device configuration scheme are statistical results of numerical simulation on the reference simulation scene under the reference simulation setting data through the target numerical model under the corresponding device configuration scheme; determining unit time consumption data under each device configuration scheme based on the reference calculation time consumption and the reference communication time consumption of each device configuration scheme and the mesh division result of each layer of reference nesting area, wherein the unit time consumption data comprises the following steps:
Determining the time integral step length of each layer of reference nesting area under the target numerical model; calculating the time consumption of unit calculation quantity under each equipment configuration scheme based on the reference calculation time consumption of each equipment configuration scheme, the grid division result and the simulation time length of each layer of reference nesting region and the time integration step length of each layer of reference nesting region under the target numerical model; calculating the time consumption of unit communication quantity under each equipment configuration scheme based on the reference communication time consumption of each equipment configuration scheme, the grid division result and the simulation time length of each layer of reference nesting region and the time integration step length of each layer of reference nesting region under the target numerical model so as to determine the unit time consumption data under each equipment configuration scheme;
calculating the operation duration under each equipment configuration scheme based on the unit time consumption data, the target calculation quantity and the target communication quantity under each equipment configuration scheme respectively, wherein one unit time consumption data comprises unit calculation quantity time consumption and unit communication quantity time consumption under the corresponding equipment configuration scheme;
And selecting a target equipment configuration scheme from the plurality of equipment configuration schemes based on the operation time length under each equipment configuration scheme and the expected calculation time length, wherein the target equipment configuration scheme is used for indicating the number of equipment adapted when the target simulation scene under the target simulation setting data carries out numerical simulation through the target numerical model.
2. The method according to claim 1, wherein the calculating the operation duration under the respective device configuration schemes based on the unit time consumption data, the target calculation amount, and the target communication amount under the respective device configuration schemes, respectively, includes:
multiplying the time consumption of the unit calculation quantity under any equipment configuration scheme and the target calculation quantity aiming at any equipment configuration scheme in the plurality of equipment configuration schemes to obtain the target calculation time consumption under any equipment configuration scheme, wherein one target calculation time consumption refers to the calculation time required by carrying out numerical simulation on the target simulation scene according to the corresponding equipment configuration scheme and the target numerical model;
multiplying the unit communication quantity time consumption and the target communication quantity under any equipment configuration scheme to obtain target communication time consumption under any equipment configuration scheme, wherein one target communication time consumption refers to communication time required by carrying out numerical simulation on the target simulation scene according to the corresponding equipment configuration scheme and the target numerical model;
And carrying out summation operation on the target calculation time consumption and the target communication time consumption under any equipment configuration scheme to obtain the operation time length under any equipment configuration scheme.
3. The method of claim 1, wherein the reference time integration step size and the reference spatial resolution are determined based on reference simulation setup data comprising the spatial resolution of each of N layers of reference nesting areas, N being a positive integer; the determining the reference time integration step length and the reference spatial resolution corresponding to the target numerical model comprises the following steps:
selecting a layer of reference nesting area from the N layers of reference nesting areas, and taking the spatial resolution of the selected reference nesting area as the reference spatial resolution corresponding to the target numerical model;
and determining the time integral step length of the selected reference nesting region under the target numerical model, and taking the time integral step length of the selected reference nesting region under the target numerical model as the corresponding reference time integral step length of the target numerical model.
4. The method according to claim 1, wherein calculating the target calculation number and the target communication number based on the mesh division result of the target nesting area of each layer and the iteration number of the target nesting area of each layer under the target numerical model, respectively, includes:
Determining the grid number in any target nested region based on the grid division result of any target nested region aiming at any target nested region in the M layers of target nested regions, and calculating the total area calculation amount in any target nested region by adopting the grid number in any target nested region and the iteration number of any target nested region under the target numerical model so as to realize the calculated target calculation amount, wherein the target calculation amount is the sum of the area calculation amounts in each layer of target nested region;
and determining the communication quantity in any target nesting region based on the mesh division result of any target nesting region, and calculating the regional communication total quantity in any target nesting region by adopting the communication quantity in any target nesting region and the iteration times of any target nesting region under the target numerical model so as to realize calculation of the target communication quantity, wherein the target communication quantity is the sum of the regional communication total quantity in each layer of target nesting region.
5. An apparatus configuration device for interactive numerical simulation, the device comprising:
The device comprises an acquisition unit, a calculation unit and a calculation unit, wherein the acquisition unit is used for acquiring target simulation setting data, the target simulation setting data comprises target region indication information of a target simulation region, spatial resolution of each layer of target nesting region in M layers of target nesting regions and expected calculation time length, the target simulation setting data also comprises simulation time length of each layer of target nesting region, and M is a positive integer; wherein the target simulation setting data is acquired through a data setting operation performed by a target object;
the processing unit is used for determining a grid division result of each layer of target nested region based on the target region indication information and the spatial resolution of each layer of target nested region respectively;
the processing unit is further configured to determine the iteration number of the target nested region of each layer under the target numerical model, where the method includes: determining a reference time integration step length and a reference spatial resolution corresponding to a target numerical model, and calculating the time integration step length of each layer of target nested region under the target numerical model based on the reference time integration step length, the reference spatial resolution and the spatial resolution of each layer of target nested region; determining the iteration times of each layer of target nested region under the target numerical model based on the time integral step length of each layer of target nested region under the target numerical model and the simulation time length of each layer of target nested region; calculating a target calculation number and a target communication number based on the mesh division result of each layer of target nested region and the iteration times of each layer of target nested region under the target numerical model;
The processing unit is further configured to determine unit time consumption data under each device configuration scheme in the multiple device configuration schemes, where the unit time consumption data includes: acquiring reference simulation setting data, wherein the reference simulation setting data comprises reference region indication information of a reference simulation region and spatial resolution of each layer of reference nesting region in N layers of reference nesting regions, the reference simulation setting data also comprises simulation duration of each layer of reference nesting region, and N is a positive integer; determining a grid division result of each layer of reference nesting area based on the reference area indication information and the spatial resolution of each layer of reference nesting area respectively; determining reference calculation time consumption and reference communication time consumption of each device configuration scheme in a plurality of device configuration schemes, wherein the reference calculation time consumption and the reference communication time consumption of one device configuration scheme are statistical results of numerical simulation on the reference simulation scene under the reference simulation setting data through the target numerical model under the corresponding device configuration scheme; determining unit time consumption data under each device configuration scheme based on the reference calculation time consumption and the reference communication time consumption of each device configuration scheme and the mesh division result of each layer of reference nesting area, wherein the unit time consumption data comprises the following steps: determining the time integral step length of each layer of reference nesting area under the target numerical model; calculating the time consumption of unit calculation quantity under each equipment configuration scheme based on the reference calculation time consumption of each equipment configuration scheme, the grid division result and the simulation time length of each layer of reference nesting region and the time integration step length of each layer of reference nesting region under the target numerical model; calculating the time consumption of unit communication quantity under each equipment configuration scheme based on the reference communication time consumption of each equipment configuration scheme, the grid division result and the simulation time length of each layer of reference nesting region and the time integration step length of each layer of reference nesting region under the target numerical model so as to determine the unit time consumption data under each equipment configuration scheme; calculating the operation duration under each equipment configuration scheme based on the unit time consumption data, the target calculation quantity and the target communication quantity under each equipment configuration scheme respectively, wherein one unit time consumption data comprises the unit calculation quantity time consumption and the unit communication quantity time consumption under the corresponding equipment configuration scheme;
The processing unit is further configured to select a target device configuration scheme from the multiple device configuration schemes based on the operation duration and the expected calculation duration under the respective device configuration schemes, where the target device configuration scheme is used to indicate the number of devices adapted when the target simulation scenario under the target simulation setting data performs numerical simulation through the target numerical model.
6. An electronic device, comprising:
a processor; and
a memory in which a program is stored,
wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the method according to any of claims 1-4.
7. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-4.
CN202311354795.1A 2023-10-19 2023-10-19 Interactive numerical simulation equipment configuration method and device and electronic equipment Active CN117113727B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311354795.1A CN117113727B (en) 2023-10-19 2023-10-19 Interactive numerical simulation equipment configuration method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311354795.1A CN117113727B (en) 2023-10-19 2023-10-19 Interactive numerical simulation equipment configuration method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN117113727A CN117113727A (en) 2023-11-24
CN117113727B true CN117113727B (en) 2024-01-23

Family

ID=88796853

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311354795.1A Active CN117113727B (en) 2023-10-19 2023-10-19 Interactive numerical simulation equipment configuration method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN117113727B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114048610A (en) * 2021-11-15 2022-02-15 中科三清科技有限公司 Data output method and device
CN114416351A (en) * 2021-12-29 2022-04-29 北京百度网讯科技有限公司 Resource allocation method, device, equipment, medium and computer program product

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9483603B2 (en) * 2014-06-02 2016-11-01 Oracle International Corporation Micro-benchmark analysis optimization for microprocessor designs

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114048610A (en) * 2021-11-15 2022-02-15 中科三清科技有限公司 Data output method and device
CN114416351A (en) * 2021-12-29 2022-04-29 北京百度网讯科技有限公司 Resource allocation method, device, equipment, medium and computer program product

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
用微机多核CPU并行方式运转WRF模式;杨仁勇;李勋;李云艳;;贵州气象(06);全文 *

Also Published As

Publication number Publication date
CN117113727A (en) 2023-11-24

Similar Documents

Publication Publication Date Title
Terefe et al. Energy-efficient multisite offloading policy using Markov decision process for mobile cloud computing
CN111475298B (en) Task processing method, device, equipment and storage medium
CN114091617A (en) Federal learning modeling optimization method, electronic device, storage medium, and program product
CN107729138B (en) Method and device for analyzing high-performance distributed vector space data
US11651198B2 (en) Data processing method and apparatus for neural network
CN116703131B (en) Power resource allocation method, device, electronic equipment and computer readable medium
CN113656179A (en) Scheduling method and device of cloud computing resources, electronic equipment and storage medium
CN111143039A (en) Virtual machine scheduling method and device and computer storage medium
CN111311014B (en) Service data processing method, device, computer equipment and storage medium
CN115759444B (en) Power equipment distribution method, device, electronic equipment and computer readable medium
CN115357350A (en) Task configuration method and device, electronic equipment and computer readable medium
CN114330689A (en) Data processing method and device, electronic equipment and storage medium
CN116954932B (en) Air quality mode operation method and device, storage medium and electronic equipment
CN111091138A (en) Irradiation forecast processing method and stacked generalization model training method and device
CN117113727B (en) Interactive numerical simulation equipment configuration method and device and electronic equipment
CN117556879A (en) Simulation method, device, equipment and medium for large model distributed training process
CN116739189A (en) Transmission tracing method and device, storage medium and electronic equipment
CN110347973B (en) Method and device for generating information
CN112699336A (en) Surface runoff watershed space discretization method and device based on eight-direction elevation difference
CN116594762A (en) Method and device for advanced scheduling of dynamic computational graph
CN116594763A (en) Method and device for advanced scheduling of dynamic computational graph
CN106648895A (en) Data processing method and device, and terminal
CN114048610B (en) Data output method and device
CN115220131A (en) Meteorological data quality inspection method and system
CN115269176A (en) Task allocation method, device, computer equipment, storage medium and product

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 Guixia

Inventor after: Qiu Xiaoguo

Inventor after: Zhang Miao

Inventor after: Xie Jun

Inventor after: Zhao Jiangwei

Inventor after: Luo Baogang

Inventor after: Xiao Wei

Inventor after: Zhao Jiaqi

Inventor after: Kang Jian

Inventor before: Zhao Jiangwei

Inventor before: Wang Guixia

Inventor before: Qiu Xiaoguo

Inventor before: Zhang Miao

Inventor before: Xie Jun

Inventor before: Luo Baogang

Inventor before: Xiao Wei

Inventor before: Zhao Jiaqi

Inventor before: Kang Jian

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Shandong Ecological Environment Monitoring Center, No. 3377, Jingshi East Road, Lixia District, Jinan City, Shandong Province, 250000

Patentee after: Shandong ecological environment monitoring center

Country or region after: China

Patentee after: 3CLEAR TECHNOLOGY Co.,Ltd.

Address before: Room 523, 5th floor, building 36, No.8 yard, Dongbei Wangxi Road, Haidian District, Beijing 100193

Patentee before: 3CLEAR TECHNOLOGY Co.,Ltd.

Country or region before: China

Patentee before: Shandong ecological environment monitoring center