Logic simulation design method for water level control function of ship water making device

The SysML modeling tool establishes sequence diagrams, state machine diagrams and activity diagrams of the water level control function of ship watermaking devices, which solves the problem of difficult to verify logic design in the existing technology, and realizes intuitive display and rapid iterative update of logic design.

CN120449301APending Publication Date: 2025-08-08CHINA STATE SHIPBUILDING CORP LTD RESEARCH INSTITUTE 719
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510506471.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

There is a lack of suitable simulation verification methods in the prior art to verify the logical design of the water level control function of the ship watermaking device. The traditional method has a large workload and is difficult to intuitively analyze the rationality of the logical design. The physical experiment debugging process is cumbersome and costly.

Method used

SysML graphical modeling language and related software tools are used to establish sequence diagrams, state machine diagrams and activity diagrams of the water level control function of ship watermaking devices, and to monitor and verify the correctness of the logical design by running these graphic models through simulation.

Benefits of technology

It realizes an intuitive display of the logical relationship of the water level control function of the ship watermaking device, which facilitates verification of design effects, and quickly iteratively updates the logical design scheme, reducing experimental costs and workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449301A_ABST
    Figure CN120449301A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of digital modeling simulation, and aims to solve the problem that no appropriate simulation verification method for logic design of a water level management and control function of a ship water making device exists in the prior art. The invention discloses a logic simulation design method for a water level control function of a ship water making device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: establishing a sequence diagram of a water level control function of the ship water making device through a modeling software tool based on SysML; establishing a state machine diagram of the water level control function of the ship water making device; the logic operation condition of the water level management and control system is monitored by setting state variables and simulating an operation state machine diagram; establishing an activity diagram of the water level control function of the ship water making device; and judging whether the activity condition of each step of the water level control function is logically correct or not by setting a preset value, a condition condition and a simulation operation activity diagram. By adopting the method, the logic relationship can be intuitively displayed, and the logic design effect can be conveniently verified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of digital modeling and simulation technology, and more specifically, to a logic simulation design method, computer equipment, computer-readable storage medium, and computer program product for the water level control function of a ship watermaking device. Background Art

[0002] A ship's desalination plant, also known as a seawater desalination plant, is used to convert seawater into fresh water for drinking and domestic use. It is a critical device for maintaining the lives and work of the crew during a ship's voyage. During operation, the water flow rate must be dynamically regulated in real time based on the water consumption of the ship's equipment and the crew's daily needs to better meet the crew's freshwater needs. A key component of this regulation is water level control. Water level control in the water flow rate is closely linked to the various fixed and temporary water demands of different equipment and personnel on board, and the logical relationships involved are relatively complex.

[0003] One traditional approach to designing the logic for the water level control function of a ship's watermaking system is to simulate it using C code or MATLAB software. However, this approach is labor-intensive, and simulations only verify program execution and provide control results. It's difficult to simulate and visually analyze the rationality of the water level control logic. Another traditional approach is to verify the rationality of the water level control logic during physical testing of the ship's watermaking system. However, this process is cumbersome and costly, and serious logic design issues are difficult to correct, resulting in significant losses. Summary of the Invention

[0004] In order to solve the problem that there is currently no suitable simulation verification method for the logical design of the water level control function of the ship's water making equipment, the present invention provides a logical simulation design method, computer equipment, computer-readable storage medium and computer program product for the water level control function of the ship's water making equipment, which can intuitively display the logical relationship of the water level control function of the ship's water making equipment, thereby facilitating the verification of the logical design effect.

[0005] To achieve the above objectives, according to a first aspect of the present invention, a logic simulation design method for the water level control function of a marine water production device is provided, the method comprising:

[0006] Using SysML-based modeling software tools, a sequence diagram for the water level control function of a ship's watermaking plant was established. The sequence diagram included all participants and multiple interaction sequences.

[0007] Establish a state machine diagram for the water level control function of the ship's water making equipment. The state machine diagram is used to display the different states of all participants and the transitions between states;

[0008] By setting state variables and simulating the state machine diagram, the logical operation of the water level control system can be monitored;

[0009] Establish an activity diagram for the water level control function of the ship's water making equipment, including activity diagrams for pre-operation preparation, normal operation, abnormal operation and shutdown of the water level control system;

