Ship simulation control platform and control method

By separating modular deployment and timestamp control methods, the problems of poor adaptability of model multiplexing and insufficient time synchronization accuracy in ship simulation are solved, efficient model management and precise simulation control are achieved, and the efficiency and accuracy of simulation experiments are improved.

CN120335331APending Publication Date: 2025-07-18NANJING CHANGFENG AEROSPACE ELECTRONICS SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510377887.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the existing ship simulation technology, there are problems such as poor adaptability of model multiplexing, complex version management, low cross-platform resource scheduling efficiency, insufficient distributed time synchronization accuracy and high cost of hardware acceleration solutions, making it difficult to achieve heterogeneous model integration, model cluster collaborative control and high-precision time synchronization.

Method used

The experimental controller and model database that is separated into modular deployment are used to update the model status through timestamps, combined with modular deployment and containerized cluster architecture, the separation of model management and control is achieved, and the ship model is distinguished using the xml model mapping file, and precise control is performed through heartbeat packets and control packets.

Benefits of technology

The fit between the simulation model and the real target is improved, the accuracy and efficiency of the simulation experiment is ensured, the flexible construction and expansion of the model is realized, and the system complexity and development costs are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120335331A_ABST
    Figure CN120335331A_ABST
Patent Text Reader

Abstract

The invention discloses a ship simulation control platform and control method in the technical field of ship simulation. The model database comprises a model library used for storing and managing ship models and a configuration library used for storing and managing model mapping files and environment model files; the experiment controller comprises a model management layer used for reading an environment model file and a model mapping file in a model database, and an experiment control layer used for carrying out motion control on a ship model according to a received motion control instruction. The scene planning layer is used for carrying out ship model position and state control and environment model control according to the received scene control instruction; and the data interaction layer is used for performing data interaction with an operator, the model management layer, the experiment control layer and the scene planning layer. According to the method, the fitting degree of a simulation model and a real target is improved under the condition that the efficiency is ensured; each ship model in a simulation experiment can be accurately controlled at each moment, and the experiment precision is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a ship simulation control platform and a control method, belonging to the technical field of ship simulation. Background Art

[0002] In the field of ship simulation, it is necessary to integrate multi-source heterogeneous models such as power systems, navigation control, and environmental perception. In the prior art, multi-format model interaction is generally achieved through standardized interface protocols, but the maintenance of dynamic data consistency depends on manual configuration, resulting in problems such as poor interface compatibility and low cross-platform resource scheduling efficiency. In addition, in the simulation experiment of multi-physical environment field coupling, the load balancing of the model cluster conflicts with the multi-model objective optimization (such as the trade-off between computational efficiency and accuracy), which has not been effectively solved.

[0003] In terms of model reuse, the prior art generally faces the problems of poor cross-project reuse adaptability and high version management complexity. At the same time, the model dependency relationship lacks a dynamic adaptation mechanism, resulting in the need to repeatedly adjust interface parameters in different simulation scenarios (such as single-ship testing and formation coordination). In addition, traditional methods rely on manual annotation of model metadata (such as input and output constraints, version numbers), which easily leads to compatibility errors or function overlaps.

[0004] In terms of the distributed platform architecture, traditional centralized simulation systems are difficult to meet the real-time requirements of multi-target model digital simulation. At present, an edge-cloud collaborative architecture is adopted, combined with hardware-in-the-loop (HIL) technology to improve the virtual-real interaction ability. However, the clock synchronization accuracy of distributed nodes is limited by network latency and clock drift. Especially in the simulation of multi-ship formations, the synchronization error of time-sensitive tasks (such as sensor data fusion) may lead to simulation failure. Although some solutions propose a hardware acceleration scheme based on FPGA to relieve the real-time pressure, its dependence on dedicated hardware significantly increases the system complexity and development cost.

[0005] In summary, the existing ship simulation technology faces the following bottlenecks: Model reuse management: insufficient cross-project reuse adaptability, difficult to maintain version and dependency relationships; Distributed time synchronization: network latency and clock drift result in insufficient synchronization accuracy, and the hardware acceleration scheme is too costly.

[0006] Heterogeneous system integration: poor consistency of dynamic data interaction, low cross-platform resource scheduling efficiency; There is an urgent need for a ship simulation control platform suitable for simulation scenarios of heterogeneous model integration, model cluster collaborative control, model reuse optimization, and high-precision time synchronization. Summary of the Invention

