A Modelica simulation deployment scheme and method based on microservice architecture for the LNG IAS field

CN117744348BActive Publication Date: 2026-08-21CHINA SHIPBUILDING DIGITAL INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311696173.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2026-08-21
Estimated Expiration
2043-12-12

AI Technical Summary

Technical Problem

[0005]本发明要解决的技术问题是提供一种通过微服务化的方式,为多平台产生的模型文件提供统一的服务接口,可以有效地解决多平台模型文件调用问题,同时可以很好地降低系统硬件要求,提升系统稳定性以及可扩展性,由此有助于提升LNG IAS仿真系统的稳定性,提升仿真验证效率,推动LNG 研发建造工业高质量发展的面向LNG IAS领域的基于微服务架构的Modelica仿真部署方案

Benefits of technology

[0015]与现有技术相比,本发明的有益技术效果是:将微服务架构应用于LNG IAS 当中基于Moelica 的仿真系统,使得数据算法模型与Modelica编程本身仿真进行解藕,兼容其它多种数据建模语言的模型结果,使得仿真服务在兼容其它平台生成的模型时可以进行快速扩展,将多种复杂的模型仿真运行进行分布式处理,可以极大地降低宿主机的运行压力,有效提高服务稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117744348B_ABST
    Figure CN117744348B_ABST
Patent Text Reader

Abstract

The simulation deployment scheme based on the micro-service architecture of the LNG IAS field of the application comprises the following steps: (1) disassembling external services required by LNG IAS simulation; (2) using Grpc and Docker for model service deployment; (3) encapsulating Grpc clients into Modelica simulation environment through Modelica External; and (4) micro-service orchestration deployment for the overall IAS simulation environment. The micro-service architecture is applied to the Modelica-based simulation system in the LNG IAS, so that the data algorithm model and the Modelica programming simulation are decoupled, the model results of other various data modeling languages are compatible, the simulation service can be quickly expanded when the model generated by other platforms is compatible, the distributed processing of multiple complex model simulation running can greatly reduce the running pressure of the host computer, and the service stability is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of LNG IAS technology, specifically to a Modelica simulation deployment scheme and method based on a microservice architecture for the LNG IAS field. Background Technology

[0002] Modelica is an open, object-oriented, equation-based computer language that can easily model complex physical systems across various fields, including mechanical, electronic, electrical, hydraulic, thermal, control, and process-oriented subsystems. Numerous companies both domestically and internationally utilize Modelica for system simulation modeling. In the field of LNG ship IAS system simulation in China, major research institutions include Dalian Maritime University, Wuhan University of Technology, and Shanghai Maritime University. Professor Wu Wanqing of Dalian Maritime University designed and researched a simulator for loading and unloading cargo oil on oil tankers, and carried out the structural design and implementation of the cargo oil loading and unloading system software. Yang Li of Dalian University of Technology completed the simulation and software development for the cargo oil loading and unloading system of liquefied cargo ships, and established a mathematical model of the loading and unloading system.

[0003] Because Modelica can directly perform simulation modeling based on equations, it has unique advantages in systematic modeling compared to other computer languages ​​such as C and C++, making it highly suitable for large-scale simulation modeling of LNG ship IAS systems. Currently, commercial software companies such as Suzhou Tongyuan and Dymola have numerous successful cases of using Modelica for simulation modeling in areas such as aircraft engines and chemical processes. However, there are currently no precedents in China for using Modelica to model LNG IAS systems. Therefore, we currently face the following two problems: (1) Modelica is difficult to handle all the critical core computational modules involved in IAS: such as data-driven neural network modeling. Therefore, Modelica needs to be compatible with model services of other model development platforms, such as Tensorflow. (2) When all models are modeled using Modelica, the system can only run on a single host machine, which places high demands on system performance, and the system is highly uncertain and has poor scalability.

[0004] Furthermore, LNG IAS is characterized by its large system size and complex equipment. Using Modelica alone for modeling and simulation has significant limitations and uncertainties. Therefore, it is important to make it compatible with other modeling methods and to decouple model services from the system. This invention provides a feasible solution to this problem. Summary of the Invention