[0010] By setting preset values and conditions, and simulating the activity diagram, we can determine whether each step of the water level control function is logically correct.

[0011] Furthermore, a sequence diagram of the water level control function of the ship's water making plant is established through a SysML-based modeling software tool, including creating all participants of the sequence diagram at the top of the sequence diagram of the water level control function of the ship's water making plant, including flow sensors, water level sensors, signal transmitters, isolators, controllers, drive units, motors, and transmission mechanisms; and defining the interaction sequence of the sequence diagram, which is used to describe the dynamic interaction behavior between the participants in the water level control system based on time sequence.

[0012] Furthermore, a state machine diagram of the water level control function of the ship's water making device is established, including establishing an initial state, entering the stop state of the ship's water making device water level control function, entering the start-up operation state of the device water level control function through a start event, and when the device water level control function is in other states, the device water level control function is put into the stop state through a stop event; sub-states within the combined state of the device water level control function are defined, including high water level, stable water level, low water level, regulating valve reduction, regulating valve immobilization, regulating valve increase, seawater flow increase, and seawater flow decrease; and by setting conversion conditions, the conversion relationship between sub-states is defined.

[0013] Furthermore, an activity diagram for the preparation before the operation of the water level control system is established, including energizing the regulating valve; adjusting the valve opening of the regulating valve to the set opening, energizing and starting the controller; after the controller is turned on, controlling the water level control system to start up; judging whether the parameters displayed on the control console screen are normal; if normal, the activity diagram for the preparation before the operation of the water level control system is established; otherwise, after completing the inspection and maintenance, return to the step of energizing the regulating valve to continue the sequential execution.

[0014] Furthermore, the above-mentioned logic simulation design method of the water level control function of the ship water making device also includes compiling the state machine diagram after establishing the state machine diagram of the water level control function of the ship water making device; if the compilation is successful, it means that the sub-state definition, variable setting, and transition condition setting in the state machine diagram are all correct; if the compilation fails, at least one of the sub-state definition, variable setting, and transition condition setting in the state machine diagram is modified until the compilation is successful.

[0015] Furthermore, the above-mentioned logic simulation design method of the water level control function of the ship water making device also includes compiling the activity diagram after establishing the activity diagram of the water level control function of the ship water making device; if the compilation is successful, it means that the step settings in the activity diagram are correct; if the compilation fails, the step settings in the activity diagram are modified until the compilation is successful.

[0016] Furthermore, activity diagrams are also used to define special signal events, including fault signals and interference signals.

[0017] According to a second aspect of the present invention, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the steps of any one of the above methods.

[0018] According to a third aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0019] According to a fourth aspect of the present invention, there is also provided a computer program product, comprising a computer program, which implements the steps of any one of the above methods when executed by a processor.

[0020] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:

[0021] The present invention provides a logic simulation design method for the water level control function of a ship water making device. The method utilizes the SysML graphical modeling language and related software tools to establish a sequence diagram, a state machine diagram, and an activity diagram of the water level control function of the ship water making device, thereby realizing the logic simulation design of the water level control function of the ship water making device. The method can intuitively display the logical relationship, facilitate the verification of the logic design effect, and quickly iterate and update the logic design scheme of the water level control function of the ship water making device. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 A flow chart of a logic simulation design method for the water level control function of a ship watermaking device provided in an embodiment of the present application;

[0024] Figure 2 This is a sequence diagram of the water level control function of the ship water making device provided in an embodiment of the present application;

[0025] Figure 3 A state machine diagram of the water level control function of a ship water making device provided in an embodiment of the present application;

[0026] Figure 4 An activity diagram for the preparation before operation of the water level control system provided in an embodiment of the present application;

[0027] Figure 5 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.

[0029] The terms "including" and "having" and any variations thereof in the specification and claims of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0030] This embodiment provides a logic simulation design method for the water level control function of a ship's watermaking device, which implements the logic simulation design of the water level control function of a ship's watermaking device through model-based systems engineering (MBSE). MBSE is a system engineering method that uses modeling to design products. It supports the full life cycle activities of system requirements, design, analysis, verification, and validation by creating, maintaining, and utilizing system models (rather than traditional documents), facilitating the rapid iterative demonstration and design of different solutions. The modeling language used by MBSE can be SysML, and the modeling tools can be Cameo Systems Modeler software, MagicDraw software, Rhapsody software, etc.

