Internet data acquisition and instruction control middleware for water affair industry

By designing the water industry Internet data acquisition and instruction control middleware, the data acquisition complexity and lack of intelligence caused by the diversity of communication protocols of water equipment are solved, and efficient data acquisition, processing and intelligent control are achieved, and the overall performance and reliability of the system are improved.

CN119814838AActive Publication Date: 2025-04-11HUNAN WABOO TECH DEV

Patent Information

Application Number
CN202510283882.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-04-11
Estimated Expiration
2045-03-11

AI Technical Summary

Technical Problem

The water industry has diverse communication protocols for field equipment, resulting in complex data collection and incompatible data formats, which affects the accuracy and completeness of data; existing command control lacks accuracy and intelligence, and cannot optimize equipment operation in real time; traditional data processing methods cannot meet the real-time requirements of massive multi-source heterogeneous data, and network congestion and data loss occur frequently.

Method used

A water industry Internet data acquisition and instruction control middleware is designed, including data acquisition module, data processing module, instruction control module and collaborative dispatching engine. The data acquisition module is connected to the device through a multi-source heterogeneous interface, collects data in real time and classifies and processes it. The data processing module performs protocol normalization processing to generate standardized data packets. The instruction control module analyzes control instructions and generates an executable instruction set based on the device status. The collaborative scheduling engine allocates the transmission paths of data streams and instructions through dynamic routing algorithms to ensure the efficiency and reliability of data transmission.

Benefits of technology

It realizes the unified collection and processing of water equipment data, improves the accuracy and completeness of data; has accurate and intelligent command control capabilities, optimizes the equipment operation efficiency; through dynamic routing algorithms, the real-time and reliability of data transmission are improved, and the processing needs of massive data are met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814838A_ABST
    Figure CN119814838A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial internet, and discloses a water affair industry internet data acquisition and instruction control middleware, which comprises a data acquisition module for acquiring water affair data through a multi-source heterogeneous interface and transmitting the water affair data in a classified manner; the data processing module is used for performing protocol normalization processing and standardized data packet generation; the instruction control module is used for receiving and analyzing an instruction and generating an equipment executable instruction set; and the collaborative scheduling engine is used for distributing transmission paths based on priorities and load states and coordinating module interaction. The data processing module comprises a protocol adaptation unit and a topology construction unit, and the collaborative scheduling engine has a load balancing strategy. In addition, each module is further subdivided into units to improve functions, such as an equipment interface unit of the data acquisition module, a protocol analysis unit and the like. According to the invention, the problems of multi-source heterogeneous data acquisition and instruction control in the water affair industry are solved, the data processing efficiency, the instruction control accuracy and the system stability are improved, and intelligent management of a water affair system is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial Internet, and specifically to a water industry Internet data collection and instruction control middleware. Background Art

[0002] In today's digital age, the water industry is accelerating towards intelligence and efficiency. With the vigorous development of advanced technologies such as the Internet of Things, big data, and artificial intelligence, the limitations of traditional water management models have become increasingly prominent. Data collection and command control, as key links in the intelligent transformation of water services, face many problems that need to be solved urgently.

[0003] On the one hand, there are many types of field equipment in the water industry, and the communication protocols are different. From basic water level sensors and water pressure sensors to complex water pumps and sewage treatment equipment, equipment produced by different manufacturers often use unique communication protocols, such as Modbus, Profibus, OPC, etc. This makes the data collection process extremely complicated and difficult to achieve unified and efficient management. The incompatible data formats and inconsistent interface standards between devices lead to frequent errors in data transmission and integration, which seriously affects the accuracy and integrity of the data. For example, in a large water treatment plant, sensors and actuators in different areas may use different communication protocols, which requires the central control system to invest a lot of manpower and time in protocol conversion and data adaptation when acquiring and processing data, which not only increases the cost of system construction, but also reduces the real-time nature of data collection, and cannot provide accurate basis for decision-making in a timely manner.

[0004] On the other hand, the existing water system lacks precision and intelligence in command control. When it is necessary to control the equipment, the issued commands often cannot be optimized and adjusted according to the actual situation of the equipment due to the inability to obtain the operating status of the equipment in real time and comprehensively. For example, when adjusting the flow of a water pump, if it is only controlled based on preset fixed parameters without considering factors such as the current load, energy consumption, and pipeline pressure of the water pump, it may lead to low efficiency of the water pump, increased energy consumption, and even shortened equipment life. Moreover, for complex control tasks, such as when multiple devices work together, the existing command control method makes it difficult to reasonably arrange the operation sequence and parameter settings, and cannot achieve efficient coordination between equipment, affecting the operating efficiency of the entire water system.

