Proxy model determination method and device, electronic equipment and storage medium

By automatically generating agent models, the problem of low computational efficiency of Modelica model simulation is solved, efficient calculation and consistent and accurate model simplification are achieved, and labor costs are reduced.

CN119989903APending Publication Date: 2025-05-13SUZHOU TONGYUAN SOFT CONTROL INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510083189.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

In the simulation calculation of Modelica model, since the model contains a large number of differential equations and algebraic equations, direct simulation calculation consumes a lot of computing resources and time, especially when dealing with large-scale systems or high-precision simulations, the calculation efficiency is low. The prior art relies on manual experience for model simplification, but increases labor costs and makes it difficult to ensure consistency and accuracy.

Method used

By obtaining the input variable information of the simulation model to be processed, sampling processing is performed to determine the sample input data, and simulation processing is performed on the sample input data based on the simulation model to obtain the simulation data. Then, the training agent model is trained based on the simulation data, and the target agent model is obtained, so as to simulate the simulation calculation of the pending simulation model based on the target agent model.

Benefits of technology

The automatic generation of agent models is realized, the computing efficiency is improved, and the consistency and accuracy of the model simplification process is ensured, thus reducing labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989903A_ABST
    Figure CN119989903A_ABST
Patent Text Reader

Abstract

The invention discloses a proxy model determination method and device, electronic equipment and a storage medium. The method is applied to a Modelica model, and the specific scheme is as follows: obtaining input variable information of a to-be-processed simulation model, sampling the input variable information, and determining sample input data corresponding to the input variable information; performing simulation processing on the sample input data based on the to-be-processed simulation model to obtain simulation data corresponding to the sample input data; and training a to-be-trained agent model based on the simulation data to obtain a target agent model, the to-be-trained agent model being determined based on the data distribution information and the input variable information of the simulation data. According to the method, automatic generation of the agent model is realized, the calculation efficiency is improved, and the consistency and accuracy of the model simplification process are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for determining an agent model. Background Art

[0002] As a multi-domain system modeling language, Modelica is widely used to build mathematical models of various complex systems, such as aerodynamic thermodynamic models of aircraft, automobile powertrain models, and energy conversion system models.

[0003] In the traditional application of Modelica models, since Modelica models contain a large number of differential equations and algebraic equations, direct simulation of Modelica models will consume a lot of computing resources and time costs. In particular, when dealing with large-scale system operations or high-precision simulation requirements based on Modelica models, the computing efficiency is relatively low.

[0004] In order to solve the above problems, the existing technology mainly relies on the experience and expertise of modeling engineers to simplify the Modelica model in a targeted manner to improve the calculation efficiency. However, the above method not only increases the manpower cost, but also makes it difficult to ensure the consistency and accuracy of the model simplification process, which is not conducive to the subsequent application of the Modelica model. Summary of the invention

[0005] The present invention provides a proxy model determination method, device, electronic device and storage medium, which realize automatic generation of proxy models, improve computing efficiency and ensure consistency and accuracy of the model simplification process.

[0006] According to one aspect of the present invention, a proxy model determination method is provided, which is applied to a Modelica model. The method comprises:

[0007] Obtaining input variable information of the simulation model to be processed, and performing sampling processing on the input variable information to determine sample input data corresponding to the input variable information;

[0008] Performing simulation processing on the sample input data based on the simulation model to be processed to obtain simulation data corresponding to the sample input data;

[0009] The proxy model to be trained is trained based on the simulation data to obtain a target proxy model, wherein the proxy model to be trained is determined based on data distribution information and input variable information of the simulation data.

[0010] According to another aspect of the present invention, there is provided a proxy model determination device, which is applied to a Modelica model, and comprises:

[0011] An input data acquisition module is used to acquire input variable information of a simulation model to be processed, and to perform sampling processing on the input variable information to determine sample input data corresponding to the input variable information;

[0012] A simulation data determination module is used to perform simulation processing on the sample input data based on the simulation model to be processed to obtain simulation data corresponding to the sample input data;

[0013] The proxy model determination module is used to train the proxy model to be trained based on the simulation data to obtain a target proxy model, wherein the proxy model to be trained is determined based on the data distribution information and input variable information of the simulation data.

[0014] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the agent model determination method according to any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the agent model determination method of any embodiment of the present invention when executed.

[0019] According to another aspect of the present invention, a computer program product is provided, including a computer program, wherein the computer program implements the agent model determination method according to any embodiment of the present invention when executed by a processor.