[0007] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide a ship simulation control platform and a control method.

[0008] To solve the above technical problems, the present invention is implemented by the following technical solutions.

[0009] In a first aspect, the present invention provides a ship simulation control platform, including: a test controller and a model database deployed in a separated modular manner, and the test controller and the model database transmit data through a network; The model database includes: a model library for storing and managing ship models, and a configuration library for storing and managing model mapping files and environmental model files; The test controller includes: A model management layer for reading environmental model files and model mapping files in the model database, An experimental control layer for performing motion control on the ship model according to the received motion control instructions, A scenario planning layer for performing position and state control of the ship model and environmental model control according to the received scenario control instructions; A data interaction layer for performing data interaction with operators, the model management layer, the experimental control layer, and the scenario planning layer; The experimental control layer receives a heartbeat data packet with a timestamp or a control data packet for a specific ship sent by the data interaction layer; After the experimental control layer receives the heartbeat data packet with a timestamp, it controls all instantiated ship models to calculate their own motion states at the next moment according to the timestamp, and updates the motion states, position information, and equipment working states of the corresponding instantiated ship models according to their own motion states at the next moment; After the experimental control layer receives the control data packet for a specific ship set in advance, it updates the control state of the instantiated specific ship model.

[0010] Further, the model mapping file is an xml model mapping file. The current ship name to be loaded and the corresponding model type number are obtained by the model management layer reading the xml model mapping file. The ship name is the unique identifier of the ship, and the model type number is used to represent the ship model of the corresponding power type; the characteristic parameters of the ship power system are set in the xml model mapping file to distinguish the different ship motion characteristics of the ship models of the same power type; The model management layer is used to sequentially read the model mapping file and the environmental model file in the configuration library according to the test parameter control instructions sent by the data interaction layer, instantiate each ship by calling the corresponding ship model according to the model mapping file, and generate the ship motion state in combination with the read environmental model.

[0011] Further, the model management layer is also used to connect to an external database through a network for reading the model mapping file and the ship model in the external database.

[0012] Further, after receiving the heartbeat data packet with a timestamp, the experiment control layer controls all instantiated ship models to calculate their own motion states at the next moment according to the timestamp, and updates the motion states, position information, and equipment working states of the corresponding instantiated ship models according to their own motion states at the next moment, including: According to the preset state update time interval Regularly send a heartbeat control instruction with a timestamp to all instantiated ship models to update the motion state of the ship model at the next moment; The function of the motion state at the next moment is:

[0013] In the formula, represents the initial state of the ship model, represents the motion state of the model at the current moment, represents the environmental parameters at the current moment, represents the input state of the ship model at the current moment, represents the step size at the next moment, represents the motion state of the model at the next moment.

[0014] Further, the separated modular deployment includes one-to-one deployment and cluster deployment; In the one-to-one deployment, the experiment controller and the model database are deployed one-to-one locally; The cluster deployment is to form a containerized cluster architecture with the deployment experiment controller as the main node and the model nodes as the slave nodes through docker. The model nodes can be deployed at any connected location in the network, and the model nodes include model databases.

[0015] In a second aspect, the present invention discloses a control method for a ship simulation control platform, including: Import the ship model into the model database according to the actual ship test data, and import the prepared environmental model data into the model database; According to the power system parameters provided by the manufacturer and the actual ship sea trial data, fill in the ship name, model category, maximum rudder angle value, maximum engine speed, gearbox reduction ratio, and maximum rudder angle rotation speed parameters into the model mapping file; Read the environmental model data in the model database through the model management layer; Read the model mapping file through the model management layer to instantiate ship model objects in sequence to form a ship model object map; The control model management layer selects the corresponding ship model in the model database according to the model category number in the model mapping file to initialize the motion parameters of the ship model object. The data interaction layer sequentially sets the initial positions and initial state information of each ship model object in the simulation experiment. The scenario planning layer traverses the instantiated ship model objects and updates the positions and state information of all ship model objects according to the set parameters to complete the initialization. The scenario planning layer calls the environmental model data to initialize the wind, ocean current, and sea wave. The data interaction layer starts sending heartbeat data packets to start the simulation experiment. The experiment control layer receives the heartbeat data packets and updates the model motion state, position information, and equipment working state according to the time interval in the timestamp. The data interaction layer sends ship control instructions. The experiment control layer receives the control data packets and retrieves and updates the control information in the map according to the ship name in the data packets. The control experiment control layer calculates the working condition of the power system of the corresponding model at the next moment according to the control information of each ship model and controls the model motion. The data interaction layer stops sending heartbeat data packets, and the model management layer releases the memory space occupied by the model instantiation to end the experiment.