[0031] SysML is a graphical modeling language designed specifically for systems engineering. It's used to describe a system's structure, behavior, requirements, and parameters. It includes sequence diagrams, state machine diagrams, and activity diagrams, enabling modeling and simulation of system behavior, effectively addressing the rapid iterative simulation design of complex system behavior logic. Sequence diagrams illustrate the system's dynamic behavior, describing the sequence of behaviors and events that occur over time. State machine diagrams display the various states of components (or objects) in the system, as well as the transitions between states caused by events over time. Activity diagrams describe the system's functional processes and data flows.

[0032] like Figure 1 As shown, a logic simulation design method for the water level control function of a ship's watermaking equipment is provided. This method can be executed by a terminal or by a server that communicates with the terminal via a network. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, etc. The server can be a standalone server or a server cluster consisting of multiple servers. This method is illustrated using the terminal as an example and includes the following steps:

[0033] Step 101: Create a sequence diagram of the water level control function of a ship water making device using a SysML-based modeling software tool. The sequence diagram includes all participants and multiple interaction sequences.

[0034] Step 102: Create a state machine diagram for the water level control function of the ship's water making equipment. The state machine diagram is used to display the different states of all participants and the transition between states.

[0035] Step 103 , by setting state variables and simulating the state machine diagram, the logical operation of the water level control system is monitored.

[0036] Step 104: Create an activity diagram for the water level control function of the ship's water making equipment. The activity diagram includes activity diagrams for pre-operation preparation, normal operation, abnormal operation, and shutdown of the water level control system.

[0037] Step 105 , by setting preset values and conditions, simulating the running activity diagram, and judging whether each step of the water level control function is logically correct.

[0038] The above-mentioned logical simulation design method of the water level control function of the ship water making device uses the SysML graphical modeling language and related software tools to establish the sequence diagram, state machine diagram, and activity diagram of the water level control function of the ship water making device, thereby realizing the logical simulation design of the water level control function of the ship water making device. It can intuitively display the logical relationship and facilitate the verification of the logical design effect.

[0039] In one embodiment, a logic simulation design method for a water level control function of a ship watermaking device is provided, comprising the following steps:

[0040] Step 1: Select a SysML-based modeling software tool, such as Cameo Systems Modeler software.

[0041] Step 2: First, establish a sequence diagram of the water level control function of the ship's water making equipment. The sequence diagram is used to illustrate the dynamic behavior information of the water level control system and describe the sequence of behaviors and events that occur over time.

[0042] like Figure 2 As shown, at the top of the sequence diagram, all participants of the sequence diagram (i.e., each modeling object in the water level control system) are created, including: seawater flow sensor, water level sensor, signal transmitter, isolator, controller, drive unit, motor, transmission mechanism (also called action mechanism).

[0043] Step 3: Define the interaction sequence of the sequence diagram. The interaction sequence is used to describe the dynamic interaction behavior between the participants in the water level control system based on time sequence. The dynamic interaction behavior of the water level control function of the ship watermaking equipment consists of the interactions between the participants in Step 2 (represented by rectangular boxes and vertical dashed lines). Each interaction is represented by a message (represented by a horizontal line with an arrow). The message has a direction, from the sender (i.e., the participant sending the message) to the receiver (i.e., the participant receiving the message). For the concurrency and time sequence of messages, vertical lines are used to describe concurrent behavior, and the time sequence is described by the order of the messages.

[0044] like Figure 2 As shown in the figure, in the water level control system, multiple interaction sequences include:

[0045] The seawater flow sensor detects the current flow rate, calculates the flow differential pressure value between the current flow rate and the preset standard flow rate, and sends the flow differential pressure value to the signal transmitter;

[0046] The water level sensor detects the current water level, calculates the water level differential pressure between the current water level and the preset standard water level, and sends the water level differential pressure value to the signal transmitter.

[0047] The signal transmitter converts the flow differential pressure value into a current signal, which is then sent to the collection isolator. In addition, the signal transmitter also converts the water level differential pressure value into a current signal, which is then sent to the collection isolator.

[0048] The acquisition isolator receives two current signals and converts them into water level signals and flow signals, which are then sent to the controller.

[0049] The controller receives the water level signal and flow signal, generates a control signal, and sends the control signal to the drive unit.

