Simulation application generation method and device, electronic equipment and storage medium
By launching the cloud simulation modeling platform on the web page and generating functional modules based on the subcomponents selected by the user, the flexibility and compatibility issues of downloading and installing the GCAir platform are solved, efficient simulation application generation is achieved, and user experience is improved.
Patent Information
- Application Number
- CN202411550557.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-11
AI Technical Summary
In the prior art, the GCAir platform downloads the entire platform using local applications or plug-ins, resulting in users needing to install specific software and only supporting limited formats, which limits users' usage flexibility and platform compatibility, and affects customers' usage experience. .
By launching a pre-built cloud simulation modeling platform on the web page, functional modules are generated based on selected subcomponents, and the canvas display of the cloud simulation modeling platform allows users to customize or select subcomponents, build simulation applications, and realize simulation construction , obtain simulation applications so that the user can input data for simulation.
It improves user flexibility and platform compatibility, without a large amount of deployment space, and improves customer experience.
Smart Images

Figure CN119416517A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of simulation processing technology, and in particular to a simulation application generation method, device, electronic equipment and storage medium. Background Art
[0002] The integrated GCAir platform is often verified through simulation tests to simulate data in multiple fields such as aerospace, aviation, shipbuilding, and automotive engineering, so as to simulate the performance of products under different working conditions and verify the feasibility and stability of the design, thereby discovering potential problems and defects before product manufacturing and improving product quality and reliability.
[0003] The GCAir platform needs to rely on local applications or plug-ins and can only be used after being downloaded locally. The GCAir platform can complete operations such as architecture design, function design, performance design, virtual testing, and virtual operation.
[0004] Since customers currently only need part of the functions of the GCAir platform, if the entire GCAir platform is downloaded directly through local applications or plug-ins, users are required to install specific software, which usually only supports limited formats, limiting user flexibility and platform compatibility. In addition, the corresponding engineering data is large and requires a large amount of deployment space, which affects the customer's user experience. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a simulation application generation method, device, electronic device and storage medium to solve the problems existing in the prior art that affect the user experience of customers.
[0006] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0007] A first aspect of an embodiment of the present invention shows a simulation application generation method, the method comprising:
[0008] For a startup instruction of a pre-built cloud simulation modeling platform, starting the cloud simulation modeling platform on a web page based on the startup instruction;
[0009] Generate corresponding functional modules based on the subcomponents selected for the cloud simulation modeling platform, and display them through a canvas of the cloud simulation modeling platform;
[0010] If it is determined that the functional module can be simulated and modeled, simulation modeling is performed on the functional module to obtain a simulation application, so that the data input by the user can be subsequently simulated based on the simulation application.
[0011] Optional, pre-built functional modules are available for pre-build process including:
[0012] Analyze the simulation engineering data of the GcAir simulation platform to obtain multiple sub-simulation engineering data;
[0013] For each sub-simulation project data, construct a corresponding sub-component based on the sub-simulation project data;
[0014] A cloud simulation modeling platform is constructed based on the subcomponents.
[0015] Optionally, generating corresponding functional modules based on the subcomponents selected for the cloud simulation modeling platform and displaying them through a canvas of the cloud simulation modeling platform includes:
[0016] Responding to a selection operation on a subcomponent of a component library in a cloud simulation modeling platform;
[0017] Respond to selection operations that build new subcomponents based on input information;
[0018] For each sub-component corresponding to the selection operation, converting the simulation engineering data in the sub-component into data in a preset format, to obtain the data in the preset format corresponding to the sub-component;
[0019] A corresponding functional module is constructed based on the data in the preset format and displayed through the canvas of the cloud simulation modeling platform.
[0020] Optionally, also include:
[0021] Registering an empty subcomponent for the cloud simulation modeling platform;
[0022] receiving input information of a custom component input to a cloud simulation modeling platform;
[0023] When it is determined that a new subcomponent constructed based on the empty component and the input information already exists, the subcomponent with the same name as the input information is updated based on the input information to obtain a new subcomponent.
[0024] Optionally, determine whether the selected functional module can be simulated, including:
[0025] Determining whether the functional modules generated by the sub-components can be connected to each other;
[0026] If so, it is determined that the functional module is capable of simulation modeling.
[0027] Optionally, simulation modeling is performed on the functional module to obtain a simulation application, including:
[0028] Acquire the simulation requirements of the device to be simulated and the module information of the functional modules generated by the subcomponents;
[0029] Based on the module information, each functional module is simulated and modeled to construct multiple simulation applications;
[0030] For each simulation application, determining whether the simulation application can meet the simulation requirement;
[0031] If possible, any simulation application that can meet the simulation requirements can be used as a simulation application for the user and displayed to the user so that the user input data can be simulated based on the simulation application later.
[0032] Optionally, also include:
[0033] Based on the simulation model selected for the cloud simulation modeling platform, and displayed through the canvas of the cloud simulation modeling platform;
[0034] Based on the simulation system selected for the cloud simulation modeling platform, the functional modules and connection relationships of the simulation system are displayed through the canvas of the cloud simulation modeling platform;
[0035] A new simulation application is obtained based on the functional modules and connection relationships of the simulation system, so that the data input by the user can be simulated based on the simulation application in the future.
[0036] A second aspect of an embodiment of the present invention shows a simulation application generation device, the device comprising:
[0037] A startup unit, configured to start the cloud simulation modeling platform on a web page based on a startup instruction of a pre-built cloud simulation modeling platform;
[0038] A processing unit, configured to generate corresponding functional modules based on the subcomponents selected for the cloud simulation modeling platform, and display the corresponding functional modules through a canvas of the cloud simulation modeling platform;
[0039] The simulation modeling unit is used to perform simulation modeling on the functional module based on the module information if it is determined that the functional module can be simulated and modeled, so as to obtain a simulation application, so as to subsequently simulate the data input by the user based on the simulation application.
[0040] A third aspect of an embodiment of the present invention shows an electronic device, which is used to run a program, wherein when the program is run, the simulation application generation method shown in the first aspect of the embodiment of the present invention is executed.
[0041] A fourth aspect of an embodiment of the present invention shows a storage medium, which includes a storage program, wherein when the program is running, the device where the storage medium is located is controlled to execute the simulation application generation method shown in the first aspect of the embodiment of the present invention.
[0042] Based on the above-mentioned embodiments of the present invention, a simulation application generation method, device, electronic device and storage medium are provided, the method comprising: starting the cloud simulation modeling platform on a web page based on the start-up instruction of a pre-built cloud simulation modeling platform; generating corresponding functional modules based on the sub-components selected for the cloud simulation modeling platform, and displaying them through the canvas of the cloud simulation modeling platform; determining whether the functional module can be simulated based on the module information of the functional module; if so, simulating the functional module based on the module information to obtain a simulation application, so that the data input by the user can be simulated based on the simulation application later. In an embodiment of the present invention, there is no need to install the GCAir platform locally, and a pre-built cloud simulation modeling platform can be started on a web page through a startup instruction; the user is allowed to fully customize the sub-components or directly select the sub-components to build the functional modules corresponding to the sub-components; so that they can subsequently freely combine and build their own simulation applications, and then determine whether the functional modules corresponding to the selected sub-components can be simulated and modeled through the module information of the functional modules; if so, the functional modules are simulated and modeled based on the module information to obtain a simulation application, so that the data input by the user can be simulated based on the simulation application, thereby improving the flexibility of user use and improving the platform compatibility, without requiring a large amount of deployment space, so as to improve the customer's usage experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0044] Figure 1 A schematic diagram of a flow chart of a simulation application generation method shown in an embodiment of the present invention;
[0045] Figure 2 A schematic diagram generated by a simulation application shown in an embodiment of the present invention;
[0046] Figure 3 A schematic flow chart of another simulation application generation method according to an embodiment of the present invention;
[0047] Figure 4 The present invention is a schematic diagram of the structure of a simulation application generating device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.
[0049] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application 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 interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that 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.
[0050] It should be noted that the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0051] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0052] See also Figure 1 , is a simulation application generation method shown in an embodiment of the present invention, the method comprising:
[0053] Step S101: starting the cloud simulation modeling platform on a web page based on the start-up instruction of the pre-built cloud simulation modeling platform;
[0054] It should be noted that the cloud simulation modeling platform uses global wide area network Web technologies (such as web page HTML5, scalable vector graphics SVG, WebGL) to implement complex simulation and modeling functions in a browser environment.
[0055] The cloud simulation modeling platform includes engineering views, simulation system information, component library, and module library.
[0056] The module library can customize modules, namely functional modules, and the modules will generate corresponding dynamic forms during the generation process. The dynamic forms include the functional module Fmu name, functional module interface version FMI Version, functional module interface type FMI Type, model name Model Name, event indicators Event indicators, variables Variables, generation date Generation Date, generation tool Generation Tool, description Description, parameter parameter and calculated parameter CalculatedParameter.
[0057] The parameter parameter includes the parameter name and initial value, and the calculated parameter CalculatedParameter also includes its corresponding parameter name and initial value.
[0058] The module library can be customized, that is, rebuild new modules, enter the name of the module to be generated through blank subsystems and text, and obtain it through FMU import, Python creation, python import and database.
[0059] The component library is used to store modules that have been built by the module library.
[0060] It should be noted that the functional modules in the cloud simulation modeling platform are pre-built, stored in the cloud server, and can be run on the web page. The specific construction process includes the following steps.
[0061] Step S11: parsing the simulation engineering data of the GcAir simulation platform to obtain a plurality of sub-simulation engineering data;
[0062] It should be noted that the GcAir simulation platform related to the digital twin of the ship is formed through the dynamic model, kinematic model, route planning model, hydraulic system model, electromechanical system model, navigation system model, ocean current model, etc. That is to say, the simulation engineering data refers to the data of the dynamic model, kinematic model, route planning model, hydraulic system model, electromechanical system model, navigation system model, and ocean current model, and each model includes various sub-components related to it.
[0063] Simulation engineering data refers to data codes, generally in XML format.
[0064] In the specific implementation of step S11, the simulation engineering data is sorted out according to the components of different models in the GcAir simulation platform and decomposed into sub-simulation engineering data of various components under multiple models.
[0065] It should be noted that the simulation engineering data includes the definition of the component, the provided interface data, the component implementation code, the information call form, the component size, the functional module FMU, the connection information, the names of other components that can be connected, etc.
[0066] Step S12: for each sub-assembly's sub-simulation engineering data, construct a corresponding sub-assembly based on the sub-simulation engineering data.
[0067] In the specific implementation of step S22, the sub-simulation engineering data of each sub-component, that is, the data in XML format, is obtained, and the corresponding sub-component is constructed based on the data, so as to obtain a plurality of sub-components of the GcAir simulation platform that are restored 1:1.
[0068] Step S13: constructing a cloud simulation modeling platform based on the functional modules.
[0069] In the process of implementing step S13, for each model, each functional module under each sub-component is encapsulated into the component library, so as to build a cloud simulation modeling platform based on the component library, HTML tags and preset canvas, so as to automatically call each sub-component from the component library to generate the corresponding functional module, thereby establishing a complete simulation engineering model corresponding to the system that needs to be simulated, that is, the construction of the cloud simulation modeling platform.
[0070] The process of building a cloud simulation modeling platform based on component libraries, HTML tags, and preset canvases includes:
[0071] The basic structure of the web page is constructed through HTML tags to display the cloud simulation modeling platform on the web page. Then, a preset canvas area is defined for displaying SVG content.
[0072] Then, the global wide area network Web technology (such as HTML5, SVG, WebGL) is used to set up event handlers and listening functions in the browser environment of the cloud simulation modeling platform to monitor and respond to the user's interactive behaviors on the canvas, such as clicking, dragging, zooming, etc. The event handler will trigger corresponding graphic changes according to the user's actions on the canvas and update the view.
[0073] In the embodiment of the present invention, the cloud simulation modeling platform is built based on the HTML and SVG technology of the Web, which uses modern Web technology to realize complex simulation and modeling functions in a browser environment.
[0074] Optionally, the cloud simulation modeling platform is also provided with a module library, and the user can input corresponding data through blank subsystems, texts, functional module FMU import, programming language Python creation, programming language Python import and database acquisition in the module library. The cloud simulation modeling platform calls the data input by the user to generate a dynamic form, and then builds a custom module.
[0075] The specific customized module methods include:
[0076] Users define their own modules in the module library, bind dependent data, and then initialize SVG; edit dynamic forms according to the attributes of built-in elements in SVG to customize nodes, that is, the visual configuration of components in SVG.
[0077] It should be noted that the component of the custom module is an HTML node customized using the SVG element foreignObject, which can be freely combined. The cloud simulation modeling platform supports the creation of open source JavaScript framework vue and JavaScript library react for user interfaces, as well as the customization of SVG itself.
[0078] In the specific implementation process of step S101, the network server receives a startup instruction of a pre-built cloud simulation modeling platform triggered by a user through a browser, and calls the cloud simulation modeling platform on a web page to start based on the startup instruction.
[0079] Step S102: Generate corresponding functional modules based on the sub-components selected for the cloud simulation modeling platform, and display them through the canvas of the cloud simulation modeling platform.
[0080] It should be noted that the specific process of implementing step S102 includes the following steps:
[0081] Step S21: responding to a selection operation of a subcomponent of a component library in the cloud simulation modeling platform.
[0082] In the specific implementation of step S21, the user may select the corresponding subcomponent to the canvas by dragging the cloud simulation modeling platform.
[0083] Step S22: Respond to the selection operation of constructing a new subcomponent based on the input information.
[0084] It should be noted that the specific implementation process of step S22 is the same as the specific implementation process of the above-mentioned specific implementation step S21, and they can refer to each other.
[0085] Among them, the input information refers to the input information of the custom module input to the cloud simulation modeling platform, which may specifically include node and connection information; each node defines its type, attributes and initial position; each connection defines the source and target nodes of the connection, the connection type and attributes.
[0086] It should be noted that the process of constructing a new subcomponent based on input information includes the following steps:
[0087] Step S31: registering an empty module for the cloud simulation modeling platform.
[0088] In the specific implementation process of step S31, the user can register an empty module, namely a node, through the canvas of the cloud simulation modeling platform.
[0089] Step S32: receiving input information of the custom module input to the cloud simulation modeling platform.
[0090] Step S33: Determine whether a new sub-component constructed based on the empty module and input information already exists. If so, execute step S34; if not, execute step S35.
[0091] In the process of implementing step S33, all subcomponents in the module library, that is, the FMU names of the nodes, are traversed to determine whether there is a subcomponent that is consistent with the FMU name of the input information. If so, it is determined that the new node exists. If it exists and is allowed to be merged, step S34 is executed. If not, step S35 is executed.
[0092] Step S34: Based on the input information, the sub-component having the same FMU name as the input information is updated to obtain a new sub-component.
[0093] In the process of implementing step S34, the attribute corresponding to the subcomponent whose FMU name is consistent with the input information is obtained; then the input information is parsed to obtain a new attribute; and the attribute and the attribute corresponding to the subcomponent whose FMU name is consistent with the input information are merged to obtain a merged attribute; the merged attribute is used as the built-in element foreignObject of SVG, and then according to the characteristics of SVG, the built-in element foreignObject is used to create a new subcomponent.
[0094] Optionally, add the child component with merged properties to the addedNodes array, and then render it to overwrite the old child component, so that node addition, merging and sorting can be handled efficiently.
[0095] Step S35: construct a new subcomponent based on the input information.
[0096] In the specific implementation of step S35, the input information is parsed to obtain new attributes; the new attributes are used as the built-in element foreignObject of SVG, and then according to the characteristics of SVG, the built-in element foreignObject is used to create a new functional module.
[0097] It should be noted that the specific process of step S35 is the same as the specific implementation process of the above-mentioned specific implementation steps S11 and S12.
[0098] Step S23: for each sub-component corresponding to the selection operation, converting the simulation engineering data in the sub-component into data in a preset format, to obtain data in the preset format corresponding to the sub-component;
[0099] In the specific implementation of step S23, the simulation engineering data is converted into data in a preset format to obtain data in the preset format corresponding to each sub-assembly.
[0100] It should be noted that the preset format refers to the JSON format. The data in the preset format contains information about subcomponents and connections. Each subcomponent defines its type, properties, and initial position; each connection defines the source and target nodes of the connection, the connection type, and properties.
[0101] Step S24: constructing corresponding functional modules based on the data in the preset format, and displaying them through the canvas of the cloud simulation modeling platform.
[0102] In the process of implementing step S24, for each subcomponent corresponding to the preset format data, the preset format data is read, and the preset format data is parsed using a visualization library and a dynamic programming language corresponding to the GcAir simulation platform to obtain various attributes such as the size of the node, the number of simulation adoptions, the color, the connection, and the style; then the various attributes such as the size of the node, the number of simulation adoptions, the color, the connection, and the style are used as the built-in element foreignObject of SVG, and then according to the characteristics of SVG, a function module is created using the built-in element foreignObject, that is, the style and attributes (such as color, size, position) of the SVG element in the function module are defined by the corresponding fields in the preset format data; then the function module of the subcomponent corresponding to the operation is selected through the canvas display of the cloud simulation modeling platform.
[0103] Optionally, when generating the functional module, the corresponding module information is generated.
[0104] The module information includes all information in the dynamic form corresponding to the functional module.
[0105] Optionally, also include:
[0106] Triggering a modification instruction for the properties of any one or more selected functional modules, i.e., modifying all information in the dynamic form;
[0107] Get the attributes edited by the user based on the modification instruction;
[0108] The new attribute is used as a built-in element foreignObject of SVG, and then according to the characteristics of SVG, the built-in element foreignObject is used to update the functional module, so as to subsequently obtain the module information of the functional module selected by the user.
[0109] Each connection in the data of the preset format corresponds to an SVG path or a line connecting SVG elements.
[0110] It should be noted that the SVG elements constructed here include the styles and attributes of the functional modules, namely, circles, rectangles, etc.
[0111] The functional module uses Scalable Vector Graphics (SVG) as the underlying representation of the graph, and SVG elements are used to represent nodes, edges, and background grids. The functional module is created and modified through the DOM API to achieve dynamic rendering and interaction of the graph.
[0112] Optionally, also include:
[0113] The configurable models and menus of the configuration function module automatically match the configurable information of the component through the correspondence between the shape field in JSON and the feed Schema, so as to dynamically update the properties later.
[0114] Optionally, after executing step S24, the method further includes:
[0115] The configuration form is automatically generated based on various attributes such as node size, number of simulations, color, connection, and style, and the SVG elements can be adjusted based on these attributes to ensure that the visual performance is consistent with the data. At the same time, the difference DIFF algorithm is compared and the differences are updated.
[0116] Step S103: Determine whether the functional module can be simulated and modeled. If so, execute step S104. If not, output a prompt so that the user can adjust the functional module selected.
[0117] It should be noted that the specific process of implementing step S103 includes the following steps:
[0118] Step S41: Based on the module information, determine whether the selected functional modules can be interconnected. If so, indicate whether the selected functional modules can be simulated and modeled, and execute step S104. If not, output a prompt so that the user can adjust the selected functional modules.
[0119] In the process of implementing step S41, for each selected functional module, it is determined whether the source and target nodes connected under the module information are other selected functional modules. That is to say, for each selected functional module, it is compared whether the source and target nodes connected under the module information are FMU names of other selected functional modules. If so, it means that the selected functional modules can be connected to each other, that is, modeling can be carried out, and step S104 is executed. If not, a prompt is output so that the user can adjust the selected functional module.
[0120] Step S104: Simulate and model the functional modules to obtain a simulation application, so as to subsequently simulate the data input by the user based on the simulation application.
[0121] It should be noted that there are multiple ways to implement the process of step S104.
[0122] One implementation method includes the following steps:
[0123] Step S51: Acquire the simulation requirements of the device to be simulated and the module information of the functional modules generated by the sub-components.
[0124] In the specific implementation process of step S51, when the user builds a project corresponding to the simulation application, the simulation requirements related to the simulated device such as the project name and description data input by the user are obtained, and then, after the functional module is displayed on the canvas, the module information corresponding to the functional module is obtained.
[0125] The simulation requirements include the name, model, size, simulation test content, etc. of the device to be simulated.
[0126] Step S52: Simulate and model each functional module based on the module information to construct multiple simulation applications.
[0127] In the present invention, since function module A is connected to function module B, function module B and function module C may also be connected at the same time, or only function module C may be connected. That is to say, there may be multiple connection relationships between the function modules. Therefore, the function modules verified by step S103 may have multiple connection methods. That is to say, the simulation applications constructed by different connection methods are different.
[0128] In the process of implementing step S52, each functional module is connected in different ways according to the connection information in the module information, and each connection method constructs a simulation application, thereby constructing multiple simulation applications.
[0129] Step S53: for each simulation application, determine whether the simulation application can meet the simulation requirement, if so, execute step S105, if not, output a prompt so that the user can adjust the selected functional module.
[0130] In the process of implementing step S53, for each simulation application, determine whether the simulation application can test the device to be simulated mentioned in the simulation requirement. If so, determine whether the simulation application can be tested according to the content of each simulation test under the simulation requirement. If both are possible, determine that the selected functional module can meet the simulation requirement, and execute step S64. If not, output a prompt so that the user can adjust the selected functional module.
[0131] Step S54: any simulation application that can meet the simulation requirement is used as a simulation application available to the user, and is displayed to the user, so that the user input data can be subsequently simulated based on the simulation application.
[0132] In the process of implementing step S54, if there is only one simulation application that can meet the simulation requirements, it will be directly used as the simulation application available to the user; if there are multiple simulation applications that can meet the simulation requirements, any one of the simulation applications can be selected as the simulation application available to the user, and displayed to the user through the canvas of the cloud simulation modeling platform, so that the data input by the user can be simulated based on the simulation application later.
[0133] Optionally, based on the simulation application generation method shown in the present invention, Figure 2 Give an example.
[0134] like Figure 2 As shown, the device to be simulated is a cooling system, and the functional modules selected by the user include a cooling pump, a thermal exchanger, an external system and an oil tank. Through steps S51 to S54, the cooling pump, the thermal exchanger, the external system and the oil tank are simulated and modeled, i.e., connected, to construct a simulation application that can simulate the cooling system object.
[0135] If you select any function module, such as external system, the corresponding module information will be displayed, that is, the dynamic form of the external system, such as Figure 2 shown.
[0136] Optionally, also include:
[0137] If the development simulation button is triggered, the data input by the user will be simulated based on the simulation application generated in the cloud simulation modeling platform to obtain the simulation results.
[0138] Another implementation method includes the following steps:
[0139] Step S61: displaying the module information and the functional module in a canvas of the cloud simulation modeling platform so that the user can operate the functional module through the canvas;
[0140] In the specific implementation of step S61, the module information and the functional modules are displayed in the canvas of the cloud simulation modeling platform, thereby allowing the user to completely customize the connection mode of the functional modules and freely combine and build simulation applications, so that the user can operate the functional modules through the canvas;
[0141] Step S62: obtaining the user's connection operation on the functional module in the cloud simulation modeling platform;
[0142] In the process of implementing step S62, a listener is used to detect whether each image model selected in the canvas has a connection, that is, a connection operation. If so, step S63 is executed. If any functional module has no connection, step S62 is continued to be executed for monitoring.
[0143] Optionally, if any functional module has not been connected, the time is counted from the last time the user made a connection operation on the canvas. If the time is greater than the preset time, a prompt is output to prompt the user whether to select the automatic method, that is, the method of steps S51 to S54 to realize simulation modeling.
[0144] Step S63: Perform connection verification on the connection operation based on the module information. If the verification passes, execute step S64. If the verification fails, output a prompt display so that the user can reconnect.
[0145] In the process of implementing step S63, for each connection operation, the FMU name corresponding to the functional modules at the source and target ends of each connection operation is determined; the corresponding module information is determined based on the FMU name of the source functional module; then the module information of the source functional module is searched to determine whether the FMU name of the connectable target node stored therein is the same as the FMU name corresponding to the target functional module; if they are the same, the connection is valid; when each connection operation is valid, it is determined that the verification is passed and step S74 is executed. If the verification fails, a prompt is output to facilitate the user to reconnect.
[0146] Step S64: In response to the modeling request, simulation modeling is performed on the functional module based on the connection operation to obtain a simulation application.
[0147] In the process of implementing step S64, a modeling button triggered by a user on the cloud simulation modeling platform is received, and simulation modeling is performed according to the functional modules and the connection operations of the functional modules to obtain a simulation application.
[0148] Optionally, after executing step S64, the process of the above steps S51 and S53 can be used to verify whether the simulation application can meet the simulation requirements. If so, it is displayed to the user so that the user can subsequently simulate the data input by the user.
[0149] It should be noted that steps S51 to S54 are an automatic construction method, which automatically constructs the simulation application corresponding to the device to be simulated for the functional module selected by the user, and steps S61 to S64 are a manual connection method, after the user selects the corresponding sub-component to generate the functional module, the functional modules are connected to further construct the simulation application corresponding to the device to be simulated.
[0150] In an embodiment of the present invention, there is no need to install the GCAir platform locally, and a pre-built cloud simulation modeling platform is started on a web page through a startup instruction; the simulation engineering data, that is, the BOM data in XML format, is used to build the corresponding sub-components; and then the cloud simulation modeling platform is built to be displayed on the web page; the user is allowed to completely customize the sub-components or directly select the sub-components to obtain the corresponding sub-components selected for the cloud simulation modeling platform, so that the BOM data in XML format in the sub-components is converted into a more general JSON format, and the corresponding functional modules are constructed through HTML and SVG technology; so that it can be completely freely combined to build its own simulation application in the future, and when it is determined that the functional module can be simulated and modeled; the functional module is simulated and modeled to obtain a simulation application, so that the data input by the user can be simulated based on the simulation application in the future, thereby improving the flexibility of user use and improving the platform compatibility, without requiring a large amount of deployment space, so as to improve the customer's usage experience.
[0151] Based on the simulation application generation method shown in the above embodiment of the present invention, correspondingly, the embodiment of the present invention also shows another simulation application generation method, such as Figure 3 As shown, the method includes:
[0152] Step S301: starting the cloud simulation modeling platform on a web page based on the start-up instruction of the pre-built cloud simulation modeling platform;
[0153] Step S302: Based on the simulation system selected for the cloud simulation modeling platform, and displayed through the canvas of the cloud simulation modeling platform;
[0154] It should be noted that the simulation system may be a simulation application previously generated by other users or the user himself through the cloud simulation modeling platform, or it may be a model pre-imported and built through the GcAir software.
[0155] If the simulation system is a simulation application previously generated by other users or the user himself through the cloud simulation modeling platform, it can be used directly after the user selects it.
[0156] It should be further explained that the simulation system is stored in the component library of the cloud simulation modeling platform.
[0157] In the specific implementation of step S302, if the simulation system is a model built by GcAir software, the following steps are included:
[0158] Step S71: Analyze the simulation system to obtain data in a preset format.
[0159] In the specific implementation process of step S71, the model configuration of the simulation system is parsed to convert the simulation engineering data into json format, that is, data in a preset format.
[0160] Step S72: construct corresponding function modules and connection relationships between the function modules based on the data in the preset format, and display the function modules and the connection relationships in the canvas.
[0161] It should be noted that the specific implementation process of step S72 is the same as the specific implementation process of the above-mentioned specific implementation step S24.
[0162] It should be noted that the process of constructing the connection relationship between the functional modules based on the data in the preset format includes:
[0163] Since the simulation system and the current cloud simulation platform are only limited by the construction of different platforms, its functional modules have existing connection relationships, obtain the connection relationships of sub-components from the data in the preset format, and connect the functional modules that can be displayed in the canvas based on the connection relationships.
[0164] It should be noted that the data stored in the functional module and the sub-component are the same, only the format of the data is different.
[0165] Step S303: obtaining a new simulation application based on the functional modules and connection relationships of the simulation system, so as to subsequently simulate the data input by the user based on the simulation application.
[0166] In the specific implementation of step S303, in response to the modeling request, simulation modeling is performed on the functional module based on the connection relationship to obtain a new simulation application.
[0167] Optionally, after executing step S303, the process of steps S51 and S53 can be used to verify whether the simulation application can meet the simulation requirements. If so, it is displayed to the user so that the user can subsequently simulate the data input by the user.
[0168] In the embodiment of the present invention, the user can select the simulation system and the simulation component at the same time. In this case, after executing step S302, the simulation application is generated through steps S103 to S104.
[0169] Optionally, the simulation generated at this time should export model data through the cloud simulation platform and also support the use of GcAir software to achieve cross-application and cross-platform (not restricted by the platform) value.
[0170] In an embodiment of the present invention, based on the simulation system selected for the cloud simulation modeling platform, the simulation system is analyzed to determine the functional modules and connection relationships that can be displayed in the cloud simulation modeling platform; then the functional modules and connection relationships are used to remodel the system so that the imported simulation system can be cross-platform compatible, easy to deploy and update.
[0171] Based on the simulation application generation method shown in the above embodiment of the present invention, the embodiment of the present invention also discloses a simulation application generation device. Figure 4 As shown, the device comprises:
[0172] A starting unit 401 is used to start the cloud simulation modeling platform on a web page based on a starting instruction of a pre-built cloud simulation modeling platform;
[0173] A processing unit 402 is used to generate corresponding functional modules based on the subcomponents selected for the cloud simulation modeling platform, and display them through a canvas of the cloud simulation modeling platform;
[0174] The simulation modeling unit 403 is used to perform simulation modeling on the functional module based on the module information if it is determined that the functional module can be simulated and modeled, so as to obtain a simulation application, so as to subsequently simulate the data input by the user based on the simulation application.
[0175] The specific principles and execution processes of each unit in the simulation application generation device for the heated smoking device disclosed in the above embodiment of the present invention are the same as the corresponding contents in the simulation application generation method provided in the above embodiment of the present invention. Please refer to the corresponding parts of the simulation application generation method disclosed in the above embodiment of the present invention, and no further details will be given here.
[0176] In an embodiment of the present invention, the user is allowed to completely customize sub-components or directly select sub-components to generate corresponding functional modules, so that the user can freely combine and build his own simulation application later, and determine whether the selected functional module can be simulated based on the module information; if so, the functional module is simulated and modeled based on the module information to obtain a simulation application, so that the data input by the user can be simulated based on the simulation application later, thereby improving the flexibility of user use and improving platform compatibility without requiring a large amount of deployment space, so as to improve the customer's usage experience.
[0177] Optionally, based on the simulation application generating device shown in the above embodiment of the present invention, the starting unit 401 of the pre-construction process of the pre-constructed functional module is specifically used for:
[0178] Analyze the simulation engineering data of the GcAir simulation platform to obtain multiple sub-simulation engineering data;
[0179] For each sub-simulation project data, construct a corresponding sub-component based on the sub-simulation project data;
[0180] A cloud simulation modeling platform is constructed based on the subcomponents.
[0181] Optionally, based on the simulation application generating device shown in the above embodiment of the present invention, the processing unit 402 is specifically configured to:
[0182] Responding to a selection operation on a subcomponent of a component library in a cloud simulation modeling platform;
[0183] Respond to selection operations that build new subcomponents based on input information;
[0184] For each sub-component corresponding to the selection operation, converting the simulation engineering data in the sub-component into data in a preset format, to obtain the data in the preset format corresponding to the sub-component;
[0185] A corresponding functional module is constructed based on the data in the preset format and displayed through the canvas of the cloud simulation modeling platform.
[0186] The processing unit 402 is further configured to:
[0187] Registering an empty subcomponent for the cloud simulation modeling platform;
[0188] receiving input information of a custom component input to a cloud simulation modeling platform;
[0189] When it is determined that a new subcomponent constructed based on the empty component and the input information already exists, the subcomponent having the same name as the input information is updated based on the input information to obtain a new subcomponent.
[0190] Optionally, based on the simulation application generating device shown in the above embodiment of the present invention, the real modeling unit 403 that determines that the selected functional module can perform simulation modeling is specifically used to:
[0191] Determining whether the functional modules generated by the sub-components can be connected to each other;
[0192] If so, it is determined that the functional module is capable of simulation modeling.
[0193] Optionally, based on the simulation application generating device shown in the above embodiment of the present invention, the simulation modeling unit 403 is specifically used for:
[0194] Acquire the simulation requirements of the device to be simulated and the module information of the functional modules generated by the subcomponents;
[0195] Based on the module information, each functional module is simulated and modeled to construct multiple simulation applications;
[0196] For each simulation application, determining whether the simulation application can meet the simulation requirement;
[0197] If possible, any simulation application that can meet the simulation requirements can be used as a simulation application for the user and displayed to the user so that the user input data can be simulated based on the simulation application later.
[0198] Optionally, based on the simulation application generating device shown in the above embodiment of the present invention, the simulation modeling unit 403 is further used for:
[0199] Based on the simulation model selected for the cloud simulation modeling platform, and displayed through the canvas of the cloud simulation modeling platform;
[0200] Based on the simulation system selected for the cloud simulation modeling platform, the functional modules and connection relationships of the simulation system are displayed through the canvas of the cloud simulation modeling platform;
[0201] A new simulation application is obtained based on the functional modules and connection relationships of the simulation system, so that the data input by the user can be simulated based on the simulation application in the future.
[0202] An embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory is used to simulate program codes and data generated by an application, and the processor is used to call program instructions in the memory to execute the steps shown in the simulation application generation method in the above embodiment.
[0203] An embodiment of the present application provides a storage medium, which includes a storage program, wherein when the program is running, the device where the storage medium is located is controlled to execute the simulation application generation method shown in the above embodiment.
[0204] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0205] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0206] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A simulation application generation method, characterized in that: The method comprises: For a startup instruction of a pre-built cloud simulation modeling platform, starting the cloud simulation modeling platform on a web page based on the startup instruction; Generate corresponding functional modules based on the subcomponents selected for the cloud simulation modeling platform, and display them through a canvas of the cloud simulation modeling platform; If it is determined that the functional module can be simulated and modeled, simulation modeling is performed on the functional module to obtain a simulation application, so that the data input by the user can be subsequently simulated based on the simulation application.
2. The method according to claim 1, characterized in that The pre-built feature modules are pre-built in the following ways: Analyze the simulation engineering data of the GcAir simulation platform to obtain multiple sub-simulation engineering data; For each sub-simulation project data, construct a corresponding sub-component based on the sub-simulation project data; A cloud simulation modeling platform is constructed based on the subcomponents.
3. The method according to claim 1, characterized in that Generate corresponding functional modules based on the subcomponents selected for the cloud simulation modeling platform and display them through the canvas of the cloud simulation modeling platform, including: Responding to a selection operation on a subcomponent of a component library in a cloud simulation modeling platform; Respond to selection operations that build new subcomponents based on input information; For each sub-component corresponding to the selection operation, converting the simulation engineering data in the sub-component into data in a preset format, to obtain the data in the preset format corresponding to the sub-component; A corresponding functional module is constructed based on the data in the preset format and displayed through the canvas of the cloud simulation modeling platform.
4. The method according to claim 3, characterized in that Also includes: Registering an empty subcomponent for the cloud simulation modeling platform; receiving input information of a custom component input to a cloud simulation modeling platform; When it is determined that a new subcomponent constructed based on the empty component and the input information already exists, the subcomponent with the same name as the input information is updated based on the input information to obtain a new subcomponent.
5. The method according to claim 1, characterized in that Make sure the selected functional modules can be simulated and modeled, including: Determining whether the functional modules generated by the sub-components can be connected to each other; If so, it is determined that the functional module is capable of simulation modeling.
6. The method according to claim 1, characterized in that The functional modules are simulated and modeled to obtain simulation applications, including: Acquire the simulation requirements of the device to be simulated and the module information of the functional modules generated by the subcomponents; Based on the module information, each functional module is simulated and modeled to construct multiple simulation applications; For each simulation application, determining whether the simulation application can meet the simulation requirement; If possible, any simulation application that can meet the simulation requirements can be used as a simulation application for the user and displayed to the user so that the user input data can be simulated based on the simulation application later.
7. The method according to claim 1, characterized in that Also includes: Based on the simulation model selected for the cloud simulation modeling platform, and displayed through the canvas of the cloud simulation modeling platform; Based on the simulation system selected for the cloud simulation modeling platform, the functional modules and connection relationships of the simulation system are displayed through the canvas of the cloud simulation modeling platform; A new simulation application is obtained based on the functional modules and connection relationships of the simulation system, so that the data input by the user can be simulated based on the simulation application in the future.
8. A simulation application generating device, characterized in that: The device comprises: A startup unit, configured to start the cloud simulation modeling platform on a web page based on a startup instruction of a pre-built cloud simulation modeling platform; A processing unit, configured to generate corresponding functional modules based on the subcomponents selected for the cloud simulation modeling platform, and display the corresponding functional modules through a canvas of the cloud simulation modeling platform; The simulation modeling unit is used to perform simulation modeling on the functional module based on the module information if it is determined that the functional module can be simulated and modeled, so as to obtain a simulation application, so as to subsequently simulate the data input by the user based on the simulation application.
9. An electronic device, characterized in that: The electronic device is used to run a program, wherein the program, when running, executes the simulation application generation method as described in any one of claims 1-7.
10. A storage medium, characterized in that: The storage medium includes a storage program, wherein when the program is running, the device where the storage medium is located is controlled to execute the simulation application generation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Cloud simulation method and system integrated with various simulation software
CN110209471A
Joint simulation method and device, storage medium and electronic equipment
CN113761745A
Low-code simulation modeling platform for central air-conditioning cold source system
CN116431284A
Construction method and device of three-dimensional simulation model, computer equipment and storage medium
CN116738516A
Model combination reusing method and framework for cloud simulation
CN116894327A