[0016] In a third aspect, the present invention discloses a computer-readable storage medium storing one or more programs, where the one or more programs include instructions that, when executed by a computing device, cause the computing device to execute the method of the first aspect.

[0017] In a fourth aspect, the present invention discloses a computer device, including one or more processors, a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing the method of the first aspect.

[0018] The beneficial effects achieved by the present invention are as follows: 1) The platform of the present invention designs a combined storage method for ship models. For the same type of physical ship, the same set of motion models is reused as a template to improve the fitting degree between the simulation model and the real target while ensuring efficiency.

[0019] 2) The platform of the present invention designs a simulation experiment control method based on timestamps, enabling the control platform to accurately control each ship model in the simulation experiment at each moment and ensuring the experiment accuracy.

[0020] 3) The platform of the present invention designs a modular control and storage structure, realizing the separation of the experimental controller and the model database. In the simulation experiment, the experimental controller uniformly manages and controls the models, facilitating the modular containerized deployment and expansion of the ship simulation control platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a schematic diagram of the architecture of a modular multi-model cluster control platform based on timestamp control; Figure 2 is a schematic diagram of the call relationship of different data by the experimental controller; Figure 3 is a schematic diagram of the control flow of different data packets; Figure 4 is a schematic diagram of the one-to-one deployment method; Figure 5 is a schematic diagram of the cluster deployment method; Figure 6 is a working flowchart of the multi-model cluster control architecture based on timestamp control. DETAILED DESCRIPTION OF THE INVENTION

[0022] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention and cannot be used to limit the protection scope of the present invention.

[0023] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "transverse", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate the orientation or position relationship based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined with "first", "second", etc. may explicitly or implicitly include one or more of such features. In the description of the present invention, unless otherwise specified, the meaning of "a plurality" is two or more.

[0024] In the description of the present invention, it should be noted that unless otherwise clearly specified and defined, the terms "installation", "connection", and "coupling" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood through specific situations.

[0025] Embodiment 1. This embodiment introduces a ship simulation control platform, including: a test controller and a model database deployed in a separated modular manner, where the test controller and the model database transmit data through a network. The model database includes: a model library for storing and managing ship models, and a configuration library for storing and managing model mapping files and environmental model files. The test controller includes: a model management layer for reading environmental model files and model mapping files in the model database, an experimental control layer for performing motion control on the ship model according to the received motion control instructions, a scenario planning layer for performing position and state control of the ship model and environmental model control according to the received scenario control instructions; a data interaction layer for performing data interaction with operators, the model management layer, the experimental control layer, and the scenario planning layer; The experimental control layer receives a heartbeat data packet with a timestamp or a control data packet for a specific ship sent by the data interaction layer; After receiving the heartbeat data packet with a timestamp, the experimental control layer controls all instantiated ship models to calculate their own motion states at the next moment according to the timestamp, and updates the motion states, position information, and equipment working states of the corresponding instantiated ship models according to their own motion states at the next moment. The position information: the initial position is set manually, and subsequent position information is recursively obtained in the order of timestamps. The position information for the next time interval is obtained by comprehensively inferring and calculating according to the position information at the previous moment, the motion direction, motion speed, acceleration, and environmental impacts (water flow rate and direction, wind direction and force) at a unit time interval, and the result is brought into the next calculation.

[0026] The working state of the device is divided into two parts: active control state feedback and simulation of main device working data. The active control state feedback is the real-time feedback of the model on the direct control instructions of the model (such as throttle increase or decrease, rudder deflection adjustment, braking, peripheral switch operations, etc.) in the automatic control or manual control mode; the simulation of main device working data is the real-time working state of the main power devices of the real ship simulated by the model (such as engine speed, gearbox speed, rudder angle deflection, etc.). Here, the specific simulation values will be displayed in real time, and the change of the values is affected by specific operation instructions (for example, when controlling the model to accelerate, the instruction controls the throttle to increase, and at this time, the propeller speed gradually increases to the control gear. According to the real-time propeller speed, the engine speed can be simulated and calculated because the speeds of these two devices are directly related. Then, the real-time gearbox speed can be deduced from the real-time engine speed, and so on).