[0005] In addition, as the scale of water systems continues to expand, the amount of data is growing explosively, and the requirements for data processing and transmission are becoming increasingly higher. Traditional data processing methods are slow and inefficient when facing massive multi-source heterogeneous data, and cannot meet real-time requirements. At the same time, during the data transmission process, due to the lack of effective routing optimization and load balancing strategies, network congestion and data loss are prone to occur, further reducing the reliability and stability of the system.

[0006] In terms of network topology management, the existing water network topology is often static and difficult to adapt to the dynamic changes of equipment. When new equipment is connected or old equipment is removed due to failure, the topology cannot be automatically updated in time, resulting in unreasonable data transmission path selection and affecting data transmission efficiency. Summary of the invention

[0007] The purpose of the present invention is to provide a water industry Internet data collection and command control middleware to solve the problems raised in the above-mentioned background technology.

[0008] To achieve the above object, the present invention provides the following technical solution: a water industry Internet data collection and command control middleware, the middleware comprising: The data acquisition module is used to connect with water equipment through multi-source heterogeneous interfaces, collect dynamic data streams in water industry scenarios in real time, and classify the data streams into structured data and unstructured data before transmitting them to the data processing module; A data processing module, used for performing protocol normalization processing on the dynamic data stream and generating a standardized data packet according to a preset data topology model; The command control module is used to receive external control commands, parse the operation objects and parameters in the commands, and dynamically generate executable command sets for the equipment according to the real-time status of the water equipment; The collaborative scheduling engine is used to allocate the transmission paths of data streams and instructions through a dynamic routing algorithm based on the priority of data streams and the load status of device resources, and coordinate the interaction timing of the data acquisition module, data processing module and instruction control module; Wherein, the data processing module includes: The protocol adapter unit is used to call the corresponding decoding rules according to the device communication protocol type and convert the heterogeneous data into a unified intermediate format; A topology construction unit is used to construct a dynamic data flow topology structure based on the physical connection relationship and data dependency relationship between device nodes; The collaborative scheduling engine is pre-installed with a load balancing strategy based on the real-time response delay and bandwidth occupancy of the device nodes.

[0009] Preferably, the data acquisition module further includes: The device interface unit connects various water production equipment and sensor equipment through dynamic loading and driving. For devices that output analog signals, the analog signals are converted into digital signals through algorithms. A protocol parsing unit, used to identify the message header fields in the device communication protocol and extract the effective data payload; The data cache queue is used to divide independent storage areas by data category and set queue overflow elimination rules based on data timeliness.

[0010] Preferably, the instruction control module includes: Instruction decomposition unit, used to decompose compound control instructions into atomic operation sequences and mark the timing constraints between operations; Equipment status monitoring unit, used to obtain the operating parameters of water equipment in real time and determine whether the equipment is in a safe state to execute instructions; The instruction optimization unit is used to select the optimal parameter combination for instruction execution through a greedy algorithm based on the historical response data of the device.

[0011] Preferably, the dynamic routing algorithm of the collaborative scheduling engine specifically includes: A path weight calculation unit, used to calculate the comprehensive weight value of each path according to the real-time network delay, remaining bandwidth and data packet size of the device node; A path selection unit, used to construct a minimum spanning tree based on the comprehensive weight value and reserve redundant transmission channels for high priority data streams; The fault-tolerant retransmission unit is used to reallocate the transmission path according to the historical success rate of the path when data packet loss is detected.

[0012] Preferably, the instruction optimization unit further includes: Parameter constraint library, used to store the minimum / maximum operating thresholds of water equipment and the coupling relationship between parameters; The cost function building unit is used to build a multi-objective optimization function using device energy consumption, execution time and error range as variables; The iterative solution unit is used to generate a candidate parameter set through Monte Carlo sampling and select the optimal solution that meets the constraint conditions.

[0013] Preferably, the protocol parsing unit specifically includes: The message feature extraction subunit is used to identify the positions of the start character, check code and end character from the device message; The protocol template matching subunit is used to compare the message structure with the pre-stored protocol template for similarity and select the template with the highest matching degree for parsing; The abnormal message processing subunit is used to reassemble the fragments of the message that cannot match the template or trigger a retransmission request.