[0050] The drive unit receives the control signal and generates a drive signal, which is then sent to the motor.

[0051] After receiving the driving signal, the motor generates a mechanical action (signal) → the mechanical action (signal) is sent to the action mechanism;

[0052] The action mechanism performs corresponding actions according to the mechanical action (signal) and generates a valve position feedback signal → the valve position feedback signal is sent to the controller;

[0053] After receiving the valve position feedback signal, the controller determines whether the control signal needs to be updated.

[0054] Step 4: Create a state machine diagram for the water level control function of the ship's water making equipment to display the various states of the modeled object and the transitions between states caused by events that occur over time. Figure 3 As shown, first establish the initial state, first enter the stop state of the device water level control function, and then enter the start-up operation state of the device water level control function through the start event. When the device water level control function is in other states, the device can also enter the stop state through the stop event.

[0055] In step 5, in addition to the start and stop states, the various other states of the marine water generation equipment can be designed as a combined state due to their high complexity, and sub-states and transition relationships are further defined within the combined state. Here, the combined state of the marine water generation equipment water level control function is defined as the set of all sub-states except start and stop, including states such as high water level, stable water level, low water level, regulating valve reduction, regulating valve immobilization, regulating valve increase, seawater flow increase, and seawater flow decrease. For example, if the water level is not less than the first set value (setting + XX), the water level is defined as high; if the water level is not greater than the second set value (setting - XX), the water level is defined as low; otherwise, the water level is defined as stable.

[0056] The transition relationship between each sub-state can be defined by setting the transition condition, and the judgment frame can be added to form a multi-state path selection, so as to establish Figure 3 For example, if the transition condition is that the water level is high and the seawater flow rate is increasing, the transition relationship is defined as going from the High Water Level sub-state and the Seawater Flow Rate Increasing sub-state to the Control Valve Decreasing sub-state. If the transition condition is that the water level is low and the seawater flow rate is decreasing, the transition relationship is defined as going from the Flow Rate Decreasing sub-state and the Low Water Level sub-state to the Control Valve Increasing sub-state.

[0057] Step 6. After the state machine diagram is modeled, use the software tool to compile the state machine diagram to confirm whether there are any numerical or judgment condition errors in the state transition design. If the compilation is successful, it means that the sub-state definition, variable setting (i.e. the first set value, second set value, etc. in step 5), transition condition setting, event definition (such as water level drop, water level rise), etc. in the state machine diagram are all correct. If there are any errors, modify them until the compilation is successful.

[0058] Step 7: After the state machine diagram is successfully compiled, you can run it to monitor the logical operation of the water level control system. By activating the start event, the system can gradually change state and operate according to the pre-set transition conditions or variables. During the state machine diagram's operation, by updating the relevant state variables, the state machine diagram can be executed according to the latest situation to observe its logical operation.

[0059] In step 8, using SysML-based modeling software tools, you can also create an activity diagram for the water level control of a ship's watermaking plant, using it to implement logical simulation design. First, organize the activities of the modeled object. The activity diagram can be created as a single, large diagram or broken down into multiple, independent, smaller activity diagrams based on specific rules. Each smaller activity diagram can be linked through transition conditions between different states. For example, the activities for the water level control function of a ship's watermaking plant can be divided into four parts: pre-operation preparation, normal operation, abnormal operation, and shutdown.

[0060] Step 9: For each activity, use software tools to create an activity diagram. The activity diagram for normal operation is similar to the state machine diagram. The activity diagram for abnormal operation needs to consider some abnormal and unexpected situations, which are crucial to the safety of system operation. Figure 4 As shown in the figure, taking pre-operation preparation as an example, a pre-operation preparation activity diagram for the water level control function is established, including energizing the control valve (for example, 380V), manually adjusting the valve position to the appropriate opening, energizing and starting the controller, starting the water level control system, and checking whether the parameters displayed on the control console screen are normal. If normal, the pre-operation preparation activity diagram for the water level control system is completed. If abnormal, after completing the inspection and maintenance, the process returns to the step of energizing the control valve and continues in sequence.

[0061] Step 10. After completing the modeling of all activity diagrams for the water level control function of the ship's water making device, you can also use a SysML-based modeling software tool to compile it. If the compilation is successful, it means that the scenarios, steps, conditions, etc. designed in the activity diagram are correct. If there are errors, modify them until the compilation is successful.

