Numerical model deployment method, device, storage medium, chip and electronic device

By obtaining and analyzing the target mode deployment indication data, determining the number of synchronous running cores and the target synchronous running cores, performing grid division and recommending indicator calculations, solving the problem of cumbersome and low efficiency in the existing technology, and achieving efficient and accurate numerical model deployment.

CN119782247AActive Publication Date: 2025-04-083CLEAR SCI & TECH CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510252056.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-04-08
Estimated Expiration
2045-03-05

AI Technical Summary

Technical Problem

The prior art is cumbersome to operate, prone to errors and low efficiency during the numerical mode deployment, making it difficult to achieve convenient numerical mode deployment.

Method used

By obtaining the target mode deployment indicator data, including the mesh information of the nested layer and the total number of central processor cores, determine the number of synchronous running cores and the number of target synchronous running cores, meshing based on this information, and calculate the recommended indicator value to determine the target recommended central processor core number.

Benefits of technology

It realizes convenient numerical mode deployment, improves deployment efficiency, reduces errors, and optimizes the operation efficiency of mode business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782247A_ABST
    Figure CN119782247A_ABST
Patent Text Reader

Abstract

The present invention provides a numerical mode deployment method, device, storage medium, chip and electronic device, the method comprising: determining the total number of synchronously running cores based on the total number of central processing unit cores, and determining at least one target number of synchronously running cores based on the total number of synchronously running cores; determining the grid division results corresponding to each target number of synchronously running cores based on each target number of synchronously running cores and each nested layer of grid number information in at least one target number of synchronously running cores, so as to determine a set of to-be-recommended synchronously running core number indication data, thereby calculating the recommended index value of each to-be-recommended number of synchronously running cores, and determining the target number of to-be-recommended cores based on the recommended index value of each to-be-recommended number of synchronously running cores, so as to determine the target recommended number of central processing unit cores under the target mode deployment indication data. The embodiment of the present invention can conveniently perform numerical mode deployment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a numerical model deployment method, device, storage medium, chip and electronic device. Background Art

[0002] At present, there is a lot of deployment work in air quality business forecasting models (i.e., air quality numerical models). Deployers may try different CPU (Central Processing Unit) core number and other parameters many times but still cannot run smoothly. In addition, since different models have different requirements for the number of grids in a certain grid block (i.e., data block), it is difficult to achieve universal settings at the model level itself; that is, related technologies usually require a lot of debugging and optimization to achieve numerical model deployment (i.e., to achieve the deployment of model business systems, which can also be referred to as model deployment), resulting in cumbersome operations and low efficiency. Based on this, there is currently no good solution for how to conveniently deploy numerical models, reduce numerical model deployment errors, and improve the efficiency of numerical model deployment. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a numerical mode deployment method, device, storage medium, chip and electronic device to solve the problems of related technologies in the process of numerical mode deployment, such as cumbersome operation, easy errors and low efficiency; that is, the embodiment of the present invention can conveniently perform numerical mode deployment, effectively improve the efficiency of numerical mode deployment, and effectively reduce numerical mode deployment errors, and can optimize the numerical mode deployment effect by target recommending the number of CPU cores.

[0004] According to an aspect of an embodiment of the present invention, a numerical mode deployment method is provided, the method comprising: Obtain target mode deployment indication data, wherein the target mode deployment indication data includes information on the number of grids in each of the M nested layers and the total number of CPU cores, where M is a positive integer; Determine the total number of cores running simultaneously based on the total number of CPU cores in the target mode deployment indication data, and determine at least one target number of cores running simultaneously based on the total number of cores running simultaneously; Determine the grid division results corresponding to the respective target numbers of synchronously running cores in the at least one target number of synchronously running cores and the grid number information of the respective nested layers; Determine a set of indication data of the number of synchronous running cores to be recommended based on the grid division results corresponding to each target number of synchronous running cores, wherein the set of indication data of the number of synchronous running cores to be recommended includes the grid division results corresponding to each number of synchronous running cores to be recommended among N numbers of synchronous running cores to be recommended, where N is a non-negative integer; When N is greater than or equal to a preset number threshold, the recommended index value of each to-be-recommended number of cores running simultaneously is calculated based on the grid division results corresponding to each to-be-recommended number of cores running simultaneously, and the target to-be-recommended number of cores is determined based on the recommended index value of each to-be-recommended number of cores running simultaneously, so as to determine the target recommended number of central processing unit cores under the target mode deployment indication data based on the target number of cores to be recommended, and the target recommended number of central processing unit cores supports the use of numerical mode deployment.

[0005] According to another aspect of an embodiment of the present invention, a numerical mode deployment device is provided, the device comprising: An acquisition unit, used to acquire target mode deployment indication data, wherein the target mode deployment indication data includes information on the number of grids in each of the M nested layers and the total number of CPU cores, where M is a positive integer; a processing unit, configured to determine a total number of synchronously operating cores based on a total number of central processing unit cores in the target mode deployment indication data, and determine at least one target number of synchronously operating cores based on the total number of synchronously operating cores; The processing unit is further configured to determine the grid division results corresponding to each target number of synchronously running cores in the at least one target number of synchronously running cores and the grid number information of each nested layer respectively; The processing unit is further configured to determine a set of indication data of the number of synchronous running cores to be recommended based on the grid division results corresponding to each target number of synchronous running cores, wherein the set of indication data of the number of synchronous running cores to be recommended includes a grid division result corresponding to each number of synchronous running cores to be recommended among N numbers of synchronous running cores to be recommended, where N is a non-negative integer; The processing unit is also used to calculate the recommended index value of each to-be-recommended number of cores to be run simultaneously based on the grid division results corresponding to each to-be-recommended number of cores to be run simultaneously, and determine the target to-be-recommended number of cores based on the recommended index value of each to-be-recommended number of cores to be run simultaneously, when N is greater than or equal to a preset number threshold, so as to determine the target recommended number of central processing unit cores under the target mode deployment indication data based on the target number of cores to be recommended, and the target recommended number of central processing unit cores supports the use of numerical mode deployment.

[0006] According to another aspect of an embodiment of the present invention, an electronic device is provided, comprising a processor and a memory storing a program, wherein the program comprises instructions, which, when executed by the processor, enable the processor to perform the above-mentioned method.

[0007] According to another aspect of an embodiment of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above-mentioned method.

[0008] According to another aspect of an embodiment of the present invention, a chip is provided. The chip is located in an electronic device and is used to execute the above-mentioned method.

[0009] The embodiment of the present invention can obtain target mode deployment indication data, the target mode deployment indication data includes the number of grids information of each nested layer in M ​​nested layers and the total number of CPU cores, so as to determine the total number of synchronous running cores based on the total number of CPU cores in the target mode deployment indication data, and determine at least one target number of synchronous running cores based on the total number of synchronous running cores. Based on this, the grid division results corresponding to each target number of synchronous running cores in at least one target number of synchronous running cores and the number of grids information of each nested layer can be determined respectively; and based on the grid division results corresponding to each target number of synchronous running cores, a set of indication data of the number of synchronous running cores to be recommended is determined, and the set of indication data of the number of synchronous running cores to be recommended includes the grid division results corresponding to each number of synchronous running cores to be recommended in N numbers of synchronous running cores to be recommended. Further, when N is greater than or equal to the preset number threshold, the recommended index value of each number of synchronous running cores to be recommended can be calculated respectively based on the grid division results corresponding to each number of synchronous running cores to be recommended, and the target number of cores to be recommended can be determined based on the recommended index value of each number of synchronous running cores to be recommended, so as to determine the target number of recommended CPU cores under the target mode deployment indication data based on the target number of cores to be recommended. It can be seen that the embodiments of the present invention can conveniently determine the target recommended number of CPU cores under the target pattern deployment indication data through the target pattern deployment indication data, so that the numerical pattern deployment (i.e., pattern deployment) can be quickly realized through the target recommended number of CPU cores. That is to say, the embodiments of the present invention can conveniently perform numerical pattern deployment to effectively improve the efficiency of numerical pattern deployment and effectively reduce numerical pattern deployment errors; and, the embodiments of the present invention can optimize the numerical pattern deployment effect through the target recommended number of CPU cores, thereby effectively improving the pattern business operation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Further details, features and advantages of the invention are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which: Figure 1 A schematic flow chart of a numerical mode deployment method according to an exemplary embodiment of the present invention is shown; Figure 2 A schematic diagram of a process of operating a preprocessing module according to an exemplary embodiment of the present invention is shown; Figure 3 A schematic flow chart of another numerical mode deployment method according to an exemplary embodiment of the present invention is shown; Figure 4 A schematic diagram showing an overall process of a numerical mode deployment according to an exemplary embodiment of the present invention; Figure 5 A schematic block diagram of a numerical model deployment device according to an exemplary embodiment of the present invention is shown; Figure 6 A block diagram of an exemplary electronic device that can be used to implement an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0011] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.

[0012] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0013] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0014] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0015] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.

[0016] It should be noted that the execution subject of the numerical mode deployment method provided in the embodiment of the present invention may be one or more electronic devices, and the present invention does not limit this; wherein, the electronic device may be a terminal (i.e., a client) or a server, then when the execution subject includes multiple electronic devices, and the multiple electronic devices include at least one terminal and at least one server, the numerical mode deployment method provided in the embodiment of the present invention may be jointly executed by the terminal and the server. Accordingly, the terminals mentioned here may include but are not limited to: smart phones, tablet computers, laptop computers, desktop computers, intelligent voice interaction devices, smart home appliances, and the like. The server mentioned here may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing (cloud computing), cloud functions, cloud storage, network services, cloud communications, 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 the like.

[0017] Based on the above description, an embodiment of the present invention proposes a numerical mode deployment method, which can be executed by the electronic device (terminal or server) mentioned above; or, the numerical mode deployment method can be executed by the terminal and the server together. For the sake of convenience, the following description will be given by taking the electronic device executing the numerical mode deployment method as an example; Figure 1 As shown, the numerical model deployment method may include the following steps S101-S105: S101, obtaining target mode deployment indication data, the target mode deployment indication data including grid number information of each nested layer in M ​​nested layers and the total number of CPU cores, where M is a positive integer.

