Simulation model component generation method and apparatus, device, and storage medium

By displaying the component library to the target user, receiving component information, and generating code files for compilation, the problem of low security of model components is solved, and the secure sharing and integrated simulation of model components are realized, thereby improving the efficiency of simulation technology.

CN119989642BActive Publication Date: 2026-04-14TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TSINGHUA UNIVERSITY
Filing Date
2024-12-31
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In the co-simulation process of model components, existing technologies have problems with low security of model components, which can easily lead to the leakage of technical secrets and difficulties in protecting intellectual property rights. In addition, the workload of model interface adaptation is large, making it difficult to guarantee the simulation calculation dimension and realism.

Method used

A method for generating simulation model components is provided. By displaying a component library to the target user, receiving component information, generating an initial simulation model, and generating code files based on the connection relationships for compilation, the target simulation model component is generated, ensuring that internal information is not exposed to other users.

Benefits of technology

It improves the security and versatility of model components, enables secure sharing and integrated simulation of model components, reduces development difficulty and cost, and enhances the efficiency of simulation technology in product development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989642B_ABST
    Figure CN119989642B_ABST
Patent Text Reader

Abstract

The application relates to a simulation model component generation method, device, equipment and storage medium. The method comprises the following steps: displaying a component library to a target user, the component library comprising a plurality of model components, the model components comprising code class model components, user encapsulation program class model components, standard type model components or model components supporting code or user encapsulation program loading; receiving component information input by the target user, the component information comprising the identities of at least two model components and the connection relationship of each model component; generating an initial simulation model according to the component information; generating a code file according to the connection relationship in the initial simulation model, and compiling the code file to generate a target simulation model component, the target simulation model component meeting preset calling interfaces and model calculation requirements, and the internal information of the target simulation model component not being open to other users. The method can improve the security of the simulation model component.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of modeling and simulation technology, and in particular to a method, apparatus, device, and storage medium for generating simulation model components. Background Technology

[0002] Because current equipment / systems involve close coupling of multiple disciplines such as aerodynamics, thermodynamics, mechanics, hydraulics, and electronics, the construction of their numerical simulation models requires the integration and joint simulation of multiple professional model components. During model integration, personnel / units responsible for each subsystem typically submit their respective professional model components to the overall responsible personnel / unit for integration and joint simulation.

[0003] In existing technologies, because model components contain a large amount of technical details and data, the submission of model components can easily lead to the leakage of technical secrets or one's own technical achievements to others. Therefore, the security of model components is low when conducting joint simulations. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, device, and storage medium for generating simulation model components that can improve the security of model components during co-simulation, in order to address the aforementioned technical problems.

[0005] Firstly, this application provides a method for generating simulation model components, including:

[0006] Display the component library to the target user. The component library includes multiple model components, including code-type model components, user-packaged program-type model components, standard type model components, or model components that support loading code or user-packaged programs.

[0007] Receive component information input by the target user. The component information includes the identifiers of at least two model components and the connection relationships between the model components.

[0008] Generate an initial simulation model based on component information;

[0009] Code files are generated based on the connection relationships in the initial simulation model, and the code files are compiled to generate the target simulation model component. The target simulation model component meets the preset calling interface and model calculation requirements, and the internal information of the target simulation model component is not exposed to other users.

[0010] In one embodiment, generating an initial simulation model based on component selection information includes:

[0011] Obtain the parameter list of each model component and display the parameter list to the target user based on the preset graphical configuration interface; receive the parameter configuration information input by the target user, including whether each parameter in the parameter list is publicly available; generate the initial simulation model based on the parameter configuration information and the connection relationship of each model component.

[0012] In one embodiment, an initial simulation model is generated based on parameter configuration information and the connection relationships of each model component, including:

[0013] For each parameter, if the parameter is not publicly disclosed, its attribute value is obtained and used as the fixed value of the parameter when generating the initial simulation model; if there are publicly disclosed parameters, a model attribute configuration interface is generated, which includes the parameter name, parameter description information, and parameter value; based on the fixed value of each parameter and at least one parameter in the model attribute configuration interface, and the connection relationship of each model component, the initial simulation model is generated.

[0014] In one embodiment, receiving component information input by the target user includes:

[0015] Display a canvas interface to the target user so that the target user can select model components from the component library and drag and drop model components onto the canvas interface; receive component information input by the target user based on the canvas interface.

[0016] In one embodiment, the component information may also be functional description information of the target simulation model components. Generating an initial simulation model based on the component information further includes:

[0017] The functional description information is parsed to determine the function of the target simulation model component; the target component is determined from the component library based on the function of the target simulation model component and the preset analysis model; and an initial simulation model is generated based on the target component.

[0018] In one embodiment, in the code file, each model component is a member object, and the parameters of the model component are the properties of the member object.

[0019] Secondly, this application also provides a simulation model component generation apparatus, comprising:

[0020] The display module is used to display the component library to the target user. The component library includes multiple model components, including code-type model components, user-encapsulated program-type model components, standard type model components, or model components that support loading code or user-encapsulated programs.

[0021] The receiving module is used to receive component information input by the target user. The component information includes the identifiers of at least two model components and the connection relationship between each model component.

[0022] The first generation module is used to generate an initial simulation model based on component information;