[0027] After receiving the control data packet for a pre-set specific ship, the experimental control layer updates the control state of the instantiated specific ship model.

[0028] The model mapping file is an xml model mapping file. By reading the xml model mapping file through the model management layer, the ship name to be loaded currently and the corresponding model type number are obtained. The ship name is the unique identifier of the ship, and the model type number is used to represent the ship model of the corresponding power type; the characteristic parameters of the ship power system are set in the xml model mapping file to distinguish the different ship motion characteristics of the ship models of the same power type. The model management layer is used to sequentially read the model mapping file and the environment model file in the configuration library according to the test parameter control instructions issued by the data interaction layer, instantiate each ship by calling the corresponding ship model according to the model mapping file, and generate the ship motion state in combination with the read environment model.

[0029] The model management layer is also used to connect to the external database through the network to read the model mapping file and the ship model of the external database.

[0030] After receiving the heartbeat data packet with a timestamp, the experimental control layer controls all instantiated ship models to calculate their own motion states at the next moment according to the timestamp, and updates the motion states, position information, and device working states of the corresponding instantiated ship models, including: According to the pre-set state update time interval Regularly send a heartbeat control instruction with a timestamp to all instantiated ship models to update the motion state of the ship model at the next moment; The function of the motion state at the next moment is:

[0031] In the formula, Represents the initial state of the ship model, Represents the motion state of the model at the current moment, Represents the environmental parameters at the current moment, Represents the input state of the ship model at the current moment, Represents the step size for the next moment, Represents the motion state of the model at the next moment.

[0032] The said separation modular deployment includes one-to-one deployment and cluster deployment; In the one-to-one deployment, the experimental controller and the model database are deployed one-to-one locally; The cluster deployment forms a containerized cluster architecture with the deployment experimental controller as the master node and the model nodes as slave nodes through docker. The model nodes can be deployed at any connected location in the network. The model nodes include model databases.

[0033] Embodiment 2, based on the same inventive concept as Embodiment 1, this embodiment introduces a ship simulation control platform. The present invention is used for a surface simulation control platform including a variety of different ship models. In view of the need to simultaneously manage multiple models for experiments in the ship simulation control platform, the need to construct experimental scenarios and control experimental processes through existing models, as well as the requirements for the deployment and expansion of the platform itself, specifically as Figure 1 shown, is a modular multi-model cluster control platform architecture based on timestamp control.

[0034] This ship simulation control platform includes two parts: an experimental controller and a model database. The experimental controller is divided into a data interaction layer, an experimental control layer, a scenario planning layer, and a model management layer, which are responsible for the management of ship models, the construction of experimental plans, and the control of experimental processes; the model database is used to store and manage local ship model data, local environment (wind model, ocean current model, wave model) data, and the mapping relationship file between the model and the actual experimental simulation ship. The two are independent of each other, facilitating the overall software architecture to achieve model cluster control, modularization, and containerized deployment of simulation experiments.

[0035] For the problem that the ship simulation control platform needs to manage multiple models for experiments simultaneously, this simulation control platform designs an independent combined data storage method. The trained ship model data, environment model data, and model mapping files are stored separately and separated from the experiment controller of the platform architecture. Only when the controller constructs the experiment scenario, the corresponding configuration file is read to instantiate the ship model required for the current experiment in the memory. And as long as the model loading requirements are met, the experiment controller can read the external model and mapping data files through the network to generate the experimental ship model. At the same time, by configuring the model mapping file, the same set of ship models can be instantiated to generate different experimental model ships. The above two points achieve the flexible construction of the experimental model.

[0036] For the requirements of the ship simulation control platform to simulate multiple ship models in the experimental planning construction, control each ship model separately during the experiment, and precisely control the time of the simulation experiment process, this platform designs a simulation experiment control method based on timestamps. The movement of the models in the experiment is continuously recursively calculated for the position and spatial movement state at the next moment at time intervals, and each recursive calculation is triggered by a heartbeat data packet with equally spaced timestamps. Each time, the state of all models at the next moment is calculated in sequence according to the current model state, ensuring the accuracy of the simulation experiment control.