[0005] The technical problem to be solved by this invention is to provide a unified service interface for model files generated by multiple platforms through a microservice approach. This can effectively solve the problem of calling model files from multiple platforms, while significantly reducing system hardware requirements, improving system stability and scalability. This helps to improve the stability of LNG IAS simulation systems, increase simulation verification efficiency, and promote the high-quality development of the LNG R&D and construction industry. This is a Modelica simulation deployment solution based on a microservice architecture for the LNG IAS field.

[0006] The technical problem to be solved by this invention is achieved through the following technical solution: a Modelica simulation deployment scheme based on a microservice architecture for the LNG IAS field, which includes the following steps: (1) Deconstruct the external services required for LNG IAS simulation. LNG IAS is an integrated automated system for liquefied natural gas. (2) Deploy the model service using Grpc and Docker; Grpc is a high-performance, cross-language RPC framework that supports multiple programming languages, including Java, C++, and Python. It is widely used in microservice architectures to implement remote calls between services. Docker is a containerization technology that can package and distribute applications, making them portable and consistent across different environments. (3) The Grpc client is encapsulated into the Modelica simulation environment through the Modelica External method. In Modelica, the External keyword is used to declare an external function. This function can be written in languages ​​such as C, C++ or Fortran. You can choose according to your needs, so it will not be elaborated here. In addition, the Modelica language has good extensibility. You can use the External keyword to encapsulate functions or classes written in other programming languages ​​into the Modelica environment. (4) Perform microservice orchestration and deployment for the overall IAS simulation environment.

[0007] Preferably, the specific process of step (1) is as follows: Based on the external services required by the liquid cargo system, cabin system, and safety system, a list is compiled, and prediction services are provided using model files generated by sklearn, matlab, and tensorflow. (This is to achieve more efficient and accurate equipment management and optimization.) Preferably, the specific process of step (2) is as follows: based on the input data fields and output data fields required in the prediction service, construct the protobuf file required for the service, combine the protobuf file and the trained data service model, use the gRPC server to encapsulate the external RPC service and package it into the corresponding Docker container.

[0008] Preferably, the entire LNG IAS consists of three main systems: the cargo system, the engine room system, and the safety system. Each main system can be further subdivided into component systems and minimum subsystems based on system complexity or functionality.

[0009] Preferably, the subsystems and sub-systems are in a hierarchical relationship.

[0010] Preferably, the entire system and most of the general-purpose equipment can be modeled and developed using Modelica, while some critical equipment needs to be simulated and modeled using a data-driven approach to identify these critical equipment.

[0011] Preferably, the specific process of step (3) is as follows: construct the corresponding Modelica simulation model. In the constructed model, the core computing modules required by it are encapsulated by the rpcclient generated by protobuf in the external way, and then the corresponding model algorithm module is requested for service.

[0012] Preferably, in constructing the corresponding Modelica simulation model, the key computational part obtains the computational results by making external service requests through RPC, thereby decoupling the core computational part. At the same time, in Modelica External, specifying LibrarySource allows for the calling of related functions of grpc_client.

[0013] Preferably, the specific process of step (4) is as follows: build a docker-compose file, configure the host:port of the services required by the three simulation systems of liquid cargo, cabin and safety, and finally deploy the overall simulation environment of IAS in microservice orchestration.

[0014] Preferably, the above service configuration is performed on all critical equipment, and all host:ports are written to the configuration file for unified management. Finally, the overall IAS simulation environment is deployed using microservice orchestration.

[0015] Compared with the prior art, the beneficial technical effects of the present invention are: applying a microservice architecture to the Moelica-based simulation system in LNG IAS decouples the data algorithm model from the Modelica programming simulation itself, making it compatible with model results from other data modeling languages. This allows the simulation service to be rapidly expanded when compatible with models generated by other platforms. Distributed processing of various complex model simulations can greatly reduce the operating pressure on the host machine and effectively improve service stability. Attached Figure Description

[0016] Figure 1 This is a flowchart of the Modelica simulation deployment scheme based on a microservice architecture for the LNG IAS field, as described in this invention. Figure 2 This is a schematic diagram of the system directory structure of the present invention; Figure 3 This is another structural diagram of the system catalog of the present invention; Figure 4 This is a schematic diagram illustrating the model of the key equipment of the present invention; Figure 5 A simplified framework diagram of the Docker container used to build, package, and deploy the prediction service according to this invention; Figure 6 This is a schematic diagram illustrating the process of constructing the Modelica simulation model for decoupling remote procedure call (RPC) according to the present invention. Figure 7 This is a simplified diagram illustrating the orchestration and deployment of the overall IAS simulation environment using microservices, as described in this invention. Detailed Implementation