[0020] The technical solution of the embodiment of the present invention obtains the input variable information of the simulation model to be processed, and samples the input variable information to obtain sample input data corresponding to the input variable information. The sample input data is simulated using the simulation model to be processed to obtain simulation data corresponding to the sample input data. The proxy model to be trained is trained based on the simulation data to obtain a target proxy model, so as to simulate the simulation calculation of the simulation model to be processed based on the target proxy model. The present invention solves the problems in the prior art of relying on manual experience to simplify the model of the simulation model to be processed, which leads to high labor costs and difficulty in ensuring the consistency and accuracy of the model simplification process. The proxy model to be trained is trained based on the simulation data obtained from the simulation model to be processed to obtain a target proxy model, so as to simulate the simulation calculation of the simulation model to be processed based on the target proxy model, thereby realizing the automatic generation of the proxy model, which not only improves the calculation efficiency, but also ensures the consistency and accuracy of the model simplification process.

[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0023] Figure 1 is a flow chart of a method for determining an agent model provided by an embodiment of the present invention;

[0024] Figure 2 is a flow chart of a method for determining an agent model provided by an embodiment of the present invention;

[0025] Figure 3 is a structural diagram of a proxy model determination device provided by an embodiment of the present invention;

[0026] Figure 4 It is a structural schematic diagram of an electronic device for implementing the proxy model determination method according to an embodiment of the present invention. DETAILED DESCRIPTION

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

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] Embodiment 1

[0030] Figure 1 This is a flowchart of a proxy model determination method provided by the first embodiment of the present invention. This embodiment can be applied to train the proxy model to be trained according to the simulation data output by the simulation model to be processed, and obtain the target proxy model, so as to simulate the simulation calculation of the simulation model to be processed based on the target proxy model. The method can be executed by a proxy model determination device, which can be implemented in the form of hardware and / or software, and can be configured in electronic devices such as mobile phones, computers or servers. Figure 1 As shown, the method includes:

[0031] S110 , obtaining input variable information of the simulation model to be processed, and performing sampling processing on the input variable information to determine sample input data corresponding to the input variable information.

[0032] Among them, in order to improve the calculation efficiency of the Modelica model, the Modelica model can be subjected to model simplification processing. In an embodiment of the present invention, the simulation model to be processed can be understood as a Modelica model that currently requires model simplification processing. The input variable information can be understood as the input variables of the simulation model to be processed and the information associated with the input variables. Optionally, the input variable information may include at least one input variable, the data type of the input variable, the variable data range of the input variable, etc. For example, if the simulation model to be processed is a Modelica model determined based on an industrial automation production line, the input variable information may include a motor speed setting value, a data type of the motor speed setting value, and a variable data range of the motor speed setting value, etc.

[0033] The sampling process may be to use a sampling algorithm to perform random sampling on the variable data range of each input variable in the input variable information to obtain at least one sample input data corresponding to each input variable. Optionally, the sampling algorithm may be at least one of a Latin hypercube design method, a uniform design method, or an orthogonal experimental design method. A suitable sampling algorithm may be selected according to actual conditions. For example, the uniform design method can make the sample input data more evenly distributed within the variable data range when the number of sampling times is small, and is suitable for situations where the uniformity of the sample input data is required to be high. The orthogonal experimental design method can effectively analyze the correlation between the input variables, and is suitable for Modelica models with complex correlations between input variables. The sample input data may be variable data randomly sampled from the variable data range of the input variable.

[0034] Specifically, a model file of a simulation model to be processed is obtained, and the model file of the simulation model to be processed is parsed to obtain input variable information of the simulation model to be processed. The input variable information may include at least one input variable corresponding to the simulation model to be processed, a variable type of each input variable, and a variable data range. The variable data range of each input variable is randomly sampled to obtain at least one sample input data corresponding to each input variable.

[0035] Optionally, the output variable information of the simulation model to be processed can also be obtained based on the above method. The input variable information and output variable information of the simulation model to be processed are sorted into data in a structured data format and stored in a preset interface information database to facilitate subsequent data access and call. Among them, the structured data format can be a tree structure.

[0036] In an embodiment of the present invention, the method for obtaining input variable information can be: obtaining model file data of the simulation model to be processed, and parsing the model file data to obtain a text to be processed, wherein the text to be processed is a text defining input variables; processing the text to be processed according to preset variable definition rules to determine input variable information, wherein the input variable information includes at least: at least one input variable and a variable data range of each input variable.

[0037] Among them, the model file data can be a model file of the simulation model to be processed. Optionally, if the simulation model to be processed is a Modelica model, the model file data can be file data with a file suffix of .mo corresponding to the simulation model to be processed. The text to be processed can be a text used to define input variables. The preset variable definition rules can be understood as the grammatical rules for defining input variables in the Modelica language specification. The input variable information can be the input variables extracted from the text to be processed and the variable data range of the input variables. The variable data range can be understood as the range of values ​​allowed to be set for the input variable.

[0038] Specifically, the model file data corresponding to the simulation model to be processed with the file suffix .mo is obtained, and the model file data is parsed line by line using text parsing technology to identify the text to be processed that defines the input variables in the model file data. According to the preset variable definition rules, the text to be processed is analyzed to obtain at least one input variable in the text to be processed and the variable data range of each input variable.