[0014] Preferably, the topology construction unit specifically includes: A node relationship discovery subunit, used to infer physical connection relationships through communication response time between devices; The dependency analysis subunit is used to construct a data dependency directed graph between device nodes based on the content relevance of the data stream; The topology update subunit is used to update the topology structure through an incremental algorithm when device nodes are added or deleted.

[0015] Preferably, the error-tolerant retransmission unit further includes: A packet loss detection subunit, used to determine whether packet loss occurs based on the continuity of the sequence number of the data packet; The path reliability evaluation subunit is used to count the historical packet loss rate and average delay of each path and generate a path reliability score; The dynamic switching subunit is used to select a backup path with a score higher than a threshold for data transmission during retransmission.

[0016] Preferably, the iterative solution unit further includes: A sampling space partitioning subunit is used to discretize the continuous parameter space into a multi-dimensional grid according to the parameter constraint library; The grid search subunit is used to calculate the cost function value at the grid intersection and record the local optimal solution; The convergence judgment subunit is used to judge whether the convergence condition is met according to the difference of the optimal solutions of adjacent iteration rounds.

[0017] Preferably, the dependency analysis subunit specifically includes: The data flow tracking subunit is used to mark the sequence of device nodes through which data flows and record the processing delay of each node; The association rule mining subunit is used to discover the strong association relationship between device nodes through the frequent item set algorithm; The directed graph generation subunit is used to map the association relationship into directed edges with weights and construct the minimum spanning tree topology.

[0018] Compared with the prior art, the present invention has the following beneficial effects: The data acquisition module of the present invention can be seamlessly connected with various types of water equipment through multi-source heterogeneous interfaces to achieve real-time acquisition of dynamic data streams. It classifies the collected data into structured and unstructured data to facilitate subsequent targeted processing. The protocol adapter unit in the data processing module can call the corresponding decoding rules according to the type of equipment communication protocol to convert heterogeneous data into a unified intermediate format, effectively solving the data compatibility problem caused by the complexity of water equipment communication protocols. For example, in a large water treatment plant containing equipment of various brands and models, whether it is a sensor using the Modbus protocol or a large water pump using the OPC protocol, data can be collected and processed smoothly, greatly improving the versatility and accuracy of data acquisition. The topology construction unit constructs a dynamic data stream topology structure based on the physical connection relationship and data dependency relationship between device nodes, making data processing more targeted and efficient, and ensuring that data can be quickly and accurately transmitted and processed in a complex water network environment.

[0019] The instruction control module has powerful instruction parsing and optimization capabilities. The instruction decomposition unit can decompose compound control instructions into atomic operation sequences and mark the timing constraint relationship between operations, providing guarantee for the orderly execution of complex control tasks. The equipment status monitoring unit obtains the operating parameters of water equipment in real time, and judges whether the equipment is in a safe state where instructions can be executed by comparing with the preset safety threshold, effectively avoiding the risk of failure caused by executing instructions due to equipment abnormality. For example, during the operation of the water pump, if the motor temperature is detected to be too high, the system will prohibit issuing instructions that may increase the burden on the equipment to ensure the safe and stable operation of the equipment. The instruction optimization unit uses a greedy algorithm combined with a parameter constraint library and a cost function to build a unit based on the historical response data of the equipment, and selects the optimal parameter combination for instruction execution. Taking the adjustment of the water pump flow as an example, the unit will comprehensively consider factors such as equipment energy consumption, execution time and error range, and select the optimal flow parameters, which not only improves the equipment operation efficiency, but also reduces energy consumption and errors, and realizes precise and intelligent instruction control.

[0020] The collaborative scheduling engine is one of the core advantages of the present invention. It allocates the transmission path of data streams and instructions through a dynamic routing algorithm based on the priority of the data stream and the load status of the device resources. The path weight calculation unit comprehensively considers the real-time network delay, remaining bandwidth and data packet size of the device node, calculates the comprehensive weight value of each path, and ensures the rationality of the data transmission path selection. For example, for water quality monitoring data with high real-time requirements, the system will give priority to paths with low network delay and sufficient bandwidth for transmission to ensure timely acquisition of data. The path selection unit constructs a minimum spanning tree based on the comprehensive weight value, and reserves redundant transmission channels for high-priority data streams, which greatly improves the reliability of data transmission. At the same time, the preset load balancing strategy based on the real-time response delay and bandwidth occupancy of the device node can effectively avoid network congestion, ensure the stable operation of the entire system, and improve the overall performance and reliability of the system.