[0018] The number of grids of a nested layer may include but is not limited to: the number of horizontal grids (i.e., the number of grids in the x-direction) and the number of vertical grids (i.e., the number of grids in the y-direction) of the corresponding nested layer, etc., which is not limited in the embodiment of the present invention; optionally, the number of grids of a nested layer may also include the number of vertical layers of the corresponding nested layer (i.e., the number of grids in the z-direction). In the embodiment of the present invention, the total number of CPU cores may be the maximum number of available CPU cores. In the embodiment of the present invention, a CPU core may be referred to as a core, i.e., one core may be one CPU core.

[0019] Optionally, the target mode deployment indication data may also include but is not limited to at least one of the following: the number of asynchronously running CPU cores, the central processing unit utilization threshold (i.e., the minimum CPU utilization), the mode identifier of the target mode, and the CPU model, etc. Among them, the number of asynchronously running CPU cores is the number of CPU cores that do not participate in parallel operation (i.e., synchronous operation) in the total number of central processing unit cores, that is, the asynchronously running CPU core is the CPU core that does not execute any module in the target mode together with the synchronously running CPU core; for example, the asynchronously running CPU core can be used to output data, etc. Optionally, the target mode (i.e., the target numerical mode) can be any air quality mode (i.e., the air quality business mode), which is not limited in the embodiment of the present invention; optionally, the mode identifier of a mode can be the mode number of the corresponding mode, or the mode name of the corresponding mode, etc., which is not limited in the embodiment of the present invention; based on this, the embodiment of the present invention may specifically relate to the field of air quality technology.

[0020] In the embodiment of the present invention, the target mode deployment indication data may be obtained in the following ways, but not limited to: The first acquisition method: a plurality of mode deployment indication data may be stored in the storage space of the electronic device itself, and the electronic device may sequentially use each of the plurality of mode deployment indication data as the target mode deployment indication data. The second acquisition method: the target object (i.e., the user, such as the deployment personnel, etc.) may perform a mode deployment indication data input operation, and then when the electronic device detects the mode deployment indication data input operation, it may respond to the detected mode deployment indication data input operation, thereby obtaining the mode deployment indication data indicated by the mode deployment indication data input operation, and using the mode deployment indication data indicated by the mode deployment indication data input operation as the target mode deployment indication data, and so on. In this case, the mode deployment indication data input operation may carry at least one of the following data: information on the number of grids of each nested layer in the M nested layers, the total number of CPU cores, the number of asynchronously running CPU cores, the CPU utilization threshold, the mode identifier of the target mode, and the CPU model, etc. At this time, the target mode deployment indication data may include the data carried by the mode deployment indication data input operation.

[0021] Optionally, the target object may set target mode deployment indication data in the setting file of the parallel partition trial calculation preprocessor (i.e., the preprocessing module described below), that is, may execute a mode deployment indication data input operation (also referred to as a mode deployment indication data setting operation). At this time, the target mode deployment indication data may be read from the setting file to obtain the target mode deployment indication data; alternatively, the electronic device may also display a mode deployment indication data input interface. In this case, the target object may execute a mode deployment indication data input operation in the mode deployment indication data input interface, and so on.

[0022] S102, determining a total number of simultaneously operating cores based on a total number of central processing unit cores in the target mode deployment indication data, and determining at least one target number of simultaneously operating cores based on the total number of simultaneously operating cores.

[0023] Optionally, the target recommended number of CPU cores described below can be obtained by running the preprocessing module through the target mode deployment indication data, that is, the electronic device can run the preprocessing module to obtain the recommended number of CPU cores under any mode deployment indication data, and can save any mode deployment indication data of historical operation and / or the recommended number of CPU cores under any mode deployment indication data, etc., so as to save a historical record data set. Optionally, the electronic device can also obtain a historical record data set, where one historical record data includes one mode deployment indication data; and can determine whether the preprocessing module is run for the first time through the target mode deployment indication data based on the historical record data set and the target mode deployment indication data; if it is determined that the preprocessing module is run for the first time through the target mode deployment indication data, then trigger the execution of the above-mentioned total number of CPU cores based on the target mode deployment indication data to determine the total number of cores running simultaneously; if it is determined that it is not the first time that the preprocessing module is run through the target mode deployment indication data, then output a non-first run prompt message. Optionally, if there is target mode deployment indication data in the historical record data set, it can be determined that this is not the first time that the preprocessing module is run through the target mode deployment indication data (that is, it is determined that this is not the first time that the target mode deployment indication data is used to run the preprocessing module, that is, it is not the first time that the target mode deployment indication data is input into the preprocessing module for running); if there is no target mode deployment indication data in the historical record data set, it can be determined that the preprocessing module is run through the target mode deployment indication data for the first time (that is, it is determined that the target mode deployment indication data is used to run the preprocessing module for the first time, that is, it is the first time that the target mode deployment indication data is input into the preprocessing module for running).

[0024] Optionally, a historical record data may also include the preprocessing module running result under each mode deployment indication data in at least one mode deployment indication data; Optionally, the preprocessing module running result under a mode deployment indication data may be any of the following: the recommended number of CPU cores under the corresponding mode deployment indication data, the mode deployment indication data adjustment prompt, and the no recommendation prompt information, etc. Optionally, the non-first operation prompt information may be set according to experience or actual needs, which is not limited in the embodiment of the present invention; Optionally, the non-first operation prompt information may be used to prompt the target object that it is not the first time to run the preprocessing module through the target mode deployment indication data, and / or may be used to prompt the target object to close or comment out the program line that calls the preprocessing module, etc. Optionally, the historical record data set may be stored in the preprocessing module log, and the electronic device may read the historical record data set from the preprocessing module log to obtain the historical record data set. It should be understood that from the perspective of improving the efficiency of numerical model deployment, if the target object is found to have a similar number of available CPU cores on different projects or machines, the maximum number of available CPU cores and other parameters can be set to the same parameters as before (that is, the target model deployment indication data can be the model deployment indication data that was previously used to run the preprocessing module). In this case, the target model deployment indication data will be judged as not being used for the first time to run the parallel partition trial calculation preprocessing program (that is, the preprocessing module), so there is no need to re-run the parallel partition trial calculation preprocessing program and other processes, which can improve the deployment efficiency; that is, when it is determined that it is not the first time to run the preprocessing module through the target model deployment indication data, the target recommended number of central processing unit cores under the target model deployment indication data can be directly determined from the historical record data set, thereby improving the deployment efficiency. Optionally, when the target model deployment indication data is not used for the first time to run the preprocessing module, the electronic device can directly output the target recommended number of central processing unit cores under the target model deployment indication data saved last time (that is, directly output the target recommended number of central processing unit cores saved in the historical record data set), such as Figure 2 The recommended number of CPU cores under a pattern deployment indication data may also be referred to as the optimal recommended number of CPU cores or optimal core information under the corresponding pattern deployment indication data.

[0025] Optionally, when the target mode deployment indication data is not used for running the preprocessing module for the first time, the electronic device may also modify the logic control variable to False (logical false, to indicate that the target mode deployment indication data is not used for running the preprocessing module for the first time).

[0026] In an embodiment of the present invention, the target mode deployment indication data may also include the number of asynchronously running CPU cores; accordingly, the electronic device may use the difference between the total number of central processing unit cores and the number of asynchronously running CPU cores as the total number of synchronously running cores.

[0027] S103, determining a grid division result corresponding to each target number of synchronous running cores in at least one target number of synchronous running cores and information about the number of grids of each nested layer.

[0028] In an embodiment of the present invention, for any target number of synchronously running cores in at least one target number of synchronously running cores, the electronic device may determine the grid division result corresponding to any target number of synchronously running cores based on any target number of synchronously running cores and the grid number information of each nested layer. Optionally, the electronic device may perform Cartesian grid division (also referred to as load balancing grid division or Cartesian grid division, etc.) for load balancing (i.e., approximate load balancing) on ​​each nested layer based on any target number of synchronously running cores and the grid number information of each nested layer to determine the grid division result corresponding to any target number of synchronously running cores; wherein, Cartesian grid division often uses a factor decomposition method to allocate the number of CPU cores in each division direction to each nested layer to obtain the grid division result corresponding to any target number of synchronously running cores, and the grid division result corresponding to a synchronously running core number may include the grid number information of each grid block of each nested layer under the corresponding number of synchronously running cores. Optionally, the number of grid blocks in the x direction of a nested layer under a number of synchronously running cores can be the number of CPU cores in the x direction of the corresponding nested layer under the corresponding number of synchronously running cores, the number of grid blocks in the y direction of a nested layer under a number of synchronously running cores can be the number of CPU cores in the y direction of the corresponding nested layer under the corresponding number of synchronously running cores, that is, the number of grid blocks in a division direction of a nested layer under a number of synchronously running cores can be the number of CPU cores in the corresponding division direction of the corresponding nested layer under the corresponding number of synchronously running cores, and so on; wherein, the total number of grid blocks indicated by the grid division result corresponding to any target number of synchronously running cores (that is, the sum of the number of grid blocks of each nested layer under any target number of synchronously running cores) can be any target number of synchronously running cores.

[0029] S104, based on the grid division results corresponding to each target number of synchronous running cores, determine a data set indicating the number of synchronous running cores to be recommended, the data set indicating the number of synchronous running cores to be recommended includes the grid division results corresponding to each number of synchronous running cores to be recommended among N numbers of synchronous running cores to be recommended, where N is a non-negative integer.

[0030] In an embodiment of the present invention, for any target number of synchronously running cores in at least one target number of synchronously running cores, the electronic device may determine whether any target number of synchronously running cores is a number of synchronously running cores to be recommended based on the grid division result corresponding to any target number of synchronously running cores; if any target number of synchronously running cores is a number of synchronously running cores to be recommended, then determine the indication data of the number of synchronously running cores to be recommended corresponding to any target number of synchronously running cores, and add the indication data of the number of synchronously running cores to be recommended corresponding to any target number of synchronously running cores to the set of indication data of the number of synchronously running cores to be recommended, so as to determine the set of indication data of the number of synchronously running cores to be recommended. Optionally, an indication data of the number of synchronously running cores to be recommended may include but is not limited to a grid division result corresponding to a number of synchronously running cores to be recommended and / or a corresponding number of synchronously running cores to be recommended; that is, the indication data of the number of synchronously running cores to be recommended corresponding to any target number of synchronously running cores may include the grid division result corresponding to any target number of synchronously running cores and / or any target number of synchronously running cores, etc., which is not limited in the embodiment of the present invention.