[0039] Optionally, the model file data may be parsed line by line using text parsing technology to identify the text to be used that defines the output variable in the model file data. The text to be used is analyzed according to the preset variable definition rules to obtain at least one output variable in the text to be used and the variable data range of each output variable.

[0040] Exemplarily, the model file data corresponding to the simulation model to be processed is obtained with the file suffix .mo. The model file data is read line by line using text parsing technology to identify the text to be processed that defines the input variables and the text to be used that defines the output variables in the model file data. According to the grammatical rules for defining input variables and output variables in the Modelica language specification, the text to be processed and the text to be used are processed to obtain input variable information and output variable information. Among them, the input variable information includes at least one input variable name, the variable type of the input variable, and the variable data range of the input variable. The output variable information includes at least one output variable name, the variable type of the output variable, and the variable data range of the output variable. The input variable information and the output variable information are organized into data in a structured data format and stored in a preset interface information database to facilitate the acquisition and use of subsequent data.

[0041] For example, the Modelica model of an industrial automation production line, whose simulation model to be processed is taken as an example for explanation. The model file data of the Modelica model of the industrial automation production line is parsed and processed to obtain the text to be processed and the text to be used. According to the grammatical rules for defining input variables and output variables in the Modelica language specification, the text to be processed and the text to be used are processed to obtain input variable information and output variable information. Among them, the input variable information can be information such as the motor speed setting value, the variable type corresponding to the motor speed setting value, and the variable data range of the motor speed setting value. The output variable information can be information such as the product flow monitoring value of each link of the production line, the variable type corresponding to the product flow monitoring value of each link of the production line, and the variable data range corresponding to the product flow monitoring value of each link of the production line. The input variable information and the output variable information are stored in the corresponding interface information database according to the preset structured data format.

[0042] In an embodiment of the present invention, the input variable information includes the variable data range of each input variable, and the method for determining the sample input data may be: determining a sampling algorithm that matches the preset sampling parameters, and dividing the variable data range of each input variable based on the sampling algorithm to obtain at least one data range to be sampled; performing random data sampling processing on each data range to be sampled to obtain sample input data corresponding to each input variable.

[0043] Among them, the preset sampling parameters may include information such as the preset number of sample input data and the subdivision parameters of the variable data range. The preset number of sample input data can be understood as the number of sample input data collected in the variable data range of each input variable. The degree of subdivision of the variable data range can be understood as how many small data ranges the variable data range is subdivided into, so as to randomly sample the corresponding sample input data in each small data range. The sampling algorithm can be a data sampling algorithm selected according to the preset sampling parameters and actual needs. Optionally, the sampling algorithm can be at least one of the Latin hypercube design method, the uniform design method or the orthogonal experimental design method. The data range to be sampled can be a small data range obtained by dividing the variable data range of the current input variable. At least one data range to be sampled corresponds to the variable data range.

[0044] Specifically, the sampling algorithm is determined according to the preset sampling parameters and actual needs. The variable data range of each input variable is divided and processed by the sampling algorithm to obtain at least one data range to be sampled corresponding to each variable data range. Each data range to be sampled is subjected to data random sampling processing to obtain at least one sample input data corresponding to each input variable, so as to obtain multiple sample input data combinations. Among them, each sample input data combination contains a sample input data of each input variable corresponding to the simulation model to be processed. Based on this, it is convenient to perform simulation processing on each sample input data combination separately using the simulation model to be processed in the subsequent process to obtain simulation data.

[0045] Exemplarily, the Latin hypercube design method is used as an example for explanation of the sampling algorithm. After the input variable information is determined, the Latin hypercube design method is called according to the preset sampling parameters such as the preset number of sample input data and the subdivision parameters of the variable data range set by the user. The variable data range of each input variable is divided into at least one data range to be sampled with equal probability based on the Latin hypercube design method. While ensuring that the probability of random sampling in each data range to be sampled is the same, a sample input data is randomly selected in each data range to be sampled, so that the subsequent sample input data combination has good uniformity and representativeness.

[0046] For example, the Modelica model of a chemical process in the simulation model to be processed is used as an example for explanation. The Modelica model has four input variables, namely temperature, pressure, flow rate and concentration, among which the variable data range of temperature is [20,50]℃, the variable data range of pressure is [1,5]MPa, and the variable data range of flow rate is [0.1,0.5]mol / L. The preset sampling parameters set the number of sample input data to 200. The Latin hypercube design method can be used to divide the variable data ranges of the above four input variables to obtain 200 data ranges to be sampled, and randomly sample data in each data range to be sampled to obtain a sample input data. That is, for each input variable, it corresponds to 200 sample input data. Based on this, 200 sets of sample input data combinations with different temperatures, pressures, flows and concentrations can be obtained. Optionally, these sample input data combinations can be organized into a sample data list, in which each row corresponds to a set of sample input data of a sample input data combination. At the same time, the sample data list also includes information such as the number and generation time of each sample input data combination to facilitate subsequent traceability and management of the sample input data.

