Method and system for guaranteeing operation stability of valve control system based on SpringBoot framework
By adopting SpringBoot framework-based methods in the smart valve control system, a virtual MQTT client and real-time data processing algorithm are built, which solves the problem of insufficient power supply caused by severe weather, ensuring the stable operation of the valve control system and water resource conservation.
Patent Information
- Application Number
- CN202510093394.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-04-25
AI Technical Summary
The existing smart valve control system may lead to insufficient power supply under severe weather conditions, resulting in the upper and lower limit thresholds returning to the default value after the valve control system is restarted, which will cause waste of water resources or the inability to meet residents' drinking water needs in time, and the valve control system is not stable enough.
The method of ensuring the operation stability of the valve control system based on the SpringBoot framework is adopted. By building a virtual MQTT client based on the MQTT protocol, it receives and classifies information in real time, and uses real-time data value acquisition algorithms and alarm analysis algorithms to determine whether the valve control system is disconnected, and remote fault processing is carried out through alarm recording and processing algorithms to ensure the stable operation of the system.
It ensures the stable operation of the valve control system, avoids waste of water resources, improves the efficiency of urban and rural water supply, and conducts timely and accurately equipment inspection and maintenance, reducing resource waste.
Smart Images

Figure CN119892591A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of remote Internet of Things intelligent water supply, and more specifically, relates to a method and system for ensuring the operating stability of a valve control system based on a SpringBoot framework. Background Art
[0002] At present, the means to achieve remote communication between the water valve measurement and control terminal and the server is mainly to use the Internet of Things card of the communication operator, but the signal of the Internet of Things card is easily affected by conditions such as transmission distance, transmission medium, weather, and local communication operator base station. For example, Chinese patent document: CN215330224U discloses an Internet of Things intelligent full-digital variable frequency water supply equipment, which is to solve the problem that the existing water supply equipment is easy to freeze in cold weather, resulting in unstable water flow. A steady flow compensation tank is arranged above the base, a negative pressure suppressor is arranged at the upper end of the steady flow compensation tank, a first fixing ring is arranged at one end of the steady flow compensation tank, and a second fixing ring is arranged at the other end of the steady flow compensation tank. A heating plate is arranged between the first fixing ring and the second fixing ring, and a heating wire is arranged inside the heating plate. An intelligent pump assembly is arranged on one side of the steady flow compensation tank, a connecting pipe is arranged at one end of the intelligent pump assembly, and a water outlet pipe is arranged at one end of the connecting pipe. A control mechanism is arranged on one side of the base. Chinese patent document: CN210166666U An intelligent water supply control system based on the Internet of Things includes a water tank, which is provided with an inlet pipe with an inlet valve and an outlet pipe with an outlet valve, the water pump, the inlet valve and the outlet valve are respectively connected to the controller, the outlet pipe has a plurality of branch outlet pipes, each branch outlet pipe is equipped with a water pump, all the branch outlet pipes are connected to the water supply pipeline, a water level detector is provided in the water tank, the water level detector is connected to the controller, the controller is connected to the control monitoring terminal through a P2P Internet of Things transmission module, the control monitoring terminal is connected to the intelligent terminal device network communication, and the control monitoring terminal is connected to an alarm.
[0003] In addition, the water valve measurement and control terminal uses solar energy for power supply. For example, Chinese patent document CN202493410U discloses a solar water pump, including a solar cell assembly, a frequency conversion controller and a water pump. The frequency conversion controller is composed of a control module and a frequency conversion module connected to each other. The solar cell assembly is connected to the control module in the frequency conversion controller through a signal line, and the solar cell assembly is connected to the frequency conversion module in the frequency conversion controller through a power line. The frequency conversion module in the frequency conversion controller is connected to the water pump. The advantages of this solar water pump are: novel structure, good automatic frequency conversion effect, stable operation of the water pump, elimination of water hammer effect during start-up and shutdown, improved energy conversion rate, and extended service life of the water pump. However, under continuous severe weather conditions, there will be insufficient power supply. When the weather returns to normal, the water valve measurement and control terminal will automatically restart, but the upper and lower limit thresholds will be restored to the default value after restarting. At this time, if the upper and lower limit thresholds are not reset in time, it will lead to the inability to supply water to the corresponding reservoir or the inability to stop supplying water to the corresponding reservoir, thereby causing waste of water resources or failing to meet the drinking water needs of residents in time, and the valve control system is not stable enough. Summary of the invention
[0004] The present invention aims to overcome at least one defect of the above-mentioned prior art, and provides a method for ensuring the operating stability of a valve control system based on SpringBoot.
[0005] The invention also discloses a system for realizing the method.
[0006] The present invention overcomes the defects of the currently used intelligent valve control system: in addition to ensuring the automation of water supply to high-level water tanks for urban and rural residents, it also minimizes the impact of various factors on the communication between the water valve measurement and control terminal and the server.
[0007] The present invention can ensure that reservoir management personnel and technical maintenance personnel can inspect and repair equipment in a timely and accurate manner, and prevent long-distance maintenance of equipment without determining whether a fault has occurred or identifying the type of fault due to information errors, thereby further wasting resources. At the same time, the present invention can also ensure the stable operation of the valve control system, accurately regulate the balance of supply and demand of urban and rural water supply, save water resources, and improve the efficiency of production and equipment maintenance management.
[0008] The detailed technical scheme of the present invention is as follows:
[0009] A method for ensuring the operational stability of a valve control system based on a SpringBoot framework, the method comprising:
[0010] S1: Use the SpringBoot framework to build a virtual MQTT client based on the MQTT protocol, and the virtual MQTT client establishes a connection with the water valve measurement and control terminal through the MQTT protocol;
[0011] S2: The system creates a real-time information receiving and information classification module, and uses a real-time data value algorithm to obtain the real-time data of the valve control system in each geographical location. After the value is obtained, the real-time value is stored in the corresponding valve control real-time information data table in the business database on the same server as the operation and maintenance valve control system;
[0012] S3: Extract data from the corresponding valve control real-time information data table in the business database, and call the alarm analysis algorithm to determine whether the valve control system in each geographical location is offline based on the preset judgment criteria:
[0013] If the line is disconnected, execute S31-S32:
[0014] S31: The alarm analysis algorithm first determines whether the instantaneous information data of each valve control system has been timely entered into the valve control real-time information data table of the business database according to the data transmission time of the real-time received information;
[0015] S32: If there is a valve control system in the valve control real-time information data table that has not been entered into the business database in time, firstly, the alarm analysis algorithm checks whether the communication connection between the virtual MQTT client and the water valve measurement and control terminal is disconnected;
[0016] The algorithm will call the alarm recording algorithm and the alarm processing algorithm, and send the valve control system ID and communication connection status as parameters to the above alarm recording algorithm and alarm processing algorithm:
[0017] The alarm recording algorithm is used to record the valve control system ID, geographical location information, alarm start time, alarm type, alarm level, faulty equipment in the valve control system and the cause of the fault into the alarm information data table in the business database;
[0018] The alarm processing algorithm performs remote fault processing operations based on the communication connection status and the valve control system ID.
[0019] S4: The system provides different accounts and passwords for water tank administrators based on water tanks in different geographical locations. The reservoir administrators can log in to the WeChat applet with their accounts and passwords and monitor the water supply situation and valve control system operation status of the water tanks they are responsible for in real time on the mobile terminal, providing real-time guarantee for the stable operation of the valve control system.
[0020] Furthermore, the S1 specifically includes:
[0021] S11: Use the eclipse paho library to create a virtual MQTT client. Each time a virtual MQTT client is created, the valve control system automatically obtains the time obtained through the automatic synchronization mechanism in the server operating system as the virtual MQTT client ID.
[0022] S12: Connect the data receiving topic published by the water valve measurement and control terminal, the valve control system control topic and the guarantee valve control system through the MQTT protocol, and create constants to receive the above topics;
[0023] S13: remotely connect the virtual MQTT client to the water valve measurement and control terminal;
[0024] Specifically, starting a remote connection includes:
[0025] Set the reconnect method as a class static variable to facilitate acquisition when the system reconnects. Use the server dedicated line IP port, virtual MQTT client ID, and memory persistence model to initialize the subscription object.
[0026] Among them, the server dedicated line IP port is used as the preliminary authentication condition for the identity information uploaded by each water valve measurement and control terminal; the virtual MQTT client ID is used as the final authentication condition for the identity information uploaded by each water valve measurement and control terminal; the memory persistence model is used as the carrier of the data information sent by each water valve measurement and control terminal;
[0027] Initialize the virtual MQTT client connection settings: set the clear session option to use a new identity for each connection, and set the agreed connection username and password; use the virtual MQTT client to subscribe to the topic published by the water valve measurement and control terminal to obtain the data uploaded by the water valve measurement and control terminal.
[0028] S14: To prevent the system from being disconnected during operation, a subscription timeout n and a session heartbeat time m are set in the system;
[0029] If the subscription does not respond within n seconds, the connection is considered timed out;
[0030] The session heartbeat time is set to m seconds. If the subscription response is normal, the server will automatically send a message to the client every 1.5*m seconds to verify whether the client is online.
[0031] The virtual MQTT client connection and subscription status are monitored in real time through the subscription timeout time and session heartbeat time. If the connection is disconnected or the session subscription is disconnected, it will automatically reconnect, providing basic protection for the stable operation of the valve control system.
[0032] Furthermore, the alarm recording algorithm specifically includes:
[0033] First, find the basic point information of the valve control system according to the valve control system ID, including geographical location information, alarm start time and devices included in the valve control system;
[0034] Then perform different operations according to the communication connection status:
[0035] When the communication connection status is normal, the alarm recording algorithm will try to send instructions to each device in the valve control system to locate the faulty device in the valve control system;
[0036] When the communication connection is disconnected, the signal connection stability monitoring is first performed:
[0037] If the signal connection is unstable, record the signal status as the cause of the fault;
[0038] If the signal connection is stable, the real-time monitoring and monitoring records on site are called according to the geographic location information, and the cause of the fault is determined by combining the preset video analysis algorithm;
[0039] At the same time, the alarm recording algorithm divides the alarm level into a three-level alarm system based on the water supply situation of the reservoir:
[0040] Level 1 alarm: There is water in the reservoir and it is not being replenished before the alarm;
[0041] Secondary alarm level: the reservoir is empty and is being or not being filled with water;
[0042] Level 3 warning level: There is water in the reservoir and it is being filled.
[0043] Furthermore, the alarm processing algorithm performs remote fault processing operations based on the communication connection status and the valve control system ID:
[0044] When the communication connection is disconnected, the system starts the emergency reconnection procedure of the valve control system and repeatedly sends the connection command within the time period preset by the valve control system manufacturer until the connection is successful;
[0045] When the communication connection is in a normal state, the alarm processing algorithm will send the operation instructions of each device to the valve control system in turn and try multiple times:
[0046] If the operation is unsuccessful, the alarm processing algorithm calls the alarm recording program to record the valve control system ID, geographic location information, alarm start time, alarm type, faulty equipment in the valve control system and the cause of the fault into the alarm information data table in the business database;
[0047] At the same time, the alarm processing algorithm sends alarm text messages to the reservoir management personnel and technical maintenance personnel to repair the valve control system; and by calling the alarm analysis algorithm, the online status of the valve control system in each geographical location is determined to provide accurate valve control system operation status information for equipment maintenance work.
[0048] In another aspect of the present invention, a system for ensuring the operational stability of a valve control system based on a SpringBoot framework is provided, the system comprising a water valve measurement and control terminal, a liquid level meter, an electric valve, an MQTTAccept data receiving system, a business database, a business system, and an alarm system, wherein the water valve measurement and control terminal, the liquid level meter, and the electric valve are collectively referred to as a smart valve control system;
[0049] The liquid level meter is installed on the water storage device and is used to transmit the liquid level data of the monitored object to the water valve measurement and control terminal in real time;
[0050] The electric valve is installed on the water supply pipe, which is connected to the main network and is in a continuous water supply state. It supports electrical signal control and manual control to ensure the safety of drinking water and water supply for residents;
[0051] The water valve measurement and control terminal is used to collect the water tank liquid level and the switch status of the electric valve measured by the liquid level meter, and compare the set upper and lower limit thresholds of the switch valve with the current liquid level:
[0052] Sending a valve switch instruction to the electric valve according to the comparison result;
[0053] The water valve measurement and control terminal includes an Internet of Things remote communication module, in which an Internet of Things card is placed for remote communication; the upper and lower limit thresholds of the switch valve are remotely set through the MQTT protocol, or manually set through the touch screen, which is convenient for water supply automation and subsequent operation and maintenance;
[0054] The MQTTAccept data receiving system is used to create a virtual MQTT client, and obtain data such as the upper and lower limit thresholds of the water valve measurement and control terminal, the real-time liquid level of the liquid level meter, the real-time status of the electric valve by subscribing to the valve control MQTT topic and store them in the smart water database, providing data support for the business processing of the smart water system.
[0055] The smart water system processes the faulty valve control system promptly, accurately and effectively based on the data in the smart water database in combination with the real-time data value acquisition algorithm, alarm analysis algorithm, alarm recording algorithm, alarm recording program and alarm processing algorithm.
[0056] Furthermore, the water valve measurement and control terminal is powered by solar energy and is manually controlled on site or remotely controlled via the MQTT protocol. On the one hand, the water valve measurement and control terminal collects the water tank liquid level data collected by the liquid level meter and uploads it to the water management platform in real time. On the other hand, it determines the switch state of the electric valve by combining the upper and lower limit thresholds of the liquid level set by the water management platform and the water tank liquid level.
[0057] Compared with the prior art, the present invention has the following beneficial effects:
[0058] The present invention provides a method and system for ensuring the operational stability of a valve control system based on a SpringBoot framework, which ensures the stable operation of the valve control system, improves the operational efficiency of urban and rural water supply, and avoids waste of water resources. In addition, it ensures that reservoir management personnel and technical maintenance personnel promptly and accurately inspect and repair the equipment, and prevents long-distance maintenance of the equipment without determining whether a fault has occurred or identifying the type of fault due to information errors, thereby further wasting resources. At the same time, the system can ensure the stable operation of the valve control system, accurately regulate the balance of supply and demand of urban and rural water supply, save water resources, and improve the efficiency of production and equipment maintenance management. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a schematic diagram of the overall architecture of the system of the present invention. DETAILED DESCRIPTION
[0060] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0061] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0062] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0063] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0064] Example 1
[0065] Ginseng Figure 1 This embodiment provides a method for ensuring the operation stability of a valve control system based on a SpringBoot framework, the method comprising:
[0066] S1: Use the SpringBoot framework to build a virtual MQTT client based on the MQTT protocol, and the virtual MQTT client establishes a connection with the water valve measurement and control terminal through the MQTT protocol;
[0067] Preferably, according to the present invention, the specific steps of S1 include:
[0068] S11: Use the eclipse paho library to create a virtual MQTT client. When creating the virtual MQTT client, ensure that the valve control system automatically obtains the time obtained through the automatic synchronization mechanism in the server operating system as the virtual MQTT client ID;
[0069] S12: Connect the data receiving topic published by the water valve measurement and control terminal, the valve control system control topic and the guarantee valve control system through the MQTT protocol, and create constants to receive the above topics;
[0070] S13: When starting the remote connection, the virtual MQTT client is connected to the water valve measurement and control terminal:
[0071] Set the reconnect method as a class static variable to facilitate acquisition when the system reconnects. Use the server dedicated line IP port, virtual MQTT client ID, and memory persistence model to initialize the subscription object.
[0072] Among them, the server dedicated line IP port is used as the preliminary authentication condition for the identity information uploaded by each water valve measurement and control terminal; the virtual MQTT client ID is used as the final authentication condition for the identity information uploaded by each water valve measurement and control terminal; the memory persistence model is used as the carrier of the data information sent by each water valve measurement and control terminal;
[0073] Initialize the virtual MQTT client connection settings: set the clear session option to use a new identity for each connection, and set the agreed connection username and password; use the virtual MQTT client to subscribe to the topic published by the water valve measurement and control terminal to obtain the data uploaded by the water valve measurement and control terminal;
[0074] S14: To prevent the system from being disconnected during operation, set the subscription timeout and session heartbeat time in the system:
[0075] If the subscription has no response within n seconds, it is considered a connection timeout. The session heartbeat time is set to m seconds. If the subscription response is normal, the server will automatically send a message to the client every 1.5*m seconds to verify whether the client is online. The above two methods monitor the virtual MQTT client connection and subscription status in real time. If the connection is disconnected or the session subscription is disconnected, it will automatically reconnect, providing basic guarantee for the stable operation of the valve control system.
[0076] S2: Create a real-time information receiving and information classification module, and use the real-time data value acquisition algorithm to acquire the real-time data of the valve control system in each geographical location (the valve control system liquid level, valve status and other data). After the acquisition is completed, the real-time value is stored in the corresponding valve control real-time information data table in the business database on the same server that operates the valve control system; wherein, the valve control system is the system carried by the water valve measurement and control terminal, that is, the management system that comes with a single water valve measurement and control terminal.
[0077] Preferably, the real-time data value acquisition algorithm can be implemented based on the mechanism of Java thread pool and timer.
[0078] Acquiring real-time data of valve control systems in various geographical locations through real-time data acquisition algorithms can ensure the integrity and real-time nature of the data collected during the production process, providing stable and reliable data support for the alarm analysis algorithm;
[0079] S3: Extract data from the corresponding valve control real-time information data table in the business database, and call the alarm analysis algorithm to determine whether the valve control system in each geographical location is offline based on the preset judgment criteria:
[0080] If a valve control system is determined to be offline according to the preset judgment criteria, S31-S32 are executed:
[0081] S31: The alarm analysis algorithm first determines whether the instantaneous information data of each valve control system has been timely entered into the valve control real-time information data table of the business database according to the data transmission time of the real-time received information; the real-time received information includes the valve control system ID and the valve control system liquid level and valve status.
[0082] The valve control system ID is a unique authentication identification mark for each valve control system.
[0083] S32: If there is a valve control system in the valve control real-time information data table that has not been entered into the business database in time, check whether the communication connection between the virtual MQTT client and the water valve measurement and control terminal is disconnected to start the communication connection stability judgment;
[0084] The alarm analysis algorithm will call the alarm recording algorithm and the alarm processing algorithm, and send the valve control system ID and communication connection status as parameters to the alarm recording algorithm and the alarm processing algorithm:
[0085] The alarm recording algorithm specifically includes:
[0086] First, find the basic point information of the valve control system according to the valve control system ID, including geographical location information, alarm start time and devices included in the valve control system;
[0087] Then perform different operations according to the communication connection status:
[0088] When the communication connection status is normal, the alarm recording algorithm will try to send instructions to each device in the valve control system to locate the faulty device in the valve control system;
[0089] When the communication connection is disconnected, the signal connection stability monitoring is first performed:
[0090] If the signal connection is unstable, record the signal status as the cause of the fault;
[0091] If the signal connection is stable, the on-site real-time monitoring and monitoring records are called according to the geographic location information, and the cause of the fault is determined in combination with the video analysis algorithm. For example, the valve-controlled solar power supply system cannot supply energy normally due to long-term rainy and bad weather, resulting in disconnection or artificial damage to the valve control system, etc. The video analysis algorithm for determining the cause of the fault does not belong to the content to be protected by the present invention, and this function can be realized by loading the relevant analysis algorithm;
[0092] At the same time, the alarm recording algorithm divides the alarm level into a three-level alarm system based on the water supply situation of the reservoir:
[0093] Level 1 alarm: There is water in the reservoir and it is not being replenished before the alarm;
[0094] Secondary alarm level: the reservoir is empty and is being or not being filled with water;
[0095] Level 3 warning level: There is water in the reservoir and it is being replenished;
[0096] The three-level alarm system corresponds to different emergency levels and solutions. After completing the analysis, the system calls the alarm recording algorithm to record the valve control system ID, geographic location information, alarm start time, alarm type (such as water shortage, water overflow, etc.), alarm level, faulty equipment in the valve control system and the cause of the fault into the alarm information data table in the business database;
[0097] The alarm processing algorithm performs remote fault processing operations based on the communication connection status and the valve control system ID:
[0098] When the communication connection is disconnected, the system starts the emergency reconnection procedure of the valve control system and repeatedly sends the connection command within the time period preset by the valve control system manufacturer until the connection is successful;
[0099] When the communication connection is in a normal state, the alarm processing algorithm will send the operation instructions of each device to the valve control system in turn and try multiple times:
[0100] If the operation is unsuccessful, such as the reconnection is still not successful within the preset time period, or a device in the valve control system does not respond to the command, etc., the alarm processing algorithm calls the alarm recording program to record the valve control system ID, geographic location information, alarm start time, alarm type, faulty equipment in the valve control system and the cause of the fault into the alarm information data table in the business database; at the same time, the alarm processing algorithm sends an alarm text message to the water reservoir management personnel and technical maintenance personnel, including detailed fault information such as the location information of the faulty valve control system, the time when the fault occurred, the faulty equipment information, the cause of the fault, etc., so that the water reservoir management personnel and technical maintenance personnel can repair the valve control system in a timely and accurate manner;
[0101] By calling the alarm analysis algorithm to determine the online status of the valve control system in each geographical location, it can ensure that local water management personnel can obtain the online status of the valve control system in a timely and accurate manner, providing accurate valve control system operation status information for equipment maintenance work;
[0102] S4: Reservoirs in different geographical locations are provided with different reservoir administrator accounts and passwords. Reservoir administrators can log in to the WeChat applet with their accounts and passwords to monitor the water supply situation and valve control system operation status of the reservoirs they are responsible for in real time on the mobile terminal, providing real-time guarantee for the stable operation of the valve control system.
[0103] The descriptions of S1 to S4 above are a method for ensuring the operational stability of a valve control system based on the SpringBoot framework.
[0104] Example 2
[0105] This embodiment provides a system for implementing a method for ensuring the operation stability of a valve control system based on a SpringBoot framework. Figure 1 As shown, it includes water valve measurement and control terminal, liquid level meter, electric valve, MQTTAccept data receiving system, smart water database, smart water system, and alarm system, among which the water valve measurement and control terminal, liquid level meter, and electric valve are collectively referred to as the smart valve control system;
[0106] The liquid level meter is installed on a water storage device (usually a well, a pool, a bucket, etc.) and is used to transmit the liquid level data of the monitored object to the water valve measurement and control terminal in real time;
[0107] The electric valve is installed on the water supply pipe, which is connected to the main network and is in a continuous water supply state. It supports electrical signal control and manual control to ensure the safety of drinking water and water supply for residents;
[0108] The water valve measurement and control terminal is used to collect the water tank liquid level and the switch status of the electric valve measured by the liquid level meter, and compare the set upper and lower limit thresholds of the switch valve with the current liquid level:
[0109] Sending a valve switch instruction to the electric valve according to the comparison result;
[0110] The water valve measurement and control terminal includes an Internet of Things remote communication module, in which an Internet of Things card is placed for remote communication; the upper and lower limit thresholds of the switch valve are remotely set through the MQTT protocol, or manually set through the touch screen, which is convenient for water supply automation and subsequent operation and maintenance;
[0111] The MQTTAccept data receiving system is used to create a virtual MQTT client, and obtains data such as upper and lower limit thresholds of the water valve measurement and control terminal, the real-time liquid level of the liquid level meter, and the real-time status of the electric valve by subscribing to the valve control MQTT topic and stores it in the smart water database, providing data support for the business processing of the smart water system;
[0112] The alarm system is a system that analyzes the collected real-time data according to the alarm analysis algorithm to determine whether it meets the alarm conditions, and then triggers the alarm, displays and stores the alarm information;
[0113] The smart water system processes the faulty valve control system in a timely, accurate and effective manner based on the data in the smart water database in combination with the real-time data value acquisition algorithm, alarm analysis algorithm, alarm recording algorithm, alarm recording program and alarm processing algorithm.
[0114] Furthermore, the water valve measurement and control terminal is powered by solar energy and is manually controlled on site or remotely controlled via the MQTT protocol. On the one hand, the water valve measurement and control terminal collects the water tank liquid level data collected by the liquid level meter and uploads it to the water management platform in real time. On the other hand, it determines the switch state of the electric valve by combining the upper and lower limit thresholds of the liquid level set by the water management platform and the water tank liquid level.
[0115] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solution of the present invention, and are not intended to limit the specific implementation methods of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the claims of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A method for ensuring the operation stability of a valve control system based on SpringBoot, characterized in that: The method comprises: S1: Use the SpringBoot framework to build a virtual MQTT client based on the MQTT protocol, and the virtual MQTT client establishes a connection with the water valve measurement and control terminal through the MQTT protocol; S2: Create a real-time information receiving and information classification module, and obtain the real-time data of the valve control system in each geographical location through a real-time data value algorithm. After the value is obtained, the real-time value is stored in the corresponding valve control real-time information data table in the business database on the same server as the operation and maintenance valve control system; S3: Extract data from the corresponding valve control real-time information data table in the business database, and call the alarm analysis algorithm to determine whether the valve control system in each geographical location is offline based on the preset judgment criteria: If the line is disconnected, execute S31-S32: S31: The alarm analysis algorithm first determines whether the instantaneous information data of each valve control system has been timely entered into the valve control real-time information data table of the business database according to the data transmission time of the real-time received information; S32: If there is a valve control system in the valve control real-time information data table that has not been entered into the business database in time, firstly, the alarm analysis algorithm checks whether the communication connection between the virtual MQTT client and the water valve measurement and control terminal is disconnected; The algorithm will call the alarm recording algorithm and the alarm processing algorithm, and send the valve control system ID and communication connection status as parameters to the above alarm recording algorithm and alarm processing algorithm: The alarm recording algorithm is used to record the valve control system ID, geographical location information, alarm start time, alarm type, alarm level, faulty equipment in the valve control system and the cause of the fault into the alarm information data table in the business database; The alarm processing algorithm performs remote fault processing operations based on the communication connection status and the valve control system ID; S4 provides different reservoir administrator accounts and passwords based on reservoirs in different geographical locations. The reservoir administrator can monitor the water supply situation and valve control system operation status of the reservoir in real time on the mobile terminal.
2. According to claim 1, a method for ensuring the operation stability of a valve control system based on SpringBoot is characterized in that: The S1 specifically includes: S11: Use the eclipse paho library to create a virtual MQTT client. When creating the virtual MQTT client, ensure that the valve control system automatically obtains the time obtained through the automatic synchronization mechanism in the server operating system as the virtual MQTT client ID; S12: Connect the data receiving topic published by the water valve measurement and control terminal, the valve control system control topic and the guarantee valve control system through the MQTT protocol to create a constant receiving topic; S13: remotely connect the virtual MQTT client to the water valve measurement and control terminal; S14: To prevent the system from being disconnected during operation, a subscription timeout n and a session heartbeat time m are set in the system; If the subscription does not respond within n seconds, the connection is considered timed out; The session heartbeat time is set to m seconds. If the subscription response is normal, the server will automatically send a message to the client every 1.5*m seconds to verify whether the client is online. The virtual MQTT client connection and subscription status are monitored in real time through the subscription timeout and session heartbeat time. If the connection is disconnected or the session subscription is disconnected, it will automatically reconnect.
3. According to claim 2, a method for ensuring the operation stability of a valve control system based on SpringBoot is characterized in that: The alarm recording algorithm specifically includes: First, find the basic point information of the valve control system according to the valve control system ID, including geographical location information, alarm start time and devices included in the valve control system; Then perform different operations according to the communication connection status: When the communication connection status is normal, the alarm recording algorithm will try to send instructions to each device in the valve control system to locate the faulty device in the valve control system; When the communication connection is disconnected, the signal connection stability monitoring is first performed: If the signal connection is unstable, record the signal status as the cause of the fault; If the signal connection is stable, the real-time monitoring and monitoring records on site are called according to the geographic location information, and the cause of the fault is determined by combining the preset video analysis algorithm; At the same time, the alarm recording algorithm divides the alarm level into a three-level alarm system based on the water supply situation of the reservoir: Level 1 alarm: There is water in the reservoir and it is not being replenished before the alarm; Secondary alarm level: the reservoir is empty and is being or not being filled with water; Level 3 warning level: There is water in the reservoir and it is being filled.
4. A method for ensuring the operation stability of a valve control system based on SpringBoot according to claim 2 or 3, characterized in that: The alarm processing algorithm performs remote fault processing operations based on the communication connection status and the valve control system ID: When the communication connection is disconnected, the system starts the emergency reconnection procedure of the valve control system and repeatedly sends the connection command within the time period preset by the valve control system manufacturer until the connection is successful; When the communication connection is in a normal state, the alarm processing algorithm will send the operation instructions of each device to the valve control system in turn and try multiple times: If the operation is unsuccessful, the alarm processing algorithm calls the alarm recording program to record the valve control system ID, geographic location information, alarm start time, alarm type, faulty equipment in the valve control system and the cause of the fault into the alarm information data table in the business database; At the same time, the alarm processing algorithm sends alarm text messages to the reservoir management personnel and technical maintenance personnel to repair the valve control system; and by calling the alarm analysis algorithm, the online status of the valve control system in each geographical location is determined to provide accurate valve control system operation status information for equipment maintenance work.
5. According to a method for ensuring the operation stability of a valve control system based on SpringBoot according to claim 1, it is characterized in that: The remote connection between the virtual MQTT client and the water valve measurement and control terminal includes: Set the reconnect method as a class static variable to facilitate acquisition when the system reconnects. Use the server dedicated line IP port, virtual MQTT client ID, and memory persistence model to initialize the subscription object. Among them, the server dedicated line IP port is used as the preliminary authentication condition for the identity information uploaded by each water valve measurement and control terminal; the virtual MQTT client ID is used as the final authentication condition for the identity information uploaded by each water valve measurement and control terminal; the memory persistence model is used as the carrier of the data information sent by each water valve measurement and control terminal; Initialize the virtual MQTT client connection settings: set the clear session option to use a new identity for each connection, and set the agreed connection username and password; use the virtual MQTT client to subscribe to the topic published by the water valve measurement and control terminal to obtain the data uploaded by the water valve measurement and control terminal.
6. A system based on SpringBoot to ensure the operational stability of a valve control system, characterized in that: The system includes: a water valve measurement and control terminal, a liquid level meter, an electric valve, an MQTTAccept data receiving system, a smart water affairs database, a smart water affairs system, and an alarm system, wherein the water valve measurement and control terminal, the liquid level meter, and the electric valve are collectively referred to as a smart valve control system; The liquid level meter is installed on the water storage device and is used to transmit the liquid level data of the monitored object to the water valve measurement and control terminal in real time; The electric valve is installed on a water supply pipe, which is connected to the main network and is in a continuous water supply state; and supports electrical signal control and manual control; The water valve measurement and control terminal is used to collect the water tank liquid level and the switch status of the electric valve measured by the liquid level meter, and compare the set upper and lower limit thresholds of the switch valve with the current liquid level: Sending a valve switch instruction to the electric valve according to the comparison result; The water valve measurement and control terminal includes an Internet of Things remote communication module, in which an Internet of Things card is placed for remote communication; the upper and lower limit thresholds of the switch valve are remotely set through the MQTT protocol, or manually set through the touch screen, which is convenient for water supply automation and subsequent operation and maintenance; The MQTTAccept data receiving system is used to create a virtual MQTT client, obtain the upper and lower limit thresholds of the water valve measurement and control terminal, the real-time liquid level of the liquid level meter, and the real-time status of the electric valve by subscribing to the valve control MQTT topic, and store them in the smart water database; The smart water system processes the faulty valve control system based on the data in the smart water database combined with the real-time data value algorithm, alarm analysis algorithm, alarm recording algorithm, alarm recording program and alarm processing algorithm.
7. A system for ensuring the operation stability of a valve control system based on SpringBoot, characterized in that: The water valve measurement and control terminal is powered by solar energy and is manually controlled on site or remotely controlled via the MQTT protocol.
Citation Information
Patent Citations
Microwave sintering real-time remote monitoring system based on MQTT protocol
CN110138842A
Internet of Things and intelligent solution pool detection method and device
CN117336325A
Solution pool monitoring system and method based on Internet of Things and artificial intelligence
CN118092268A
Intelligent device communication platform based on MQTT message protocol
WO2019205907A1