[0023] The second generation module is used to generate code files based on the connection relationships in the simulation model, and compile the code files to generate target simulation model components. The target simulation model components meet the preset calling interface and model calculation requirements, and the internal information of the target simulation model components is not exposed to other users.

[0024] In one embodiment, the first generation module is specifically used to obtain the parameter list of each model component and display the parameter list to the target user based on a preset graphical configuration interface; receive parameter configuration information input by the target user, the parameter configuration information including whether each parameter in the parameter list is publicly available; and generate an initial simulation model based on the parameter configuration information and the connection relationship of each model component.

[0025] In one embodiment, the first generation module is configured to: for each parameter, if the parameter is not publicly disclosed, obtain the attribute value of the parameter and use the attribute value of the parameter as the fixed value of the parameter when generating the initial simulation model; if there is a publicly disclosed parameter among the parameters, generate a model attribute configuration interface, the attribute configuration interface including the parameter name, parameter description information and parameter value; and generate the initial simulation model based on the fixed value of each parameter and at least one of the parameters in the model attribute configuration interface, and the connection relationship of each model component.

[0026] In one embodiment, the receiving module is specifically configured to display a canvas interface to the target user, so that the target user can select model components from the component library and drag and drop the model components onto the canvas interface; and receive component information input by the target user based on the canvas interface.

[0027] In one embodiment, the component information may also be functional description information of the target simulation model component. The first generation module is further configured to parse the functional description information to determine the function of the target simulation model component; determine the target component from the component library based on the function of the target simulation model component and the preset analysis model; and generate an initial simulation model based on the target component.

[0028] In one embodiment, in the code file, each model component is a member object, and the parameters of the model component are the properties of the member objects.

[0029] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the methods described in the first aspect above.

[0030] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the methods described in the first aspect above.

[0031] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the methods described in the first aspect above.

[0032] The aforementioned simulation model component generation method, apparatus, device, and storage medium, by displaying a component library to the target user, which includes multiple model components such as code-type model components, user-encapsulated program-type model components, standard type model components, or model components that support loading code or user-encapsulated programs; receiving component information input by the target user, including the identifiers of at least two model components and the connection relationships between them; generating an initial simulation model based on the component information; generating a code file based on the connection relationships in the simulation model, and compiling the code file to generate the target simulation model component, which meets preset calling interfaces and model calculation requirements, and whose internal information is not exposed to other users. Thus, when generating the target simulation model component, an initial simulation model can be generated through the model components in the component library and their connection relationships. The initial simulation model is then used to generate a code file, which is then compiled. The resulting target simulation model component can be shared with other users, and because it is encapsulated, its internal structure and data are not exposed to users, effectively improving the security of the model component. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a flowchart illustrating a method for generating simulation model components in one embodiment;

[0035] Figure 2 This is a flowchart illustrating the steps for generating an initial simulation model in one embodiment;

[0036] Figure 3 This is a flowchart illustrating the steps for generating the initial simulation model in another embodiment;

[0037] Figure 4This is a flowchart illustrating the steps of receiving component information input by a target user in one embodiment;

[0038] Figure 5 This is a flowchart illustrating the steps for generating the initial simulation model in another embodiment;

[0039] Figure 6 This is a flowchart illustrating the method for generating simulation model components in another embodiment;

[0040] Figure 7 This is a structural block diagram of a simulation model component generation device in one embodiment;

[0041] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0043] Because current equipment / systems involve close coupling of multiple disciplines such as aerodynamics, thermodynamics, mechanics, hydraulics, and electronics, the construction of their numerical simulation models requires the integration and joint simulation of multiple professional models. During model integration, personnel / units responsible for each subsystem typically submit their respective professional models to the overall responsible personnel / unit for integration and joint simulation. Since the models contain a large amount of technical details and data, the submission process can easily lead to the leakage of technical secrets or personal technological achievements. Therefore, in practice, due to intellectual property rights and achievement protection issues, units / departments / individuals will not share their developed professional models with others. Furthermore, many professions and personnel develop models in various forms, some using self-developed code programs. Different professional models use different tools and integration interfaces. Directly delivering code can easily lead to the leakage of technical achievements and makes it impossible to control the usage scenarios and purposes. Encrypting and encapsulating the code before delivery introduces development difficulties and technical challenges for developers, increasing model development costs and time, often resulting in an unfavorable return on investment.

[0044] Due to difficulties in protecting intellectual property rights and the large workload of adapting model interfaces, the current professional models are severely fragmented, making it difficult to form a system-level integrated simulation effect. Relying solely on simulation calculations of single disciplines and single systems can only calculate the performance results of components or subsystems themselves, and cannot effectively model the mutual influence and interaction processes after multiple systems are coupled. The simulation dimension and realism are difficult to guarantee, resulting in computer simulation technology being unable to effectively assist in system development and performance prediction analysis.

[0045] Therefore, there is an urgent need to develop a method for generating simulation model components that can improve the security and versatility of model components, provide safeguards for the shared use and integrated simulation of model components, and enhance the efficiency of digital simulation technology in the product / equipment development process.

[0046] In view of this, this application provides a method for generating simulation model components that can effectively improve the security of model components. The simulation model component generation method provided in this application can be executed by a simulation model component generation device, which can be implemented through software, hardware, or a combination of both. It can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device in software form. In the following method embodiments, the execution subject is always described using a computer device as an example. The computer device can be a terminal, such as a laptop or desktop computer. This application does not limit the specific type of computer device.