[0031] Optionally, if there is no target grid block in the grid division result corresponding to any target number of synchronous running cores, it can be determined that any target number of synchronous running cores is a number of synchronous running cores to be recommended; if there is a target grid block in the grid division result corresponding to any target number of synchronous running cores, it can be determined that any target number of synchronous running cores is not a number of synchronous running cores to be recommended. Optionally, the target grid block may refer to a grid block in which the number of grids in any division direction is less than the specified number of grids, such as a grid block in which the number of grids in any division direction is less than the specified number of grids in the target mode. Optionally, the specified number of grids may be set according to experience, may be set according to actual needs, or may be determined based on the target mode (in this case, the above-mentioned specified number of grids may be the specified number of grids in the target mode), which is not limited in the embodiment of the present invention; illustratively, when the target mode is NAQPMS (a nested grid air quality forecast mode), the specified number of grids may be 2, when the target mode is WRF-Chem (an atmospheric chemistry online coupling mode), the specified number of grids may be 10, and so on. In other words, the electronic device can determine whether the number of grids in each division direction of each grid block in the grid division result corresponding to any target number of synchronous running cores is less than the specified number of grids, thereby determining whether there is a target grid block in the grid division result corresponding to any target number of synchronous running cores, and further determining whether any target number of synchronous running cores is a recommended number of synchronous running cores.

[0032] Based on this, the grid division results (also called grid division schemes) that do not meet the requirements can be removed, that is, N recommended numbers of synchronous running cores whose grid division results meet the requirements can be screened out from at least one target number of synchronous running cores, so as to obtain a data set indicating the number of synchronous running cores to be recommended, which can effectively ensure the accuracy and stability of the mode operation results, avoid using the target number of synchronous running cores whose grid division results do not meet the specified number of grids in the target mode as a number of synchronous running cores to be recommended, and thus avoid using the target number of synchronous running cores whose grid division results do not meet the specified number of grids in the target mode as the target recommended number of central processing unit cores.

[0033] S105, when N is greater than or equal to a preset number threshold, respectively, based on the grid division results corresponding to each number of cores to be recommended for simultaneous operation, the recommended index value of each number of cores to be recommended for simultaneous operation is calculated, and based on the recommended index value of each number of cores to be recommended for simultaneous operation, the target number of cores to be recommended is determined, so as to determine the target recommended number of central processing unit cores under the target mode deployment indication data based on the target number of cores to be recommended, and the target recommended number of central processing unit cores supports the use of numerical mode deployment.

[0034] Optionally, the electronic device may also determine whether the number of cores to be recommended for simultaneous operation is greater than or equal to a preset number threshold, that is, determine whether N is greater than or equal to the preset number threshold. The number of cores to be recommended for simultaneous operation may be a number of cores that meets all requirements (such as not being a prime number, being greater than or equal to the threshold of the number of cores to be recommended for simultaneous operation, and the corresponding grid division result does not contain a target grid block, etc.), that is, determine whether the number of cores to be recommended for simultaneous operation that meet all requirements is greater than or equal to the preset number threshold; Optionally, the preset number threshold may be set according to experience or according to actual needs, and the embodiment of the present invention is not limited to this; Exemplarily, the preset number threshold may be 1. Based on this, when N is greater than or equal to the preset number threshold (that is, the number of cores to be recommended for simultaneous operation is greater than or equal to the preset number threshold), the above-mentioned calculation of the recommended index value of each core to be recommended for simultaneous operation based on the grid division results corresponding to each core to be recommended for simultaneous operation may be triggered; when N is less than the preset number threshold (that is, the number of cores to be recommended for simultaneous operation is less than the preset number threshold), a no recommendation prompt message may be output, and the no recommendation prompt message may be used to prompt that there is no CPU core that meets the conditions under the target mode deployment indication data. Optionally, the no-recommendation prompt information may be set according to experience or according to actual needs, which is not done in the embodiment of the present invention.

[0035] Optionally, after determining the target recommended number of CPU cores, the electronic device may also write the target recommended number of CPU cores into the mode operation setting file of the target mode. Optionally, the electronic device may also determine the historical record data corresponding to the target mode deployment indication data, and save the historical record data corresponding to the target mode deployment indication data to the preprocessing module log; illustratively, the historical record data corresponding to the target mode deployment indication data may include the target mode deployment indication data and / or the target recommended number of CPU cores, etc., thereby recording the target mode deployment indication data, etc.

[0036] The embodiment of the present invention can obtain target mode deployment indication data, the target mode deployment indication data includes the number of grids information of each nested layer in M ​​nested layers and the total number of CPU cores, so as to determine the total number of synchronous running cores based on the total number of CPU cores in the target mode deployment indication data, and determine at least one target number of synchronous running cores based on the total number of synchronous running cores. Based on this, the grid division results corresponding to each target number of synchronous running cores in at least one target number of synchronous running cores and the number of grids information of each nested layer can be determined respectively; and based on the grid division results corresponding to each target number of synchronous running cores, a set of indication data of the number of synchronous running cores to be recommended is determined, and the set of indication data of the number of synchronous running cores to be recommended includes the grid division results corresponding to each number of synchronous running cores to be recommended in N numbers of synchronous running cores to be recommended. Further, when N is greater than or equal to the preset number threshold, the recommended index value of each number of synchronous running cores to be recommended can be calculated respectively based on the grid division results corresponding to each number of synchronous running cores to be recommended, and the target number of cores to be recommended can be determined based on the recommended index value of each number of synchronous running cores to be recommended, so as to determine the target number of recommended CPU cores under the target mode deployment indication data based on the target number of cores to be recommended. It can be seen that the embodiments of the present invention can conveniently determine the target recommended number of CPU cores under the target mode deployment indication data through the target mode deployment indication data, so that the numerical mode deployment can be quickly realized through the target recommended number of CPU cores. That is to say, the embodiments of the present invention can conveniently perform numerical mode deployment to effectively improve the efficiency of numerical mode deployment and effectively reduce numerical mode deployment errors; and, the embodiments of the present invention can optimize the numerical mode deployment effect through the target recommended number of CPU cores, thereby effectively improving the mode business operation efficiency.

[0037] Based on the above description, the embodiment of the present invention further proposes a more specific numerical mode deployment method. Accordingly, the numerical mode deployment method can be executed by the electronic device (terminal or server) mentioned above; or, the numerical mode deployment method can be executed by the terminal and the server together. For the convenience of explanation, the following description is taken as an example of an electronic device executing the numerical mode deployment method; please refer to Figure 3, the numerical model deployment method may include the following steps S301-S306: S301, obtaining target mode deployment indication data, the target mode deployment indication data including grid number information of each nested layer in M ​​nested layers and the total number of CPU cores, where M is a positive integer.

[0038] S302, determining a total number of synchronously running cores based on a total number of central processing unit cores in the target mode deployment indication data, and determining at least one target number of synchronously running cores based on the total number of synchronously running cores.

[0039] Optionally, the target mode deployment indication data may also include a CPU utilization threshold. Based on this, when determining at least one target number of synchronously running cores based on the total number of synchronously running cores, the electronic device may calculate the synchronously running core number threshold based on the total number of synchronously running cores and the CPU utilization threshold, such as the product between the total number of synchronously running cores and the CPU utilization threshold may be used as the synchronously running core number threshold (i.e., the synchronously running core number threshold may be the total number of synchronously running cores × the CPU utilization threshold); and determine the number of synchronously running cores to be determined under the current iteration (also referred to as the current number of synchronously running cores to be determined), and determine whether the number of synchronously running cores to be determined under the current iteration is a target number of synchronously running cores; wherein the number of synchronously running cores to be determined under the first iteration is the total number of synchronously running cores, that is, the total number of synchronously running cores may be used as the number of synchronously running cores to be determined under the first iteration. Optionally, the CPU utilization threshold may be set according to experience or according to actual needs, and the embodiment of the present invention does not limit this; it should be understood that in order to take into account resource utilization, the CPU utilization threshold cannot be set too small, and can usually float in a smaller area, such as the CPU utilization threshold may be 80%.

[0040] Optionally, when determining the number of synchronously running cores to be determined in the current iteration, if the current iteration is not the first iteration, the number of synchronously running cores to be determined in the current iteration can be determined as: the number of synchronously running cores to be determined in the previous iteration (also referred to as the previous number of synchronously running cores to be determined) - 1; or, assuming that the current iteration is the tth iteration, the number of synchronously running cores to be determined in the current iteration can be determined as: the total number of synchronously running cores - t + 1, t is a positive integer, thereby updating the number of synchronously running cores to be determined in the current iteration, and so on.

[0041] Correspondingly, if the number of synchronous running cores to be determined in the current iteration is greater than or equal to the synchronous running core number threshold, and the number of synchronous running cores to be determined in the current iteration is not a prime number, the number of synchronous running cores to be determined in the current iteration can be used as a target synchronous running core number, so that the number of synchronous running cores to be determined in the current iteration can be determined as a target synchronous running core number, so that at least one target synchronous running core number can include the number of synchronous running cores to be determined in the current iteration; if the number of synchronous running cores to be determined in the current iteration is a prime number, the number of synchronous running cores to be determined in the current iteration is not used as a target synchronous running core number, so that it can be determined that the number of synchronous running cores to be determined in the current iteration is not a target synchronous running core number; further, the above determination of the number of synchronous running cores to be determined in the current iteration can be iteratively performed (that is, the next iteration can be used as the current iteration to determine the number of synchronous running cores to be determined in the current iteration) until the number of synchronous running cores to be determined in the current iteration is less than the synchronous running core number threshold, so as to achieve the determination of at least one target synchronous running core number. Based on this, when the number of synchronously running cores to be determined in the current iteration is less than the synchronously running core number threshold, it can be determined that the condition for stopping iteration is met, thereby stopping iteration. At this time, it can also be determined that the number of synchronously running cores to be determined in the current iteration is not a target number of synchronously running cores. It should be noted that Cartesian grid division generally uses factor decomposition to allocate the number of CPU cores in each direction, so the number of synchronously running CPU cores cannot be a prime number; based on this, the embodiment of the present invention can effectively filter out the number of synchronously running cores to be determined that is a prime number, so as to effectively avoid the target number of synchronously running cores being a prime number, and ensure the stability of the mode operation.