[0017] The specific technical solutions of the present invention will be further described below with reference to the accompanying drawings, so as to enable those skilled in the art to further understand the present invention, without constituting a limitation on its rights.

[0018] Example 1, referring to Figure 1 A Modelica simulation deployment solution based on a microservice architecture for the LNG IAS field, which includes the following steps: (1) Deconstruct the external services required for LNG IAS simulation. LNG IAS is an integrated automated system for liquefied natural gas. (2) Deploy the model service using Grpc and Docker; Grpc is a high-performance, cross-language RPC framework that supports multiple programming languages, including Java, C++, and Python. It is widely used in microservice architectures to implement remote calls between services. Docker is a containerization technology that can package and distribute applications, making them portable and consistent across different environments. (3) The Grpc client is encapsulated into the Modelica simulation environment through the Modelica External method. In Modelica, the External keyword is used to declare an external function. This function can be written in languages ​​such as C, C++ or Fortran. You can choose according to your needs, so it will not be elaborated here. In addition, the Modelica language has good extensibility. You can use the External keyword to encapsulate functions or classes written in other programming languages ​​into the Modelica environment. (4) Perform microservice orchestration and deployment for the overall IAS simulation environment.

[0019] In Example 1, the present invention provides a unified service interface for calling model files generated by multiple platforms when using Modelica for IAS system simulation through a microservice approach. This can effectively solve the problem of calling model files from multiple platforms, while also significantly reducing system hardware requirements and improving system stability and scalability. In other words, this invention is a Modelica simulation deployment solution based on a microservice architecture for the LNG IAS field. It is mainly used to solve the compatibility problem between Modelica and other general machine learning algorithm models in the LNG IAS simulation field. Simulation data models of automated systems such as liquid cargo, cabin, and safety developed based on different algorithm platforms are uniformly encapsulated into algorithm services through gRPC, Docker, etc., to provide stable and scalable services for the overall IAS simulation service.

[0020] Example 2, refer to Figure 2-3 Example 1 describes a Modelica simulation deployment scheme based on a microservice architecture for the LNG IAS field. The specific process of step (1) is as follows: sort out the external services required by the liquid cargo system, cabin system and safety system, and use model files generated by sklearn, matlab and tensorflow to provide prediction services, so as to achieve more efficient and accurate equipment management and optimization.

[0021] Example 3, referring to Figure 4Example 2 is a Modelica simulation deployment scheme based on microservice architecture for the LNG IAS field. The specific process of step (2) is as follows: according to the input data fields and output data fields required in the prediction service, construct the protobuf file required for the service, combine the protobuf file and the trained data service model, use the gRPC server to encapsulate the external RPC service and package it into the corresponding Docker container.

[0022] Example 4, the Modelica simulation deployment scheme based on microservice architecture for the LNG IAS field in Examples 2-3, the entire LNG IAS consists of three main systems: liquid cargo system, cabin system and safety system. Each main system can be further subdivided into component systems and minimum subsystems based on system complexity or functionality.

[0023] Example 5 is a Modelica simulation deployment scheme based on a microservice architecture for the LNG IAS field, as described in Example 4. The subsystems and sub-systems are hierarchical and subordinate to each other.

[0024] Example 6, refer to Figure 5 Example 4 presents a Modelica simulation deployment scheme based on a microservice architecture for the LNG IAS field. The entire system and most of the general equipment can be modeled and developed using Modelica. However, some critical equipment requires simulation modeling using a data-driven approach to identify and address these critical equipment.

[0025] Example 7, referring to Figure 6 The Modelica simulation deployment scheme based on microservice architecture for the LNG IAS field in Example 1, the specific process of step (3) is as follows: construct the corresponding Modelica simulation model, and in the constructed model, encapsulate the core computing module required by it through the protobuf-generated rpc client in the external way, and use it to make service requests to the corresponding model algorithm module. In Example 7, after compilation, the gRPC client is encapsulated in C language, key fields are encapsulated into relevant APIs, and the entire project is compiled into a DLL file. Then, the relevant Modelica simulation model is constructed, and the DLL file is called. Its core calculation module passes parameters to the gRPC client in the DLL file through external method for service requests.