[0021] The topology construction unit can dynamically discover the physical connection relationship and data dependency relationship between device nodes. The node relationship discovery subunit infers the physical connection relationship through the communication response time between devices. The dependency analysis subunit builds a data dependency directed graph between device nodes based on the content relevance of the data stream. When device nodes are added or deleted, the topology update subunit promptly updates the topology structure through an incremental algorithm. This enables the system to quickly adapt to the dynamic changes of water equipment and ensure that the data transmission path is always in the optimal state. For example, when a new device is connected to the water industry Internet, the system can automatically identify and update the topology structure, include the new device in the data collection and command control scope, and improve the scalability and flexibility of the system.

[0022] During the data collection and transmission process, the present invention provides a complete processing mechanism for possible abnormal situations. The abnormal message processing subunit in the protocol parsing unit reassembles the fragments of the message that cannot match the template or triggers a retransmission request to ensure the integrity of the data. When the fault-tolerant retransmission unit in the collaborative scheduling engine detects data packet loss, it reallocates the transmission path according to the historical success rate of the path, further improving the reliability of data transmission. The equipment status monitoring unit in the command control module monitors the equipment status in real time. Once an abnormality is found, it promptly prohibits the execution of the command and issues an alarm, which fully guarantees the stable operation of the water system. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a working principle diagram of the water industry Internet data collection and command control middleware described in the present invention; Figure 2 Workflow diagram for water service instruction processing and optimization; Figure 3 Workflow diagram for dynamic routing of collaborative scheduling engine. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] See also Figure 1-3 The present invention provides a water industry Internet data collection and command control middleware, which aims to solve the problem of multi-source heterogeneous data collection and command control in water industry scenarios, and realize efficient and stable data transmission and precise control of equipment. Specifically including: Data acquisition module: connected to water equipment through multi-source heterogeneous interfaces. These interfaces have the ability to adapt to multiple communication protocols and are compatible with the communication methods of different types of water equipment. When collecting dynamic data streams in water industry scenarios in real time, for analog signals, the device interface unit accesses the analog signals output by the water equipment and generates digital signals through analog-to-digital conversion; for digital signals, they are directly received and processed. The collected data is classified into structured data and unstructured data according to its characteristics and then transmitted to the data processing module. For example, the operating parameters of water equipment, such as water level, water pressure and other numerical data, are structured data; while the equipment's fault alarm text information, equipment maintenance logs, etc. are unstructured data.

[0026] Data processing module: After receiving the dynamic data stream, the protocol adapter unit first calls the corresponding decoding rules according to the device communication protocol type to convert the heterogeneous data into a unified intermediate format. In this process, the protocol adapter unit has built-in decoding rule libraries for multiple communication protocols, such as decoding programs for common protocols such as Modbus and OPC. Taking the Modbus protocol as an example, if a data packet in the Modbus RTU format is received, the protocol adapter unit extracts valid data based on its specific frame format. Next, the topology construction unit constructs a dynamic data stream topology structure based on the physical connection relationship and data dependency relationship between device nodes. The topology construction unit discovers subunits through node relationships and infers physical connection relationships using the communication response time between devices; the dependency analysis subunit constructs a data dependency directed graph between device nodes based on the content relevance of the data stream; the topology update subunit updates the topology structure through an incremental algorithm when device nodes are added or deleted. After completing the data processing, a standardized data packet is generated according to the preset data topology model to facilitate subsequent transmission and processing.

[0027] Instruction control module: responsible for receiving external control instructions. The instruction decomposition unit decomposes the compound control instructions into atomic operation sequences and marks the timing constraint relationship between the operations. For example, for a compound instruction to control the start and stop of a water pump and adjust the flow rate, the instruction decomposition unit will decompose it into atomic operations such as starting the water pump, adjusting the flow rate, and stopping the water pump, and mark the order of each operation. The equipment status monitoring unit obtains the operating parameters of the water equipment in real time, such as temperature, speed, etc., and determines whether the equipment is in a safe state where the instructions can be executed based on the preset safety threshold. The instruction optimization unit selects the optimal parameter combination for instruction execution through a greedy algorithm based on the historical response data of the equipment. When selecting the optimal parameter combination, the instruction optimization unit uses the minimum / maximum operating threshold of the water equipment and the coupling relationship between the parameters stored in the parameter constraint library. The cost function construction unit uses the equipment energy consumption, execution time and error range as variables to establish a multi-objective optimization function. The iterative solution unit generates a candidate parameter set through Monte Carlo sampling and selects the optimal solution that meets the constraints.