[0047] S120 , performing simulation processing on the sample input data based on the simulation model to be processed to obtain simulation data corresponding to the sample input data.

[0048] The simulation data may include sample input data and sample output data output by the simulation model to be processed based on the sample input data. The sample output data includes variable data corresponding to at least one output variable.

[0049] Specifically, according to the simulation environment interface specification corresponding to the Modelica model, the sample input data corresponding to each input variable is input into the simulation model to be processed, and the sample input data is simulated and calculated based on the simulation model to be processed to obtain sample output data corresponding to the sample input data. The sample input data and the sample output data are used as simulation data to train the proxy model based on the simulation data.

[0050] Exemplarily, in combination with the above example, for each group of sample input data combinations in the sample data list, according to the simulation environment interface specification of the simulation model to be processed, the sample input data in the sample input data combination are input one by one into the simulation model to be processed, so as to interact with Modelica simulation environments such as OpenModelica and Dymola to obtain sample output data corresponding to each sample input data combination.

[0051] For example, the Modelica model of a chemical process in the simulation model to be processed is used as an example for explanation. By calling the interface function corresponding to the Modelica simulation environment, the sample input data corresponding to the temperature, pressure, flow rate and concentration are passed to the model variables of the simulation model to be processed, and the simulation calculation process is started to obtain the sample output data output by the simulation model to be processed. Among them, the sample output data includes a variable value corresponding to at least one output variable. The sample input data and the sample output data are associated and integrated to obtain simulation data. For example, the sample input data corresponding to the input variables such as temperature, pressure, flow rate and concentration and the sample output data corresponding to the output variables such as the yield and concentration of the reaction product are stored as simulation data in the corresponding simulation result database to facilitate the use of subsequent simulation data.

[0052] It should be noted that when simulating the sample input data based on the simulation model to be processed, the operating status of the simulation model to be processed can also be monitored to ensure that the simulation model to be processed outputs sample output data corresponding to the sample input data when it operates normally.

[0053] S130 , training the proxy model to be trained based on the simulation data to obtain a target proxy model, wherein the proxy model to be trained is determined based on data distribution information and input variable information of the simulation data.

[0054] Among them, the proxy model to be trained can be a model for simulating the simulation calculation of the simulation model to be processed. The data distribution information of the simulation data can include the data trend of the simulation data, the degree of discreteness, and the correlation between the simulation data. The variable correlation information between the input variables can be determined by the input variable information. The proxy model to be trained can be a model selected from the proxy model algorithm library based on the data distribution information of the simulation data and the variable correlation information corresponding to the input variable information. Optionally, the proxy model to be trained can be one of the models such as a polynomial response surface model, a radial basis function neural network model, a Kriging interpolation model, and a support vector machine model. The target proxy model can be a trained proxy model to be trained.

[0055] Specifically, the sample input data in the simulation data is input into the proxy model to be trained, and the proxy model to be trained is trained to obtain actual output data corresponding to the sample input data. The loss value is calculated by the sample output data in the simulation data and the actual output data. Based on the loss value and at least one preset optimization algorithm, the model parameters of the proxy model to be trained are modified to obtain the target proxy model.

[0056] In an embodiment of the present invention, the method also includes: encapsulating the target proxy model into a module to be integrated, and deploying the module to be integrated in the target system, so that the module to be integrated and other system modules deployed in the target system perform data collaborative processing; wherein the other system modules are modules encapsulated based on the proxy model or the simulation model.

[0057] Among them, the module to be integrated can be a module obtained by encapsulating the target proxy model according to a preset encapsulation format. The preset encapsulation format can be a packaging format of the target proxy model set according to actual needs. Optionally, the preset encapsulation format can be a dynamic link library file format, Python module format, etc.; it can also be a packaging format determined by the application scenario and integration requirements corresponding to the target proxy model. For example, the preset encapsulation format can be an executable file or a Java class library format. For example, in some specific industrial control software, the target proxy model can be encapsulated into an executable file so that the target proxy model can be called and executed in the industrial control software; in system integration based on the Java platform, the target proxy model can be encapsulated into a Java class library to facilitate data interaction with other Java components.

[0058] The target system may be a system that integrates the modules to be integrated corresponding to the target proxy model. The target system may include multiple system modules, each of which may be a module encapsulated by the proxy model or a module encapsulated by the simulation model. For example, if the simulation model is a smaller-scale Modelica model, the simulation model may be directly encapsulated as a system module. Other system modules may be understood as system modules other than the modules to be integrated in the target system.