[0042] S303: Determine a grid division result corresponding to each target number of synchronous running cores based on each target number of synchronous running cores in at least one target number of synchronous running cores and information on the number of grids of each nested layer.

[0043] Among them, the grid division result corresponding to a number of synchronously running cores includes the grid number information of each grid block of each nested layer under the corresponding number of synchronously running cores, and the grid number information of a grid block includes the grid number of the corresponding grid block in each division direction in multiple division directions. Optionally, the multiple division directions may include but are not limited to the x direction (i.e., horizontal direction) and the y direction (i.e., vertical direction); illustratively, when two-dimensional grid division is performed on each nested layer (i.e., two-dimensional division of grid blocks is performed on each nested layer), the multiple division directions may include the x direction and the y direction, and when three-dimensional grid division is performed on each nested layer (i.e., three-dimensional division of grid blocks is performed on each nested layer), the multiple division directions may include the x direction, the y direction, and the z direction (i.e., vertical direction), and so on.

[0044] In one embodiment, after the number of synchronous running cores to be determined in the current iteration is taken as a target number of synchronous running cores, the grid division result corresponding to the number of synchronous running cores to be determined in the current iteration can be determined based on the number of synchronous running cores to be determined in the current iteration and the grid number information of each nested layer; that is, if the number of synchronous running cores to be determined in the current iteration is greater than or equal to the synchronous running core number threshold, and the number of synchronous running cores to be determined in the current iteration is not a prime number, then the grid division result corresponding to the number of synchronous running cores to be determined in the current iteration can be determined based on the number of synchronous running cores to be determined in the current iteration and the grid number information of each nested layer, and then load balancing grid division (i.e., Cartesian grid division) can be performed on each nested layer based on the number of synchronous running cores to be determined in the current iteration and the grid number information of each nested layer to obtain the grid division result corresponding to the number of synchronous running cores to be determined in the current iteration.

[0045] In another implementation, the electronic device may also determine the grid division results corresponding to each target number of synchronous running cores based on each target number of synchronous running cores in the at least one target number of synchronous running cores and the grid number information of each nested layer after determining at least one target number of synchronous running cores, that is, after stopping iteration, and so on; this is not limited to the embodiments of the present invention.

[0046] S304, based on the grid division results corresponding to each target number of synchronous running cores, determine a data set indicating the number of synchronous running cores to be recommended, the data set indicating the number of synchronous running cores to be recommended includes the grid division results corresponding to each number of synchronous running cores to be recommended among N numbers of synchronous running cores to be recommended, where N is a non-negative integer.

[0047] In one embodiment, if there is no target grid block in the grid division result corresponding to the number of synchronous running cores to be determined in the current iteration, the number of synchronous running cores to be determined in the current iteration can be used as a number of synchronous running cores to be recommended, so that the indication data of the number of synchronous running cores to be recommended corresponding to the number of synchronous running cores to be determined in the current iteration can be added to the indication data set of the number of synchronous running cores to be recommended; that is, based on the grid division result corresponding to the number of synchronous running cores to be determined in the current iteration, it can be judged whether the number of synchronous running cores to be determined in the current iteration is a number of synchronous running cores to be recommended, and when there is no target grid block in the grid division result corresponding to the number of synchronous running cores to be determined in the current iteration, it is determined that the number of synchronous running cores to be determined in the current iteration is a number of synchronous running cores to be recommended, and when there is a target grid block in the grid division result corresponding to the number of synchronous running cores to be determined in the current iteration, it is determined that the number of synchronous running cores to be determined in the current iteration is not a number of synchronous running cores to be recommended. Among them, a data indicating the number of cores to be recommended to be run simultaneously includes a grid division result corresponding to the number of cores to be recommended to be run simultaneously, and the target grid block may refer to a grid block in which the number of grids in any division direction is less than the specified number of grids; after stopping the iteration, a data set indicating the number of cores to be recommended to be run simultaneously can be obtained.

[0048] Based on this, in an iteration process, after taking the number of synchronous running cores to be determined in the current iteration as a target number of synchronous running cores, the grid division result corresponding to the number of synchronous running cores to be determined in the current iteration (i.e., the target number of synchronous running cores "the number of synchronous running cores to be determined in the current iteration") can be further determined, and after taking the number of synchronous running cores to be determined in the current iteration as a number of synchronous running cores to be recommended, the number of synchronous running cores to be determined corresponding to the number of synchronous running cores to be determined in the current iteration (i.e., the number of synchronous running cores to be recommended "the number of synchronous running cores to be determined in the current iteration") can be further added to the set of indication data of the number of synchronous running cores to be recommended (i.e., the indication data of the number of synchronous running cores to be recommended corresponding to the number of synchronous running cores to be determined in the current iteration can be saved), thereby completing the current iteration process, such as Figure 2 shown.

[0049] In another embodiment, the electronic device may also determine a set of data indicating the number of synchronous running cores to be recommended based on the grid division results corresponding to each target number of synchronous running cores after stopping the iteration (i.e., after the loop ends). That is, based on the grid division results corresponding to each target number of synchronous running cores, it may be judged whether each target number of synchronous running cores is a synchronous running core to be recommended, so as to add the data indicating the number of synchronous running cores to be recommended corresponding to the target number of synchronous running cores to be recommended to the set of data indicating the number of synchronous running cores to be recommended, and so on. This is not limited to the embodiments of the present invention.

[0050] It should be understood that in the parallel operation of the mode, it can be divided into synchronous operation of the CPU core and asynchronous operation of the CPU core. For different modes, the number of grid points (such as a grid center point) in each division direction in each grid block also has a minimum limit, otherwise the mode will have errors such as abnormal calculation results or inability to run; and if the number of synchronously running CPU cores is a prime number, the current mode Cartesian grid division algorithm program will not be able to execute. In this regard, the embodiment of the present invention can effectively avoid the grid division results corresponding to the recommended number of synchronously running cores, where the number of grids in any division direction is less than the specified number of grids in the corresponding mode, thereby effectively avoiding errors such as abnormal calculation results or inability to run in the mode; and the embodiment of the present invention can avoid the number of synchronously running cores being a prime number, thereby ensuring that the Cartesian grid division algorithm program can be stably executed.

[0051] S305, when N is greater than or equal to a preset number threshold, for any of the N numbers of cores to be recommended for synchronous operation, based on the grid division result corresponding to any number of cores to be recommended for synchronous operation, determine the recommended indicator calculation information of each nested layer under any number of cores to be recommended for synchronous operation.

[0052] In one embodiment, the electronic device may use the number of grids of each nested layer in each division direction and the number of CPU cores of each nested layer in each division direction under any recommended number of synchronous running cores as the recommended indicator calculation information of the corresponding nested layer under any number of synchronous running cores to be recommended; in this case, the recommended indicator calculation information of a nested layer under any number of synchronous running cores to be recommended may include the number of grids of the corresponding nested layer in each division direction (which may be determined from the number of grids information of a nested layer) and the number of CPU cores of the corresponding nested layer in each division direction under any number of synchronous running cores to be recommended. Among them, the number of CPU cores in a division direction of a nested layer under a number of synchronous running cores (such as any number of synchronous running cores to be recommended) can be the same as the number of grid blocks in the corresponding division direction of the corresponding nested layer under the corresponding number of synchronous running cores; optionally, the grid division result corresponding to a number of synchronous running cores may also include the number of CPU cores in each division direction of each nested layer under the corresponding number of synchronous running cores, and at this time, the number of CPU cores in each division direction of each nested layer under any number of synchronous running cores to be recommended can be directly determined from the grid division result corresponding to any number of synchronous running cores to be recommended; or, the grid division result corresponding to a number of synchronous running cores may also include the number of grid blocks in each division direction of each nested layer under the corresponding number of synchronous running cores, so that the number of grid blocks in any division direction of any nested layer under any number of synchronous running cores to be recommended is used as the number of CPU cores in any division direction of any nested layer under any number of synchronous running cores to be recommended, and so on.

[0053] In another embodiment, the grid division result corresponding to a number of synchronously running cores includes the grid number information of each grid block of each nested layer under the corresponding number of synchronously running cores, and the grid number information of a grid block includes the grid number of each grid block in each of the multiple division directions. Based on this, the electronic device can determine the recommended indicator calculation information of each nested layer under any number of synchronously running cores to be recommended based on the grid number information of each grid block of each nested layer under any number of synchronously running cores to be recommended, and so on.

[0054] In a specific implementation, the recommended indicator calculation information of a nested layer under any number of synchronous running cores to be recommended may include the grid number information of each grid block of the corresponding nested layer under any number of synchronous running cores to be recommended; that is, the grid number information of each grid block of each nested layer under any number of synchronous running cores to be recommended can be used as the recommended indicator calculation information of the corresponding nested layer under any number of synchronous running cores to be recommended, so as to realize the recommended indicator calculation information of each nested layer under any number of synchronous running cores to be recommended based on the grid number information of each grid block of each nested layer under any number of synchronous running cores to be recommended.