[0028] Collaborative scheduling engine: Based on the priority of data flow and the load status of device resources, the transmission path of data flow and instructions is allocated through a dynamic routing algorithm. The path weight calculation unit calculates the comprehensive weight value of each path according to the real-time network delay, remaining bandwidth and data packet size of the device node. The calculation formula is ,in , , is the weight coefficient, and , , , They are the maximum values ​​of network delay, remaining bandwidth, and packet size, respectively. The path selection unit constructs a minimum spanning tree based on the comprehensive weight value and reserves redundant transmission channels for high-priority data streams. When the fault-tolerant retransmission unit detects packet loss, it reallocates the transmission path according to the path's historical success rate. The collaborative scheduling engine also coordinates the interaction timing of the data acquisition module, data processing module, and instruction control module to ensure that each module works in an orderly manner. The collaborative scheduling engine is pre-set with a load balancing strategy based on the real-time response delay and bandwidth occupancy of the device node to optimize system performance.

[0029] The present invention will be further described below in conjunction with Embodiments 1 to 5:

[0030] Embodiment 1 In the data acquisition module, after the device interface unit is connected to the analog signal output by the water service sensor, an efficient analog-to-digital conversion algorithm is used to convert the analog signal into a more accurate digital signal. During the conversion process, in order to reduce noise interference, the noise is filtered out through a filtering algorithm so that the converted digital signal can more accurately reflect the actual sensor measurement value.

[0031] When the protocol parsing unit identifies the message header field in the device communication protocol, the message feature extraction subunit identifies the position of the start character, check code and terminator from the device message. A specific byte pattern matching algorithm is used to identify the start character and terminator. For example, if the start character is a fixed two-byte "0xAA 0xBB", the message feature extraction subunit compares byte by byte when receiving the message data. When two consecutive bytes are found to match the start character, the starting position is determined; the terminator is identified in the same way. The protocol template matching subunit compares the message structure with the pre-stored protocol templates for similarity, and selects the template with the highest match for parsing. During the similarity comparison process, the Hamming distance algorithm is used to calculate the difference between the message structure and each protocol template. The Hamming distance calculation formula is: ,in and are two strings of equal length, and The first Bit character, is the XOR operation, is the string length. The protocol template with the smallest Hamming distance is selected as the matching result. The abnormal message processing subunit reassembles the fragments of the message that cannot match the template or triggers a retransmission request. When it is found that the message cannot match the template, it first determines whether the message is a fragmented message. If the message length is less than the normal message length and contains some valid data, it attempts to reassemble the fragments. According to the sequence number and other information carried by the message, multiple fragmented messages are spliced ​​into a complete message in sequence; if reassembly is not possible, a retransmission request is triggered to ensure data integrity.

[0032] The data cache queue is divided into independent storage areas according to data categories, such as storing water level data, water pressure data, water quality data, etc. in different queue areas. Set the overflow elimination rules of the queue according to the timeliness of the data, using a combination of timestamp and first-in-first-out (FIFO). For data with high timeliness requirements, such as real-time water pressure data, set a shorter effective time. When the data is stored in the queue for longer than When the queue is full, it will be eliminated; for data with relatively low timeliness requirements, such as daily water quality monitoring data, a longer validity period is set. ,When the queue is full and new data enters, the data that enters the queue earliest is eliminated according to the first-in-first-out principle.

[0033] Embodiment 2 The instruction decomposition unit uses a recursive parsing algorithm when decomposing compound control instructions into atomic operation sequences. For complex compound instructions, the instruction decomposition unit first determines whether the instruction contains sub-instructions. If so, it recursively calls itself to decompose each sub-instruction until an atomic operation sequence is obtained. In terms of marking the timing constraints between operations, the timestamp marking method is used. A timestamp is assigned to each atomic operation, and the value of the timestamp indicates the execution order of the operation in the entire instruction sequence. For example, for a compound instruction that controls the switching of multiple valves, the atomic operations such as opening valve 1, opening valve 2, closing valve 1, and closing valve 2 are marked with timestamps respectively. , , , ,and , clarify the order of operations.

[0034] The equipment status monitoring unit obtains the operating parameters of water equipment in real time, such as the speed of the water pump , Motor temperature When judging whether the device is in a safe state to execute instructions, multiple safety thresholds are preset, such as the safety threshold range of the pump speed. , the motor temperature safety threshold is When the pump speed is detected Less than or greater than , or the motor temperature Greater than When the device is judged to be in an unsafe state, the execution of related instructions is prohibited and an alarm signal is issued.