[0059] Specifically, the computational logic and data structure of the target proxy model are converted and packaged according to a preset packaging format to obtain a module to be integrated, and the module to be integrated is deployed to the target system so that the module to be integrated performs data collaborative processing with other system modules deployed in the target system.

[0060] Optionally, encapsulating the target proxy model as a module to be integrated includes: defining an interface function corresponding to the simulation model to be processed, and encapsulating the interface function, the target proxy model, and model information of the target proxy model as the module to be integrated.

[0061] The interface function may be an input interface function and an output interface function that match the simulation model to be processed. The interface function may enable external software to call the target proxy model just like calling the simulation model to be processed. The model information may include model parameters, algorithm type, calculation logic, data structure and other information of the target proxy model.

[0062] Specifically, define an interface function that matches the simulation model to be processed so that the target proxy model can implement the model call processing corresponding to the simulation model to be processed. Determine the model information of the target proxy model, such as model parameters, algorithm type, calculation logic, and data structure. Encapsulate the target proxy model, interface function, and model information of the target proxy model according to a preset encapsulation format to obtain a module to be integrated corresponding to the target proxy model.

[0063] Exemplarily, the module to be integrated is a Python module as an example for explanation. A set of Python functions are created, the input parameters of these Python functions correspond to the input variables of the simulation model to be processed, and the return values ​​of these Python functions correspond to the output variables of the simulation model to be processed. The target proxy model, interface function and model information of the target proxy model are encapsulated according to the preset encapsulation format. At the same time, the name, version number, developer information and detailed description of the input variables and output variables of the target proxy model are also encapsulated into the module to be integrated to facilitate the user to identify and manage the target proxy model.

[0064] The technical solution of this embodiment obtains the input variable information of the simulation model to be processed, and performs sampling processing on the input variable information to obtain sample input data corresponding to the input variable information. The sample input data is simulated using the simulation model to be processed to obtain simulation data corresponding to the sample input data. The proxy model to be trained is trained based on the simulation data to obtain a target proxy model, so as to simulate the data processing of the simulation model to be processed based on the target proxy model. The present invention solves the problems in the prior art of high labor costs and difficulty in ensuring the consistency and accuracy of the model simplification process caused by relying on manual experience to simplify the model of the simulation model to be processed. The target proxy model is obtained by training the proxy model to be trained based on the simulation data obtained from the simulation model to be processed, so as to simulate the simulation calculation of the simulation model to be processed through the target proxy model, thereby realizing the automatic generation of the proxy model, which not only improves the calculation efficiency, but also ensures the consistency and accuracy of the model simplification process.

[0065] Embodiment 2

[0066] Figure 2 1 is a flow chart of a proxy model determination method provided by Embodiment 2 of the present invention. This embodiment is a preferred embodiment of the above embodiment. The specific implementation method can refer to the technical solution of this embodiment. Among them, the technical terms that are the same or corresponding to the above embodiment are not repeated here.

[0067] like Figure 2 As shown, the method includes:

[0068] S210: Obtain input variable information of the simulation model to be processed, and perform sampling processing on the input variable information to determine sample input data corresponding to the input variable information.

[0069] S220 , performing simulation processing on the sample input data based on the simulation model to be processed to obtain simulation data corresponding to the sample input data.

[0070] S230, determining a proxy model to be trained from at least one proxy model to be selected based on data distribution information of simulation data, variable correlation information between input variables, preset model accuracy information, and preset model complexity information.

[0071] Among them, the data distribution information of the simulation data may include the data trend of the simulation data, the degree of discreteness, and the correlation between the simulation data. The variable correlation information between the input variables may be the correlation information between the output variables determined by statistical methods. The preset model accuracy information may be the accuracy target of the proxy model to be trained, which is set according to actual needs. The preset model complexity information may be the complexity of the proxy model to be trained, which is set according to actual needs. The model complexity is related to data such as the number of model parameters and the number of hidden layers of the model. The proxy model to be selected may be a pre-built proxy model.

[0072] Specifically, after the simulation data is determined, the simulation data can be preprocessed by data cleaning, data standardization, etc. to obtain the simulation data after data preprocessing. The simulation data after data preprocessing is processed based on statistical methods to determine the data distribution information of the simulation data. The input variable information is processed to determine the variable correlation information between the input variables. According to the data distribution information, variable correlation information, preset model accuracy information and preset model complexity information of the simulation data, at least one proxy model to be selected in the proxy model algorithm library is evaluated and processed to determine the proxy model to be trained. It can be understood that the data distribution information and variable correlation information adapted to the simulation data, and the proxy model to be selected that satisfies the preset model accuracy information and preset model complexity information are selected from at least one proxy model to be selected, and the proxy model to be selected is used as the proxy model to be trained.