[0055] In another specific implementation, the recommended index calculation information of a nested layer under any number of synchronous running cores to be recommended may include the mean value of the number of grids in each division direction of the corresponding nested layer under any number of synchronous running cores to be recommended. Optionally, for any nested layer among the M nested layers and any division direction among the multiple division directions, the electronic device may perform a mean operation on the number of grids in any division direction of each grid block of any nested layer under any number of synchronous running cores to be recommended, and obtain the mean value of the number of grids in any division direction of any nested layer under any number of synchronous running cores to be recommended, so as to obtain the recommended index calculation information of any nested layer under any number of synchronous running cores to be recommended. At this time, the mean value of the number of grids in a division direction of a nested layer under any number of synchronous running cores to be recommended can also be called the mean value of the number of grids between each grid block in the corresponding division direction of the corresponding nested layer under any number of synchronous running cores to be recommended, and so on. Exemplarily, taking any division direction as the x direction as an example, assuming that the grid blocks of any nested layer under any recommended number of simultaneously running cores are grid block 1, grid block 2, grid block 3 and grid block 4, then the number of grids in the x direction of grid block 1, the number of grids in the x direction of grid block 2, the number of grids in the x direction of grid block 3 and the number of grids in the x direction of grid block 4 can be averaged to obtain the average number of grids in the x direction of any nested layer under any recommended number of simultaneously running cores. Optionally, the electronic device may also use the number of grids in each division direction of any grid block of any nested layer under any number of cores to be recommended for simultaneous operation as the mean value of the number of grids in the corresponding division direction of any nested layer under any number of cores to be recommended for simultaneous operation. That is to say, a grid block may be selected from each grid block of any nested layer under any number of cores to be recommended for simultaneous operation (such as randomly selecting or specifying any grid block (such as specifying the first grid block), etc.), and the number of grids in each division direction of the selected grid block may be used as the mean value of the number of grids in the corresponding division direction of any nested layer under any number of cores to be recommended for simultaneous operation. , and so on; the embodiment of the present invention is not limited to this; for example, assuming that the grid blocks of any nested layer under any recommended number of synchronous running cores are grid block 1, grid block 2, grid block 3 and grid block 4, and the selected grid block is grid block 1, then the number of grids of grid block 1 in the x direction can be used as the average number of grids in the x direction of any nested layer under any recommended number of synchronous running cores, and the number of grids of grid block 1 in the y direction can be used as the average number of grids in the y direction of any nested layer under any recommended number of synchronous running cores, and so on.

[0056] S306, using the recommended indicator calculation information of each nested layer under any number of synchronous running cores to be recommended, calculate the recommended indicator value of any number of synchronous running cores to be recommended, and determine the target number of cores to be recommended based on the recommended indicator value of each number of synchronous running cores to be recommended, so as to determine the target recommended number of central processing unit cores under the target mode deployment indication data based on the target number of cores to be recommended, and the target recommended number of central processing unit cores supports the use of numerical mode deployment.

[0057] It should be noted that from the perspective of improving computing efficiency, in parallel computing, both computing and communication consume time. To ensure that the load is balanced (approximately), a solution with relatively minimal communication volume should be adopted to further improve the computing speed. In other words, with the same number of grids and approximately the same number of CPU cores, a solution with a smaller number of communication grids (i.e., communication volume) will theoretically run faster.

[0058] In one embodiment, the recommended indicator calculation information of a nested layer under any recommended number of simultaneously running cores may include the number of grids of the corresponding nested layer in each division direction and the number of CPU cores of the corresponding nested layer in each division direction under any recommended number of simultaneously running cores.

[0059] In this case, the electronic device can use the recommended index calculation information of each nested layer under any number of cores to be recommended for simultaneous operation to calculate the total number of communication grids under any number of cores to be recommended for simultaneous operation, so as to use the total number of communication grids under any number of cores to be recommended for simultaneous operation as the recommended index value for any number of cores to be recommended for simultaneous operation. Optionally, taking two dimensions (i.e., multiple division directions including the x direction and the y direction) as an example for explanation, when the number of grids in each division direction of each nested layer can be divided by the integer of the number of CPU cores in the corresponding division direction of the corresponding nested layer under any number of cores to be recommended for simultaneous operation, the electronic device can use formula 1.1 to calculate the total number of communication grids under any number of cores to be recommended for simultaneous operation: Formula 1.1 Among them, N xi , N yi can be respectively the number of grids in the x direction and the number of grids in the y direction of the i-th nesting layer in the M nesting layers, i∈[1,M], M is the total number of nesting layers; P xi , P yi can be respectively the number of CPU cores in the x direction and the number of CPU cores in the y direction of the i-th nested layer under any recommended number of synchronous running cores, N xi / P xi It can represent the number of grids in the x direction for each grid block of the ith nested layer under any recommended number of simultaneous running cores, N yi / P yiIt can represent the number of grids in the y direction of each grid block of the i-th nested layer under any number of cores to be recommended for simultaneous operation, and f can represent the total number of communication grids under any number of cores to be recommended for simultaneous operation.

[0060] It should be understood that for the function f, when the ratio of the number of CPU cores in each division direction (P xi / P yi ) and the ratio of the number of grids in each division direction (N xi / N yi ) are the same, that is, the number of grids in each grid block in each division direction is the same (N xi / P xi =N yi / P yi ), the total number of communication grids under any number of cores to be recommended for simultaneous operation is the least (i.e., the communication volume is the least). Based on this, the embodiment of the present invention can use the following method to approach the optimal solution as much as possible, thereby calculating the recommended index value of any number of cores to be recommended for simultaneous operation.

[0061] In another implementation manner, the recommended index calculation information of a nested layer under any number of cores to be recommended for simultaneous operation may include the grid number information of each grid block of the corresponding nested layer under any number of cores to be recommended for simultaneous operation; illustratively, multiple division directions including the x direction and the y direction are used as an example for explanation, when the recommended index calculation information of each nested layer under any number of cores to be recommended for simultaneous operation is used to calculate the recommended index value of any number of cores to be recommended for simultaneous operation (at this time, the recommended index value of any number of cores to be recommended for simultaneous operation is calculated using the grid number information of each grid block of each nested layer under any number of cores to be recommended for simultaneous operation), the electronic device may use formula 1.2 to calculate the recommended index value of any number of cores to be recommended for simultaneous operation: Formula 1.2 Where nblocks is the total number of grid blocks divided by the grid of each nested layer under any recommended number of simultaneous running cores (that is, the sum of the number of grid blocks of each nested layer under any recommended number of simultaneous running cores), nblock_i is the number of grid blocks of the ith nested layer under any recommended number of simultaneous running cores, NB xji It can represent the number of grids in the x-direction of the j-th grid block of the ith nested layer under any recommended number of synchronous running cores (the number of grids in the x-direction of a grid block can also be called the number of grids in the x-direction of the corresponding grid block), NB yjiIt can represent the number of grids in the y direction of the jth grid block of the ith nested layer under any number of cores to be recommended for simultaneous operation (the number of grids in the y direction of a grid block can also be called the number of grids in the y direction of the corresponding grid block). It should be understood that when S is 0, the ratio of the number of CPU cores in each division direction and the ratio of the number of grids in each division direction are the same, that is, the number of grids in each division direction of each grid block is the same, and the optimal solution will be obtained. In other words, the smaller the recommended index value of any number of cores to be recommended for simultaneous operation, the smaller the communication volume. It should be noted that formula 1.2 is only an exemplary description of the implementation method of using the grid number information of each grid block of each nested layer under any number of cores to be recommended for simultaneous operation to calculate the recommended index value of any number of cores to be recommended for simultaneous operation, and the embodiments of the present invention are not limited to this.

[0062] In an embodiment of the present invention, the electronic device may determine at least one division direction group from a plurality of division directions, and one division direction group may include any two division directions from the plurality of division directions, that is, any two division directions may be used as a division direction group, so that at least one division direction group may include any division direction from the plurality of division directions and a division direction group respectively composed of each division direction except any division direction from the plurality of division directions; exemplarily, when the plurality of division directions include the x direction and the y direction, the number of division direction groups in at least one division direction group may be 1 (i.e., the division direction group "x direction and y direction"); when the plurality of division directions include the x direction, the y direction, and the z direction, at least one division direction group may include the division direction groups "x direction and y direction", "x direction and z direction", and "y direction and z direction". Based on this, for any grid block in all grid blocks of each nested layer under any number of cores to be recommended for synchronous operation, the grid number difference of any grid block under each division direction group in at least one division direction group may be determined based on the grid number information of any grid block (e.g., the grid number difference under the division direction group "x direction and y direction" may be NB in ​​formula 1.2). xji -NB yji ), so that after obtaining the difference in the number of grids of each grid block under each division direction group at each nested layer under any number of cores to be recommended for simultaneous operation, the recommended index value of any number of cores to be recommended for simultaneous operation can be calculated based on the difference in the number of grids of each grid block under each division direction group at each nested layer under any number of cores to be recommended for simultaneous operation, so as to realize the use of the grid number information of each grid block under any number of cores to be recommended for simultaneous operation at each nested layer to calculate the recommended index value of any number of cores to be recommended for simultaneous operation. Exemplarily, the squares of the difference in the number of grids of each grid block under each division direction group at each nested layer under any number of cores to be recommended for simultaneous operation can be summed to obtain the recommended index value of any number of cores to be recommended for simultaneous operation, and so on.

[0063] In another implementation manner, the recommended index calculation information of a nested layer under any number of cores to be recommended for simultaneous operation may include the average number of grids in each division direction of the corresponding nested layer under any number of cores to be recommended for simultaneous operation; illustratively, multiple division directions including the x direction and the y direction are used as an example for explanation, when the recommended index calculation information of each nested layer under any number of cores to be recommended for simultaneous operation is used to calculate the recommended index value of any number of cores to be recommended for simultaneous operation (at this time, the average number of grids in each division direction of each nested layer under any number of cores to be recommended for simultaneous operation is used to calculate the recommended index value of any number of cores to be recommended for simultaneous operation), the electronic device may use formula 1.3 to calculate the recommended index value of any number of cores to be recommended for simultaneous operation: Formula 1.3 Among them, NB xi It can represent the average number of grids in the x direction of the ith nested layer under any recommended number of simultaneous running cores, NB yi It can represent the mean value of the number of grids in the y direction of the i-th nested layer under any number of cores to be recommended for simultaneous operation. It should be noted that formula 1.3 is only an exemplary description of using the mean value of the number of grids in each division direction of each nested layer under any number of cores to be recommended for simultaneous operation to calculate the recommended index value of any number of cores to be recommended for simultaneous operation, and the embodiment of the present invention does not limit this.