[0035] When the instruction optimization unit selects the optimal parameter combination for instruction execution based on the device historical response data through a greedy algorithm, it first establishes a device historical response database. The database stores the parameter combination for each instruction execution and the corresponding device response results, including the device energy consumption. , execution time t and error range The cost function construction unit uses device energy consumption, execution time and error range as variables to establish a multi-objective optimization function ,in , , is the weight coefficient, and , , , The iterative solution unit generates a candidate parameter set through Monte Carlo sampling. During the sampling process, random sampling is performed according to the parameter range in the parameter constraint library. For example, for the water pump flow control instruction, the flow parameter value range is , randomly generate multiple candidate flow values ​​within this range. Then select the optimal solution that meets the constraints, which include the minimum / maximum operating thresholds in the parameter constraint library and the coupling relationship between parameters. For example, there is a certain coupling relationship between flow and pressure. When the flow increases, the pressure will change accordingly. This relationship needs to be considered when selecting the optimal solution.

[0036] Embodiment 3 When calculating the comprehensive weight of each path, the path weight calculation unit monitors the network delay, remaining bandwidth and data packet size in real time. For the network delay D, a monitoring method based on heartbeat packets is adopted. 0 Send a heartbeat packet to the device node and record the round trip time of the heartbeat packet as the network delay D. The remaining bandwidth B is obtained by querying the interface status information of the network device. The packet size S is measured when the packet is generated. In the formula for calculating the comprehensive weight value W In the weight coefficient , , Dynamically adjust according to different application scenarios. For example, in scenarios with high real-time requirements, increase value, reduce and The value of makes network delay account for a larger proportion in the weight calculation.

[0037] When the path selection unit constructs the minimum spanning tree based on the comprehensive weight value, the Prim algorithm is used. Taking a certain device node as the starting point, the edge with the smallest weight connected to the node that has been added to the tree is continuously selected, and the corresponding node is added to the tree until all nodes are added. In terms of reserving redundant transmission channels for high-priority data streams, a certain number of backup paths are reserved for high-priority data streams according to the priority level of the data stream. For example, the data stream is divided into three priorities, and two backup paths are reserved for the highest priority data stream; for the second highest priority data stream, one backup path is reserved.

[0038] When the fault-tolerant retransmission unit detects packet loss, the packet loss detection subunit determines whether packet loss has occurred based on the continuity of the packet sequence number. When the received packet sequence number is interrupted, it is determined that packet loss has occurred. The path reliability assessment subunit counts the historical packet loss rate P and average delay of each path. , generate the path reliability score R, the calculation formula is ,in is the maximum value of the average delay. The dynamic switching subunit selects the score higher than the threshold when retransmitting When packet loss is detected and the reliability score R of the current path is lower than the threshold When , the path with the highest score is selected from the backup paths for retransmission.

[0039] Embodiment 4 This embodiment further improves the instruction optimization unit to increase the accuracy and efficiency of instruction execution parameter optimization.

[0040] The parameter constraint library uses a relational database to manage the minimum / maximum operating thresholds and coupling relationships between parameters of water equipment. For example, for the flow and pressure parameters of a water pump, a data table is established in the database to record the minimum flow value. , maximum value , minimum pressure , maximum value , and the coupling relationship expression between flow and pressure, such as , where k and b are constants.

[0041] The cost function construction unit takes device energy consumption, execution time and error range as variables, and considers more practical factors when establishing a multi-objective optimization function. , execution time t and error range In addition, the equipment wear degree W is added as a variable to construct a new multi-objective optimization function ,in is the weight coefficient of equipment wear degree, is the maximum value of the equipment wear degree. The equipment wear degree W is estimated based on factors such as equipment operation time and load size.

[0042] When the iterative solution unit generates candidate parameter sets through Monte Carlo sampling, the sampling space division subunit discretizes the continuous parameter space into a multidimensional grid according to the parameter constraint library. For example, for the optimization problem of two parameters, flow and pressure, the range of flow is Divided into n intervals, the pressure range The grid is divided into m intervals to form n×m grid intersections. The grid search subunit calculates the cost function value at the grid intersection and records the local optimal solution. The convergence judgment subunit determines whether the convergence condition is met based on the difference in the optimal solutions of adjacent iterations. Suppose the optimal solutions obtained in two adjacent iterations are F i and ,when When , it is determined that the convergence condition is reached, where is the preset convergence accuracy.