[0062] After successfully compiling the activity diagram, you can use the software tool to execute the activity diagram by setting preset values and conditions to determine the logical correctness of each step in the water level control function. The activity diagram can also define special signal events, such as fault signals and interference signals, to simulate relevant scenarios in the operation of the water level control system.

[0063] A logic simulation design method for the water level control function of a ship watermaking device provided in this embodiment can intuitively display the logical relationship, facilitate the verification of the logic design effect, and quickly iterate and update the logic design scheme of the water level control function of the ship watermaking device.

[0064] The present application also provides a computer device, the internal structure of which can be as follows: Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a logic simulation design method for the water level control function of a ship water making device is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0065] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0066] like Figure 5 As shown, the present application also provides a computer device, which includes a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the steps in the above-mentioned method embodiments.

[0067] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned method embodiments. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a microdrive, a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.

[0068] The present application also provides a computer program product, including a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.

[0069] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0070] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0071] The above description is merely an exemplary embodiment of the present disclosure and is not intended to limit the scope of the present disclosure. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure herein, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not recorded in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

[0072] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0073] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A logic simulation design method for the water level control function of a ship water making device, characterized in that: include: Using SysML-based modeling software tools, a sequence diagram for the water level control function of a ship's watermaking plant is established, including all participants and multiple interaction sequences. Establish a state machine diagram for the water level control function of the ship's water making plant, which is used to display the different states of all participants and the transitions between states; By setting state variables, simulating and running the state machine diagram, the logical operation of the water level control system is monitored; Establish an activity diagram for the water level control function of the ship's water making device, which includes activity diagrams for pre-operation preparation, normal operation, abnormal operation, and shutdown of the water level control system; By setting preset values and conditions, the activity diagram is simulated and run to determine whether each step of the water level control function is logically correct.

2. The method according to claim 1, wherein The sequence diagram of the water level control function of the ship water making device is established by using the SysML-based modeling software tool, including: At the top of the sequence diagram of the water level control function of the ship's water making equipment, create all the participants of the sequence diagram, including flow sensor, water level sensor, signal transmitter, isolator, controller, drive unit, motor, and transmission mechanism; An interaction sequence of the sequence diagram is defined, where the interaction sequence is used to describe the dynamic interaction behaviors between participants in the water level control system based on time sequence.

3. The method according to claim 1, wherein The state machine diagram for establishing the water level control function of the ship water making device includes: Establishing an initial state, entering the stopped state of the water level control function of the ship's water making device, entering the started running state of the device's water level control function through a start event, and when the device's water level control function is in other states, entering the stopped state through a stop event; Defining sub-states within the combined state of the water level control function of the device, including high water level, stable water level, low water level, regulating valve reduction, regulating valve immobilization, regulating valve increase, seawater flow increase, and seawater flow decrease; By setting the transition conditions, the transition relationship between the sub-states is defined.

4. The method according to claim 1, wherein Establish an activity diagram for the water level control system before operation, including: Power on the regulating valve; After adjusting the valve opening of the regulating valve to the set opening, power on the controller; After the controller is turned on, the water level control system is turned on; Determine whether the parameters displayed on the control console screen are normal; If it is normal, the activity diagram prepared before the operation of the water level control system is established; otherwise, after completing the inspection and maintenance, return to the step of energizing the regulating valve and continue to execute the sequence.

5. The method according to claim 3, wherein The method further comprises: After establishing a state machine diagram for the water level control function of the ship water making device, compiling the state machine diagram; If the compilation is successful, it means that the sub-state definition, variable setting, and transition condition setting in the state machine diagram are all correct; If the compilation fails, at least one of the sub-state definition, variable setting, and transition condition setting in the state machine diagram is modified until the compilation succeeds.

6. The method according to claim 1, wherein The method further comprises: After establishing an activity diagram of the water level control function of the ship water making device, compiling the activity diagram; If the compilation is successful, it means that the step settings in the activity diagram are correct; If the compilation fails, the step settings in the activity diagram are modified until the compilation succeeds.

7. The method according to claim 1, wherein The activity diagram is also used to define special signal events, including fault signals and interference signals.

8. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product, characterized in that The invention comprises a computer program, which implements the steps of the method according to any one of claims 1 to 7 when the computer program is executed by a processor.