[0064] In an embodiment of the present invention, the electronic device can determine at least one division direction group from multiple division directions; based on this, for any nested layer in the M nested layers, the average difference in the number of grids in each division direction of any nested layer under any number of cores to be recommended for simultaneous operation can be determined respectively (for example, the average difference in the number of grids in the division direction group "x direction and y direction" can be NB in ​​formula 1.3) based on the average value of the number of grids in each division direction of any nested layer under any number of cores to be recommended for simultaneous operation. xi -NB yi ), so that after obtaining the average difference in the number of grids in each division direction group of each nested layer under any number of cores to be recommended for simultaneous operation, the recommended index value of any number of cores to be recommended for simultaneous operation can be calculated based on the average difference in the number of grids in each division direction group of each nested layer under any number of cores to be recommended for simultaneous operation, so as to achieve the calculation of the recommended index value of any number of cores to be recommended for simultaneous operation by using the average value of the number of grids in each division direction of each nested layer under any number of cores to be recommended for simultaneous operation. Exemplarily, the squares of the average difference in the number of grids in each division direction group of each nested layer under any number of cores to be recommended for simultaneous operation can be summed to obtain the recommended index value of any number of cores to be recommended for simultaneous operation, and so on.

[0065] From the above, it can be seen that if the recommended index calculation information of a nested layer under any number of cores to be recommended for simultaneous operation is determined based on the grid number information of each grid block of the corresponding nested layer under any number of cores to be recommended for simultaneous operation, then no matter whether the grid number of each nested layer in each division direction can be divided by the integer number of CPU cores in the corresponding division direction of the corresponding nested layer under any number of cores to be recommended for simultaneous operation, the recommended index value of each nested layer under any number of cores to be recommended can be obtained. Preferably, the embodiment of the present invention can determine the recommended index calculation information of each nested layer under any number of cores to be recommended for simultaneous operation based on the grid number information of each grid block of each nested layer under any number of cores to be recommended for simultaneous operation, so that the embodiment of the present invention is not only applicable when the grid number in each division direction can be divided by the corresponding number of cores, but can also be applied to the more common scenario where the grid number in each direction cannot be divided by the corresponding number of cores, so that the recommended index value of each number of cores to be recommended for simultaneous operation can be accurately represented.

[0066] Furthermore, when determining the target number of cores to be recommended based on the recommended index values ​​of each number of cores to be recommended for synchronous operation, the number of cores to be recommended for synchronous operation with the smallest recommended index value can be determined from the N numbers of cores to be recommended for synchronous operation based on the recommended index values ​​of each number of cores to be recommended for synchronous operation, thereby obtaining the number of cores to be recommended for synchronous operation with the smallest communication volume, that is, the number of cores to be recommended for synchronous operation with the smallest communication volume can be the number of cores to be recommended for synchronous operation with the smallest recommended index value; and the target number of cores to be recommended is determined based on the number of cores to be recommended for synchronous operation with the smallest recommended index value. Optionally, the electronic device can directly determine the number of cores to be recommended for synchronous operation with the smallest recommended index value from the N numbers of cores to be recommended for synchronous operation; or, the N numbers of cores to be recommended for synchronous operation can be sorted in ascending order of the recommended index values ​​to obtain a sorting result (that is, a sorting for communication volume), so as to select the number of cores to be recommended for synchronous operation with the smallest recommended index value from the sorting result, such as the first number of cores to be recommended for synchronous operation in the sorting result, or the first P numbers of cores to be recommended for synchronous operation, etc. The recommended index value of each number of cores to be recommended for synchronous operation in the first P numbers of cores to be recommended for synchronous operation is the same (that is, they are all equal to the recommended index value of the first number of cores to be recommended for synchronous operation), P is a positive integer, and so on.

[0067] Optionally, when determining the target number of cores to be recommended based on the number of cores to be recommended for synchronous operation with the smallest recommended index value, the recommended number of CPU cores to be recommended for synchronous operation (also referred to as the recommended number of CPU cores to be available for synchronous operation) may be determined based on the number of cores to be recommended for synchronous operation with the smallest recommended index value, and the sum of the recommended number of CPU cores to be recommended for synchronous operation and the number of CPU cores to be asynchronously operated may be used as the target number of cores to be recommended. Optionally, if the number of cores to be recommended for synchronous operation with the smallest recommended index value is 1, the number of cores to be recommended for synchronous operation with the smallest recommended index value may be used as the recommended number of CPU cores to be recommended for synchronous operation; if the number of cores to be recommended for synchronous operation with the smallest recommended index value is greater than 1, the largest number of cores to be recommended for synchronous operation may be determined from multiple numbers of cores to be recommended for synchronous operation with the smallest recommended index values, and the largest number of cores to be recommended for synchronous operation may be used as the recommended number of CPU cores to be recommended for synchronous operation, such as sorting the multiple numbers of cores to be recommended for synchronous operation with the smallest recommended index values ​​in descending order, so that the first number of cores to be recommended for synchronous operation in the descending order result may be determined as the largest number of cores to be recommended for synchronous operation. In other embodiments, a number of cores to be recommended for simultaneous operation may be randomly selected from multiple numbers of cores to be recommended for simultaneous operation with the smallest recommendation index values, and the randomly selected number of cores to be recommended for simultaneous operation may be used as the recommended number of CPU cores to be simultaneously operated, and so on.

[0068] Optionally, after obtaining the target number of cores to be recommended, the electronic device may also return preprocessing correct end information (such as 0, etc.) to indicate that the target number of cores to be recommended is correctly obtained, etc. Optionally, the preprocessing correct end information may be set according to experience or according to actual needs, and the embodiment of the present invention is not limited to this.

[0069] Optionally, the electronic device can start the operation of the target mode according to the target number of cores to be recommended and the number of grids of each nested layer, and obtain the mode case running time of the target mode for the target number of cores to be recommended, so as to check whether the mode case running time is less than the preset mode running time threshold; optionally, the modified mode parameters can be used to generate a submission command or script corresponding to the scheduling system to start the mode operation (i.e., start the operation of the target mode); optionally, the modified mode parameters may include but are not limited to the target number of cores to be recommended (i.e., corresponding to the total number of CPU cores), the number of grids of each nested layer, the number of asynchronously running CPU cores, etc., which is not limited in the embodiment of the present invention. Optionally, the preset mode running time threshold can be set according to experience or actual needs, which is not limited in the embodiment of the present invention.

[0070] Correspondingly, if the mode case running time is less than the preset mode running time threshold, the target recommended number of CPU cores under the target mode deployment indication data is determined based on the target number of cores to be recommended, and the target number of cores to be recommended is used as the target recommended number of CPU cores under the target mode deployment indication data; if the mode case running time is greater than or equal to the preset mode running time threshold, the mode deployment indication data adjustment prompt is output. Optionally, the mode deployment indication data adjustment prompt can be set according to experience or according to actual needs, and the embodiment of the present invention is not limited to this; illustratively, the mode deployment indication data adjustment prompt can be used to prompt the target object to increase the maximum number of available CPU cores (i.e., the total number of CPU cores) and / or reduce the minimum CPU utilization, etc. Based on this, the target object can modify the target mode deployment indication data according to the mode deployment indication data adjustment prompt, and the mode deployment indication data input operation can be performed again to use the modified mode deployment indication data as the target mode deployment indication data, so that the electronic device can re-enter step S301, thereby continuously looping, and so on.

[0071] It can be seen that the embodiments of the present invention can perform mode parameter setting and grid division according to the target number of cores to be recommended, and adopt a grid division scheme with relatively small communication volume under the same grid and approximate core number, so as to improve the mode operation (that is, mode business operation) speed, thereby obtaining a mode deployment method with higher operation efficiency (the operation speed is higher when the number of CPU cores in each division direction is approximately the same, that is, the operation speed of each grid block is higher when the number of grids in each division direction is approximately the same); and, the mode case running time can be used to further detect whether the running time meets the mode running time efficiency (that is, whether the mode case running time is less than the preset mode running time threshold), thereby further ensuring the mode business operation efficiency; based on this, the embodiments of the present invention can realize the optimization of the mode running speed, which can effectively improve the mode business operation efficiency.

[0072] Optionally, after obtaining the target recommended number of CPU cores, the electronic device may also write the target recommended number of CPU cores into the mode operation setting file of the target mode, so as to modify the mode operation CPU core number in the mode operation setting file to the target recommended number of CPU cores; and / or, take the target recommended number of CPU cores and the target mode deployment indication data as a historical record data (that is, the historical record data may include the target recommended number of CPU cores and the target mode deployment indication data), so as to add it to the historical record data set, and save it to the log. In summary, as can be seen from the above, Figure 4As shown, the electronic device can determine whether the mode case running time meets the mode running time efficiency based on the size relationship between the mode case running time and the preset mode running time threshold, that is, when the mode case running time is less than the preset mode running time threshold, it can be determined that the mode case running time meets the mode running time efficiency; when the mode case running time is greater than or equal to the preset mode running time threshold, it can be determined that the mode case running time does not meet the mode running time efficiency; thereby, when the mode running time efficiency is met, the target recommended number of CPU cores is obtained, the mode running setting file is written, and saved to the log.

[0073] Optionally, when the output mode deployment indication data adjustment prompt or no recommended prompt information is displayed, the electronic device may also record the target mode deployment indication data, and / or record the mode deployment indication data adjustment prompt or no recommended prompt information, etc.; the embodiment of the present invention is not limited to this; that is, when the input mode deployment indication data adjustment prompt or no recommended prompt information is displayed, the target mode deployment indication data, and / or the output mode deployment indication data adjustment prompt or no recommended prompt information may also be stored in the log to obtain corresponding historical record data, etc.