[0073] Exemplarily, in combination with the above examples, simulation data is obtained in the simulation result database, and data preprocessing is performed on the simulation data to obtain preprocessed simulation data. For example, data cleaning processing such as removing outliers and filling missing values ​​is performed on the simulation data, and data standardization processing such as unifying the simulation data to a similar numerical range is performed. By performing data preprocessing on the simulation data, the data quality of the simulation data can be improved, thereby improving the accuracy of the subsequent selection of the proxy model to be trained. The simulation data after data preprocessing is processed based on statistical methods to determine the data distribution information of the simulation data. The input variable information is processed to determine the variable correlation information between the input variables. According to the data distribution information of the simulation data, the variable correlation information between the input variables, the preset model accuracy information, and the preset model complexity information, the proxy model to be trained is determined from at least one proxy model to be selected in the proxy model algorithm library.

[0074] For example, the proxy model to be selected may include models such as a polynomial response surface model, a radial basis function neural network model, a Kriging interpolation model, and a support vector machine model. If the simulation data presents a linear trend and has low requirements for model complexity, the polynomial response surface model may be selected as the proxy model to be trained. If the simulation data presents a nonlinear trend and the variable correlation between the input variables is relatively complex, the radial basis function neural network model may be selected as the proxy model to be trained. If the input variable is an input variable with spatial correlation, the Kriging interpolation model may be selected as the proxy model to be trained to better fit the local variation characteristics of the model. If the amount of simulation data is small and there are multiple input variables, the support vector machine model may be selected as the proxy model to be trained.

[0075] By setting at least one proxy model to be selected, it is possible to select a suitable proxy model to be trained for training according to different types of simulation models to be processed and user requirements to obtain a target proxy model. That is, no matter it is a linear model or a nonlinear model, or a low-dimensional model or a high-dimensional model, the technical solution provided by the embodiment of the present invention can effectively process it to obtain the corresponding target proxy model, which has a wide range of applications and strong adaptability.

[0076] S240: Input the sample input data in the simulation data into the agent model to be trained to obtain actual output data.

[0077] The actual output data may be data output by the agent model to be trained based on the sample input data.

[0078] Specifically, the sample input data in the simulation data is input into the proxy model to be trained, so as to obtain actual output data based on the proxy model to be trained.

[0079] S250: Determine a loss value based on the actual output data and the sample output data in the simulation data.

[0080] Among them, the loss value can be understood as the difference between the actual output data and the sample output data.

[0081] Specifically, the loss function is used to process the actual output data and the sample output data in the simulation data to obtain a loss value, so as to modify the model parameters of the proxy model to be trained based on the loss value. The loss function may be a mean square error function or a mean absolute error function.

[0082] S260: Based on the loss value and at least one preset optimization algorithm, the model parameters of the proxy model to be trained are modified to obtain a target proxy model.

[0083] The at least one preset optimization algorithm may be an algorithm for iteratively optimizing model parameters of the proxy model to be trained. Optionally, the preset optimization algorithm may be a genetic algorithm or a particle swarm optimization algorithm.

[0084] Generally, the model parameters of the proxy model to be trained are initial parameters or default parameters. When the proxy model to be trained is trained, the model parameters in the proxy model to be trained can be corrected based on the actual output data. That is, the target proxy model can be obtained by correcting the loss value of the proxy model to be trained.

[0085] Specifically, when the model parameters of the proxy model to be trained are corrected using the loss value and at least one preset optimization algorithm, the convergence of the loss function can be used as a training target, such as whether the training error is less than the preset error, or whether the error change tends to be stable, or whether the current number of iterations is equal to the preset number. If the detection reaches the convergence condition, such as the training error of the loss function is less than the preset error, or the error change trend tends to be stable, it indicates that the training of the proxy model to be trained is completed, and the iterative training can be stopped at this time. If it is detected that the convergence condition is not met at present, other simulation data can be further obtained to continue training the proxy model to be trained until the training error of the loss function is within the preset range. When the training error of the loss function reaches convergence, the trained proxy model to be trained can be used as the target proxy model. At this time, the simulation calculation of the simulation model to be processed can be simulated by the target proxy model.

[0086] Exemplarily, the radial basis function neural network model is used as an example for explanation. The center position, width parameter, and connection weight of the radial basis function and the neural network are continuously adjusted by the preset optimization algorithm, and the training error of the proxy model to be trained is minimized as the training goal, and the model parameters of the proxy model to be trained are iteratively optimized. In each iterative optimization process, a part of the simulation data is used as a training set to train the proxy model to be trained, and another part of the simulation data is used as a verification set to evaluate the model performance of the proxy model to be trained. The search direction and step size of the preset optimization algorithm are adjusted according to the training error feedback corresponding to the verification set. When the training error converges to the preset error or the number of iterations reaches the preset number of conditions, the target proxy model is obtained.

[0087] Optionally, model parameters and structural information of the target proxy model may be obtained based on the trained target proxy model, and stored in a proxy model library.