[0037] For the requirements of the efficient deployment and easy expansion of the ship simulation control platform itself, this platform designs a modular control and storage structure. The experiment controller and the model database are completely separated and exist independently. The actual ship models used in the experiment are only created and uniformly managed and controlled by the experiment controller after the experiment controller reads the corresponding models in the model database through the configuration file. The experiment controller, as a unified interaction and data feedback platform, only needs to be deployed once, while the model database can be deployed distributively in multiple copies. This facilitates the virtual deployment of this architecture in the form of a single experiment controller and multiple model databases through docker.

[0038] The combined data storage method of the present invention is specifically as follows: In the application scenario of this architecture, the simulation experiment scenario requires the ability to simulate the experimental situation under the joint movement of multiple ships. Different ships correspond one-to-one with the actual ships in reality. The following situations need to be considered: 1. Ships of the same model can use the same set of motion models, but there are certain differences in the actual measured thrust and steering ability of the installed power systems; 2. Ships of different models need to use their respective corresponding motion models; 3. For the same ship, due to the repair or replacement of the power system, the measured maximum speed, acceleration ability, and steering ability have changed; 4. In the same simulation experiment, all ship models need to use the same set of environment models (wind model, ocean current model, wave model).

[0039] To address the above situation and improve the fitness between the simulation model and the real target while ensuring efficiency, this architecture designs a combined storage method for ship models. For the same type of physical ship, the same set of motion models are reused as templates. Since the propeller speed and rudder angle are used in the model to describe the ship's motion ability, and the working conditions of the propeller and rudder are determined by the relevant equipment in the actual ship's power system, the present invention can separate these relevant parameters (such as the maximum propeller speed, rudder rotation speed, gearbox reduction ratio, etc.) to form a model mapping file for a specific ship for a specific model and label the name for distinction. The model mapping file is in xml format, which is convenient for local reading and network transmission.

[0040] Similarly, for the environments under different sea conditions, the present invention stores the corresponding wind models (describing the influence of aerodynamic forces on the ship), ocean current models (general models for representing water flow motion), and wave models (representing the rolling and pitching of the ship during motion) respectively. The same environmental model needs to be used in the same simulation experiment to ensure the unity of the ship's motion.

[0041] The calling relationships of different types of data are as Figure 2 shown, and the overall data is uniformly controlled by the experiment controller. The experiment controller obtains the ship name and the corresponding model type number to be loaded currently by reading the xml model mapping file.

[0042] In the Xml file, different ships are distinguished using <ship>< / ship> tags. The ship name ( <shipname>< / shipname> ), as the unique identifier of the ship, cannot be repeated. The ship type ( <shiptype>< / shiptype> ) represents the model number used by this ship. Different numbers represent different types of ship power models. The control parameters ( <shipparam>< / shipparam> ) are used to set the characteristic parameters of the ship's power system (such as propeller speed, rudder angular velocity, gearbox reduction ratio, etc.) to distinguish the motion characteristics of different ships. The experiment controller can also accept xml configuration information sent through network data packets for remote dynamic loading.

[0043] The experiment controller reads the configuration information in sequence and calls the corresponding ship motion model to instantiate each ship, and generates the ship motion state in combination with the read environmental model. The motion state is used for both state display and as the basis for the experiment controller to update the state at the next moment.

[0044] The cluster control method based on time stamps of the present invention is as follows: In the simulation experiment, in order to enable the control platform to precisely control each ship model in the simulation experiment at each moment and ensure the experimental accuracy, this platform designs a simulation experiment control method based on time stamps.

[0045] The ship motion model is a recursive calculation model that continuously calculates the state after a certain moment based on the current state. Continuously calculate The state after a certain moment To control variables, the platform sets a fixed time interval As the minimum time unit for state update. By sending heartbeat control instructions with timestamps to the model at regular intervals through the simulation control platform to update the model state, it is possible to control the ship state in time slices during the simulation experiment. The model advancement function is as follows:

[0046] Among them, Represents the initial state of the model, Represents the model at The output state at a certain moment, Represents The environmental parameters at a certain moment, Represents the model at The input state at a certain moment, Represents the next step size, Represents the output state of the model at the next moment.

