Water flow intelligent monitoring method, device and equipment
By receiving user query instructions and selecting appropriate data collection methods based on the properties of the water flow meter, the problem of convenience and inefficiency of water flow monitoring in the existing technology is solved, and the function of users to query water flow data anytime and anywhere is realized, improving the convenience and timeliness of monitoring.
Patent Information
- Application Number
- CN202411446178.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, water flow monitoring is less convenient and has low monitoring efficiency, making it difficult for users to query water flow data anytime and anywhere.
By receiving user query instructions, the attribute information of the water flow meter to be queried is determined, the water flow meter value is obtained using a wireless transmission module or an automatic meter reading device based on OCR identification, and the accumulated flow data and traffic data within the preset period are processed and output through the cloud server.
It enables users to query water flow data anytime and anywhere, improves the convenience and timeliness of water flow monitoring, and saves personnel workload and costs.
Smart Images

Figure CN119624697A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water flow monitoring, and in particular to a method, device and equipment for intelligently monitoring water flow. Background Art
[0002] The water flow meter at the production site is used to record the water consumption in real time. The operator reads the meter on time every day to track the resource usage and equipment operation conditions, and to form a daily water consumption record. Manual meter reading consumes a lot of time and energy of the operator. At present, the DCS system is mostly used to collect the data of the local instrument through the signal cable by the controller, which can realize remote monitoring. However, the on-site flow meter is far away from the electronic room, and the DCS system cannot realize flow query anytime and anywhere.
[0003] Therefore, how to enable users to query water flow anytime and anywhere has become a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0004] The present invention provides a water flow intelligent monitoring method, device and equipment, which are used to solve the defects of poor convenience and low monitoring efficiency of water flow in the prior art.
[0005] In a first aspect, the present invention provides a water flow intelligent monitoring method, comprising:
[0006] Receive a user query instruction, and determine the attribute information of the water flow meter to be queried based on the query instruction;
[0007] When the attribute information indicates that the water flow meter to be queried allows an external module, reading the value of the water flow meter through the wireless transmission module;
[0008] When the attribute information indicates that the water flow meter to be queried does not allow an external module, obtaining the value of the water flow meter through an automatic meter reading device based on OCR recognition;
[0009] The numerical value of the water flow meter is transmitted to the communication interface layer, the packet analysis layer, the data execution layer and the recording layer of the cloud server in sequence, and the accumulated flow data and the flow data within a preset time period are output, and the preset time period is the time period carried in the user query instruction;
[0010] Record the accumulated flow data and the flow data within a preset period of time, and generate statistical charts;
[0011] The accumulated flow data, the flow data within the preset time period and the statistical chart are sent to a user terminal.
[0012] According to a water flow intelligent monitoring method provided by the present invention, the value of the water flow meter is obtained by an automatic meter reading device based on OCR recognition, including:
[0013] Collecting the front image of the water flow meter by using a camera;
[0014] The character library training model is called by utilizing OCR digital recognition, the front image is input into the character library training model, and the numerical value of the water flow meter is output.
[0015] According to a water flow intelligent monitoring method provided by the present invention, the output of cumulative flow data and flow data within a preset time period includes:
[0016] The communication interface layer is used to receive the numerical value of the water flow meter and convert it into a character array;
[0017] The packet parsing layer is used to decompose the character array into identification bits, value bits and check bits, and determine whether the identification bits comply with preset rules. If not, an error code is returned to the communication interface layer. If yes, the value bits are converted into a number system according to the rule sequence, and the rule sequence number and the converted value are packaged and transmitted to the data execution layer.
[0018] The data execution layer is used to construct a database insert SQL command according to the rule sequence number and the converted value, connect to the database and execute the insert command;
[0019] The recording layer is used to count the insert commands, write them into a log file, and output the accumulated flow data and the flow data within a preset time period.
[0020] A water flow intelligent monitoring method provided by the present invention also includes:
[0021] Obtaining the geographical location, water supply network structure and water use type attributes of all water flow meters to be queried, and grouping all the water flow meters to be queried using a K-means clustering algorithm to obtain water flow groups;
[0022] Acquire water flow data of each water flow group in real time, calculate the real-time total water consumption of each water flow group, compare the real-time total water consumption with a preset threshold value, and determine whether it exceeds a preset range;
[0023] If it exceeds the preset range, the early warning mechanism is triggered, and the cause of the abnormality is determined by association rule mining and time series pattern analysis. According to the preset water flow balance model, the target water flow group and the adjusted water volume that need to be adjusted are determined, wherein the water flow balance model is constructed based on the water supply network structure and the supply and demand relationship between the water flow groups.
[0024] According to a water flow intelligent monitoring method provided by the present invention, the geographical location, water supply network structure and water use type attributes of all water flow meters to be queried are obtained, and the K-means clustering algorithm is used to group all the water flow meters to be queried to obtain water flow groups, including:
[0025] Obtain the geographical coordinates of all water flow meters to be queried, the topological relationship of the water supply network structure to which they belong, and the corresponding water use type attribute labels;
[0026] According to the geographic location coordinates, the water flow monitoring points are divided into a number of spatial regions by using spatial clustering, and the monitoring points in each of the spatial regions are spatially clustered and distributed;
[0027] For each of the spatial regions, statistics are collected on the topological relationship of the water supply network structure and the distribution of water use type attribute labels of the monitoring points in the region;
[0028] The spatial regions are merged according to the topological relationship of the water supply network structure and the distribution of water use type attribute labels to obtain different water flow groups.
[0029] A water flow intelligent monitoring method provided by the present invention also includes:
[0030] Acquire historical water use data of each of the water flow groups, and pre-process the historical water use data to obtain a standardized historical water use data set;
[0031] Calculating the water consumption threshold of each water flow group using a statistical analysis method according to the historical water consumption data set;
[0032] Performing time series analysis on the standardized historical water consumption data set to obtain a water consumption time series model for each water flow group;
[0033] According to the water consumption time series model, predict the normal water consumption fluctuation range of each water flow group within a preset time period;
[0034] For each water flow group, features are extracted from multiple dimensions, including water consumption, water use time distribution, and water use frequency, and the judgment conditions for abnormal water use are formed through feature combination;
[0035] The water consumption threshold value, the normal water consumption fluctuation range and the abnormal water consumption judgment condition of each group are used as monitoring rules and stored in a group monitoring rule library;
[0036] When the water consumption data of any group is monitored in real time, the corresponding monitoring rules are retrieved from the group monitoring rule library to determine whether the current water consumption data meets the monitoring rules;
[0037] If the monitoring rules are met, an early warning is triggered, and an optimized scheduling strategy is adopted in combination with the characteristics of water demand, and the group monitoring rule library is improved.
[0038] According to a water flow intelligent monitoring method provided by the present invention, the target water flow group and the adjusted water volume to be adjusted are determined according to a preset water flow balance model, including:
[0039] Obtain water demand data of each water flow group as constraints for the genetic algorithm;
[0040] The genetic algorithm is used to search for the optimal water diversion scheme, and the water diversion volume, energy consumption and water pressure indicators are used as optimization targets of the fitness function;
[0041] According to the score of the fitness function, an optimal water diversion scheme is selected that meets the water demand of the water flow group and has a dynamic balance of the overall water system flow;
[0042] The water transfer volume and water pressure parameters in the optimal water transfer scheme are used as control instructions and transmitted to the water pump and valve actuator;
[0043] Obtaining real-time monitoring parameters of water flow and water pressure to determine whether the actual water allocation complies with the optimal water allocation plan;
[0044] If the deviation between the actual water allocation and the optimal water allocation scheme exceeds a preset threshold, the genetic algorithm is triggered to search for the optimal scheme again;
[0045] According to the dynamic changes in water demand of the water flow group, the genetic algorithm is run periodically to continuously optimize the water transfer plan.
[0046] A water flow intelligent monitoring method provided by the present invention also includes:
[0047] Obtain the water allocation target of the water flow group in the optimal water diversion plan and the current actual water consumption data of each water flow group;
[0048] Calculate the difference between the actual water consumption and the target water allocation to obtain the water volume that needs to be adjusted for each water flow group;
[0049] According to the water volume to be adjusted, combined with the preset pipe network topology and valve position information, determine the valve to be adjusted and the corresponding adjustment range;
[0050] Control the valve to be adjusted to perform opening adjustment and obtain the pressure change data of the pump station outlet;
[0051] If the pressure change data at the pump station outlet exceeds the preset pressure threshold range, the pump station pressure adjustment value is calculated by the PID control algorithm, and the pump station is controlled to adjust the pressure according to the pressure adjustment value until the pressure change data at the pump station outlet is within the preset pressure threshold range;
[0052] During the valve and pump station adjustment process, the real-time water consumption data of each water flow group is continuously collected, the difference between the real-time water consumption data and the target water distribution volume is calculated, and the valve adjustment state is dynamically optimized and controlled according to the difference until the difference is less than the preset water volume threshold;
[0053] Record the actual water consumption, valve adjustment status and pump station energy consumption data of each water flow group during the water transfer process.
[0054] In a second aspect, the present invention further provides a water flow intelligent monitoring device, comprising:
[0055] A receiving module, used for receiving a user query instruction and determining the attribute information of the water flow meter to be queried based on the query instruction;
[0056] A query module, configured to read the value of the water flow meter through a wireless transmission module when the attribute information indicates that the water flow meter to be queried allows an external module to be connected; and to obtain the value of the water flow meter through an automatic meter reading device based on OCR recognition when the attribute information indicates that the water flow meter to be queried does not allow an external module to be connected;
[0057] An output module, used to transmit the numerical value of the water flow meter to the communication interface layer, packet parsing layer, data execution layer and recording layer of the cloud server in sequence, and output the accumulated flow data and the flow data within a preset time period, wherein the preset time period is the time period carried in the user query instruction;
[0058] A recording module, used to record the accumulated flow data and the flow data within a preset time period, and generate statistical charts;
[0059] The sending module is used to send the accumulated flow data, the flow data within the preset time period and the statistical chart to the user terminal.
[0060] In a third aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for intelligently monitoring water flow as described above is implemented.
[0061] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described intelligent water flow monitoring methods.
[0062] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-mentioned intelligent water flow monitoring methods.
[0063] The present invention provides a method, device and equipment for intelligent monitoring of water flow, comprising receiving a user query instruction, and determining attribute information of a water flow meter to be queried based on the query instruction; when the attribute information indicates that the water flow meter to be queried allows an external module, reading the value of the water flow meter through a wireless transmission module; when the attribute information indicates that the water flow meter to be queried does not allow an external module, obtaining the value of the water flow meter through an automatic meter reading device based on OCR recognition; transmitting the value of the water flow meter to a communication interface layer, a packet parsing layer, a data execution layer and a recording layer of a cloud server in sequence, outputting cumulative flow data and flow data within a preset time period, the preset time period being a time period carried in the user query instruction; recording the cumulative flow data and flow data within the preset time period, and generating statistical charts; sending the cumulative flow data, flow data within the preset time period and statistical charts to a user terminal, reading the water flow by adopting different collection methods for water flow meters at different locations, and sending the water flow to the user terminal through the cloud server, thereby improving the water flow monitoring efficiency and the timeliness of user queries. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0065] Figure 1 is a flow chart of the water flow intelligent monitoring method provided in this embodiment;
[0066] Figure 2 Schematic diagram of the hardware principle of the water flow intelligent monitoring method provided in this embodiment;
[0067] Figure 3 is an architecture diagram of the data acquisition interface program provided in this embodiment;
[0068] Figure 4 is a schematic diagram of the structure of the water flow intelligent monitoring device provided in this embodiment;
[0069] Figure 5 It is a schematic diagram of the structure of the electronic device provided in this embodiment. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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.
[0071] Figure 1 is a flow chart of the water flow intelligent monitoring method provided in this embodiment, Figure 2 It is a schematic diagram of the hardware principle of the water flow intelligent monitoring method provided in this embodiment.
[0072] like Figure 1 As shown, the water flow intelligent monitoring method provided by the embodiment of the present invention mainly includes the following steps:
[0073] 101. Receive a user query instruction, and determine water flow attribute information to be queried based on the query instruction.
[0074] In a specific implementation process, the user can send a query instruction at any time through a terminal such as a mobile phone or a computer. The query instruction includes information such as the number of the water flow meter to be queried and the preset time period. The water flow meter that needs to be queried is defined as the water flow meter to be queried. Therefore, after receiving the user's query instruction, the attribute information of the water flow meter to be queried is first determined based on the query instruction. The attribute information includes location, authority, and its own function. The attribute information is used to characterize whether the water flow meter to be queried can be connected to an external module, including authority reasons or water flow meter functions. For example, although the water flow meters of some units have the function of an external module, due to authority, the module is not allowed to be connected externally. And some water flow meters themselves do not have the function of connecting modules externally.
[0075] Therefore, it is necessary to first determine the properties of the water flow meter and then determine the data collection method.
[0076] 102. When the attribute information indicates that the water flow meter to be queried allows an external module, the value of the water flow meter is read through the wireless transmission module.
[0077] If external modules are allowed, it means that the water flow to be queried currently has the function of an external module, and no privacy permissions are set. At this time, wireless transmission can be performed through the external module, and the data of the water flow meter can be collected in real time through wireless transmission. The wireless transmission module has the function of converting RS485 and TCP protocols, and is equipped with a flow card. Every 10 seconds, a ModbusRTU request is sent to the water flow meter to read the required instantaneous or cumulative flow value. The flow meter returns a hexadecimal RS485 byte string to the module, including the length bit, value bit and check bit. The module sends the RS485 byte string to the cloud using the TCP communication protocol.
[0078] Therefore, the current value of the water flow meter and the value within the preset time period can be obtained remotely and wirelessly, and the value can be read at a fixed time period every day to accurately and automatically calculate the daily water consumption, which is convenient for providing monthly report data support.
[0079] 103. When the attribute information indicates that the water flow meter to be queried does not allow an external module, the value of the water flow meter is obtained through an automatic meter reading device based on OCR recognition.
[0080] When the attribute information indicates that external modules are not allowed, on the one hand, it may be that the water flow meter itself does not have the function of external modules, that is, it does not have the function of parsing ModbusRTU instructions, and on the other hand, it may be due to the privacy permissions of the water flow meter that external modules are not allowed. For both situations, the interface readings of the water flow meter are collected by reading through a camera.
[0081] The hardware of the device consists of three main parts: a single-chip microprocessor, a wireless network card, and a camera. It is installed in front of the water flow meter to ensure that the camera can collect complete readings. The software includes a camera driver, an image acquisition program, an OCR digital recognition program, and a network communication program. It can be set to collect images of the water flow meter dial every 1 minute. The OCR digital recognition program calls the font training model to generate the current meter count value and transmits it to the cloud using the TCP communication protocol.
[0082] Specifically, the front image of the water flow meter is collected by a camera, and then the font training model is called by OCR digital recognition, the front image is input to the font training model, and the numerical value of the water flow meter is output. The font training model is pre-trained based on a large number of front image samples of the water flow meter and numerical samples of the water flow meter.
[0083] The automatic meter reading device with OCR recognition can read the water flow value, which effectively solves the problem of no wireless network. And by combining images with neural networks, it can also ensure the accuracy and timeliness of the reading of water flow meter values.
[0084] 104. The water flow meter value is transmitted to the communication interface layer, packet analysis layer, data execution layer and recording layer of the cloud server in sequence, and the accumulated flow data and the flow data within a preset time period are output. The preset time period is the time period carried in the user query instruction.
[0085] After the automatic meter reading device automatically completes the reading of the water flow meter value through the wireless transmission module or OCR recognition, it needs to be input into the data acquisition interface of the cloud server. Through the operation of the data acquisition interface program, the image data or simulation data is converted into specific flow data, and the flow data can be transmitted between user terminals.
[0086] Figure 3 is the architecture diagram of the data acquisition interface program provided in this embodiment, such as Figure 3 As shown in the figure, a system service program is developed based on NET7.0 and runs on a cloud server that is a Windows Server system. The program architecture includes a communication interface layer, a packet parsing layer, a data execution layer, and a recording layer.
[0087] The communication interface layer is responsible for establishing a TCPServer instance, listening to TCP connection requests on the specified port, and receiving the numerical packets of the water flow meter, converting them into character arrays and transmitting them to the parsing layer. The communication interface layer contains a request connection pool, which can receive requests from multiple addresses in parallel. The packet parsing layer decomposes the received character array into three parts: identification bit, numerical bit and check bit, and determines whether the identification bit conforms to the established rules. If it does not conform to the rules, it will return an error code to the communication interface layer. Otherwise, it will convert the numerical bit according to the rule sequence, and then package the rule sequence number and the converted numerical value and transmit it to the data execution layer. The data execution layer constructs a database insert SQL command based on the rule sequence number and the converted numerical value, connects to the database and executes the insert command. The recording layer counts the number of TCP connections, the number of database commands executed, and the insert command in real time, writes to the log file, and monitors the activation status of the system service, the database connection status and the status of each thread. Finally, the cumulative flow data and the flow data within the preset time period are output.
[0088] 105. Record the cumulative flow data and the flow data within the preset time period, and generate statistical charts.
[0089] The automatic record archiving program is developed based on MySQL 8.0 database and built on the cloud server. The database service includes two layers of scheduled transactions. It automatically constructs a virtual table to query and summarize the data of each flow meter at the hour of each hour. If there is no data record at the hour, it will be replaced by the record with the shortest time difference between the scanned data and the moment within one minute. If there is no record of the flow table within one minute, it will be filled with a null value. This transaction can meet the user's needs for recording the flow value at the hour. In addition, the database will automatically calculate the cumulative flow value and the interpolation value of the previous day at the specified time every day as daily flow statistics, and the monthly, quarterly and other flows are similar, so that users can automatically generate statistical charts.
[0090] 106. Send the accumulated flow data, the flow data within a preset time period, and statistical charts to the user terminal.
[0091] The web program developed based on the JakartaEE framework runs on the Tomcat10.1 system service and can execute user submitted requests, including user login verification requests, real-time data viewing requests, historical query requests, report download requests, etc. The user interface is developed based on HTML5, including PC and mobile interfaces. Users can access the specified address through the browser on the PC side and perform related operations. On the Android side, you can install the APP to access related pages. Login verification is required before access to ensure data security.
[0092] Therefore, it is possible to view the water flow meter value remotely, conveniently and in real time, and it can also be pushed to the user terminal at regular intervals, including statistical charts, so that users can have a comprehensive understanding of the water usage situation.
[0093] Compared with manual meter reading, the water flow intelligent monitoring method of this embodiment reduces the workload of personnel, increases the timeliness of water flow monitoring, saves costs, and users can view it anytime and anywhere, which improves convenience.
[0094] Furthermore, based on the above embodiments, the present embodiment also includes: obtaining the geographical location, water supply network structure and water use type attributes of all water flow meters to be queried, and using the K-means clustering algorithm to group all water flow meters to be queried to obtain water flow groups; obtaining the water flow data of each water flow group in real time, calculating the real-time total water consumption of each water flow group, and comparing the real-time total water consumption with a preset threshold to determine whether it exceeds the preset range; if it exceeds the preset range, triggering an early warning mechanism, using association rule mining and time series pattern analysis to determine the cause of the abnormality, and according to a preset water flow balance model, determining the target water flow group and the adjusted water volume that need to be adjusted, wherein the water flow balance model is constructed based on the water supply network structure and the supply and demand relationship between water flow groups.
[0095] Specifically, define each flow meter to be queried as corresponding to a monitoring point, obtain the geographical location coordinates of all water flow meters to be queried, the topological relationship of the water supply network structure to which they belong, and the corresponding water use type attribute label; according to the geographical location coordinates, use spatial clustering to divide the water flow monitoring points into several spatial areas, and the monitoring points in each spatial area are clustered and distributed in space; for each spatial area, count the distribution of the water supply network structure topological relationship and water use type attribute label of the monitoring points in the area; merge the spatial areas according to the distribution of the water supply network structure topological relationship and water use type attribute label to obtain different water flow groups. Dividing different monitoring points into different groups facilitates subsequent overall monitoring, and the internal monitoring points of the same water flow group have high attribute similarity, and the attributes between water flow groups are greatly different.
[0096] After dividing different water flow groups, the historical water consumption data of each water flow group is obtained, and the historical water consumption data is preprocessed to obtain a standardized historical water consumption data set; based on the historical water consumption data set, the water consumption threshold of each water flow group is calculated using a statistical analysis method; a time series analysis is performed on the standardized historical water consumption data set to obtain a water consumption time series model for each water flow group; based on the water consumption time series model, the normal water consumption fluctuation range of each water flow group within a preset time period is predicted; for each water flow group, features are extracted from multiple dimensions such as water consumption, water consumption time distribution, and water consumption frequency, and judgment conditions for abnormal water consumption are formed through feature combination; the water consumption threshold of each group, the normal water consumption fluctuation range, and the judgment conditions for abnormal water consumption are used as monitoring rules and stored in the group monitoring rule library; when the water consumption data of any group is monitored in real time, the corresponding monitoring rules are retrieved from the group monitoring rule library to determine whether the current water consumption data meets the monitoring rules; if the monitoring rules are met, an early warning is triggered, and an optimized scheduling strategy is adopted in combination with the characteristics of water demand, and the group monitoring rule library is improved.
[0097] Through the monitoring and management of water flow groups, different water supply strategies can be formulated based on different water use characteristics, thereby ensuring water supply efficiency and improving the rationality of water supply management. At the same time, it can also avoid water leakage and water theft. In addition, the monitoring rules are updated in real time to ensure the rationality of water flow monitoring.
[0098] Among them, according to the preset water flow balance model, the target water flow group and the adjusted water volume that need to be adjusted are determined, including: obtaining the water demand data of each water flow group as the constraint condition of the genetic algorithm; using the genetic algorithm to search for the optimal water diversion plan, and taking the water diversion volume, energy consumption and water pressure indicators as the optimization targets of the fitness function; according to the score of the fitness function, the optimal water diversion plan that meets the water demand of the water flow group and the dynamic balance of the overall water system flow is screened out; the water diversion volume and water pressure parameters in the optimal water diversion plan are used as control instructions and passed to the water pump and valve actuators; the real-time monitoring parameters of water flow and water pressure are obtained to determine whether the actual water allocation meets the optimal water diversion plan; if the deviation between the actual water allocation and the optimal water diversion plan exceeds the preset threshold, the genetic algorithm is triggered to re-search the optimal plan; according to the dynamic changes in the water demand of the water flow group, the genetic algorithm is periodically run to continuously optimize the water diversion plan.
[0099] By continuously optimizing the water diversion plan through the legacy algorithm, we can save water while ensuring efficient water scheduling and rational water use, avoiding the situation where there is no water available or water is not used up. Through more reasonable scheduling and control, combined with intelligent monitoring of water flow, it is ensured that the water needs of different users are met to the maximum extent.
[0100] Further, on the basis of the above-mentioned embodiment, it also includes obtaining the water volume allocation target of the water flow group in the optimal water diversion scheme and the current actual water consumption data of each water flow group; calculating the difference between the actual water consumption and the target allocated water volume to obtain the water volume that needs to be adjusted for each water flow group; according to the water volume that needs to be adjusted, combined with the preset pipe network topology and valve position information, determining the valve that needs to be adjusted and the corresponding adjustment amplitude; controlling the valve that needs to be adjusted to perform opening adjustment, and obtaining the pump station outlet pressure change data; if the pump station outlet pressure change data exceeds the preset pressure threshold range, the pump station pressure adjustment value is calculated by the PID control algorithm, and the pump station is controlled to adjust the pressure according to the pressure adjustment value until the pump station outlet pressure change data is within the preset pressure threshold range; in the valve and pump station adjustment process, the real-time water consumption data of each water flow group is continuously collected, the difference between the real-time water consumption data and the target allocated water volume is calculated, and the valve adjustment state is dynamically optimized and controlled according to the difference until the difference is less than the preset water volume threshold; the actual water consumption of each water flow group, the valve adjustment state and the pump station energy consumption data during the water diversion process are recorded.
[0101] By carrying out specific water diversion operations, it is ensured that the actual water consumption of each water flow group meets the basic demand, and the control of the pump station can also be rationalized.
[0102] Based on the same general inventive concept, the present invention also protects an intelligent water flow monitoring device. The intelligent water flow monitoring device provided by the present invention is described below. The intelligent water flow monitoring device described below and the intelligent water flow monitoring method described above can be referenced to each other.
[0103] Figure 4 It is a structural schematic diagram of the water flow intelligent monitoring device provided in this embodiment.
[0104] like Figure 4 As shown, this embodiment provides a water flow intelligent monitoring device, including:
[0105] The receiving module 401 is used to receive a user query instruction and determine the attribute information of the water flow meter to be queried based on the query instruction;
[0106] The query module 402 is used to read the value of the water flow meter through the wireless transmission module when the attribute information indicates that the water flow meter to be queried allows an external module to be connected; when the attribute information indicates that the water flow meter to be queried does not allow an external module to be connected, obtain the value of the water flow meter through an automatic meter reading device based on OCR recognition;
[0107] The output module 403 is used to transmit the numerical value of the water flow meter to the communication interface layer, the packet analysis layer, the data execution layer and the recording layer of the cloud server in sequence, and output the accumulated flow data and the flow data within a preset time period, where the preset time period is the time period carried in the user query instruction;
[0108] The recording module 404 is used to record the accumulated flow data and the flow data within a preset period of time and generate statistical charts;
[0109] The sending module 405 is used to send the accumulated flow data, the flow data within a preset time period and the statistical chart to the user terminal.
[0110] Figure 5 It is a schematic diagram of the structure of the electronic device provided in this embodiment.
[0111] like Figure 5As shown, the electronic device may include: a processor (processor) 510, a communication interface (Communications Interface) 520, a memory (memory) 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logic instructions in the memory 530 to execute the water flow intelligent monitoring method, which includes: receiving a user query instruction, and determining the attribute information of the water flow meter to be queried based on the query instruction; when the attribute information indicates that the water flow meter to be queried allows an external module, reading the value of the water flow meter through a wireless transmission module; when the attribute information indicates that the water flow meter to be queried does not allow an external module, obtaining the value of the water flow meter through an automatic meter reading device based on OCR recognition; transmitting the value of the water flow meter to the communication interface layer, packet parsing layer, data execution layer and recording layer of the cloud server in sequence, and outputting the cumulative flow data and the flow data within a preset time period, wherein the preset time period is the time period carried in the user query instruction; recording the cumulative flow data and the flow data within the preset time period, and generating statistical charts; sending the cumulative flow data, the flow data within the preset time period and the statistical charts to the user terminal.
[0112] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0113] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the water flow intelligent monitoring method provided by the above methods, which includes: receiving a user query instruction, and determining the attribute information of the water flow meter to be queried based on the query instruction; when the attribute information indicates that the water flow meter to be queried allows an external module, reading the value of the water flow meter through a wireless transmission module; when the attribute information indicates that the water flow meter to be queried does not allow an external module, obtaining the value of the water flow meter through an automatic meter reading device based on OCR recognition; transmitting the value of the water flow meter to the communication interface layer, packet parsing layer, data execution layer and recording layer of the cloud server in sequence, and outputting the cumulative flow data and the flow data within a preset time period, wherein the preset time period is the time period carried in the user query instruction; recording the cumulative flow data and the flow data within the preset time period, and generating statistical charts; sending the cumulative flow data, the flow data within the preset time period and the statistical charts to the user terminal.
[0114] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the water flow intelligent monitoring method provided by the above-mentioned methods, the method comprising: receiving a user query instruction, and determining the attribute information of the water flow meter to be queried based on the query instruction; when the attribute information indicates that the water flow meter to be queried allows an external module, reading the value of the water flow meter through a wireless transmission module; when the attribute information indicates that the water flow meter to be queried does not allow an external module, obtaining the value of the water flow meter through an automatic meter reading device based on OCR recognition; transmitting the value of the water flow meter to the communication interface layer, packet parsing layer, data execution layer and recording layer of the cloud server in sequence, and outputting the cumulative flow data and the flow data within a preset time period, wherein the preset time period is the time period carried in the user query instruction; recording the cumulative flow data and the flow data within the preset time period, and generating statistical charts; sending the cumulative flow data, the flow data within the preset time period and the statistical charts to the user terminal.
[0115] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0116] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A water flow intelligent monitoring method, characterized in that: include: Receive a user query instruction, and determine the attribute information of the water flow meter to be queried based on the query instruction; When the attribute information indicates that the water flow meter to be queried allows an external module, reading the value of the water flow meter through the wireless transmission module; When the attribute information indicates that the water flow meter to be queried does not allow an external module, obtaining the value of the water flow meter through an automatic meter reading device based on OCR recognition; The numerical value of the water flow meter is transmitted to the communication interface layer, the packet analysis layer, the data execution layer and the recording layer of the cloud server in sequence, and the accumulated flow data and the flow data within a preset time period are output, and the preset time period is the time period carried in the user query instruction; Record the accumulated flow data and the flow data within a preset period of time, and generate statistical charts; The accumulated flow data, the flow data within the preset time period and the statistical chart are sent to a user terminal.
2. The water flow intelligent monitoring method according to claim 1 is characterized in that: The method of obtaining the value of the water flow meter by using an automatic meter reading device based on OCR recognition includes: Collecting the front image of the water flow meter by using a camera; The character library training model is called by utilizing OCR digital recognition, the front image is input into the character library training model, and the numerical value of the water flow meter is output.
3. The water flow intelligent monitoring method according to claim 1 is characterized in that: The output of the accumulated flow data and the flow data within a preset period includes: The communication interface layer is used to receive the numerical value of the water flow meter and convert it into a character array; The packet parsing layer is used to decompose the character array into identification bits, value bits and check bits, and determine whether the identification bits comply with preset rules. If not, an error code is returned to the communication interface layer. If yes, the value bits are converted into a number system according to the rule sequence, and the rule sequence number and the converted value are packaged and transmitted to the data execution layer. The data execution layer is used to construct a database insert SQL command according to the rule sequence number and the converted value, connect to the database and execute the insert command; The recording layer is used to count the insert commands, write them into a log file, and output the accumulated flow data and the flow data within a preset time period.
4. The water flow intelligent monitoring method according to any one of claims 1 to 3, characterized in that: Also includes: Obtaining the geographical location, water supply network structure and water use type attributes of all water flow meters to be queried, and grouping all the water flow meters to be queried using a K-means clustering algorithm to obtain water flow groups; Acquire water flow data of each water flow group in real time, calculate the real-time total water consumption of each water flow group, compare the real-time total water consumption with a preset threshold value, and determine whether it exceeds a preset range; If it exceeds the preset range, the early warning mechanism is triggered, and the cause of the abnormality is determined by association rule mining and time series pattern analysis. According to the preset water flow balance model, the target water flow group and the adjusted water volume that need to be adjusted are determined, wherein the water flow balance model is constructed based on the water supply network structure and the supply and demand relationship between the water flow groups.
5. The water flow intelligent monitoring method according to claim 4 is characterized in that: The geographical location, water supply network structure and water use type attributes of all water flow meters to be queried are obtained, and the K-means clustering algorithm is used to group all the water flow meters to be queried to obtain water flow groups, including: Obtain the geographical coordinates of all water flow meters to be queried, the topological relationship of the water supply network structure to which they belong, and the corresponding water use type attribute labels; According to the geographic location coordinates, the water flow monitoring points are divided into a number of spatial regions by using spatial clustering, and the monitoring points in each of the spatial regions are spatially clustered and distributed; For each of the spatial regions, statistics are collected on the topological relationship of the water supply network structure and the distribution of water use type attribute labels of the monitoring points in the region; The spatial regions are merged according to the topological relationship of the water supply network structure and the distribution of water use type attribute labels to obtain different water flow groups.
6. The water flow intelligent monitoring method according to claim 5, characterized in that: Also includes: Acquire historical water use data of each of the water flow groups, and pre-process the historical water use data to obtain a standardized historical water use data set; Calculating the water consumption threshold of each water flow group using a statistical analysis method according to the historical water consumption data set; Performing time series analysis on the standardized historical water consumption data set to obtain a water consumption time series model for each water flow group; According to the water consumption time series model, predict the normal water consumption fluctuation range of each water flow group within a preset time period; For each water flow group, features are extracted from multiple dimensions, including water consumption, water use time distribution, and water use frequency, and the judgment conditions for abnormal water use are formed through feature combination; The water consumption threshold value, the normal water consumption fluctuation range and the abnormal water consumption judgment condition of each group are used as monitoring rules and stored in a group monitoring rule library; When the water consumption data of any group is monitored in real time, the corresponding monitoring rules are retrieved from the group monitoring rule library to determine whether the current water consumption data meets the monitoring rules; If the monitoring rules are met, an early warning is triggered, and an optimized scheduling strategy is adopted in combination with the characteristics of water demand, and the group monitoring rule library is improved.
7. The water flow intelligent monitoring method according to claim 4, characterized in that: The step of determining the target water flow group and the adjusted water volume to be adjusted according to the preset water flow balance model includes: Obtain water demand data of each water flow group as constraints for the genetic algorithm; The genetic algorithm is used to search for the optimal water diversion scheme, and the water diversion volume, energy consumption and water pressure indicators are used as optimization targets of the fitness function; According to the score of the fitness function, an optimal water diversion scheme is selected that meets the water demand of the water flow group and has a dynamic balance of the overall water system flow; The water transfer volume and water pressure parameters in the optimal water transfer scheme are used as control instructions and transmitted to the water pump and valve actuator; Obtaining real-time monitoring parameters of water flow and water pressure to determine whether the actual water allocation complies with the optimal water allocation plan; If the deviation between the actual water allocation and the optimal water allocation scheme exceeds a preset threshold, the genetic algorithm is triggered to search for the optimal scheme again; According to the dynamic changes in water demand of the water flow group, the genetic algorithm is run periodically to continuously optimize the water transfer plan.
8. The water flow intelligent monitoring method according to claim 7, characterized in that: Also includes: Obtain the water allocation target of the water flow group in the optimal water diversion plan and the current actual water consumption data of each water flow group; Calculate the difference between the actual water consumption and the target water allocation to obtain the water volume that needs to be adjusted for each water flow group; According to the water volume to be adjusted, combined with the preset pipe network topology and valve position information, determine the valve to be adjusted and the corresponding adjustment range; Control the valve to be adjusted to perform opening adjustment and obtain the pressure change data of the pump station outlet; If the pressure change data at the pump station outlet exceeds the preset pressure threshold range, the pump station pressure adjustment value is calculated by the PID control algorithm, and the pump station is controlled to adjust the pressure according to the pressure adjustment value until the pressure change data at the pump station outlet is within the preset pressure threshold range; During the valve and pump station adjustment process, the real-time water consumption data of each water flow group is continuously collected, the difference between the real-time water consumption data and the target water distribution volume is calculated, and the valve adjustment state is dynamically optimized and controlled according to the difference until the difference is less than the preset water volume threshold; Record the actual water consumption, valve adjustment status and pump station energy consumption data of each water flow group during the water transfer process.
9. A water flow intelligent monitoring device, characterized in that: include: A receiving module, used for receiving a user query instruction and determining the attribute information of the water flow meter to be queried based on the query instruction; A query module, configured to read the value of the water flow meter through a wireless transmission module when the attribute information indicates that the water flow meter to be queried allows an external module to be connected; and to obtain the value of the water flow meter through an automatic meter reading device based on OCR recognition when the attribute information indicates that the water flow meter to be queried does not allow an external module to be connected; An output module, used to transmit the numerical value of the water flow meter to the communication interface layer, packet parsing layer, data execution layer and recording layer of the cloud server in sequence, and output the accumulated flow data and the flow data within a preset time period, wherein the preset time period is the time period carried in the user query instruction; A recording module, used to record the accumulated flow data and the flow data within a preset time period, and generate statistical charts; The sending module is used to send the accumulated flow data, the flow data within the preset time period and the statistical chart to the user terminal.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the water flow intelligent monitoring method as described in any one of claims 1 to 8 is implemented.