[0047] In one exemplary embodiment, such as Figure 1 As shown, a method for generating simulation model components is provided, including the following steps 101 to 104. Wherein:

[0048] Step 101: Display the component library to the target user.

[0049] The component library includes multiple model components, including code-type model components, user-packaged program-type model components, standard type model components, or model components that support loading code or user-packaged programs.

[0050] Optionally, the target user can be the owner of the simulation model component, that is, the target user can obtain the simulation model component by performing the method in the embodiments of this application.

[0051] For example, model components can be adders, unit converters, etc.

[0052] Optionally, the component library can be stored in the terminal's storage medium in the form of a database or configuration file, or in the server's storage medium. It is understood that when the component library is stored in the server's storage medium, when it is necessary to display the component library to the target user, the terminal can send a component library request message to the server and receive the component library information sent by the server.

[0053] Optionally, model components from the component library can be displayed to the target user through the component display interface.

[0054] In one possible implementation, the component library can be displayed to the target user in the default display mode. Since the component library includes multiple model components, the default display mode can be to display all model components on the component display interface, or to categorize the model components and display the categories of model components on the component display interface. When categorizing model components, they can be categorized according to the functional type of the model component or the first letter of its name.

[0055] In another possible implementation, a preset number of first model components and drop-down icons can be displayed. It is understood that after the drop-down icon is triggered, the component display interface can display a preset number of second model components. The first and second model components are different and both belong to the model library.

[0056] It should be noted that the embodiments of this application do not limit the method of displaying model components in the component library to the target user through the component display interface, and can be set according to actual needs.

[0057] Step 102: Receive component information input by the target user.

[0058] The component information includes the identifiers of at least two model components and the connection relationships between the model components.

[0059] Optionally, the connection relationship between the model components can be a physical connection, a logical connection, or an interface connection, or a combination of the above connections. This application does not limit this. A physical connection can be a connection of model components together through physical media such as wires or mechanical devices, so that energy, matter, or signals can be directly transmitted between the model components. A logical connection can be a connection of model components through software code, algorithms, or data structures, and the connection relationship of model components can be realized through a calculation process. An interface connection can be a connection of model components through a predefined interface standard or protocol.

[0060] In one possible implementation, the system can receive the identifiers of each model component and the connection relationships between them from the target user's input via an input interface.

[0061] In another possible implementation, the component information file can be uploaded to the terminal based on a preset file upload interface. The component information file can then be analyzed using the parsing method corresponding to the file format, thereby receiving the component information input by the target user.

[0062] It is understood that users can enter the identifiers of each model component and the connection relationships between each model component in the component information file, and upload the component information file. The file format of the component information file can be a text file, an image file, or a table file, etc., and this application embodiment does not limit this.

[0063] Optionally, target users can also upload model components from the component library to the terminal through the functional extension modules in the component library (i.e. model components that support loading code or user-packaged programs), and provide data interfaces for interaction with other model components by setting the input and output ports of each model component.

[0064] Step 103: Generate an initial simulation model based on the component information.

[0065] Optionally, the corresponding model components can be obtained from the component library based on the identifiers of each model component in the component information, and the model components can be connected according to the corresponding connection relationships to generate an initial simulation model.

[0066] Optionally, the initial simulation model can be displayed to the target user through a display interface, allowing the target user to confirm or adjust the initial simulation model.

[0067] Optionally, the connection relationships between each model component can be verified to ensure that the interconnected model components meet the basic requirements. For example, if model component A is connected to model component B, it is necessary to verify whether the data format of the output port of model component A and the input port of model component B are consistent. If the data format is inconsistent, model component A and model component B cannot be directly connected.

[0068] Optionally, the verification results can be displayed to the target user through a display interface, so that the target user can adjust the connection relationship of the model components based on the verification results.

[0069] Step 104: Generate code files based on the connection relationships in the initial simulation model, and compile the code files to generate the target simulation model components.

[0070] The target simulation model component meets the preset call interface and model calculation requirements, and the internal information of the target simulation model component is not open to other users.

[0071] Optionally, an independent code file is generated from the initial simulation model. The code file contains interface functions generated based on the input / output ports of the initial simulation model. At the same time, calling code is generated through preset calling interfaces. The connection relationship can represent the calling relationship of the interfaces corresponding to each model component. The corresponding calling code calls the interfaces corresponding to each model component. That is, the calling code can interact with other functional codes and interface codes to generate the code file.

[0072] Optionally, the programming language of the stand-alone code file can be any programming language, such as C or C++.

[0073] Optionally, when compiling code files, the compilation environment and compiler can be determined according to the programming language corresponding to the code files. For example, for C or C++, GCC (GNU Compiler Collection) can be used as the compiler, and for Java, JDK (Java Development Kit) can be used as the compiler.

[0074] Optionally, the code file can be compiled to obtain the target simulation model component. The target simulation model component can be an executable file, and its interface functions conform to the programming language specification. Therefore, the versatility of the target simulation model component can be improved. Other users can use the target simulation model component plug and play, reducing the difficulty of using the simulation model component. At the same time, since the target simulation model component is generated by compilation, other users cannot view its code, the various model components it contains, and the connection relationships between the model components.

