Interface-oriented model resource combination reusing method and system
Through the interface-oriented model resource combination reuse method and system, the problem of model variations from person to person and low reuse rate in simulation modeling is solved, component modeling and multi-level graphical visual model assembly are realized, and flexible business function combination is supported. Shorten the development cycle and improve development efficiency.
Patent Information
- Application Number
- CN202411075350.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The lack of uniformity of modeling frameworks and specifications of models in existing simulation modeling technologies leads to the model vary from person to person, low establishment efficiency, low reuse rate, and the inability to achieve universality and integrity, which extends the system development time.
Adopt interface-oriented model resource combination reuse methods and systems, and realize component-based modeling and model management service tools by building model architecture specifications, combining multi-level graphical visual model assembly tools to support model components splitting and combining, and well defined interfaces and protocols form a model system for a certain field.
It realizes the reuse of model resources and flexible business functions combination, shortens the development cycle, improves model development efficiency, supports multi-level and large-scale combination reuse, and solves the problem of repeated construction of model resources.
Smart Images

Figure CN119004812A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of simulation modeling, and in particular to an interface-oriented model resource combination reuse method and system. Background Art
[0002] At present, simulation modeling technology is one of the key technologies to promote the development of modern science and technology, and is also one of the key technologies to build a scientific research and innovation country. It has great application potential and great application value in the fields of national security and national civil economy. At present, simulation modeling technology has been rapidly promoted in the fields of aviation, aerospace, shipbuilding, etc., and system modeling and simulation technology have been widely used in enterprises, institutions and scientific research and other manufacturing industries. How to quickly promote the development of simulation modeling technology and the application of simulation technology, greatly save scientific research funds, and shorten the development cycle has attracted more and more attention and concern from all parties, and it is also the focus and difficulty of the vast number of scientific researchers and managers.
[0003] At present, there is a lack of uniformity in the modeling framework and specifications of simulation models, which results in different models being built by different people, low model building efficiency, low model reuse rate, inability to achieve universality, and inability to reflect the integrity of the model. This is repetitive work for model developers and prolongs the development time of the system. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides an interface-oriented model resource combination and reuse method and system, which obtains componentized modeling and model management service tools and multi-level graphic visualization model assembly tools based on the model system architecture specification of model resource combination and reuse composed of a model framework and constraints of the model framework, and stores the model / protocol data in a database.
[0005] The model system architecture specification provides modeling specifications for component-based modeling and model management service tools and multi-level graphic visualization model assembly tools. Model / model system information, port information and configuration information are exchanged between component-based modeling and model management service tools and multi-level graphic visualization model assembly tools, and both tools interact with the database for model and protocol data. It solves the long-standing problem of duplicate construction of model resources, achieves one-time development and multiple reuse, and supports flexible business function combinations. The model supports multi-level, large-scale, interface-oriented combination reuse assembly, by decomposing the entity model into "building blocks", and forming a model system for a certain field through well-defined interfaces and protocols.
[0006] In order to achieve the above object, the technical solution provided by the present invention is as follows:
[0007] An interface-oriented model resource combination and reuse method, comprising:
[0008] Step S10, constructing a model system architecture specification for model resource combination reuse consisting of a model framework and constraints of the model framework;
[0009] Step S20, input protocol information and model information, and match the model information with the corresponding protocol information; generate a model framework that meets the model system architecture specification through a template replacement algorithm according to the model information that matches the corresponding protocol information, and fill in the target code in the model framework to build a model for model resource combination reuse; split the model for model resource combination reuse into model components and upload them to the corresponding model to complete the management of the model; and test the model components uploaded in the model; configure the interface relationship between the tested models through a graphical interface, and store the configured interface relationship into an interface relationship template in the database;
[0010] Step S30, constructing a graphical model assembly tool through graphical model assembly technology, wherein the constructed graphical model assembly tool has the functions of model instantiation, establishing an initial model or an initial combination model, hierarchical modeling, establishing a target model, templating, configuration management and / or plug-in management; assembling the model components in the interface relationship template by dragging and dropping graphics elements through the graphical model assembly tool, constructing a target model of a multi-level graphical visualization assembly represented by multi-layer graphics elements, and storing it in a database.
[0011] Furthermore, in step S10, the specific steps of constructing a model system architecture specification for model resource combination reuse consisting of a model framework and constraints of the model framework include:
[0012] Constructing a model framework, wherein the model framework includes a basic framework and / or a business framework;
[0013] The model framework is based on the publish-subscribe mechanism of the message middleware, and is configured according to the interface relationships preset in the model architecture specification to generate interaction relationships between models and obtain constraints on the model framework;
[0014] The model system architecture specification for model resource combination and reuse consists of the model framework and the constraints of the model framework.
[0015] Furthermore, the method of using the model system architecture specification for model resource combination and reuse includes:
[0016] When the model is running, the constraints of the model framework are triggered through the publish-subscribe mechanism of the message middleware, and the interface communication and data exchange between models are completed through the interaction relationship between models;
[0017] A polling algorithm is used to obtain the calculation progress of interface communication and data exchange between models. When the calculation progress of all models is completed, the unified scheduling task time is advanced to the next beat.
[0018] Furthermore, the interface relationships preset by the model architecture specification are configured to include:
[0019] Parameter configuration port is the initialization input port for model parameter modeling. It is used for the model to read the initialization information of the input port to complete the initialization work. The parameter configuration is passed from one model to another model to complete the parameter configuration distribution within the model and perform parameter key modeling.
[0020] Data port is the data exchange port between models, including data input port and data output port. The sender of the model actively sends data through the data input port, and the receiver receives data asynchronously through the data output port. The data response function is called back for data processing, which is used for data transmission of event information.
[0021] Model service port, which is a remote access port between models; it is used for the initiator of the model to initiate a service call, the service party to call back the service response function, perform the service and return, and the initiator continues to run after receiving the return; the service provides system services for the service party platform, including creating new entities, establishing links, disconnecting links, applying for step length, obtaining simulation entity lists, obtaining port mapping lists and / or opening new simulation branch services;
[0022] The driving port is the port of the main callback function of the model driving itself or other functions. It is used to implement the serial, parallel and logical judgment branches of the workflow, and can drive the core calculation functions within the model to complete the business work.
[0023] The status port is a port for obtaining or setting the model status. It is used to read data in an active manner. When the data publisher of the model does not explicitly publish data and the data subscriber needs status data, the port data is obtained in GET mode without binding a response event. The data updater can update the status data in SET mode.
[0024] Furthermore, the basic framework and / or business framework in the model framework is used to implement the model, expand the model, and upgrade the model on the basis of the model framework, thereby realizing interface-oriented model resource combination reuse modeling; wherein,
[0025] The basic framework is mainly used to determine the standards and specifications at the software development level;
[0026] Business framework, mainly used to determine the standards and specifications of the business aspects of the model system;
[0027] Among them, the basic framework includes interface type, interface requirements and / or protocol type;
[0028] The business framework includes command rules, field composition, basic protocols and / or basic ports.
[0029] Furthermore, the steps in step S20 include:
[0030] S21, inputting protocol information, wherein the protocol information is a definition of the interactive data format between model interfaces; the protocol information is managed using Protobuf to meet the generation of multiple language model frameworks and the calling of model components; wherein the multiple languages include: C, C++, Java or Python;
[0031] S22, inputting model information, wherein the model information includes basic model information and / or model port information; wherein the model port information matches the corresponding protocol information;
[0032] S23, downloading the model framework, automatically generating a model framework that complies with the model system architecture specification in multiple languages through a template replacement algorithm according to the model port information that matches the corresponding protocol information, and filling in the target code in the model framework to build a model for model resource combination reuse, and splitting the model for model resource combination reuse into model components;
[0033] S24, uploading model components, for uploading the model components to the corresponding model to complete the management of the model;
[0034] S25, running the model components uploaded to the corresponding model through the model testing tool to test the running effect of the model components;
[0035] S26, configuring the interface relationship between the models through a graphical interface, and storing the configured interface relationship into an interface relationship template in a database; the model will perform data interaction according to the port connection and data communication method in the interface relationship template.
[0036] Furthermore, after entering the model information, it also includes managing the ports in the entered model information; port management is used to design communication ports of abstract model tree nodes, configure different types of ports for model tree nodes, and maintain the model by maintaining the data protocol used by the port and / or port open status information.
[0037] Furthermore, in S25, the model testing tool is mainly used for programming development test support for a single model, and can form a test project with dynamic input and output information that changes over time during the test process. The test project can internally include multiple test cases and test result data, which is a model testing tool that is convenient for comparative analysis.
[0038] Furthermore, in step S30, the constructed graphical model assembly tool has the functions of model instantiation, establishing an initial model or an initial combination model, hierarchical modeling, establishing a target model, templating, configuration management and / or plug-in management, specifically including:
[0039] S31, automatically generating a model editing interface according to the attribute information of the target model, inputting specific parameter values of the parameter configuration port, forming a model instance, so that the graphical model assembly tool has a model instantiation function;
[0040] S32, inputting basic information of the model or combined model and model port information corresponding to the target model; matching the model port information with corresponding protocol information, establishing an initial model or an initial combined model, so that the graphical model assembly tool has the function of establishing an initial model or an initial combined model;
[0041] S33, using the built initial model or initial combination model to build the internal structure of the initial model or the initial combination model by dragging the primitives, so as to realize hierarchical modeling, so that the graphical model assembly tool has the hierarchical modeling function;
[0042] S34, configuring the interface relationship formed within the initial model or the initial combination model, and verifying the consistency matching of the configured interface relationship through a protocol full matching calculation algorithm; completing the establishment of the target model, so that the graphical model assembly tool has the function of establishing the target model;
[0043] S35, when the target model can effectively simulate the function and performance of the real equipment, it can be used as a physical template, which is conducive to quickly generating simulation models of other equipment of the same type, so that the graphical model assembly tool has a template function;
[0044] S36, initializing parameter configuration for the entity template to describe the specific performance of the equipment simulation model; wherein different initialization parameter configurations of the same entity template can form different equipment simulation models, realize the refined characterization of the specific equipment's unique attributes, and enter the database for unified management, so that the graphical model assembly tool has a configuration management function;
[0045] S37, the operation interface that needs to be intervened through the interface during the simulation process of the equipment simulation model exists in the form of a plug-in. The plug-in supports parsing the parameter configuration port of the uploaded model component and associating the data source, quickly selecting interface controls from the database, and building a parametric configuration interface. It supports the parametric configuration of the equipment simulation model, so that the graphical model assembly tool has a plug-in management function.
[0046] The present invention also provides an interface-oriented model resource combination and reuse system, comprising:
[0047] The model system architecture specification module is used to construct a model system architecture specification for model resource combination reuse consisting of a model framework and constraints of the model framework;
[0048] Componentized modeling and model management service tools are used to input protocol information and model information, and match model information with corresponding protocol information; based on the model information matching the corresponding protocol information, a model framework that meets the model system architecture specification is generated through a template replacement algorithm, and the target code is filled in the model framework to build a model for model resource combination reuse; the model for model resource combination reuse is split into model components and uploaded to the corresponding model to complete the model management; and the model components uploaded in the model are tested; the interface relationship between the tested models is configured through a graphical interface, and the configured interface relationship is formed into an interface relationship template and stored in the database;
[0049] A multi-level graphic visualization model assembly tool is used to construct a graphic model assembly tool through graphic model assembly technology. The constructed graphic model assembly tool has model instantiation function, initial model or initial combination model establishment function, hierarchical modeling function, target model establishment function, template function, configuration management function and / or plug-in management function; the model components in the interface relationship template are assembled by dragging and dropping graphics elements through the graphic model assembly tool, and a target model of a multi-level graphic visualization assembly represented by multi-layer graphics elements is constructed and stored in a database.
[0050] The present invention discloses an interface-oriented model resource combination and reuse method and system, which has the following beneficial effects:
[0051] 1. The model system architecture specification is made public. When users implement, expand, or upgrade models, they implement them based on the basic framework and business framework of the model system architecture specification, thereby achieving combinatorial, reusable, and configurable systematic modeling.
[0052] 2. The present invention obtains componentized modeling and model management service tools based on the model system architecture specification, which mainly include componentized modeling service and model management service.
[0053] The componentized modeling service uses componentization technology to abstract and differentiate simulation model instances according to their functions, build the common parts into atomic behavioral models, split various entities into a series of basic model components with common meanings, and adopt the method of assembling and combining the characteristic parts to reflect the composition and relationship between behaviors, so as to form a higher-level behavioral model, thereby realizing the reuse of behavioral models. Therefore, the componentized modeling service provides model framework download and model debugging tools. The component model template development module meets the needs of users to develop models independently, and automatically generates standard code frameworks in multiple languages. Users can complete the initial construction of the model by filling in the business code based on the model framework, and the model component can be formed after debugging.
[0054] Model management service can build and manage multiple model systems for different simulation scenarios. Each model system can formulate protocols, standards, specifications and other contents as the basis for model design, development and construction. In order to facilitate model developers to develop and manage multiple model systems, models are managed hierarchically in a tree structure tree. Model system management service can realize functions such as model system management, protocol management, model management, component management, port management and template management.
[0055] The download function meets the needs of users to develop models independently, and automatically generates model frameworks that meet software standards in multiple languages (including C, C++, Java, and Python). The model debugging tool is mainly used to support the programming, development, and debugging of a single model. It can transform the dynamic input and output information that changes over time during the test process into a test project. The test project can include multiple test cases and test result data internally for easy comparison and analysis. The model system management refers to the domain asset set, that is, the set of models, protocols, configurations, algorithms, and relationships established for a certain field, rather than for a specific application. The protocol management maintains and manages the data protocols used in the maintenance model system. The data protocol is the most basic part of the model system and constrains the data communication protocol between models within the model system. The port management is used to design the communication ports of the abstract model tree nodes. Different types of ports can be configured for the model tree nodes, and the model can be maintained by maintaining the data protocol used by the port, the port open status, and other information. The template is the basis for the model operation in the hypothetical scenario. When the hypothetical scenario is running, the model will interact with data based on the port connection and data communication method in the template.
[0056] 3. The present invention obtains a multi-level graphic visualization model assembly tool based on the model system architecture specification. By studying the graphical model assembly technology and constructing the graphical model assembly tool, the user can intuitively and quickly use the built atomic model or combined model by dragging the primitives to build a combined model and realize hierarchical modeling. The graphical model assembly tool provides modeling primitives, receives the model represented by the user in the form of primitives, and converts and saves it as a combined model description file. Various types of simulation entity models can be completed in the form of component assembly. The model assembly tool has four major services: model assembly service, consistency matching verification service, model parameter configuration service and model plug-in management service, and has model instantiation function, initial model or initial combined model establishment function, hierarchical modeling function, target model establishment function, template function, configuration management function and / or plug-in management function.
[0057] The target model file of the multi-level graphic visualization assembly represented by multi-layer primitives after assembly by the assembly tool is essentially a model node relationship diagram. The file information is saved in JSON format. JSON is a text-based lightweight data exchange format with strong readability and support for multiple parsing languages. It has gradually replaced XML and become the mainstream standard for network information exchange. The model file contains three JSON classes, namely primitive information, connection information and view information. The primitive information saves the internal model information of the combined model, the connection information saves the interaction relationship between the internal models, and the view information saves the basic information of the entire node relationship diagram.
[0058] Model assembly service refers to assembling various components into a combined model as the basic model, and then forming different instances by configuring different parameters for the combined model.
[0059] The consistency matching verification service is aimed at model assembly needs in different scenarios. The software has made breakthroughs in model diversified assembly technology and can provide model assembly methods based on graphical settings and templates, realizing model assembly in a more agile and efficient manner. Among them, when the simulation components are assembled and published as a combined model, the model interface matching and matching verification are manually performed based on the graphical settings.
[0060] Model parameter configuration service During the model assembly phase, model parameter configuration can be performed before assembly, that is, configuring parameters for each atomic component, and then assembling after forming component instances; it can also be performed after assembly, that is, configuring parameters for the assembled general combination model.
[0061] Model plug-in management service There is a special type of model in the simulation model, that is, it is necessary to intervene in the operation through the interface during the simulation process to provide conditions for "man in the loop". This type of operation interface exists in the form of a plug-in, which can manage the interface plug-in. It supports parsing the initialization interface of the uploaded component and associating it with the data source, quickly selecting interface controls from the control library, and flexibly building a simple, friendly, and easy-to-use parameterized configuration interface to meet the rapid setting and display requirements of various types of business models, and support users to parameterize the model instance.
[0062] The above software is used to solve the long-standing problem of repeated construction of model resources, so that development can be done once and reused multiple times, while supporting users to flexibly combine business functions. The model supports multi-level, large-scale, interface-oriented combination reuse assembly, and forms a model system for a certain field by decomposing the entity model into "building blocks" and defining well-defined interfaces and protocols. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0064] Figure 1 It is a schematic diagram of an interface-oriented model resource combination and reuse system provided by the present invention. DETAILED DESCRIPTION
[0065] First of all, it should be pointed out that the embodiments of the present invention only disclose preferred implementation modes and should not be understood as limiting the implementation of the present invention. The protection scope of the present invention shall still be based on the contents disclosed in the claims.
[0066] The present invention provides an interface-oriented model resource combination and reuse method, comprising:
[0067] Step S10, constructing a model system architecture specification for model resource combination reuse consisting of a model framework and constraints of the model framework;
[0068] Among them, the model architecture specification is based on the software modeling specification; for example: I is input, O is output, C is calculation, and E is event.
[0069] Step S20, input protocol information and model information, and match the model information with the corresponding protocol information; generate a model framework that meets the model system architecture specification through a template replacement algorithm according to the model information that matches the corresponding protocol information, and fill in the target code in the model framework to build a model for model resource combination reuse; split the model for model resource combination reuse into model components and upload them to the corresponding model to complete the management of the model; and test the model components uploaded in the model; configure the interface relationship between the tested models through a graphical interface, and store the configured interface relationship into an interface relationship template in the database;
[0070] Step S30, constructing a graphical model assembly tool through graphical model assembly technology, wherein the constructed graphical model assembly tool has the functions of model instantiation, establishing an initial model or an initial combination model, hierarchical modeling, establishing a target model, templating, configuration management and / or plug-in management; assembling the model components in the interface relationship template by dragging and dropping graphics elements through the graphical model assembly tool, constructing a target model of a multi-level graphical visualization assembly represented by multi-layer graphics elements, and storing it in a database.
[0071] This step studies the graphical model assembly technology and constructs a graphical model assembly tool, which enables users to intuitively and quickly use the built models or combined models by dragging and dropping primitives to build a combined model and achieve hierarchical modeling. The graphical model assembly tool provides modeling primitives, receives the model represented by the user in the form of primitives, converts it and saves it as a combined model description file. Various types of simulation equipment models can be completed in the form of component assembly.
[0072] In step S10, the specific steps of constructing a model system architecture specification for model resource combination reuse consisting of a model framework and constraints of the model framework include:
[0073] Constructing a model framework, wherein the model framework includes a basic framework and / or a business framework;
[0074] The model framework is based on the publish-subscribe mechanism of the message middleware, and is configured according to the interface relationships preset in the model architecture specification to generate interaction relationships between models and obtain constraints on the model framework;
[0075] The model system architecture specification for model resource combination and reuse consists of the model framework and the constraints of the model framework.
[0076] Methods for using the model architecture specification for model resource combination and reuse include:
[0077] When the model is running, the constraints of the model framework are triggered through the publish-subscribe mechanism of the message middleware, and the interface communication and data exchange between models are completed through the interaction relationship between models;
[0078] A polling algorithm is used to obtain the calculation progress of interface communication and data exchange between models. When the calculation progress of all models is completed, the unified scheduling task time is advanced to the next beat.
[0079] The interface relationships preset by the model architecture specification are configured to include:
[0080] Parameter configuration port is the initialization input port for model parameter modeling. It is used for the model to read the initialization information of the input port to complete the initialization work. The parameter configuration is passed from one model to another model to complete the parameter configuration distribution within the model and perform parameter key modeling.
[0081] Data port is the data exchange port between models, including data input port and data output port. The sender of the model actively sends data through the data input port, and the receiver receives data asynchronously through the data output port. The data response function is called back for data processing, which is used for data transmission of event information.
[0082] Model service port, which is a remote access port between models; it is used for the initiator of the model to initiate a service call, the service party to call back the service response function, perform the service and return, and the initiator continues to run after receiving the return; the service provides system services for the service party platform, including creating new entities, establishing links, disconnecting links, applying for step length, obtaining simulation entity lists, obtaining port mapping lists and / or opening new simulation branch services;
[0083] The driving port is the port of the main callback function of the model driving itself or other functions. It is used to implement the serial, parallel and logical judgment branches of the workflow, and can drive the core calculation functions within the model to complete the business work.
[0084] The status port is a port for obtaining or setting the model status. It is used to read data in an active manner, that is, to "pull" data. When the data publisher of the model does not explicitly publish data and the data subscriber needs status data, the GET method is used to obtain the port data without binding a response event. The data updater can use the SET method to update the status data.
[0085] The modeling of simulation models needs to be based on a certain basic framework and business framework. The basic framework and / or business framework in the model framework are used to implement the model, expand the model, and upgrade the model on the basis of the model framework, thereby realizing interface-oriented model resource combination reuse modeling; among them,
[0086] The basic framework is mainly used to determine the standards and specifications at the software development level;
[0087] Business framework, mainly used to determine the standards and specifications of the business aspects of the model system;
[0088] Among them, the basic framework includes interface type, interface requirements and / or protocol type;
[0089] The business framework includes command rules, field composition, basic protocols and / or basic ports.
[0090] The steps in step S20 include:
[0091] S21, input protocol information, which is the interactive data format definition between model interfaces; the protocol information is managed by Protobuf (Protocol Buffers) to meet the generation of multi-language model frameworks and the calling of model components; the multiple languages include: C, C++, Java or Python; Protobuf is a tool for serializing structured data to achieve data storage and exchange, which is independent of programming languages and development platforms. The Portobuf protocol can meet the generation of multi-language model frameworks and the calling of model components.
[0092] S22, inputting model information, wherein the model information includes basic model information and / or model port information; wherein the model port information matches the corresponding protocol information;
[0093] S23, download the model framework, and automatically generate a model framework that complies with the model architecture specifications in multiple languages through a template replacement algorithm according to the model port information that matches the corresponding protocol information, and fill in the target code in the model framework to build a model for model resource combination reuse, and split the model for model resource combination reuse into model components; this step simplifies the platform learning cost and allows developers to focus on the implementation of business codes. The software can generate a multi-language, multi-platform model framework. Based on the model framework, users can complete the model construction by filling in the business code to form model components.
[0094] S24, uploading model components, for uploading the model components to the corresponding model to complete the management of the model;
[0095] S25, running the model components uploaded to the corresponding model through the model testing tool to test the running effect of the model components;
[0096] S26, configuring the interface relationship between the models through a graphical interface, and storing the configured interface relationship into an interface relationship template in a database; the model will perform data interaction according to the port connection and data communication method in the interface relationship template.
[0097] After entering the model information, it also includes managing the ports in the entered model information; port management is used to design the communication ports of the abstract model tree nodes, configure different types of ports for the model tree nodes, and maintain the model by maintaining the data protocol used by the port and / or the port open status information.
[0098] In S25, the model testing tool is mainly used for programming development test support for a single model. It can form a test project with dynamic input and output information that changes over time during the test process. The test project can internally include multiple test cases and test result data, which is a model testing tool that is convenient for comparative analysis.
[0099] In step S30, the constructed graphical model assembly tool has the functions of model instantiation, establishing an initial model or an initial combination model, hierarchical modeling, establishing a target model, templating, configuration management and / or plug-in management, including:
[0100] S31, automatically generating a model editing interface according to the attribute information of the target model, inputting specific parameter values of the parameter configuration port, forming a model instance, so that the graphical model assembly tool has a model instantiation function;
[0101] S32, inputting basic information of the model or combined model and model port information corresponding to the target model; matching the model port information with corresponding protocol information, establishing an initial model or an initial combined model, so that the graphical model assembly tool has the function of establishing an initial model or an initial combined model;
[0102] S33, using the built initial model or initial combination model to build the internal structure of the initial model or the initial combination model by dragging the primitives, so as to realize hierarchical modeling, so that the graphical model assembly tool has the hierarchical modeling function;
[0103] S34, configuring the interface relationship formed within the initial model or the initial combination model, and verifying the consistency matching of the configured interface relationship through a protocol full matching calculation algorithm; completing the establishment of the target model, so that the graphical model assembly tool has the function of establishing the target model;
[0104] S35, when the target model can effectively simulate the function and performance of the real equipment, it can be used as a physical template, which is conducive to quickly generating simulation models of other equipment of the same type, so that the graphical model assembly tool has a template function;
[0105] S36, initializing parameter configuration for the entity template to describe the specific performance of the equipment simulation model; wherein different initialization parameter configurations of the same entity template can form different equipment simulation models, realize the refined characterization of the specific equipment's unique attributes, and enter the database for unified management, so that the graphical model assembly tool has a configuration management function;
[0106] S37, the operation interface that needs to be intervened through the interface during the simulation process of the equipment simulation model exists in the form of a plug-in. The plug-in supports parsing the parameter configuration port of the uploaded model component and associating the data source, quickly selecting interface controls from the database, and building a parametric configuration interface. It supports the parametric configuration of the equipment simulation model, so that the graphical model assembly tool has a plug-in management function.
[0107] This step is for a special type of model in the simulation model, that is, it is necessary to intervene in the operation through the interface during the simulation process to provide conditions for "man in the loop". This type of operation interface exists in the form of a plug-in, which can manage the interface plug-in. It supports parsing the parameter configuration port of the uploaded component and associating it with the data source, quickly selecting interface controls from the control library, and flexibly building a simple, friendly, and easy-to-use parameterized configuration interface to meet the rapid setting and display requirements of various types of business models, and support users to parameterize the equipment simulation model.
[0108] like Figure 1 As shown, the present invention also provides an interface-oriented model resource combination and reuse system, comprising:
[0109] The model system architecture specification module is used to construct a model system architecture specification for model resource combination reuse consisting of a model framework and constraints of the model framework;
[0110] Componentized modeling and model management service tools are used to input protocol information and model information, and match model information with corresponding protocol information; based on the model information that matches the corresponding protocol information, a model framework that meets the model architecture specifications is generated through a template replacement algorithm, and the target code is filled in the model framework to build a model for model resource combination and reuse; the model for model resource combination and reuse is split into model components and uploaded to the corresponding model to complete the model management; and the model components uploaded in the model are tested; the interface relationship between the tested models is configured through a graphical interface, and the configured interface relationship is formed into an interface relationship template and stored in the database; it has combination and reuse modeling services and model management services.
[0111] For example, for numerical calculation models, various simulation models are developed through a unified model component interface relationship template. This ensures that different simulation models have a unified code framework and compilation environment, providing a basis for interaction between models. The simulation adopts object-oriented thinking, splitting various entities into a series of basic model components with universal significance. Different types of components have their own functional definitions and inheritance relationships, allowing modelers to develop and customize specific models.
[0112] The interface relationship template meets the needs of users to develop models independently, automatically generates code frameworks that meet software standards in multiple languages, simplifies the platform learning cost, and allows developers to focus on the implementation of business codes. The software can generate multi-language and multi-platform model frameworks. Based on the model framework, users can fill in the business code to complete the initial construction of the model. Different model frameworks can be generated for models of different business types, supporting multiple development languages and multiple operating platforms. Users can write business codes in the model framework to form model components.
[0113] For different simulation scenarios, multiple models are constructed and managed. Each model system can formulate protocols, standards, specifications, etc. as the basis for model design, development, and construction. In order to facilitate model developers to develop and manage multiple model systems, models are managed hierarchically in a tree structure tree.
[0114] The multi-level graphic visualization model assembly tool is used to construct a graphic model assembly tool through the graphic model assembly technology. The constructed graphic model assembly tool has the functions of model instantiation, establishing the initial model or initial combination model, hierarchical modeling, establishing the target model, template function, configuration management function and / or plug-in management function; the model components in the interface relationship template are assembled by dragging the primitives through the graphic model assembly tool, and the target model of the multi-level graphic visualization assembly represented by multi-layer primitives is constructed and stored in the database. It has model assembly service, consistency matching verification service, model parameter configuration service and model plug-in management service.
[0115] The component-based modeling and model management service tool and the multi-level graphic visualization model assembly tool interact with each other in terms of model / model system information, port information, and configuration information, and both tools interact with the database in terms of model and protocol data.
[0116] For specific implementation steps when the system is running, please refer to the specific content of the method embodiment.
[0117] The present invention discloses an interface-oriented model resource combination and reuse method and system, which has the following beneficial effects:
[0118] 1. The model system architecture specification is made public. When users implement, expand, or upgrade models, they implement them based on the basic framework and business framework of the model system architecture specification, thereby achieving combinatorial, reusable, and configurable systematic modeling.
[0119] 2. The present invention obtains componentized modeling and model management service tools based on the model system architecture specification, which mainly include componentized modeling service and model management service.
[0120] The componentized modeling service uses componentization technology to abstract and differentiate simulation model instances according to their functions, build the common parts into atomic behavioral models, split various entities into a series of basic model components with common meanings, and adopt the method of assembling and combining the characteristic parts to reflect the composition and relationship between behaviors, so as to form a higher-level behavioral model, thereby realizing the reuse of behavioral models. Therefore, the componentized modeling service provides model framework download and model debugging tools. The component model template development module meets the needs of users to develop models independently, and automatically generates standard code frameworks in multiple languages. Users can complete the initial construction of the model by filling in the business code based on the model framework, and the model component can be formed after debugging.
[0121] Model management service can build and manage multiple model systems for different simulation scenarios. Each model system can formulate protocols, standards, specifications and other contents as the basis for model design, development and construction. In order to facilitate model developers to develop and manage multiple model systems, models are managed hierarchically in a tree structure tree. Model system management service can realize functions such as model system management, protocol management, model management, component management, port management and template management.
[0122] The download function meets the needs of users to develop models independently, and automatically generates model frameworks that meet software standards in multiple languages (including C, C++, Java, and Python). The model debugging tool is mainly used to support the programming, development, and debugging of a single model. It can transform the dynamic input and output information that changes over time during the test process into a test project. The test project can include multiple test cases and test result data internally for easy comparison and analysis. The model system management refers to the domain asset set, that is, the set of models, protocols, configurations, algorithms, and relationships established for a certain field, rather than for a specific application. The protocol management maintains and manages the data protocols used in the maintenance model system. The data protocol is the most basic part of the model system and constrains the data communication protocol between models within the model system. The port management is used to design the communication ports of the abstract model tree nodes. Different types of ports can be configured for the model tree nodes, and the model can be maintained by maintaining the data protocol used by the port, the port open status, and other information. The template is the basis for the model operation in the hypothetical scenario. When the hypothetical scenario is running, the model will interact with data based on the port connection and data communication method in the template.
[0123] 3. The present invention obtains a multi-level graphic visualization model assembly tool based on the model system architecture specification. By studying the graphical model assembly technology and constructing the graphical model assembly tool, the user can intuitively and quickly use the built atomic model or combined model by dragging the primitives to build a combined model and realize hierarchical modeling. The graphical model assembly tool provides modeling primitives, receives the model represented by the user in the form of primitives, and converts and saves it as a combined model description file. Various types of simulation entity models can be completed in the form of component assembly. The model assembly tool has four major services: model assembly service, consistency matching verification service, model parameter configuration service and model plug-in management service, and has model instantiation function, initial model or initial combined model establishment function, hierarchical modeling function, target model establishment function, template function, configuration management function and / or plug-in management function.
[0124] The target model file of the multi-level graphic visualization assembly represented by multi-layer primitives after assembly by the assembly tool is essentially a model node relationship diagram. The file information is saved in JSON format. JSON is a text-based lightweight data exchange format with strong readability and support for multiple parsing languages. It has gradually replaced XML and become the mainstream standard for network information exchange. The model file contains three JSON classes, namely primitive information, connection information and view information. The primitive information saves the internal model information of the combined model, the connection information saves the interaction relationship between the internal models, and the view information saves the basic information of the entire node relationship diagram.
[0125] Model assembly service refers to assembling various components into a combined model as the basic model, and then forming different instances by configuring different parameters for the combined model.
[0126] The consistency matching verification service is aimed at model assembly needs in different scenarios. The software has made breakthroughs in model diversified assembly technology and can provide model assembly methods based on graphical settings and templates, realizing model assembly in a more agile and efficient manner. Among them, when the simulation components are assembled and published as a combined model, the model interface matching and matching verification are manually performed based on the graphical settings.
[0127] Model parameter configuration service During the model assembly phase, model parameter configuration can be performed before assembly, that is, configuring parameters for each atomic component, and then assembling after forming component instances; it can also be performed after assembly, that is, configuring parameters for the assembled general combination model.
[0128] Model plug-in management service There is a special type of model in the simulation model, that is, it is necessary to intervene in the operation through the interface during the simulation process to provide conditions for "man in the loop". This type of operation interface exists in the form of a plug-in, which can manage the interface plug-in. It supports parsing the initialization interface of the uploaded component and associating it with the data source, quickly selecting interface controls from the control library, and flexibly building a simple, friendly, and easy-to-use parameterized configuration interface to meet the rapid setting and display requirements of various types of business models, and support users to parameterize the model instance.
[0129] The above software is used to solve the long-standing problem of repeated construction of model resources, so that development can be done once and reused multiple times, while supporting users to flexibly combine business functions. The model supports multi-level, large-scale, interface-oriented combination reuse assembly, and forms a model system for a certain field by decomposing the entity model into "building blocks" and defining well-defined interfaces and protocols.
[0130] Finally, it should be pointed out that any unit or individual using or implementing the technical solution of the present invention is an infringement of the present invention, and any unit or individual cannot independently implement the present patent without the permission of the applicant. Any unit or individual inspired by the present invention or implementing it after simple adjustments should also be considered within the scope of protection of this patent.
Claims
1. An interface-oriented model resource combination and reuse method, characterized in that: include: Step S10, constructing a model system architecture specification for model resource combination reuse consisting of a model framework and constraints of the model framework; Step S20, input protocol information and model information, and match the model information with the corresponding protocol information; generate a model framework that meets the model system architecture specification through a template replacement algorithm according to the model information that matches the corresponding protocol information, and fill in the target code in the model framework to build a model for model resource combination reuse; split the model for model resource combination reuse into model components and upload them to the corresponding model to complete the management of the model; and test the model components uploaded in the model; configure the interface relationship between the tested models through a graphical interface, and store the configured interface relationship into an interface relationship template in the database; Step S30, constructing a graphical model assembly tool through a graphical model assembly technology, wherein the constructed graphical model assembly tool has a model instantiation function, a function of establishing an initial model or an initial combination model, a hierarchical modeling function, a function of establishing a target model, a templating function, a configuration management function, and / or a plug-in management function; The model components in the interface relationship template are assembled by dragging and dropping graphics through the graphical model assembly tool, and a target model of multi-level graphical visualization assembly represented by multi-layer graphics is constructed and stored in the database.
2. The method according to claim 1, characterized in that In step S10, the specific steps of constructing a model system architecture specification for model resource combination reuse consisting of a model framework and constraints of the model framework include: Constructing a model framework, wherein the model framework includes a basic framework and / or a business framework; The model framework is based on the publish-subscribe mechanism of the message middleware, and is configured according to the interface relationships preset in the model architecture specification to generate interaction relationships between models and obtain constraints on the model framework; The model system architecture specification for model resource combination and reuse consists of the model framework and the constraints of the model framework.
3. The method according to claim 2, characterized in that Methods for using the model architecture specification for model resource combination and reuse include: When the model is running, the constraints of the model framework are triggered through the publish-subscribe mechanism of the message middleware, and the interface communication and data exchange between models are completed through the interaction relationship between models; A polling algorithm is used to obtain the calculation progress of interface communication and data exchange between models. When the calculation progress of all models is completed, the unified scheduling task time is advanced to the next beat.
4. The method according to claim 3, characterized in that The interface relationships preset by the model architecture specification are configured to include: Parameter configuration port is the initialization input port for model parameter modeling. It is used for the model to read the initialization information of the input port to complete the initialization work. The parameter configuration is passed from one model to another model to complete the parameter configuration distribution within the model and perform parameter key modeling. Data port is the data exchange port between models, including data input port and data output port. The sender of the model actively sends data through the data input port, and the receiver receives data asynchronously through the data output port. The data response function is called back for data processing, which is used for data transmission of event information. Model service port, which is a remote access port between models; it is used for the initiator of the model to initiate a service call, the service party to call back the service response function, perform the service and return, and the initiator continues to run after receiving the return; the service provides system services for the service party platform, including creating new entities, establishing links, disconnecting links, applying for step length, obtaining simulation entity lists, obtaining port mapping lists and / or opening new simulation branch services; The driving port is the port of the main callback function of the model driving itself or other functions. It is used to implement the serial, parallel and logical judgment branches of the workflow, and can drive the core calculation functions within the model to complete the business work. The status port is a port for obtaining or setting the model status. It is used to read data in an active manner. When the data publisher of the model does not explicitly publish data and the data subscriber needs status data, the port data is obtained in GET mode without binding a response event. The data updater can update the status data in SET mode.
5. The method according to any one of claims 1 to 4, characterized in that: The basic framework and / or business framework in the model framework is used to implement the model, expand the model, and upgrade the model on the basis of the model framework, thereby realizing interface-oriented model resource combination reuse modeling; among them, The basic framework is mainly used to determine the standards and specifications at the software development level; Business framework, mainly used to determine the standards and specifications of the business aspects of the model system; Among them, the basic framework includes interface type, interface requirements and / or protocol type; The business framework includes command rules, field composition, basic protocols and / or basic ports.
6. The method according to claim 1, characterized in that The steps in step S20 include: S21, inputting protocol information, wherein the protocol information is a definition of the interactive data format between model interfaces; the protocol information is managed using Protobuf to meet the generation of multiple language model frameworks and the calling of model components; wherein the multiple languages include: C, C++, Java or Python; S22, inputting model information, wherein the model information includes basic model information and / or model port information; wherein the model port information matches the corresponding protocol information; S23, downloading the model framework, automatically generating a model framework that complies with the model system architecture specification in multiple languages through a template replacement algorithm according to the model port information that matches the corresponding protocol information, and filling in the target code in the model framework to build a model for model resource combination reuse, and splitting the model for model resource combination reuse into model components; S24, uploading model components, for uploading the model components to the corresponding model to complete the management of the model; S25, running the model components uploaded to the corresponding model through the model testing tool to test the running effect of the model components; S26, configuring the interface relationship between the models through a graphical interface, and storing the configured interface relationship into an interface relationship template in a database; the model will perform data interaction according to the port connection and data communication method in the interface relationship template.
7. The method according to claim 6, characterized in that After entering the model information, it also includes managing the ports in the entered model information; port management is used to design the communication ports of the abstract model tree nodes, configure different types of ports for the model tree nodes, and maintain the model by maintaining the data protocol used by the port and / or the port open status information.
8. The method according to claim 6, characterized in that In S25, the model testing tool is mainly used for programming development test support for a single model. It can form a test project with dynamic input and output information that changes over time during the test process. The test project can internally include multiple test cases and test result data, which is a model testing tool that is convenient for comparative analysis.
9. The method according to claim 1, characterized in that In step S30, the constructed graphical model assembly tool has the functions of model instantiation, establishing an initial model or an initial combination model, hierarchical modeling, establishing a target model, templating, configuration management and / or plug-in management, including: S31, automatically generating a model editing interface according to the attribute information of the target model, inputting specific parameter values of the parameter configuration port, forming a model instance, so that the graphical model assembly tool has a model instantiation function; S32, inputting basic information of the model or combined model and model port information corresponding to the target model; matching the model port information with corresponding protocol information, establishing an initial model or an initial combined model, so that the graphical model assembly tool has the function of establishing an initial model or an initial combined model; S33, using the built initial model or initial combination model to build the internal structure of the initial model or the initial combination model by dragging the primitives, so as to realize hierarchical modeling, so that the graphical model assembly tool has the hierarchical modeling function; S34, configuring the interface relationship formed within the initial model or the initial combination model, and verifying the consistency matching of the configured interface relationship through a protocol full matching calculation algorithm; completing the establishment of the target model, so that the graphical model assembly tool has the function of establishing the target model; S35, when the target model can effectively simulate the function and performance of the real equipment, it can be used as a physical template, which is conducive to quickly generating simulation models of other equipment of the same type, so that the graphical model assembly tool has a template function; S36, initializing parameter configuration for the entity template to describe the specific performance of the equipment simulation model; wherein different initialization parameter configurations of the same entity template can form different equipment simulation models, realize the refined characterization of the specific equipment's unique attributes, and enter the database for unified management, so that the graphical model assembly tool has a configuration management function; S37, the operation interface that needs to be intervened through the interface during the simulation process of the equipment simulation model exists in the form of a plug-in. The plug-in supports parsing the parameter configuration port of the uploaded model component and associating the data source, quickly selecting interface controls from the database, and building a parametric configuration interface. It supports the parametric configuration of the equipment simulation model, so that the graphical model assembly tool has a plug-in management function.
10. An interface-oriented model resource combination and reuse system, characterized in that: include: The model system architecture specification module is used to construct a model system architecture specification for model resource combination reuse consisting of a model framework and constraints of the model framework; Componentized modeling and model management service tools are used to input protocol information and model information, and match model information with corresponding protocol information; based on the model information matching the corresponding protocol information, a model framework that meets the model system architecture specification is generated through a template replacement algorithm, and the target code is filled in the model framework to build a model for model resource combination reuse; the model for model resource combination reuse is split into model components and uploaded to the corresponding model to complete the model management; and the model components uploaded in the model are tested; the interface relationship between the tested models is configured through a graphical interface, and the configured interface relationship is formed into an interface relationship template and stored in the database; A multi-level graphic visualization model assembly tool is used to construct a graphic model assembly tool through a graphic model assembly technology, and the constructed graphic model assembly tool has a model instantiation function, an initial model or initial combination model establishment function, a hierarchical modeling function, a target model establishment function, a template function, a configuration management function and / or a plug-in management function; The model components in the interface relationship template are assembled by dragging and dropping graphics through the graphical model assembly tool, and a target model of multi-level graphical visualization assembly represented by multi-layer graphics is constructed and stored in the database.
Citation Information
Patent Citations
A distributed software fabrication system and process for fabricating business applications
CA2459423A1
Visual modeling method for distributed simulation platform
CN105677446A
Data acquisition and processing method and system suitable for factory automatic production scheduling
CN111913943A
Flexible configurable simulation system
CN112463130A
Ipage webpage type low-code development platform based on drag-and-drop component framework
CN116225429A
Cited By
Efficient large-scale distributed parallel computing deduction simulation platform and design method thereof
CN121615362A
Efficient large-scale distributed parallel computing deduction simulation platform and design method thereof
CN121615362B