[0043] Embodiment 5 In the topology construction unit, the node relationship discovery subunit uses the method of taking the average value of multiple measurements when inferring the physical connection relationship through the communication response time between devices. To reduce the measurement error, a detection packet is sent to the device node at a certain time interval, and the communication response time is recorded. The measurement is continuous for n times, and the average value is taken as the communication response time between devices. .according to The size of determines the physical connection relationship. Less than threshold , it is considered that there is a physical connection between the two device nodes.

[0044] The dependency analysis subunit builds a data dependency directed graph between device nodes based on the content relevance of the data flow. The data flow tracking subunit marks the sequence of device nodes through which the data flows and records the processing delay of each node. For example, when a set of water quality monitoring data is transmitted from sensor node A to data processing node B and then to storage node C, the node sequence is marked. , and record the processing delay t of nodes A and B A ,t B The association rule mining subunit discovers the strong association relationship between device nodes through the frequent item set algorithm. In the frequent item set algorithm, the support threshold S is set th and the confidence threshold C th For the device node set I, calculate the frequency of each subset in the data set. If the frequency is greater than the support threshold S th , then the subset is a frequent item set. For frequent item sets, calculate its confidence. If the confidence is greater than the confidence threshold C th,If the relationship is strong, it is considered that there is a strong association. The directed graph generation subunit maps the association into directed edges with weights and constructs a minimum spanning tree topology. The weight is set according to the strength of the association. The stronger the association, the greater the weight.

[0045] The topology update subunit updates the topology structure through an incremental algorithm when device nodes are added or deleted. When a new device node is added, its physical connection relationship and data dependency relationship with the existing nodes are first determined. The physical connection is determined based on the communication response time, and the data dependency is determined based on the data flow content. The new node and its connection relationship and dependency relationship are then added to the existing topology structure. When a device node is deleted, the node and its related connection edges and dependency edges are removed from the topology structure, and the relevant parameters of the topology structure, such as the shortest path between nodes, are recalculated.

[0046] In the protocol analysis unit, the message feature extraction subunit identifies the positions of the start character, check code, and end character from the device message. For the identification of the check code, the cyclic redundancy check (CRC) algorithm is used. The message data is calculated according to the preset CRC polynomial to obtain the calculation result. , and the checksum carried in the message If , the verification passes; otherwise, it is determined that there may be errors in the message data. When the protocol template matching subunit compares the message structure with the pre-stored protocol template for similarity, in addition to using the Hamming distance algorithm, it also adds semantic analysis. For some fields with specific semantics, such as the device type field, semantic matching is performed to improve the accuracy of the match. When the abnormal message processing subunit reassembles fragments of messages that cannot match the template or triggers a retransmission request, if errors are found in the fragmented messages during the fragment reassembly process, error correction coding technology is used to correct the errors. For example, Hamming code is used to correct erroneous fragmented messages to improve the success rate of fragment reassembly.

[0047] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0048] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A water industry Internet data collection and command control middleware, characterized in that: The middleware includes: The data acquisition module is used to connect with water equipment through multi-source heterogeneous interfaces, collect dynamic data streams in water industry scenarios in real time, and classify the data streams into structured data and unstructured data before transmitting them to the data processing module; A data processing module, used for performing protocol normalization processing on the dynamic data stream and generating a standardized data packet according to a preset data topology model; The command control module is used to receive external control commands, parse the operation objects and parameters in the commands, and dynamically generate executable command sets for the equipment according to the real-time status of the water equipment; The collaborative scheduling engine is used to allocate the transmission paths of data streams and instructions through a dynamic routing algorithm based on the priority of data streams and the load status of device resources, and coordinate the interaction timing of the data acquisition module, data processing module and instruction control module; Wherein, the data processing module includes: The protocol adapter unit is used to call the corresponding decoding rules according to the device communication protocol type and convert the heterogeneous data into a unified intermediate format; A topology construction unit is used to construct a dynamic data flow topology structure based on the physical connection relationship and data dependency relationship between device nodes; The collaborative scheduling engine is pre-installed with a load balancing strategy based on the real-time response delay and bandwidth occupancy of the device nodes.

2. The water industry Internet data collection and command control middleware according to claim 1 is characterized in that: The data acquisition module also includes: The device interface unit connects various water production equipment and sensor equipment through dynamic loading and driving. For devices that output analog signals, the analog signals are converted into digital signals through algorithms. A protocol parsing unit, used to identify the message header fields in the device communication protocol and extract the effective data payload; The data cache queue is used to divide independent storage areas by data category and set queue overflow elimination rules based on data timeliness.