[0047] When the platform instantiates the ship model, it includes motion model information and dynamic system parameter information. Next, it is necessary to set the coordinates and initial motion states (azimuth, pitch, roll angle, initial speed, etc.) of each ship for positioning on the map. After that, the set ship objects can be stored in the map. The ship name (ShipName) can be used as the key index of the map<key,value> key-value pair due to its uniqueness, and the overall ship model information is used as the value in the key-value pair. The platform will send two types of control data packets to the model: As Figure 3 Shown, the heartbeat data packet with a timestamp, which is effective for all models. The timestamp increases in multiples of the time interval To enable the model to calculate the motion state of the next moment based on the timestamp. After receiving the heartbeat data packet, the model will traverse the key-value pairs in the map to update the motion states, position information, and device working states (such as propeller and rudder states) of all instantiated ship models; The control data packet for a specific ship, which is only effective for the ship model to be controlled. The model updates the control information (engine switch, throttle control, rudder angle control, etc.) of the specific ship model instantiated in the map through the key value. After receiving the control information, the model only updates its own control state without any display, and only calculates the corresponding values of the propeller and rudder angle at the next moment after receiving the next heartbeat data packet.

[0048] The modular platform architecture of the present invention is specifically as follows: To facilitate the deployment and expansion of the ship simulation control platform, this architecture designs a modular control and storage structure, separating the experimental controller from the model database. During the simulation experiment, the experimental controller uniformly manages and controls the models. In the model database, the ship motion model and environmental (wind, ocean current, wave) model data are stored in a relational database (MySQL), and the model mapping files are composed of xml format files. Through this architecture, the experimental controller is not directly associated with the model data and it is easy to transfer data through the network. A one-to-one single-point configuration mode of the local experimental controller and the local model database can be used, such as Figure 4 shown, or a cluster configuration mode of a single experimental controller node and multiple model databases in a one-to-many relationship can be formed, such as Figure 5 shown.

[0049] The one-to-one deployment mode is mainly used for local deployment. In the cluster mode, a containerized cluster architecture with the deployed experimental controller as the main node and the model nodes as the slave nodes can be formed through docker. The nodes can be deployed at any connected location in the network.

[0050] In this embodiment, multiple model clusters are managed and controlled through a unified control platform. By integrating multiple model clusters together, functions such as data sharing, task collaboration, and unified resource allocation between models can be achieved. In large-scale data processing and complex task execution, model cluster control can help users complete more work in a shorter time, improving the scalability and flexibility of the system.

[0051] 1. High efficiency: Model cluster control can achieve data sharing between multiple models, avoiding duplicate calculations and resource waste, and improving the processing efficiency and performance of the system.

[0052] 2. Scalability: Model cluster control can dynamically expand the cluster scale according to user needs, realizing automatic task allocation and scheduling, and adapting to task execution of different scales and complexities.

[0053] 3. Stability: Model cluster control can ensure the stability and quality of the system through centralized monitoring and management, timely discover and handle problems, and improve the reliability and availability of the system.

[0054] 4. Flexibility: Model cluster control can implement different task distribution and execution strategies according to user needs, providing personalized services and customized solutions for users.

[0055] The problems solved by the present invention are divided into three aspects: 1) In the application scenario of this architecture, the simulation experiment scenario requires the ability to simulate the experimental situation under the joint movement of multiple ships. Different ships correspond one-to-one with the actual ships in reality. The following situations need to be considered: 1. Ships of the same model can use the same set of motion models, but there are certain differences in the actual measured thrust and steering ability of the installed power systems; 2. Ships of different models need to use their respective corresponding models; 3. For the same ship, due to the repair or replacement of the power system, the measured maximum speed, acceleration ability, and steering ability have changed; 4. In the same simulation experiment, all ship models need to use the same set of environmental models (wind model, ocean current model, wave model).

[0056] To address the above situations and improve the fitting degree between the simulation model and the real target while ensuring efficiency, this architecture designs a combined storage method for ship models. For physical ships of the same model, the same set of motion models is reused as a template. Since the motion ability of the ship is described by the propeller rotation speed and rudder angle in the model, and the working conditions of the propeller and rudder are determined by the relevant equipment in the actual ship power system, we can separate these relevant parameters (such as the maximum speed of the propeller, the rotation speed of the rudder, the gearbox reduction ratio, etc.) to form a model mapping file for a specific ship for a specific model and label the name for distinction. The model mapping file is in xml format, which is convenient for local reading and network transmission.