[0075] Optionally, after generating the target simulation model component, the target simulation model component can be verified to ensure that it can be used normally.

[0076] Optionally, the target simulation model component can be stored in the component library, and the display icon of the target simulation model component can be implemented in the form of text, formula, image, etc.

[0077] The aforementioned simulation model component generation method involves: displaying a component library to the target user, which includes multiple model components such as code-based model components, user-encapsulated program-based model components, standard type model components, or model components that support loading code or user-encapsulated programs; receiving component information input from the target user, including the identifiers of at least two model components and their connection relationships; generating an initial simulation model based on the component information; generating a code file based on the connection relationships in the simulation model, and compiling the code file to generate the target simulation model component. The target simulation model component meets preset calling interfaces and model calculation requirements, and its internal information is not exposed to other users. Thus, when generating the target simulation model component, an initial simulation model can be generated through the model components in the component library and their connection relationships. The initial simulation model is then used to generate a code file, which is then compiled. The resulting target simulation model component can be shared with other users, and because it is encapsulated, its internal structure and data are not exposed to users, effectively improving the security of the model component.

[0078] In one exemplary embodiment, such as Figure 2As shown, optionally, an initial simulation model is generated based on the component selection information, including steps 201 to 203. Wherein:

[0079] Step 201: Obtain the parameter list of each model component and display the parameter list to the target user based on the preset graphical configuration interface.

[0080] Optionally, the parameter list of each model component can be determined by parsing each model component, or the corresponding parameter list can be obtained from the component library based on the identifier of each model component.

[0081] Optionally, after receiving a trigger command from the target user for the model component, the parameter list of the model component can be displayed to the target user based on a preset graphical configuration interface. Alternatively, after receiving component information input by the target user, the parameter list can be displayed to the target user based on a preset graphical configuration interface. In this case, there are multiple preset graphical configuration interfaces on the display interface, each corresponding to a multiple model component.

[0082] Step 202: Receive parameter configuration information input by the target user.

[0083] The parameter configuration information includes whether each parameter in the parameter list is publicly available.

[0084] Optionally, the graphical configuration interface includes the parameter name, parameter description, and parameter configuration information for each parameter. The target user can enter or select whether the corresponding parameter is publicly disclosed in the parameter configuration information.

[0085] Step 203: Generate the initial simulation model based on the parameter configuration information and the connection relationship of each model component.

[0086] Optionally, the connection relationships between the model components in the initial simulation model are public.

[0087] Optional, such as Figure 3 As shown, based on the parameter configuration information and the connection relationships of each model component, an initial simulation model is generated, including the following steps 301 to 303. Wherein:

[0088] Step 301: For each parameter, if the parameter is not publicly disclosed, obtain the attribute value of the parameter and use the attribute value of the parameter as the fixed value of the parameter when generating the initial simulation model.

[0089] Optionally, the parameter configuration information may also include the parameter values ​​of each parameter configured by the target user. For the parameters of each model component, if the target user has configured a certain parameter that is not publicly disclosed, the parameter value corresponding to that parameter in the parameter configuration information can be used as the attribute value.

[0090] Optionally, the attribute value of the parameter can also be determined based on the specification value or the historical parameter value of the parameter in the corresponding model component. The historical parameter value can be the parameter value corresponding to the model component when it is used to generate other simulation model components.

[0091] Optionally, since the parameter is not publicly disclosed, its value is fixed when generating the initial simulation model.

[0092] Step 302: If any of the parameters are publicly available, then generate the model attribute configuration interface.

[0093] The attribute configuration interface includes the parameter name, parameter description, and parameter value.

[0094] Optionally, a model attribute configuration interface can be generated for a publicly disclosed parameter, or a model attribute configuration interface can be generated based on all publicly disclosed parameters in each model component.

[0095] Optionally, if there are two or more publicly disclosed parameters, a model attribute configuration interface can be generated. This model attribute configuration interface includes two or more attribute configuration columns. It can be understood that one attribute configuration column corresponds to one publicly disclosed parameter, and the attribute configuration column includes the parameter name, parameter description information, and parameter value.

[0096] Optionally, a model attribute configuration interface can be automatically generated by combining and reconstructing templated attribute interface configuration methods and structured attribute parameter description information, enabling graphical setting of parameter values ​​for parameters selected by the target user for public exposure.

[0097] Optionally, the model property configuration interface can be used to configure parameter values ​​for parameters exposed by the target simulation model component when other users use the target simulation model component.

[0098] Optionally, when other users use the target simulation model component, the parameter values ​​of each parameter in the model attribute configuration interface can display default values. These default values ​​can be set by the target user when generating the target simulation model component, or determined by the terminal device based on the standard value or historical parameter value of the corresponding model component when generating the target simulation model component.

[0099] Step 303: Generate an initial simulation model based on the fixed values ​​of each parameter and at least one of the parameters in the model attribute configuration interface, and the connection relationships of each model component.