[0088] The technical solution of this embodiment obtains the input variable information of the simulation model to be processed, and performs sampling processing on the input variable information to determine the sample input data corresponding to the input variable information. The sample input data is simulated based on the simulation model to be processed to obtain simulation data corresponding to the sample input data. According to the data distribution information of the simulation data, the variable correlation information between the input variables, the preset model accuracy information and the preset model complexity information, the proxy model to be trained is determined from at least one proxy model to be selected. The sample input data in the simulation data is processed based on the proxy model to be trained to obtain actual output data. Based on the actual output data and the sample output data in the simulation data, the loss value is determined, and the model parameters of the proxy model to be trained are corrected based on the loss value and at least one preset optimization algorithm to obtain the target proxy model. The present invention obtains the target proxy model by training the proxy model to be trained based on the simulation data, and simulates the simulation calculation of the simulation model to be processed through the target proxy model, thereby replacing the complex Modelica model with the target proxy model with a lower computational cost, and facilitating subsequent data processing and optimization operations based on the target proxy model. In the scenario where the target proxy model is called multiple times, the consumption of computing resources is greatly reduced, and the computing time is reduced. For example, if the simulation model to be processed is a large aircraft aerodynamic thermodynamic Modelica model, the target proxy model provided by the embodiment of the present invention can be used to perform subsequent model optimization design, which can shorten the calculation time by dozens or even hundreds of times, making large-scale optimization calculations that were difficult to achieve in actual engineering applications possible. The above process of automatically generating the target proxy model not only reduces the dependence on manual experience, but also ensures the consistency and accuracy of the model simplification process, which is conducive to the management and application of large-scale model libraries. Different Modelica models can automatically generate proxy models according to the same process, which improves the efficiency and quality of engineering development.

[0089] Embodiment 3

[0090] Figure 3 Schematic diagram of the structure of a proxy model determination device provided by Embodiment 3 of the present invention. Figure 3 As shown, the device includes: an input data acquisition module 310, a simulation data determination module 320 and an agent model determination module 330.

[0091] The input data acquisition module 310 is used to obtain the input variable information of the simulation model to be processed, and to sample the input variable information to determine the sample input data corresponding to the input variable information; the simulation data determination module 320 is used to simulate the sample input data based on the simulation model to be processed to obtain the simulation data corresponding to the sample input data; the agent model determination module 330 is used to train the agent model to be trained based on the simulation data to obtain the target agent model, wherein the agent model to be trained is determined based on the data distribution information and input variable information of the simulation data.

[0092] The technical solution of this embodiment obtains the input variable information of the simulation model to be processed, and performs sampling processing on the input variable information to obtain sample input data corresponding to the input variable information. The sample input data is simulated using the simulation model to be processed to obtain simulation data corresponding to the sample input data. The proxy model to be trained is trained based on the simulation data to obtain a target proxy model, so as to simulate the data processing of the simulation model to be processed based on the target proxy model. The present invention solves the problems in the prior art of high labor costs and difficulty in ensuring the consistency and accuracy of the model simplification process caused by relying on manual experience to simplify the model of the simulation model to be processed. The target proxy model is obtained by training the proxy model to be trained based on the simulation data obtained from the simulation model to be processed, so as to simulate the simulation calculation of the simulation model to be processed through the target proxy model, thereby realizing the automatic generation of the proxy model, which not only improves the calculation efficiency, but also ensures the consistency and accuracy of the model simplification process.

[0093] On the basis of the above embodiments, optionally, the device also includes: a model encapsulation module, which is used to encapsulate the target proxy model into a module to be integrated, and deploy the module to be integrated in the target system, so that the module to be integrated and other system modules deployed in the target system can perform data collaborative processing; wherein the other system modules are modules encapsulated based on the proxy model or the simulation model.

[0094] Optionally, the input data acquisition module includes an input variable information acquisition unit, which is used to acquire model file data of the simulation model to be processed, and parse the model file data to obtain a text to be processed, wherein the text to be processed is a text defining input variables; the text to be processed is processed according to preset variable definition rules to determine input variable information, wherein the input variable information includes at least: at least one input variable and a variable data range of each input variable.

[0095] Optionally, the input variable information includes the variable data range of each input variable, and the input data acquisition module includes a sample input data determination unit, which is used to determine a sampling algorithm that matches preset sampling parameters, and divide the variable data range of each input variable based on the sampling algorithm to obtain at least one data range to be sampled; perform random data sampling processing on each data range to be sampled to obtain sample input data corresponding to each input variable.

[0096] Optionally, the device also includes: a module for determining a proxy model to be trained, which is used to determine a proxy model to be trained from at least one proxy model to be selected based on data distribution information of simulation data, variable correlation information between input variables, preset model accuracy information, and preset model complexity information.