[0057] Similarly, for the environments under different sea conditions, we separately store the corresponding wind models (describing the influence of aerodynamic forces on the ship), ocean current models (general models for representing the movement of water currents), and wave models (representing the rolling and pitching of the ship during movement). The same environmental model needs to be used in the same simulation experiment to ensure the unity of ship movement.

[0058] 2) In a distributed simulation experiment, it is very important to uniformly and effectively control all model devices in the distributed system. To solve this problem and enable the control platform to accurately control each ship model in the simulation experiment at each moment and ensure the experimental accuracy, this platform designs a simulation experiment control method based on timestamps.

[0059] 3) Considering the flexibility of model replacement in the subsequent use of the framework, as well as the overall deployment and expansion issues, the ship simulation control platform designed in this invention has a modular control and storage structure, realizing the separation of the experiment controller and the model database. In the simulation experiment, the experiment controller uniformly manages and controls the models. It realizes the local deployment mode of one-to-one deployment, as well as the containerized cluster deployment mode with the experiment controller as the master node and the model nodes as the slave nodes formed by docker. It realizes the free combination of models and improves the flexibility of simulation experiments.

[0060] Embodiment 3 is based on the same inventive concept as other embodiments. This embodiment introduces a control method for a ship simulation control platform, as Figure 6 shown, including: Import the trained ship motion model into the database according to the test data of the physical ship, and import the prepared environmental model data into the database; According to the power system parameters provided by the manufacturer and the sea trial data of the physical ship, fill in parameters such as ship name, model category, maximum rudder angle value, maximum engine speed, gearbox reduction ratio, and maximum rudder angle speed into the model mapping file; The experiment controller reads the environmental model data in the database through the model management layer; The experiment controller reads the model mapping file through the model management layer and instantiates the ship model objects in sequence to form a ship model object map; The experiment controller model management layer selects the corresponding ship model in the database according to the model category number in the model mapping file to initialize the motion parameters of the ship model object; The operator sets the initial position and initial state information of each ship model object in the simulation experiment in sequence through the data interaction layer of the experiment controller; The experiment controller traverses the instantiated ship model objects through the scenario planning layer, and updates the position and state information of all ship model objects according to the set parameters to complete the initialization; The experiment controller initializes the wind, ocean current, and sea wave by calling the environmental model data through the scenario planning layer; The operator starts to send heartbeat data packets through the data interaction layer of the experiment controller to start the simulation experiment; The experiment controller receives the heartbeat data packet through the experiment control layer, and updates the model motion state, position information, and equipment working state according to the time interval in the timestamp; The operator sends ship control instructions through the data interaction layer of the experiment controller; The experiment controller receives the control data packet through the experiment control layer, and retrieves and updates the control information in the map according to the ship name in the data packet; The experiment control layer of the experiment controller calculates the working condition of the power system of the corresponding model at the next moment according to the control information of each model ship, and controls the model motion; When the simulation experiment ends, the operator stops sending heartbeat data packets through the data interaction layer of the experiment controller, and the experiment controller releases the memory space occupied by the model instantiation through the model management layer to end the experiment.

[0061] Example 4, which is based on the same inventive concept as other embodiments, introduces a computer-readable storage medium storing one or more programs, where the one or more programs include instructions that, when executed by a computing device, cause the computing device to execute the method of the first aspect.

[0062] Example 5, which is based on the same inventive concept as other embodiments, introduces a computer device, including one or more processors, a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing the method of the first aspect.

[0063] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.

[0064] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0065] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0066] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable apparatus to generate a computer-implemented process, thereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one process or a plurality of processes and / or blocks Figure 1 one process or a plurality of processes and / or blocks Figure 1 steps of the functions specified in one block or a plurality of blocks.

[0067] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims

1. A ship simulation control platform, characterized in that, Comprising: A test controller and a model database deployed separately and modularly, where the test controller and the model database transmit data through a network; The model database includes: a model library for storing and managing ship models, and a configuration library for storing and managing model mapping files and environmental model files; The test controller includes: A model management layer for reading environmental model files and model mapping files in the model database, An experimental control layer for performing motion control on the ship model according to the received motion control instruction, A scenario planning layer for performing ship model position and state control and environmental model control according to the received scenario control instruction; A data interaction layer for performing data interaction with operators, the model management layer, the experimental control layer, and the scenario planning layer; The experimental control layer receives a heartbeat data packet with a timestamp or a control data packet for a specific ship sent by the data interaction layer; After receiving the heartbeat data packet with a timestamp, the experimental control layer controls all instantiated ship models to calculate their own motion states at the next moment according to the timestamp, and updates the motion states, position information, and equipment working states of the corresponding instantiated ship models according to their own motion states at the next moment; After receiving the control data packet for a specific ship preset in advance, the experimental control layer updates the control state of the already instantiated specific ship model.