[0100] Optionally, when the parameters of each model component are not publicly disclosed, an initial simulation model can be generated based on the fixed values ​​of each parameter and the connection relationships of each model component; when the parameters of each model component are publicly disclosed, an initial simulation model can be generated based on the Magic Heart attribute configuration interface and the connection relationships of each model component; when there are publicly disclosed and privately disclosed parameters among the parameters of each model component, an initial simulation model can be generated based on the fixed values ​​of the privately disclosed parameters, the attribute configuration interface of the corresponding publicly disclosed parameters, and the connection relationships of each model component.

[0101] Optionally, the generated initial simulation model can be displayed to the user through a display interface. If there are publicly available parameters in the initial simulation model, the display interface can include the connection relationships of each model component and the model attribute configuration interface. When there are two or more publicly available parameters, if one publicly available parameter corresponds to one model attribute configuration interface, the display interface can include two or more model attribute configuration interfaces. If all publicly available parameters correspond to one model attribute configuration interface, the display interface includes one model attribute configuration interface, and this model attribute configuration interface includes two or more attribute configuration columns.

[0102] For each parameter, if it is not publicly disclosed, its attribute value is obtained and used as a fixed value when generating the initial simulation model. If there are publicly disclosed parameters, a model attribute configuration interface is generated. Based on the fixed values ​​of each parameter and at least one parameter in the model attribute configuration interface, and the connection relationships of each model component, the initial simulation model is generated. The parameter configuration information of the target user determines whether each parameter is publicly disclosed. When generating the initial simulation model, the parameter values ​​of each parameter are determined based on the fixed values ​​of the non-public parameters and, or, the model attribute configuration interface. In this way, not all parameters in the initial simulation model need to be publicly disclosed, which can ensure the security of the model. Other users can also configure the corresponding parameter values ​​for the publicly disclosed parameters in the target simulation model component according to the model attribute configuration interface when using the target simulation model component.

[0103] In one exemplary embodiment, in the code file, each model component is a member object, and the parameters of the model component are the properties of the member object.

[0104] Optionally, each model component in the initial simulation model generates a member object. The parameters in the model component are the properties of the corresponding member object. The parameters of the model component can be publicly disclosed, meaning that other users can reconfigure the parameter values ​​when using the target simulation model component. Alternatively, they can be kept private, meaning that other users are unaware of the parameter when using the target simulation model component. Therefore, when generating the code file, for parameters that are not publicly disclosed, their property values ​​are obtained and the parameters are treated as constants. For publicly disclosed parameters, they are treated as variables. At the same time, a parameter value configuration function interface is generated to support other users in configuring the parameter values.

[0105] In one exemplary embodiment, such as Figure 4 As shown, optionally, receiving component information input by the target user includes the following steps 401 to 402. Wherein:

[0106] Step 401: Display the canvas interface to the target user so that the target user can select model components from the component library and drag and drop the model components onto the canvas interface.

[0107] Optionally, the canvas interface and the component library can be displayed simultaneously on the display interface. The canvas interface and the component library can be displayed vertically or horizontally, or the component library can be located inside the canvas interface. This application embodiment does not limit the way the canvas interface and the component library are displayed on the display interface.

[0108] Optionally, receiving drag-and-drop instructions from the target user to the component library allows the selection of a corresponding model component from the library, followed by moving the model component to the canvas interface. The drag-and-drop instructions can also be information about the movement of the model component on the canvas interface. For example, if model component A is connected to both model component B and model component C on the current canvas interface, receiving drag-and-drop instructions from the target user can select model component D from the component library and connect it to model component C. Alternatively, receiving drag-and-drop instructions from the target user can delete the connection between model A and model component C.

[0109] Step 402: Receive component information input by the target user based on the canvas interface.

[0110] Optionally, a save button is displayed on the screen interface. When the target user triggers the save button, the model components displayed on the current canvas interface and the connection relationships between the model components are stored, thereby enabling the receipt of component information input by the target user based on the canvas interface.

[0111] The above-mentioned display of the canvas interface to the target user allows the target user to select model components from the component library and drag and drop the model components onto the canvas interface. The canvas interface receives component information input by the target user. For the target user, determining component information through the canvas interface is more intuitive, and the input component information is also more accurate.

[0112] In one exemplary embodiment, such as Figure 5 As shown, optionally, the component information can also be functional description information of the target simulation model components. Generating the initial simulation model based on the component information further includes steps 501 to 503. Wherein:

[0113] Step 501: Parse the functional description information to determine the functions of the target simulation model components.

[0114] Optionally, the functional description information can be written according to a preset format and rules, so the functional description information can be parsed according to the corresponding format and rules. Alternatively, the function of the target simulation model component can be determined from the functional description information through natural language processing technology.

[0115] Step 502: Determine the target component from the component library based on the function of the target simulation model component and the preset analysis model.

[0116] Optionally, the preset analysis model can be a convolutional neural network model or a recurrent neural network model, etc. The functions of the target simulation model components can be input into the preset analysis model, and then the target components can be input. If there are two or more target components, the preset analysis model can also output the connection relationship between each target component.

[0117] Optionally, the preset analysis model can be trained by using the functions of historical simulation model components and the corresponding structures of historical simulation model components (i.e., the model components contained in the historical simulation model components) as training samples. By training the neural network model, the analysis model can learn the functions of the simulation model components and the relationships between the contained model components.

[0118] Step 503: Generate an initial simulation model based on the target component.

[0119] In one possible implementation, an initial simulation model is determined based on the target components and the connection relationships between them, and then the initial simulation model is displayed to the target user through a display interface.