[0026] Example 8, the Modelica simulation deployment scheme based on microservice architecture for the LNG IAS field in Example 7, in the construction of the corresponding Modelica simulation model, its key calculation part is obtained by RPC making external service requests to obtain the calculation results, thereby decoupling the core calculation part. At the same time, in Modelica External, specifying LibrarySource can make grpc_client related function calls.

[0027] Example 9, referring to Figure 7 The Modelica simulation deployment scheme based on microservice architecture for the LNG IAS field in Example 1, the specific process of step (4) is as follows: build a docker-compose file, configure the host:port of the services required by the three simulation systems of liquid cargo, cabin and safety. host is the host name, which is usually used to identify a device on the network, while port is the port number, which is used to identify a process on the device. Finally, the overall IAS simulation environment is deployed by microservice orchestration.

[0028] Example 10, referring to Figure 7 Example 1 presents a Modelica simulation deployment scheme based on a microservice architecture for the LNG IAS field. The above-mentioned service configuration is performed on all critical equipment, and all host:ports are written to the configuration file for unified management. Finally, the overall IAS simulation environment is deployed through microservice orchestration.

[0029] This Modelica simulation deployment solution, based on a microservice architecture, is designed for the LNG IAS field. It applies a microservice architecture to the Moelica-based simulation system in LNG IAS, decoupling the data algorithm model from the Modelica programming simulation itself. It is compatible with model results from other data modeling languages, allowing the simulation service to be rapidly expanded while being compatible with models generated by other platforms. Distributed processing of various complex model simulations can greatly reduce the operating pressure on the host machine and effectively improve service stability.

Claims

1. A Modelica simulation deployment scheme based on a microservice architecture for the LNG IAS field, characterized in that, The simulation deployment scheme includes the following steps: (1) Disassemble the external services required for LNG IAS simulation; (2) Deploy the model service using Grpc and Docker; (3) The Grpc client is encapsulated into the Modelica simulation environment via the Modelica External method; (4) Perform microservice orchestration and deployment for the overall IAS simulation environment; The specific process of step (1) is as follows: sort out the external services required by the liquid cargo system, cabin system and safety system, and provide prediction services using model files generated by sklearn, matlab and tensorflow; The entire system and its general equipment were modeled and developed using Modelica. The key equipment involved required data-driven simulation modeling to identify and analyze this key equipment. The specific process of step (2) is as follows: Based on the input data fields and output data fields required in the prediction service, construct the protobuf file required for the service, combine the protobuf file and the trained data service model, use the gRPC server to encapsulate the external RPC service and package it into the corresponding Docker container; The specific process of step (3) is as follows: construct the corresponding Modelica simulation model. In the constructed model, the core computing modules required are encapsulated by the protobuf-generated RPC client in the external way, and then the corresponding model algorithm module is requested for service. The specific process of step (4) is as follows: build a docker-compose file, configure the host:port of the services required by the three simulation systems of liquid cargo, cabin and safety, and finally deploy the overall simulation environment of IAS in microservice orchestration.

2. The Modelica simulation deployment scheme based on microservice architecture for the LNG IAS field according to claim 1, characterized in that: The entire LNG IAS consists of three main systems: the cargo system, the engine room system, and the safety system. Each main system is further subdivided into component systems and the smallest subsystems based on system complexity or functionality.

3. The Modelica simulation deployment scheme based on microservice architecture for the LNG IAS field according to claim 2, characterized in that: The subsystems and the smallest subsystems are subordinate to each other in a hierarchical relationship.

4. The Modelica simulation deployment scheme based on microservice architecture for the LNG IAS field according to claim 1, characterized in that: In constructing the corresponding Modelica simulation model, the key computational part obtains the computational results by making external service requests through RPC, thereby decoupling the core computational part. At the same time, in Modelica External, LibrarySource is specified to make grpc_client related function calls.

5. The Modelica simulation deployment scheme based on a microservice architecture for the LNG IAS field according to claim 1, characterized in that, The above deployment scheme was implemented for all critical equipment, and all host:ports were written to the configuration file for unified management. Finally, the overall IAS simulation environment was deployed using microservice orchestration.

Citation Information

Patent Citations

  • Simulation application program construction system and method based on micro service

    CN115981783A

  • Simulation experiment environment deployment method based on OpenStack

    CN116932130A