[0074] After acquiring the target mode deployment indication data, the embodiment of the present invention can determine the total number of synchronously running cores based on the total number of CPU cores in the target mode deployment indication data, and determine at least one target number of synchronously running cores based on the total number of synchronously running cores. Accordingly, the grid division results corresponding to each target number of synchronously running cores and the grid number information of each nested layer in at least one target number of synchronously running cores can be determined respectively; and based on the grid division results corresponding to each target number of synchronously running cores, a set of indication data of the number of synchronously running cores to be recommended is determined, and the set of indication data of the number of synchronously running cores to be recommended includes the grid division results corresponding to each number of synchronously running cores to be recommended in N numbers of synchronously running cores to be recommended. Based on this, when N is greater than or equal to the preset number threshold, for any number of synchronously running cores to be recommended in the N numbers of synchronously running cores to be recommended, the recommended indicator calculation information of each nested layer under any number of synchronously running cores to be recommended can be determined respectively based on the grid division results corresponding to any number of synchronously running cores to be recommended. Furthermore, the recommended indicator calculation information of each nested layer under any number of cores to be recommended for simultaneous operation can be used to calculate the recommended indicator value of any number of cores to be recommended for simultaneous operation, and based on the recommended indicator values ​​of each number of cores to be recommended for simultaneous operation, the target number of cores to be recommended can be determined, so as to determine the target recommended number of central processing unit cores under the target mode deployment indication data based on the target number of cores to be recommended. It can be seen that the embodiment of the present invention can achieve the optimal setting of the number of CPU cores through the target recommended number of central processing unit cores, which can reduce erroneous settings and reduce the time for deploying numerical models. That is to say, the embodiment of the present invention proposes a parallel partitioned trial calculation preprocessor algorithm for the target model, thereby proposing a process scheme for determining the number of CPU cores in the deployment of a model (such as an air quality model), which can conveniently deploy numerical models, thereby effectively improving the efficiency of numerical model deployment, and can quickly give the most appropriate number of cores (i.e., the target recommended number of central processing unit cores) to ensure that timeliness requirements are met and save deployment parameter setting and debugging time; wherein, parameter setting and debugging are key processes in the process of numerical model deployment, and the embodiment of the present invention can effectively reduce the work pressure and time occupancy of this process, can effectively reduce costs, improve performance, and can improve the running performance, running speed and even the accuracy of model forecast results of the model through the grid division results corresponding to the target recommended number of central processing unit cores.

[0075] Based on the description of the relevant embodiments of the above numerical mode deployment method, the embodiment of the present invention further proposes a numerical mode deployment device, which can be a computer program (including program code) running in an electronic device; Figure 5 As shown, the numerical model deployment device may include an acquisition unit 501 and a processing unit 502. The numerical model deployment device may execute Figure 1 or Figure 3The numerical model deployment method shown, that is, the numerical model deployment device can run the above-mentioned units: An acquisition unit 501 is used to acquire target mode deployment indication data, wherein the target mode deployment indication data includes information on the number of grids in each of the M nested layers and the total number of CPU cores, where M is a positive integer; The processing unit 502 is configured to determine the total number of synchronously operating cores based on the total number of CPU cores in the target mode deployment indication data, and determine at least one target number of synchronously operating cores based on the total number of synchronously operating cores; The processing unit 502 is further configured to determine the grid division results corresponding to each target number of synchronous running cores in the at least one target number of synchronous running cores and the grid number information of each nested layer respectively; The processing unit 502 is further configured to determine a set of indication data of the number of synchronous running cores to be recommended based on the grid division results corresponding to the target numbers of synchronous running cores, wherein the set of indication data of the number of synchronous running cores to be recommended includes a grid division result corresponding to each number of synchronous running cores to be recommended among N numbers of synchronous running cores to be recommended, where N is a non-negative integer; The processing unit 502 is also used to calculate the recommended index value of each to-be-recommended number of cores to be run simultaneously based on the grid division results corresponding to each to-be-recommended number of cores to be run simultaneously, and determine the target to-be-recommended number of cores based on the recommended index value of each to-be-recommended number of cores to be run simultaneously, when N is greater than or equal to a preset number threshold, so as to determine the target recommended number of central processing unit cores under the target mode deployment indication data based on the target number of cores to be recommended, and the target recommended number of central processing unit cores supports the use of numerical mode deployment.

[0076] In one embodiment, the target mode deployment indication data also includes a central processing unit utilization threshold; when determining at least one target number of synchronous running cores based on the total number of synchronous running cores, it can be specifically used to: calculate the synchronous running core number threshold based on the total number of synchronous running cores and the central processing unit utilization threshold; and determine the number of synchronous running cores to be determined in the current iteration, and judge whether the number of synchronous running cores to be determined in the current iteration is a target number of synchronous running cores; wherein the number of synchronous running cores to be determined in the first iteration is the total number of synchronous running cores; if the number of synchronous running cores to be determined in the current iteration is greater than or equal to the synchronous running core number threshold, and the number of synchronous running cores to be determined in the current iteration is not a prime number, then the number of synchronous running cores to be determined in the current iteration is taken as a target number of synchronous running cores; if the number of synchronous running cores to be determined in the current iteration is a prime number, then the number of synchronous running cores to be determined in the current iteration is not taken as a target number of synchronous running cores; iteratively execute the determination of the number of synchronous running cores to be determined in the current iteration until the number of synchronous running cores to be determined in the current iteration is less than the synchronous running core number threshold, so as to achieve the determination of at least one target number of synchronous running cores.

[0077] In another implementation manner, the grid division result corresponding to a synchronous running core number includes the grid number information of each grid block under the corresponding synchronous running core number at each nested layer, and the grid number information of a grid block includes the grid number of the corresponding grid block in each division direction in multiple division directions; when the processing unit 502 determines the grid division result corresponding to each target synchronous running core number based on each target synchronous running core number in the at least one target synchronous running core number and the grid number information of each nested layer, it can be specifically used to: after taking the synchronous running core number to be determined under the current iteration as a target synchronous running core number, determine the grid division result corresponding to the synchronous running core number to be determined under the current iteration based on the synchronous running core number to be determined under the current iteration and the grid number information of each nested layer; When the processing unit 502 determines the set of data indicating the number of synchronous running cores to be recommended based on the grid division results corresponding to the target numbers of synchronous running cores, it can be specifically used to: if there is no target grid block in the grid division results corresponding to the number of synchronous running cores to be determined in the current iteration, then the number of synchronous running cores to be determined in the current iteration is used as a number of synchronous running cores to be recommended, so as to add the data indicating the number of synchronous running cores to be recommended corresponding to the number of synchronous running cores to be determined in the current iteration to the set of data indicating the number of synchronous running cores to be recommended; wherein, one data indicating the number of synchronous running cores to be recommended includes a grid division result corresponding to the number of synchronous running cores to be recommended, and the target grid block refers to a grid block in which the number of grids in any division direction is less than the specified number of grids; after stopping the iteration, the set of data indicating the number of synchronous running cores to be recommended is obtained.

[0078] In another embodiment, the target recommended number of CPU cores is obtained by running a preprocessing module on the target mode deployment indication data; the acquisition unit 501 may also be used to: acquire a set of historical record data, where one historical record data includes one mode deployment indication data; The processing unit 502 can also be used to: determine whether the preprocessing module is run for the first time through the target mode deployment indication data based on the historical record data set and the target mode deployment indication data; if it is determined that the preprocessing module is run for the first time through the target mode deployment indication data, trigger the execution of the total number of central processing unit cores based on the target mode deployment indication data to determine the total number of synchronously running cores; if it is determined that the preprocessing module is not run for the first time through the target mode deployment indication data, output a non-first-time running prompt message.

[0079] In another embodiment, the processing unit 502 may also be used to: when N is less than the preset number threshold, output a no-recommendation prompt message, wherein the no-recommendation prompt message is used to prompt that there is no CPU core that meets the conditions under the target mode deployment indication data.

[0080] In another embodiment, when the processing unit 502 calculates the recommended index value of each to-be-recommended number of cores for synchronous operation based on the grid division results corresponding to each to-be-recommended number of cores for synchronous operation, it can be specifically used to: for any to-be-recommended number of cores for synchronous operation among the N to-be-recommended number of cores for synchronous operation, based on the grid division results corresponding to any to-be-recommended number of cores for synchronous operation, respectively determine the recommended index calculation information of each nested layer under any to-be-recommended number of cores for synchronous operation; and calculate the recommended index value of any to-be-recommended number of cores for synchronous operation using the recommended index calculation information of each nested layer under any to-be-recommended number of cores for synchronous operation.

[0081] In another embodiment, when the processing unit 502 determines the target number of cores to be recommended based on the recommended index values ​​of each number of cores to be recommended for synchronous operation, it can be specifically used to: determine the number of cores to be recommended for synchronous operation with the smallest recommended index value from the N numbers of cores to be recommended for synchronous operation based on the recommended index values ​​of each number of cores to be recommended for synchronous operation; and determine the target number of cores to be recommended based on the number of cores to be recommended for synchronous operation with the smallest recommended index value.

[0082] In another embodiment, the processing unit 502 can also be used to: start the operation of the target mode according to the target number of cores to be recommended and the grid number information of each nested layer, and obtain the mode case running time of the target mode for the target number of cores to be recommended, so as to check whether the mode case running time is less than the preset mode running time threshold; if the mode case running time is less than the preset mode running time threshold, trigger the execution of the target recommended number of central processing unit cores under the target mode deployment indication data determined based on the target number of cores to be recommended; if the mode case running time is greater than or equal to the preset mode running time threshold, output the mode deployment indication data adjustment prompt.

[0083] According to one embodiment of the present invention, Figure 5 Each unit in the numerical model deployment device shown can be combined into one or several other units separately or in whole, or one (some) of the units can be further divided into multiple functionally smaller units, which can achieve the same operation without affecting the technical effect of the embodiment of the present invention. According to another embodiment of the present invention, it can be executed on a general electronic device such as a computer including a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM) and other processing elements and storage elements. Figure 1 or Figure 3 A computer program (including program code) for each step involved in the corresponding method shown in Figure 5 The numerical mode deployment device shown in the figure is used to implement the numerical mode deployment method of the embodiment of the present invention.

[0084] Based on the description of the above method embodiment and device embodiment, the exemplary embodiment of the present invention further provides an electronic device, including: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to enable the electronic device to perform the method according to the embodiment of the present invention when executed by the at least one processor.

[0085] 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 used to cause the computer to perform a method according to an embodiment of the present invention.