[0097] Optionally, the simulation data includes sample input data and sample output data based on the output of the simulation model to be processed. The proxy model determination module is used to input the sample input data into the proxy model to be trained to obtain actual output data; determine the loss value based on the actual output data and the sample output data; based on the loss value and at least one preset optimization algorithm, modify the model parameters of the proxy model to be trained to obtain the target proxy model.

[0098] Optionally, the model encapsulation module includes: a module to be integrated determining unit, which is used to define an interface function corresponding to the simulation model to be processed, and encapsulate the interface function, the target proxy model and the model information of the target proxy model into a module to be integrated.

[0099] The proxy model determination device provided in the embodiment of the present invention can execute the proxy model determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0100] Embodiment 4

[0101] Figure 4 1 is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0102] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0103] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0104] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the agent model determination method.

[0105] In some embodiments, the proxy model determination method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the proxy model determination method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the proxy model determination method in any other appropriate manner (e.g., by means of firmware).

[0106] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0107] The computer program for implementing the agent model determination method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0108] Embodiment 5

[0109] Embodiment 5 of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a processor to execute a proxy model determination method, the method comprising:

[0110] The input variable information of the simulation model to be processed is obtained, and the input variable information is sampled and processed to determine the sample input data corresponding to the input variable information; the sample input data is simulated and processed based on the simulation model to be processed to obtain the simulation data corresponding to the sample input data; the proxy model to be trained is trained based on the simulation data to obtain the target proxy model, wherein the proxy model to be trained is determined based on the data distribution information and input variable information of the simulation data.

[0111] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0112] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0113] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0114] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0115] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0116] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for determining a proxy model, characterized in that: Applied to a Modelica model, the method comprises: Acquire input variable information of the simulation model to be processed, and perform sampling processing on the input variable information to determine sample input data corresponding to the input variable information; Performing simulation processing on the sample input data based on the simulation model to be processed to obtain simulation data corresponding to the sample input data; The agent model to be trained is trained based on the simulation data to obtain a target agent model, wherein the agent model to be trained is determined based on the data distribution information of the simulation data and the input variable information.

2. The method according to claim 1, characterized in that Also includes: The target proxy model is encapsulated as a module to be integrated, and the module to be integrated is deployed in the target system so that the module to be integrated and other system modules deployed in the target system can perform data collaborative processing; wherein the other system modules are modules encapsulated based on the proxy model or the simulation model.

3. The method according to claim 1, characterized in that The step of obtaining input variable information of the simulation model to be processed includes: Acquire model file data of a simulation model to be processed, and parse the model file data to obtain text to be processed, wherein the text to be processed is a text defining input variables; According to preset variable definition rules, the text to be processed is processed to determine input variable information, wherein the input variable information at least includes: at least one input variable and a variable data range of each input variable.

4. The method according to claim 1, characterized in that The input variable information includes a variable data range of each input variable, and the sampling process is performed on the input variable information to determine the sample input data corresponding to the input variable information, including: Determine a sampling algorithm that matches preset sampling parameters, and divide the variable data range of each input variable based on the sampling algorithm to obtain at least one data range to be sampled; Perform random sampling on each data range to be sampled to obtain sample input data corresponding to each input variable.

5. The method according to claim 1, characterized in that Before performing training processing on the agent model to be trained based on the simulation data, the method further includes: Based on the data distribution information of the simulation data, the variable correlation information between the input variables, the preset model accuracy information and the preset model complexity information, a proxy model to be trained is determined from at least one proxy model to be selected.

6. The method according to claim 1, characterized in that The simulation data includes the sample input data and sample output data based on the output of the simulation model to be processed, and the training process is performed on the agent model to be trained based on the simulation data to obtain the target agent model, including: Inputting the sample input data into the agent model to be trained to obtain actual output data; Determine a loss value based on the actual output data and the sample output data; Based on the loss value and at least one preset optimization algorithm, the model parameters of the proxy model to be trained are modified to obtain a target proxy model.

7. The method according to claim 2, characterized in that The step of encapsulating the target proxy model into a module to be integrated includes: An interface function corresponding to the simulation model to be processed is defined, and the interface function, the target proxy model and the model information of the target proxy model are encapsulated as a module to be integrated.

8. A proxy model determination device, characterized in that: Applied to the Modelica model, the device comprises: An input data acquisition module is used to acquire input variable information of a simulation model to be processed, and perform sampling processing on the input variable information to determine sample input data corresponding to the input variable information; A simulation data determination module, used for performing simulation processing on the sample input data based on the simulation model to be processed to obtain simulation data corresponding to the sample input data; The proxy model determination module is used to train the proxy model to be trained based on the simulation data to obtain a target proxy model, wherein the proxy model to be trained is determined based on the data distribution information of the simulation data and the input variable information.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the agent model determination method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the agent model determination method according to any one of claims 1 to 7 when executed.