2. The ship simulation control platform according to claim 1, characterized in that, The model mapping file is an xml model mapping file. By reading the xml model mapping file through the model management layer, the name of the ship to be loaded currently and the corresponding model type number are obtained. The ship name is the unique identifier of the ship, and the model type number is used to represent the ship model of the corresponding power type; the characteristic parameters of the ship power system are set in the xml model mapping file to distinguish the different ship motion characteristics of the ship models of the same power type; The model management layer is used to sequentially read the model mapping file and the environmental model file in the configuration library according to the test parameter control instruction sent by the data interaction layer, instantiate each ship by calling the corresponding ship model according to the model mapping file, and generate the ship motion state in combination with the read environmental model.

3. The ship simulation control platform according to claim 1, wherein The model management layer is also used to connect to an external database through the network for reading the model mapping file and the ship model in the external database.

4. The ship simulation control platform according to claim 1, characterized in that, After receiving the heartbeat data packet with a timestamp, the experimental control layer controls all instantiated ship models to calculate their own motion states at the next moment according to the timestamp, and updates the motion states, position information, and equipment working states of the corresponding instantiated ship models according to their own motion states at the next moment, including: According to a preset status update time interval Regularly send a heartbeat control instruction with a timestamp to all instantiated ship models to update the motion state of the ship model at the next moment; The function of the motion state at the next moment is: ; In the formula, represents the initial state of the ship model, represents the motion state of the model at the current moment, represents the environmental parameters at the current moment, represents the input state of the ship model at the current moment, represents the step size at the next moment, represents the motion state of the model at the next moment.

5. The ship simulation control platform according to claim 1, characterized in that, The separate modular deployment includes one-to-one deployment and cluster deployment; In the one-to-one deployment, the test controller and the model database are deployed one-to-one locally; The cluster deployment is to form a containerized cluster architecture with the test controller as the main node and the model nodes as the slave nodes through docker. The model nodes can be deployed at any connected position in the network, and the model nodes include model databases.

6. A control method for the ship simulation control platform according to any one of claims 1-5, characterized in that, Comprising: Import the ship model into the model database according to the test data of the physical ship, and import the prepared environmental model data into the model database; According to the power system parameters provided by the manufacturer and the sea trial data of the physical ship, fill in the ship name, model category, maximum rudder angle value, maximum engine speed, gearbox reduction ratio, and maximum rudder angle speed parameters into the model mapping file; Read the environmental model data in the model database through the model management layer; Read the model mapping file through the model management layer and instantiate the ship model object in sequence to form a ship model object map; Control the model management layer to select the corresponding ship model in the model database according to the model category number in the model mapping file to initialize the motion parameters of the ship model object; Set the initial position and initial state information of each ship model object in the simulation experiment in sequence through the data interaction layer; Traverse the instantiated ship model objects through the scenario planning layer, and update the position and state information of all ship model objects according to the set parameters to complete the initialization; Call the environmental model data through the scenario planning layer to initialize the wind, ocean current, and sea wave; Start sending heartbeat data packets through the data interaction layer to start the simulation experiment; Receive the heartbeat data packet through the experiment control layer, and update the model motion state, position information, and device working state according to the time interval in the timestamp; Send ship control instructions through the data interaction layer; Receive the control data packet through the experiment control layer, and retrieve and update the control information in the map according to the ship name in the data packet; Control the experiment control layer to calculate the working condition of the power system of the corresponding model at the next moment according to the control information of each ship model, and control the model motion; Stop sending heartbeat data packets through the data interaction layer, and release the memory space occupied by the model instantiation through the model management layer to end the experiment.

7. A computer-readable storage medium storing one or more programs, characterized in that, The one or more programs include instructions that, when executed by a computing device, cause the computing device to perform the method according to any one of claims 1 to 5.

8. A computer device, characterized in that, Comprising, One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for performing the method according to any one of claims 1 to 5.