[0120] In another possible implementation, after the target components are determined, they can be displayed to the target user through a canvas interface. The target user can confirm or adjust each target component and its connection relationship based on the canvas interface, which can improve the accuracy of generating the initial simulation model. Then, after receiving the confirmation instruction from the target user, the initial simulation model can be determined according to the target components and their connection relationship.

[0121] Optionally, the target component is equivalent to the model component in steps 201 to 203. When determining the initial simulation model based on the target component and the connection relationship between the target components, it can be achieved in the same way as steps 201 to 203 above. This application embodiment will not repeat the details.

[0122] The above process involves parsing the functional description information to determine the function of the target simulation model component. Based on the function of the target simulation model component and the preset analysis model, the target component is determined from the component library. An initial simulation model is then generated based on the target component. This method can quickly determine the target component from the component library based on its functional description information and then generate an initial simulation model based on the target component. This can effectively improve the efficiency and accuracy of simulation model component generation. At the same time, it can improve the versatility of simulation model component generation. That is, for non-professionals, they only need to input the desired function of the target simulation model component to quickly and accurately generate the corresponding target simulation model component.

[0123] As an optional implementation method, such as Figure 6 As shown, the simulation model component generation method provided in this application embodiment may include the following specific steps:

[0124] Step 601: Display the component library to the target user.

[0125] The component library includes multiple model components, including code-type model components, user-packaged program-type model components, standard type model components, or model components that support loading code or user-packaged programs.

[0126] Step 602: Display the canvas interface to the target user so that the target user can select model components from the component library and drag and drop the model components onto the canvas interface.

[0127] Step 603: Receive component information input by the target user based on the canvas interface.

[0128] The component information includes the identifiers of at least two model components and the connection relationships between the model components.

[0129] Step 604: Obtain the parameter list of each model component and display the parameter list to the target user based on the preset graphical configuration interface.

[0130] Step 605: Receive parameter configuration information input by the target user.

[0131] The parameter configuration information includes whether each parameter in the parameter list is publicly available.

[0132] Step 606: For each parameter, if the parameter is not publicly disclosed, obtain the attribute value of the parameter and use the attribute value of the parameter as the fixed value of the parameter when generating the initial simulation model.

[0133] Step 607: If any of the parameters are publicly available, then generate the model attribute configuration interface.

[0134] The attribute configuration interface includes the parameter name, parameter description, and parameter value.

[0135] Step 608: Generate an initial simulation model based on the fixed values ​​of each parameter and at least one of the parameters in the model attribute configuration interface, and the connection relationships of each model component.

[0136] Step 609: Generate code files based on the connection relationships in the initial simulation model, and compile the code files to generate the target simulation model components.

[0137] The target simulation model component meets the preset call interface and model calculation requirements, and the internal information of the target simulation model component is not open to other users.

[0138] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0139] Based on the same inventive concept, this application also provides a simulation model component generation apparatus for implementing the simulation model component generation method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the simulation model component generation apparatus provided below can be found in the limitations of the simulation model component generation method described above, and will not be repeated here.

[0140] In one exemplary embodiment, such as Figure 7 As shown, a simulation model component generation device is provided, including: a display module 701, a receiving module 702, a first generation module 703, and a second generation module 704, wherein:

[0141] Display module 701 is used to display a component library to the target user. The component library includes multiple model components, including code-type model components, user-encapsulated program-type model components, standard type model components, or model components that support loading code or user-encapsulated programs.

[0142] The receiving module 702 is used to receive component information input by the target user. The component information includes the identifiers of at least two model components and the connection relationship between each model component.

[0143] The first generation module 703 is used to generate an initial simulation model based on component information;

[0144] The second generation module 704 is used to generate code files based on the connection relationships in the simulation model, and to compile the code files to generate a target simulation model component. The target simulation model component meets the preset calling interface and model calculation requirements, and the internal information of the target simulation model component is not exposed to other users.

[0145] In an exemplary embodiment, the first generation module 703 is specifically used to obtain the parameter list of each model component and display the parameter list to the target user based on a preset graphical configuration interface; receive parameter configuration information input by the target user, the parameter configuration information including whether each parameter in the parameter list is publicly available; and generate an initial simulation model based on the parameter configuration information and the connection relationship of each model component.

[0146] In an exemplary embodiment, the first generation module 703 is configured to: for each parameter, if the parameter is not publicly disclosed, obtain the attribute value of the parameter and use the attribute value of the parameter as the fixed value of the parameter when generating the initial simulation model; if there is a publicly disclosed parameter among the parameters, generate a model attribute configuration interface, the attribute configuration interface including the parameter name, parameter description information and parameter value; and generate the initial simulation model based on the fixed value of each parameter and at least one of the parameters in the model attribute configuration interface, and the connection relationship of each model component.

[0147] In an exemplary embodiment, the receiving module 702 is specifically configured to display a canvas interface to the target user, so that the target user can select model components from the component library and drag and drop the model components to the canvas interface; and receive component information input by the target user according to the canvas interface.

[0148] In an exemplary embodiment, the component information may also be the functional description information of the target simulation model component. The first generation module 703 is further configured to parse the functional description information to determine the function of the target simulation model component; determine the target component from the component library based on the function of the target simulation model component and the preset analysis model; and generate an initial simulation model based on the target component.