3. The water industry Internet data collection and command control middleware according to claim 1 is characterized in that: The command control module comprises: Instruction decomposition unit, used to decompose compound control instructions into atomic operation sequences and mark the timing constraints between operations; Equipment status monitoring unit, used to obtain the operating parameters of water equipment in real time and determine whether the equipment is in a safe state to execute instructions; The instruction optimization unit is used to select the optimal parameter combination for instruction execution through a greedy algorithm based on the historical response data of the device.

4. The water industry Internet data collection and command control middleware according to claim 1 is characterized in that: The dynamic routing algorithm of the collaborative scheduling engine specifically includes: A path weight calculation unit, used to calculate the comprehensive weight value of each path according to the real-time network delay, remaining bandwidth and data packet size of the device node; A path selection unit, used to construct a minimum spanning tree based on the comprehensive weight value and reserve redundant transmission channels for high priority data streams; The fault-tolerant retransmission unit is used to reallocate the transmission path according to the historical success rate of the path when data packet loss is detected.

5. The water industry Internet data collection and command control middleware according to claim 3 is characterized in that: The instruction optimization unit also includes: Parameter constraint library, used to store the minimum / maximum operating thresholds of water equipment and the coupling relationship between parameters; The cost function building unit is used to build a multi-objective optimization function using device energy consumption, execution time and error range as variables; The iterative solution unit is used to generate a candidate parameter set through Monte Carlo sampling and select the optimal solution that meets the constraint conditions.

6. The water industry Internet data collection and command control middleware according to claim 2 is characterized in that: The protocol parsing unit specifically includes: The message feature extraction subunit is used to identify the positions of the start character, check code and end character from the device message; The protocol template matching subunit is used to compare the message structure with the pre-stored protocol template for similarity and select the template with the highest matching degree for parsing; The abnormal message processing subunit is used to reassemble the fragments of the message that cannot match the template or trigger a retransmission request.

7. The water industry Internet data collection and command control middleware according to claim 1 is characterized in that: The topology construction unit specifically includes: A node relationship discovery subunit, used to infer physical connection relationships through communication response time between devices; The dependency analysis subunit is used to construct a data dependency directed graph between device nodes based on the content relevance of the data stream; The topology update subunit is used to update the topology structure through an incremental algorithm when device nodes are added or deleted.

8. The water industry Internet data collection and command control middleware according to claim 4 is characterized in that: The error-tolerant retransmission unit also includes: A packet loss detection subunit, used to determine whether packet loss occurs based on the continuity of the sequence number of the data packet; The path reliability evaluation subunit is used to count the historical packet loss rate and average delay of each path and generate a path reliability score; The dynamic switching subunit is used to select a backup path with a score higher than a threshold for data transmission during retransmission.

9. The water industry Internet data collection and command control middleware according to claim 5 is characterized in that: The iterative solution unit also includes: A sampling space partitioning subunit is used to discretize the continuous parameter space into a multi-dimensional grid according to the parameter constraint library; The grid search subunit is used to calculate the cost function value at the grid intersection and record the local optimal solution; The convergence judgment subunit is used to judge whether the convergence condition is met according to the difference of the optimal solutions of adjacent iteration rounds.

10. The water industry Internet data collection and command control middleware according to claim 7, characterized in that: The dependency analysis subunit specifically includes: The data flow tracking subunit is used to mark the sequence of device nodes through which data flows and record the processing delay of each node; The association rule mining subunit is used to discover the strong association relationship between device nodes through the frequent item set algorithm; The directed graph generation subunit is used to map the association relationship into directed edges with weights and construct the minimum spanning tree topology.

Citation Information

Patent Citations

  • Intelligent water affair data analysis and management system and method

    CN116216819A

  • Zero-trust unified identity authentication system and construction method

    CN117749536A

  • Vehicle-mounted network bus information transmission vehicle management system and method based on data acquisition and analysis

    CN117991750A

  • Multi-span greenhouse environment control method, controller and control decision support system

    CN119247789A

  • Asset data acquisition method based on Internet of Things

    CN119254791A

Cited By

  • Processing method, device and system based on voice instruction

    CN120183410A

  • Voice command-based processing method, device, and system

    CN120183410B

  • Multi-equipment cooperative control method, system and equipment for feeding of smelting furnace

    CN120333148A

  • Method for automatically generating instruction conforming to Modbus protocol

    CN120499164A

  • Enterprise computer informatization construction system and method

    CN120658675A