[0086] An exemplary embodiment of the present invention further provides a chip, wherein the chip is located in an electronic device, and the chip is used to execute the method according to the embodiment of the present invention.

[0087] An exemplary embodiment of the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to enable the computer to perform a method according to an embodiment of the present invention.

[0088] refer to Figure 6 , a block diagram of an electronic device 600 that can be used as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices or various forms of mobile devices. The components shown herein, their connections and relationships, and their functions are only examples. Figure 6 As shown, the electronic device 600 includes a computing unit 601, which 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 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0089] Multiple 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 can be any type of device that can input information to the electronic device 600. The input unit 606 can receive input digital or character information, and generate key signal input related to the user settings and / or function control of the electronic device. The output unit 607 can be any type of device that can present information, and can include but is not limited to a display, a vibrator, and / or a printer. The storage unit 608 can include but is not limited to a disk, an optical disk. 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 telecommunication networks, and can include but is not limited to a modem, a wireless communication transceiver, and / or a chipset, etc. The computing unit 601 can be various general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include but are not limited to a central processing unit (CPU), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above. For example, in some embodiments, the numerical mode deployment method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 600 via the ROM 602 and / or the communication unit 609. In some embodiments, the computing unit 601 may be configured to perform the numerical mode deployment method in any other appropriate manner (e.g., by means of firmware).

[0090] Furthermore, it should be understood that what is disclosed above is only a preferred embodiment of the present invention, and certainly cannot be used to limit the scope of rights of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A numerical model deployment method, characterized in that: include: Obtain target mode deployment indication data, wherein the target mode deployment indication data includes information on the number of grids in each of the M nested layers and the total number of CPU cores, where M is a positive integer; Determine the total number of cores running simultaneously based on the total number of CPU cores in the target mode deployment indication data, and determine at least one target number of cores running simultaneously based on the total number of cores running simultaneously; Determine the grid division results corresponding to the respective target numbers of synchronously running cores in the at least one target number of synchronously running cores and the grid number information of the respective nested layers; Determine a set of indication data of the number of synchronous running cores to be recommended based on the grid division results corresponding to each target number of synchronous running cores, wherein the set of indication data of the number of synchronous running cores to be recommended includes the grid division results corresponding to each number of synchronous running cores to be recommended among N numbers of synchronous running cores to be recommended, where N is a non-negative integer; When N is greater than or equal to a preset number threshold, the recommended index value of each to-be-recommended number of cores running simultaneously is calculated based on the grid division results corresponding to each to-be-recommended number of cores running simultaneously, and the target to-be-recommended number of cores is determined based on the recommended index value of each to-be-recommended number of cores running simultaneously, so as to determine the target recommended number of central processing unit cores under the target mode deployment indication data based on the target number of cores to be recommended, and the target recommended number of central processing unit cores supports the use of numerical mode deployment.

2. The method according to claim 1, characterized in that The target mode deployment indication data also includes a CPU utilization threshold; The determining at least one target number of synchronously running cores based on the total number of synchronously running cores comprises: Based on the total number of synchronously running cores and the CPU utilization threshold, a synchronously running core number threshold is calculated; and the number of synchronously running cores to be determined in the current iteration is determined, and whether the number of synchronously running cores to be determined in the current iteration is a target number of synchronously running cores; wherein the number of synchronously running cores to be determined in the first iteration is the total number of synchronously running cores; If the number of synchronous running cores to be determined in the current iteration is greater than or equal to the synchronous running core number threshold, and the number of synchronous running cores to be determined in the current iteration is not a prime number, the number of synchronous running cores to be determined in the current iteration is used as a target number of synchronous running cores; If the number of synchronously running cores to be determined in the current iteration is a prime number, the number of synchronously running cores to be determined in the current iteration is not used as a target number of synchronously running cores; The determining of the number of synchronously running cores to be determined in the current iteration is iteratively performed until the number of synchronously running cores to be determined in the current iteration is less than the synchronously running core number threshold, so as to achieve the determination of the at least one target synchronously running core number.

3. The method according to claim 2, characterized in that The grid division result corresponding to a synchronous running core number includes grid number information of each grid block under the corresponding synchronous running core number at each nested layer, and the grid number information of a grid block includes the grid number of each grid block in multiple division directions; the determining the grid division result corresponding to each target synchronous running core number based on each target synchronous running core number in the at least one target synchronous running core number and the grid number information of each nested layer, includes: After taking the number of synchronous running cores to be determined in the current iteration as a target number of synchronous running cores, determining a grid division result corresponding to the number of synchronous running cores to be determined in the current iteration based on the number of synchronous running cores to be determined in the current iteration and the grid number information of each nested layer; The determining of a set of indication data of the number of synchronously running cores to be recommended based on the grid division results corresponding to the respective target numbers of synchronously running cores comprises: If there is no target grid block in the grid division result corresponding to the number of synchronous running cores to be determined in the current iteration, the number of synchronous running cores to be determined in the current iteration is taken as a number of synchronous running cores to be recommended, so as to add the indication data of the number of synchronous running cores to be recommended corresponding to the number of synchronous running cores to be determined in the current iteration to the indication data set of the number of synchronous running cores to be recommended; wherein one indication data of the number of synchronous running cores to be recommended includes a grid division result corresponding to the number of synchronous running cores to be recommended, and the target grid block refers to a grid block in which the number of grids in any division direction is less than the specified number of grids; After the iteration is stopped, the to-be-recommended synchronously-running core number indication data set is obtained.

4. The method according to any one of claims 1 to 3, characterized in that: The target recommended number of CPU cores is obtained by running a preprocessing module on the target mode deployment indication data; the method further comprises: Obtain a historical record data set, where each historical record data includes a pattern deployment indication data; Based on the historical record data set and the target mode deployment indication data, determining whether to run the preprocessing module for the first time through the target mode deployment indication data; If it is determined that the preprocessing module is run for the first time through the target mode deployment indication data, triggering the execution of the method based on the total number of CPU cores in the target mode deployment indication data to determine the total number of synchronously running cores; If it is determined that this is not the first time that the preprocessing module is run through the target mode deployment indication data, a prompt message indicating that it is not the first time that the preprocessing module is run is output.

5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: When N is less than the preset number threshold, a no-recommendation prompt message is output, where the no-recommendation prompt message is used to prompt that there is no CPU core that meets the conditions under the target mode deployment indication data.

6. The method according to any one of claims 1 to 3, characterized in that: The calculating the recommended index value of each number of cores to be recommended for simultaneous operation based on the grid division results corresponding to each number of cores to be recommended for simultaneous operation, comprises: For any number of cores to be recommended for simultaneous operation among the N numbers of cores to be recommended for simultaneous operation, based on a grid division result corresponding to the number of cores to be recommended for simultaneous operation, respectively determine the recommended index calculation information of each nested layer under the number of cores to be recommended for simultaneous operation; The recommended index calculation information of each nested layer under any number of cores to be recommended for simultaneous operation is used to calculate the recommended index value of any number of cores to be recommended for simultaneous operation.

7. The method according to any one of claims 1 to 3, characterized in that: The determining the target number of cores to be recommended based on the recommendation indicator values ​​of the respective numbers of cores to be recommended for simultaneous operation includes: Based on the recommendation index values ​​of the respective numbers of synchronously running cores to be recommended, determining a number of synchronously running cores to be recommended with a minimum recommendation index value from the N numbers of synchronously running cores to be recommended; Based on the number of cores to be recommended for synchronous operation with the smallest recommended index value, a target number of cores to be recommended is determined.

8. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: According to the target number of cores to be recommended and the number of grids of each nested layer, the operation of the target mode is started, and the mode case running time of the target mode for the target number of cores to be recommended is obtained to check whether the mode case running time is less than a preset mode running time threshold; If the mode case running time is less than the preset mode running time threshold, triggering the step of determining the target recommended number of CPU cores under the target mode deployment indication data based on the target number of cores to be recommended; If the mode case running time is greater than or equal to the preset mode running time threshold, a mode deployment indication data adjustment prompt is output.

9. A numerical model deployment device, characterized in that: The device comprises: An acquisition unit, used to acquire target mode deployment indication data, wherein the target mode deployment indication data includes information on the number of grids in each of the M nested layers and the total number of CPU cores, where M is a positive integer; a processing unit, configured to determine a total number of synchronously operating cores based on a total number of central processing unit cores in the target mode deployment indication data, and determine at least one target number of synchronously operating cores based on the total number of synchronously operating cores; The processing unit is further configured to determine the grid division results corresponding to each target number of synchronously running cores in the at least one target number of synchronously running cores and the grid number information of each nested layer respectively; The processing unit is further configured to determine a set of indication data of the number of synchronous running cores to be recommended based on the grid division results corresponding to each target number of synchronous running cores, wherein the set of indication data of the number of synchronous running cores to be recommended includes a grid division result corresponding to each number of synchronous running cores to be recommended among N numbers of synchronous running cores to be recommended, where N is a non-negative integer; The processing unit is also used to calculate the recommended index value of each to-be-recommended number of cores to be run simultaneously based on the grid division results corresponding to each to-be-recommended number of cores to be run simultaneously, and determine the target to-be-recommended number of cores based on the recommended index value of each to-be-recommended number of cores to be run simultaneously, when N is greater than or equal to a preset number threshold, so as to determine the target recommended number of central processing unit cores under the target mode deployment indication data based on the target number of cores to be recommended, and the target recommended number of central processing unit cores supports the use of numerical mode deployment.

10. An electronic device, characterized in that: include: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 8.

11. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-8.

12. A chip, characterized in that: The chip is located in an electronic device, and the chip is used to execute the method according to any one of claims 1-8.

Citation Information

Patent Citations

  • CPU + GPU heterogeneous parallel optimization method in gas dynamic theory unified algorithm

    CN111858066A

  • Numerical weather forecasting method and device based on super computer

    CN114372212A

  • Data processing method, equipment and medium

    CN115685394A

  • Air quality mode operation method and device, storage medium and electronic equipment

    CN116954932A

  • Equipment configuration method and device for interactive numerical simulation and electronic equipment

    CN117113727A