[0149] In one exemplary embodiment, in the code file, each model component is a member object, and the parameters of the model component are the properties of the member object.

[0150] Each module in the aforementioned simulation model component generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0151] Optionally, a co-simulation system is provided, including the methods and apparatus of any of the above embodiments.

[0152] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a method for generating simulation model components. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0153] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0154] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0155] The system displays a component library to the target user. This library includes multiple model components, such as code-based model components, user-packaged program-based model components, standard-type model components, or model components that support loading code or user-packaged programs. It receives component information input from the target user, including identifiers of at least two model components and their connection relationships. An initial simulation model is generated based on the component information. A code file is generated based on the connection relationships in the initial simulation model, and the code file is compiled to generate the target simulation model component. This target simulation model component meets preset calling interface and model calculation requirements, and its internal information is not accessible to other users.

[0156] In one embodiment, when the processor executes the computer program, it also performs the following steps: obtaining a parameter list of each model component and displaying the parameter list to the target user based on a preset graphical configuration interface; receiving parameter configuration information input by the target user, the parameter configuration information including whether each parameter in the parameter list is publicly available; and generating an initial simulation model based on the parameter configuration information and the connection relationship of each model component.

[0157] In one embodiment, when the processor executes the computer program, it further performs the following steps: for each parameter, if the parameter is not publicly disclosed, the attribute value of the parameter is obtained, and the attribute value of the parameter is used as the fixed value of the parameter when generating the initial simulation model; if there are publicly disclosed parameters among the parameters, a model attribute configuration interface is generated, the attribute configuration interface including the parameter name, parameter description information and parameter value; based on the fixed value of each parameter and at least one of the parameters in the model attribute configuration interface, and the connection relationship of each model component, the initial simulation model is generated.

[0158] In one embodiment, when the processor executes the computer program, it also performs the following steps: displaying a canvas interface to a target user so that the target user can select a model component from a component library and drag and drop the model component onto the canvas interface; and receiving component information input by the target user based on the canvas interface.

[0159] In one embodiment, the component information may also be functional description information of the target simulation model component. When the processor executes the computer program, it further performs the following steps: parsing the functional description information to determine the function of the target simulation model component; determining the target component from the component library based on the function of the target simulation model component and the preset analysis model; and generating an initial simulation model based on the target component.

[0160] In one embodiment, in the code file, each model component is a member object, and the parameters of the model component are the properties of the member object.

[0161] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0162] The system displays a component library to the target user. This library includes multiple model components, such as code-based model components, user-packaged program-based model components, standard-type model components, or model components that support loading code or user-packaged programs. It receives component information input from the target user, including identifiers of at least two model components and their connection relationships. An initial simulation model is generated based on the component information. A code file is generated based on the connection relationships in the initial simulation model, and the code file is compiled to generate the target simulation model component. This target simulation model component meets preset calling interface and model calculation requirements, and its internal information is not accessible to other users.

[0163] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining a parameter list of each model component and displaying the parameter list to the target user based on a preset graphical configuration interface; receiving parameter configuration information input by the target user, the parameter configuration information including whether each parameter in the parameter list is publicly available; and generating an initial simulation model based on the parameter configuration information and the connection relationship of each model component.

[0164] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for each parameter, if the parameter is not publicly disclosed, the attribute value of the parameter is obtained, and the attribute value of the parameter is used as the fixed value of the parameter when generating the initial simulation model; if there are publicly disclosed parameters among the parameters, a model attribute configuration interface is generated, the attribute configuration interface including the name of the parameter, the description information of the parameter, and the parameter value; based on the fixed value of each parameter and at least one of the parameters in the model attribute configuration interface, and the connection relationship of each model component, an initial simulation model is generated.

[0165] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: displaying a canvas interface to a target user so that the target user can select model components from the component library and drag and drop the model components onto the canvas interface; and receiving component information input by the target user based on the canvas interface.

[0166] In one embodiment, the component information may also be functional description information of the target simulation model component. When the computer program is executed by the processor, it further performs the following steps: parsing the functional description information to determine the function of the target simulation model component; determining the target component from the component library based on the function of the target simulation model component and the preset analysis model; and generating an initial simulation model based on the target component.

[0167] In one embodiment, in the code file, each model component is a member object, and the parameters of the model component are the properties of the member object.

[0168] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0169] The system displays a component library to the target user. This library includes multiple model components, such as code-based model components, user-packaged program-based model components, standard-type model components, or model components that support loading code or user-packaged programs. It receives component information input from the target user, including identifiers of at least two model components and their connection relationships. An initial simulation model is generated based on the component information. A code file is generated based on the connection relationships in the initial simulation model, and the code file is compiled to generate the target simulation model component. This target simulation model component meets preset calling interface and model calculation requirements, and its internal information is not accessible to other users.

[0170] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining a parameter list of each model component and displaying the parameter list to the target user based on a preset graphical configuration interface; receiving parameter configuration information input by the target user, the parameter configuration information including whether each parameter in the parameter list is publicly available; and generating an initial simulation model based on the parameter configuration information and the connection relationship of each model component.

[0171] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for each parameter, if the parameter is not publicly disclosed, the attribute value of the parameter is obtained, and the attribute value of the parameter is used as the fixed value of the parameter when generating the initial simulation model; if there are publicly disclosed parameters among the parameters, a model attribute configuration interface is generated, the attribute configuration interface including the name of the parameter, the description information of the parameter, and the parameter value; based on the fixed value of each parameter and at least one of the parameters in the model attribute configuration interface, and the connection relationship of each model component, an initial simulation model is generated.

[0172] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: displaying a canvas interface to a target user so that the target user can select model components from the component library and drag and drop the model components onto the canvas interface; and receiving component information input by the target user based on the canvas interface.

[0173] In one embodiment, the component information may also be functional description information of the target simulation model component. When the computer program is executed by the processor, it further performs the following steps: parsing the functional description information to determine the function of the target simulation model component; determining the target component from the component library based on the function of the target simulation model component and the preset analysis model; and generating an initial simulation model based on the target component.

[0174] In one embodiment, in the code file, each model component is a member object, and the parameters of the model component are the properties of the member object.

[0175] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0176] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0177] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for generating simulation model components, characterized in that, The method includes: Display a component library to the target user. The component library includes multiple model components, including code-type model components, user-packaged program-type model components, standard type model components, or model components that support loading code or user-packaged programs. Receive component information input by the target user, wherein the component information includes the identifiers of at least two model components and the connection relationship between the model components; An initial simulation model is generated based on the component information; Code files are generated based on the connection relationships in the initial simulation model, and these code files are compiled to generate a target simulation model component. This target simulation model component meets preset calling interface and model calculation requirements, and its internal information is not accessible to other users. The step of generating an initial simulation model based on the component selection information includes: Obtain the parameter list of each model component, and display the parameter list to the target user based on a preset graphical configuration interface; Receive parameter configuration information input by the target user, wherein the parameter configuration information includes whether each parameter in the parameter list is publicly available; Based on the parameter configuration information and the connection relationships of each model component, the initial simulation model is generated. The step of generating the initial simulation model based on the parameter configuration information and the connection relationships of each model component includes: For each of the parameters, if the parameter is not publicly disclosed, the attribute value of the parameter is obtained, and when generating the initial simulation model, the attribute value of the parameter is used as the fixed value of the parameter. If any of the parameters are publicly disclosed, a model attribute configuration interface is generated. The attribute configuration interface includes the name of the parameter, the description of the parameter, and the parameter value. The initial simulation model is generated based on the fixed values ​​of each parameter, at least one of the model attribute configuration interfaces, and the connection relationships of each model component.

2. The method according to claim 1, characterized in that, The component information received from the target user includes: Display a canvas interface to the target user so that the target user can select the model component from the component library and drag the model component to the canvas interface; Component information input by the target user is received based on the canvas interface.

3. The method according to claim 1, characterized in that, The component information also includes functional description information of the target simulation model components, and the step of generating an initial simulation model based on the component information further includes: The functional description information is parsed to determine the function of the target simulation model component; The target component is determined from the component library based on the function of the target simulation model component and the preset analysis model; An initial simulation model is generated based on the target component.

4. The method according to claim 1, characterized in that, In the code file, each model component is a member object, and the parameters of the model component are the attributes of the member object.

5. The method according to claim 1, characterized in that, The step of obtaining the parameter list for each of the model components includes: By parsing each model component, the parameter list of each model component can be determined, or the corresponding parameter list can be obtained from the component library based on the identifier of each model component.

6. The method according to claim 1, characterized in that, The method further includes: The target simulation model component is stored in the component library, and the display icon of the target simulation model component is implemented in the form of text, formula or image.

7. A simulation model component generation device, characterized in that, The device includes: The display module is used to display a component library to the target user. The component library includes multiple model components, including code-type model components, user-packaged program-type model components, standard type model components, or model components that support loading code or user-packaged programs. A receiving module is used to receive component information input by a target user, wherein the component information includes the identifiers of at least two model components and the connection relationship between the model components; The first generation module is used to generate an initial simulation model based on the component information; The second generation module is used to generate code files based on the connection relationships in the initial simulation model, and compile the code files to generate a target simulation model component. The target simulation model component meets preset calling interface and model calculation requirements, and the internal information of the target simulation model component is not disclosed to other users. The first generation module is specifically used for: Obtain the parameter list of each model component and display the parameter list to the target user based on the preset graphical configuration interface; Receive parameter configuration information input by the target user. The parameter configuration information includes whether each parameter in the parameter list is publicly available. Based on the parameter configuration information and the connection relationships of each model component, an initial simulation model is generated. When the first generation module generates the initial simulation model based on the parameter configuration information and the connection relationships of each model component, it is specifically used for: For each parameter, if the parameter is not publicly disclosed, the attribute value of the parameter is obtained, and the attribute value of the parameter is used as the fixed value of the parameter when generating the initial simulation model; If any of the parameters are publicly available, a model attribute configuration interface will be generated. The attribute configuration interface includes the parameter name, parameter description, and parameter value. Based on the fixed values ​​of each parameter and at least one of the parameters in the model attribute configuration interface, and the connection relationships of each model component, an initial simulation model is generated.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Adaptation system and method of multidisciplinary design and analysis tool

    CN105988797A

  • Simulation model code generation method and device

    CN117971192A