A water conservancy project real-time monitoring method and system based on the Internet of Things
By applying the isolated forest algorithm to identify abnormal nodes and construct the optimal transmission path in the water conservancy project monitoring system, the problem of interference with sensor signals during transmission was solved, and the stability and accuracy of data transmission were improved.
Patent Information
- Application Number
- CN202510518711.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2045-04-24
AI Technical Summary
In water conservancy project monitoring systems, sensor signals are susceptible to interference from terrain, climate, and electromagnetic interference during transmission, leading to unstable data transmission.
An IoT-based real-time monitoring method is adopted, which uses the isolated forest algorithm to identify abnormal nodes and constructs the optimal data transmission path, using stable nodes to transmit the monitoring information of abnormal nodes.
It improves the stability and accuracy of data transmission in the water conservancy project monitoring system, reduces latency and packet loss rate, and enhances the integrity of monitoring information.
Smart Images

Figure CN120499206B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of water conservancy informatization, in particular to a water conservancy project real-time monitoring method and system based on Internet of Things. BACKGROUND
[0002] As important infrastructure for regulating water flow, flood control and drought resistance, irrigation and power generation, the safety and stability of water conservancy projects are directly related to the safety of people's life and property and the health of the ecological environment; therefore, building an efficient and accurate monitoring system is a key link to ensure the safe operation of water conservancy projects.
[0003] At present, the monitoring of water conservancy projects is based on a fixed sensor network, which includes multiple sensor nodes. The sensor nodes are used to receive and store sensor data in the jurisdictional area, and then transmit the sorted monitoring data to the central processing system, so that the central processing system can analyze the abnormality of the health state of the project structure, thereby discovering potential safety hazards in time and issuing warning signals, and then actively preventing and improving the safety management level of water conservancy projects.
[0004] However, due to the complex environment of water conservancy projects, various types of sensor signals are easily affected by terrain, climate and electromagnetic interference during transmission, resulting in unstable data transmission.
[0005] Therefore, there is an urgent need for a high-stability water conservancy project real-time monitoring method and system. SUMMARY
[0006] In view of the unstable transmission of various types of sensor signals during transmission, the application provides a water conservancy project real-time monitoring method and system based on Internet of Things.
[0007] In a first aspect, the application provides a water conservancy project real-time monitoring method based on Internet of Things, applied to a water conservancy project monitoring system, the method comprising:
[0008] Obtaining a sensor network of a water conservancy project, the sensor network comprising monitoring information of multiple sensor nodes;
[0009] Abnormality analysis of the monitoring information of the multiple sensor nodes to determine abnormal nodes;
[0010] Querying the node state of the multiple sensor nodes to determine multiple stable nodes, the node state comprising multiple state information, the multiple state information comprising load, delay time and packet loss rate;
[0011] According to the node state of the abnormal node and the node state of a plurality of stable nodes, a data transmission path of the abnormal node is configured, so that the monitoring information of the abnormal node is transmitted to the water conservancy project monitoring system according to the data transmission path.
[0012] Optionally, the monitoring information of a plurality of sensing nodes is analyzed to determine an abnormal node, specifically including:
[0013] Obtain historical monitoring information of the first sensing node, the first sensing node being any one of a plurality of sensing nodes;
[0014] The historical monitoring information of the first sensing node is dynamically sampled to obtain a training data set;
[0015] Based on the training data set, a monitoring information isolation forest model is constructed;
[0016] The current monitoring information of the first sensing node is input into the monitoring information isolation forest model to obtain an abnormal score of the first sensing node, the current monitoring information of the first sensing node including data points corresponding to a plurality of monitoring data types;
[0017] If the abnormal score is greater than or equal to an abnormal score threshold, the first sensing node is determined to be an abnormal node.
[0018] Optionally, the current monitoring information of the first sensing node is input into the monitoring information isolation forest model to obtain the abnormal score of the first sensing node, specifically including:
[0019]
[0020] Optionally, wherein, is the abnormal score of the first sensing node, is the average tree height of the data point corresponding to the i-th monitoring data type of the first sensing node in the monitoring information isolation forest model, is a normalization factor determined by the number N of data points of the i-th data type, W(i) is a monitoring data time decay coefficient of the i-th monitoring data type of the first sensing node, and n is the total number of monitoring data types governed by the first sensing node.
[0021] Optionally, the historical monitoring information of the first sensing node is dynamically sampled to obtain a training data set, specifically including:
[0022] Obtain the regional attribute of the region governed by the first sensing node;
[0023] According to the regional attribute, the monitoring information of the first sensing node is divided into key monitoring information and non-key monitoring information;
[0024] calculating a data amount ratio of a total amount of data of the key monitoring information to a total amount of data of the non-key monitoring information;
[0025] determining a sampling ratio of the key monitoring information to the non-key monitoring information according to the data amount ratio;
[0026] sampling the monitoring information of the first sensing node according to the sampling ratio to obtain the training data set.
[0027] Optionally, the non-key monitoring information includes monitoring data of multiple non-key monitoring information types, and the sampling the monitoring information of the first sensing node according to the sampling ratio to obtain the training data set further includes:
[0028] dividing the multiple non-key monitoring information types into multiple functional combinations according to functional attributes of the multiple non-key monitoring information types;
[0029] selecting monitoring data corresponding to any one non-key monitoring information type in each functional combination as a sampling database of the non-key monitoring information.
[0030] Optionally, the sampling the historical monitoring information of the first sensing node to obtain the training data set further includes:
[0031] obtaining historical environmental monitoring data in a preset time period in a region governed by the first sensing node;
[0032] reading an abnormal time point of the historical environmental monitoring data;
[0033] dividing the preset time period into a first time period and a second time period according to the abnormal time point;
[0034] determining a sampling ratio of the historical monitoring information in the preset time period according to a time span of the first time period and a time span of the second time period;
[0035] sampling the historical monitoring information based on the sampling ratio to obtain the training data set.
[0036] Optionally, the querying node states of the multiple sensing nodes to determine multiple stable nodes specifically includes:
[0037] matching and comparing multiple state information of a second sensing node with a preset state information threshold table, the second sensing node being any one of the multiple sensing nodes, and the preset state information threshold table storing a relationship between state information and a state information threshold;
[0038] When the load amount of the second sensing node is less than the preset load amount threshold, the delay time is less than the delay time threshold, and the packet loss rate is less than the packet loss rate threshold, it is determined that the second sensing node is a stable node.
[0039] Optionally, the data transmission path of the abnormal node is configured according to the node state of the abnormal node and the node state of a plurality of stable nodes, specifically:
[0040] The abnormal node, a plurality of stable nodes, and the water conservancy project monitoring system are jointly constructed as a data transmission topology network;
[0041] Taking the abnormal node as a starting point and the water conservancy project monitoring system as a terminal, the data transmission topology network is traversed to obtain a plurality of available transmission paths;
[0042] The path state of the plurality of available transmission paths is calculated, and the path state includes a load amount average, a delay time average, and a packet loss rate average;
[0043] According to the path length and the number of nodes of the plurality of available transmission paths, the path state weight of the plurality of available transmission paths is calculated, and the path state weight includes a load amount average weight, a delay time average weight, and a packet loss rate average weight;
[0044] According to the path state and the path state weight of the plurality of available transmission paths, the transmission performance score of the plurality of available transmission paths is calculated;
[0045] From the transmission performance scores of the plurality of available transmission paths, the available transmission path with the highest transmission performance score is selected as the data transmission path of the abnormal node.
[0046] Optionally, the path state weight of the plurality of available transmission paths is calculated according to the path length and the number of nodes of the plurality of available transmission paths, specifically:
[0047]
[0048]
[0049]
[0050] wherein, , , are a load amount average weight, a delay time average weight, and a packet loss rate average weight, respectively, is a path length, and N is a number of nodes.
[0051] In a second aspect, the application provides a water conservancy project real-time monitoring system based on the Internet of Things. The system is a water conservancy project monitoring system. The system comprises an acquisition module, a processing module and a sending module. The acquisition module is configured to acquire a sensor network of a water conservancy project. The sensor network comprises monitoring information of a plurality of sensor nodes.
[0052] The acquisition module is configured to acquire a sensor network of a water conservancy project. The sensor network comprises monitoring information of a plurality of sensor nodes.
[0053] The processing module is configured to perform abnormality analysis on the monitoring information of the plurality of sensor nodes to determine an abnormal node, and to query node states of the plurality of sensor nodes to determine a plurality of stable nodes. The node states comprise a plurality of state information. The plurality of state information comprises a load amount, a delay time and a packet loss rate.
[0054] The sending module is configured to configure a data transmission path of the abnormal node according to the node state of the abnormal node and the node states of the plurality of stable nodes, so that the monitoring information of the abnormal node is transmitted to the water conservancy project monitoring system according to the data transmission path.
[0055] In a third aspect, the application provides an electronic device. The electronic device comprises a processor, a memory, a user interface and a network interface. The memory is configured to store instructions. The user interface and the network interface are configured to communicate with other devices. The processor is configured to execute the instructions stored in the memory, so that the electronic device performs the method according to any one of the first aspect.
[0056] In a fourth aspect, the application provides a computer-readable storage medium. The computer-readable storage medium stores instructions. When the instructions are executed, the method according to any one of the first aspect is performed.
[0057] In summary, the one or more technical solutions provided in the embodiments of the application have at least the following technical effects or advantages:
[0058] The application determines whether there is an abnormal node in the water conservancy project through the abnormal analysis of the monitoring information of the plurality of sensing nodes in the sensing network of the water conservancy project. The abnormal node can be understood as a sensing node that is interfered by terrain, climate, electromagnetic and the like in the process of transmitting monitoring information to the water conservancy project monitoring system, resulting in incomplete data or high delay of the sensing node. In the process of abnormal analysis, in order to ensure accuracy, the isolated forest algorithm is combined with the time interval of occurrence of node abnormal monitoring information. With the continuous updating of the isolated forest model, the time interval of occurrence of abnormal monitoring information will be shorter and shorter, and the confidence of abnormal monitoring information will be higher and higher, so that the abnormal node can be more accurately identified. When there is an abnormal node, the node state of the plurality of sensing nodes is queried, and the optimal data transmission path (data transmission path with low load, short delay time and low packet loss rate) is calculated according to the node state of the plurality of sensing nodes. At this time, when the abnormal node receives the monitoring information uploaded by the sensor, the monitoring information is sent to the water conservancy project monitoring system according to the optimal data transmission path, so as to improve the stability of data transmission. BRIEF DESCRIPTION OF DRAWINGS
[0059] Figure 1 FIG. 1 is a flow diagram of a water conservancy project real-time monitoring method based on the Internet of Things provided by an embodiment of the application.
[0060] Figure 2 FIG. 2 is a structural diagram of a water conservancy project real-time monitoring system based on the Internet of Things provided by an embodiment of the application.
[0061] Figure 3 FIG. 3 is a structural diagram of an electronic device provided by an embodiment of the application.
[0062] FIG. 4 is a structural diagram of an electronic device provided by an embodiment of the application. DETAILED DESCRIPTION
[0063] In order for those skilled in the art to better understand the technical solutions in the specification, the technical solutions in the specification will be described clearly and completely in conjunction with the drawings in the embodiments of the specification. Obviously, the described embodiments are only some of the embodiments of the application, not all.
[0064] In the description of the embodiments of the present application, the words "for example" or "such as" are used to represent an example, an illustration, or an exposition. Any embodiment or design scheme described as "for example" or "such as" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words "for example" or "such as" are used in the specific manner to present the relevant concept.
[0065] In the description of the embodiments of the present application, the term "a plurality of" means two or more. For example, a plurality of systems means two or more systems, and a plurality of screen terminals means two or more screen terminals. In addition, the terms "first" and "second" are used only for the purpose of description, and should not be interpreted as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features. The terms "include", "contain", "have" and their variants mean "include but are not limited to", unless otherwise specifically emphasized.
[0066] At present, the environment of water conservancy projects is complex, and most of them are large projects, which leads to the need for long transmission distance for monitoring data to be transmitted to the central processing system. Long distance transmission generally uses wireless transmission. If the wireless transmission path is complex or encounters thunderstorm weather, etc., various types of sensing signals are easily disturbed in the transmission process, resulting in high delay time and packet loss rate of data transmission.
[0067] In order to solve the above problems, the present application provides a real-time monitoring method for water conservancy projects based on Internet of Things, which is applied to a water conservancy project monitoring system, as shown in the figure, the method comprises steps S101 to S104, and the steps are as follows: Figure 1
[0068] S101, acquiring the sensing network of the water conservancy project, the sensing network comprising monitoring information of a plurality of sensing nodes.
[0069] In the above steps, the sensor network of the water conservancy project can be understood as an Internet of Things network, and data transmission can be performed between multiple sensor nodes, and the data transmission mode adopts Internet of Things protocols such as LoRa and NB-IoT, so as to ensure the data transmission efficiency. In addition, the water conservancy project monitoring system can be understood as a cloud platform for decision-making and analysis, which can not only coordinate the control strategies of multiple sensor nodes in the sensor network, but also predict faults of the monitored object and optimize parameters of the monitoring equipment according to the monitoring information uploaded by multiple sensor nodes, thereby improving the safety management level of the water conservancy project. The monitoring information of multiple sensor nodes is determined by the monitoring tasks in the jurisdictional area of each sensor node. For example, the monitoring tasks of the reservoir include water level data monitoring and biological index monitoring. The water level task monitoring needs to monitor the water level height, the inflow / outflow flow rate, and the instantaneous flow rate of the spillway, and the biological index monitoring needs to monitor the algae density and the distribution area of the coliform group.
[0070] S102, performing anomaly analysis on the monitoring information of the multiple sensor nodes to determine an abnormal node.
[0071] In the above steps, when the sensor nodes send the collected monitoring information to the water conservancy project monitoring system, the data volume is large and the abnormal data points are unevenly distributed, which causes the abnormal data points to be submerged by normal data points in the process of statistical analysis and determination of abnormal data points, thereby causing inaccurate judgment of abnormal nodes. Therefore, the isolated forest algorithm is used to solve the problem that the abnormal data points are not obvious due to large data volume, and the time interval of multiple abnormal data points is combined to solve the problem that the abnormal data points are easily ignored due to uneven distribution of abnormal data points, so as to improve the identification accuracy of abnormal nodes. Specifically:
[0072] Taking the first sensor node as an example, the first sensor node is any one of the multiple sensor nodes in the sensor network. First, the historical monitoring information of the first sensor node is obtained, the historical monitoring information is the monitoring information from a preset historical time point to a current time point, and the monitoring information within 1 hour is preferably selected. The monitoring information includes multiple types of monitoring data, such as water level height, inflow / outflow flow rate, and instantaneous flow rate of the spillway.
[0073] At this time, the historical monitoring information is taken as a training data set of the isolation forest algorithm, and then the isolation forest algorithm is executed according to a preset maximum number of trees, a maximum tree depth and a random seed, so as to cut the data in the training data set and obtain a plurality of isolated trees corresponding to each of a plurality of monitoring data types. For example, the training data set contains a data set of water level height and a data set of spillway instantaneous flow. At this time, the isolation tree cutting algorithm (random seed) is executed on the data set of water level height and the data set of spillway instantaneous flow respectively, so as to obtain a plurality of isolated trees corresponding to the data set of water level height and a plurality of isolated trees corresponding to the data set of spillway instantaneous flow. It should be noted that the random seed is randomly cut when cutting the data set, so that a single isolated tree cannot highlight the abnormal sample points. Therefore, a plurality of isolated trees need to be generated, and then the path distribution of the sample points in the plurality of isolated trees is observed. The sample points with short paths and similar path lengths in the plurality of isolated trees are abnormal sample points. Then, the plurality of isolated trees corresponding to each of the plurality of monitoring data types are constructed into a monitoring information isolation forest model. The isolation forest algorithm is a conventional technical means for those skilled in the art, and the specific execution mode will not be described in detail here.
[0074] After obtaining the monitoring information isolation forest model, the current monitoring information of the first sensing node is input into the monitoring information isolation forest model to determine the path length distribution of the monitoring data points corresponding to a plurality of monitoring data types of the first sensing node in the monitoring information isolation forest model. For example, if the first sensing node contains the monitoring data type of water level height, the monitoring information isolation forest model contains a plurality of isolated trees about the water level height. After the current water level height data is input into the monitoring information isolation forest model, the plurality of isolated trees corresponding to the matching value of the current water level height data are matched. Then, the root nodes of the plurality of isolated trees are taken as starting points, and the leaf nodes of the current water level height data are taken as ending points. The plurality of isolated trees are traversed to obtain the tree height (path length) of the current water level height data in the plurality of corresponding isolated trees.
[0075] Then, the abnormal score of the first sensing node is calculated according to the isolation forest data point abnormal score algorithm. Specifically, the abnormal score of the first sensing node is calculated according to the following formula:
[0076]
[0077] wherein, wherein, is the abnormal score of the first sensing node, is the average tree height of the data point corresponding to the i-th monitoring data type of the first sensing node in the monitoring information isolation forest model, is a normalization factor determined by the number N of data points of the i-th data type, and n is the total number of monitoring data types governed by the first sensing node.
[0078] In the above formula, It can be understood that the basic isolation score of the i-th monitoring data type corresponding to the data point is calculated by the isolated forest data point anomaly score algorithm, and in the expression, if the current monitoring data point is an abnormal data point, it will be easily isolated due to deviating from the mainstream distribution, thereby causing the tree height mean of the monitoring data point in the monitoring information isolated forest model will be smaller; in addition, in order to eliminate the influence of sample size on path length, a normalization factor determined by the number N of data points of the i-th data type is also introduced, and its expression is: Finally, in order to highlight the abnormal data points, the tree height mean and the normalization factor are uniformly integrated in the form of an exponential function, at this time, the small change of the path length of the abnormal monitoring data point will cause the abnormal score to fluctuate significantly, so that the abnormal score is more easily found.
[0079] But relying only on the isolated forest data point anomaly score algorithm to judge the abnormality of the current monitoring data point has a chance, that is, in a period of time, the proportion of normal data points is 99.9%, and the proportion of abnormal data points is only 0.1%, at this time, it does not mean that the sensor node is abnormal; therefore, in order to reduce the occurrence of chance, the time interval of the occurrence of the abnormal monitoring data point is combined to obtain a new abnormal score calculation method, which is as follows:
[0080]
[0081]
[0082] wherein, is the decay coefficient of the i-th monitoring data type of the first sensor node, is the current time point, is the nearest abnormal time point to the current time point, and W(i) is the monitoring data time decay coefficient of the i-th monitoring data type of the first sensor node.
[0083] In the expression, with the continuous updating of the monitoring information isolated forest model, if the first sensor node is abnormal, the time interval between the two abnormal monitoring data points in the monitoring data stream transmitted by the first sensor node will become closer and closer, thereby causing the abnormal score of the first sensor node to continuously increase, and when the abnormal score threshold is reached, the first sensor node can be determined to be an abnormal node. In this process, the chance of judging a single monitoring data point is avoided, and the distribution of abnormal monitoring data points in the entire data stream is also considered, so as to improve the accuracy of the abnormal score algorithm of the first sensor node. It should be noted that the decay coefficient of the i-th monitoring data type of the first sensor node needs to be customized for each monitoring data type because different types of monitoring data have different physical characteristics and abnormal propagation speeds, so as to improve the confidence of the abnormal score of the monitoring data point.
[0084] Finally, since the first sensor contains multiple data points of monitoring data types, when the first sensor is employed After the anomaly scores of the multiple data points of monitoring data types are calculated, the anomaly scores of the multiple data points of monitoring data types are averaged to obtain an anomaly score of the first sensor node; when the anomaly score of the first sensor node is greater than or equal to an anomaly score threshold, the first sensor node is determined as an anomaly node.
[0085] In a possible implementation, when the monitoring information isolation forest model is constructed, if the proportion of anomaly monitoring data points in the training data set for construction is large, the anomaly monitoring data points may be misjudged as normal monitoring data points, and the normal monitoring data points may be misjudged as anomaly monitoring data points. To solve this problem, the application adopts a dynamic sampling strategy when the training data set is constructed, specifically as follows:
[0086] First, historical environmental monitoring data in a preset time period in the jurisdiction area of the first sensor node is obtained, where the environmental monitoring data includes temperature, humidity, rainfall, and light intensity, and the preset time period is a time period between a preset time point and a current time point. It can be understood that when the environmental data is mutated, the first sensor node may be subjected to strong interference in the process of transmitting monitoring information to the water conservancy project monitoring system, thereby increasing the probability of data anomaly. Therefore, the application divides the preset time period into a first time period and a second time period by reading a mutation time point of the historical environmental monitoring data, where the first time period is monitoring information before the mutation time point, and the second time period is monitoring information after the mutation time point. The monitoring information in the first time period is less disturbed, and the monitoring information in the second time period is more disturbed. Since there are many types of environmental monitoring data, there may be multiple mutation time points. The application selects the mutation time point closest to the current time point as the division time point to improve the timeliness of the divided data.
[0087] Then, according to the time span of the first time period and the time span of the second time period, the sampling ratio of the two time periods is determined. Here, if the time span of the first time period is greater than or equal to the time span of the second time period, the ratio = the time span of the first time period / the time span of the second time period; if the time span of the first time period is less than the time span of the second time period, the ratio = the time span of the second time period / the time span of the first time period; finally, the historical monitoring information is dynamically sampled based on the sampling ratio to obtain a training data set, thereby ensuring that the amount of data used to construct the monitoring information isolation forest model is sufficient, and reducing the possibility that the proportion of anomaly monitoring data points in the training data set is large.
[0088] In a possible implementation, for each sensor node in the sensor network, a large amount of sensor data in the jurisdictional area needs to be collected and processed, and if all the sensor data is used as the training data set when constructing the monitoring information isolation forest model for each sensor node, the construction efficiency of the model will be very low, and the sensor data collected and processed by each sensor node is different, which makes the model construction efficiency of each sensor node different, and the sensor data is changing all the time, at this time, the following situation will exist: the construction completion time of the monitoring information isolation forest model of the first sensor node is t1, and the construction completion time of the monitoring information isolation forest model of the second sensor node is t2, wherein t1 is less than t2, when the first sensor node constructs the monitoring information isolation forest model, it is found that it is an abnormal node, but after the time reaches t3 (t3 is greater than t1 but less than t2), the first sensor node becomes a normal node again, at this time, the second sensor node is still constructing the model, at this time, if the transmission path of the first sensor node is changed, it will cause the first sensor node to become an abnormal node again.
[0089] Therefore, in order to avoid the above problems and make the construction time of the monitoring information isolation forest model of each sensor node approximately the same, and reduce the construction time of the monitoring information isolation forest model, the training data set proposed in the present application is a small sample data set; but at this time, the small sample data set will cause the reliability of the data used to construct the monitoring information isolation forest model to be not high; at this time, the present application divides the monitoring information of each sensor node into key monitoring information and non-key monitoring information according to the regional attribute of the jurisdictional area of each sensor node, for example, taking the first sensor node as an example, the first sensor node is any one of the plurality of sensor nodes, if the regional attribute of the jurisdictional area of the first sensor node is reservoir management, its monitoring information includes water level, water quality, air temperature, water temperature, air humidity and environmental noise, etc., at this time, according to the functional importance of these monitoring information, the key monitoring information includes water level, water quality and water temperature, and the non-key monitoring information includes air temperature, air humidity and environmental noise.
[0090] At this time, for the first sensor node, the key monitoring information is more important for the abnormal judgment of the sensor node, which is directly related to the safety problem of the reservoir, and the non-key monitoring information is not so important, even if the non-key monitoring information is abnormal, but the key monitoring information is not abnormal, the first sensor node will still be determined as a normal node. Therefore, the present application calculates the data amount ratio of the total amount of data of the key monitoring information and the total amount of data of the non-key monitoring information in the first sensor node, to determine the sampling ratio of the two, and the proportion of the key monitoring information in the sampling ratio is always greater than the proportion of the non-key monitoring information; finally, according to the sampling ratio of the two, the monitoring information of the first sensor node is sampled, so as to obtain a training data set with higher reliability.
[0091] In a possible implementation, in order to further reduce the construction time of the monitoring information isolation forest model, in the process of sampling the monitoring information (including monitoring data of various non-critical monitoring information types) of the first sensor node, the various non-critical monitoring information types are divided into multiple functional combinations according to the functional attributes of the various non-critical monitoring information types. For example, the non-critical monitoring information includes air temperature, air humidity, and environmental noise, wherein the air temperature and the air humidity are used to evaluate the air quality near the reservoir, and the environmental noise is used to evaluate whether there is human construction activity around the reservoir. At this time, for each functional combination, when one item is abnormal, the other item will also be abnormal, therefore, only the monitoring data corresponding to an arbitrary non-critical monitoring information type in each functional combination is selected as a sampling database of the non-critical monitoring information, and in the process of sampling the non-critical monitoring information, the monitoring data of the non-critical monitoring information types outside the sampling database does not need to be processed, thereby reducing the construction time of the monitoring information isolation forest model.
[0092] S103, query the node state of the plurality of sensor nodes, and determine a plurality of stable nodes, the node state including a plurality of state information, and the plurality of state information including a load amount, a delay time, and a packet loss rate.
[0093] In the above steps, the stable node can be understood as a sensor node whose load amount, delay time, and packet loss rate are all below the threshold value, and each sensor node has its own monitoring task, so the threshold conditions set by each sensor node are different, and therefore in the query process, the plurality of state information corresponding to each of the plurality of sensor nodes is matched and compared with a preset state information threshold table, the preset state information threshold table stores the correspondence between the plurality of state information of each of the plurality of sensor nodes and the state information threshold; when the load amount of the sensor node is less than the preset load amount threshold, the delay time is less than the delay time threshold, and the packet loss rate is less than the packet loss rate threshold, the sensor node can be determined as a stable node.
[0094] S104, configuring a data transmission path of the abnormal node according to the node state of the abnormal node and the node state of the plurality of stable nodes, so that the monitoring information of the abnormal node is transmitted to the water conservancy project monitoring system according to the data transmission path.
[0095] In the above steps, after the plurality of stable nodes are screened out, the quality of the monitoring information directly uploaded by the abnormal node is poor, and therefore the present application selects the plurality of stable nodes to indirectly transmit the monitoring information of the abnormal node to the plurality of stable nodes, and then the stable nodes upload the monitoring information to the water conservancy project monitoring system, so as to improve the data quality of the monitoring information received by the water conservancy project monitoring system. Specifically,
[0096] Firstly, the abnormal node, the plurality of stable nodes and the water conservancy monitoring system are jointly constructed as a data transmission topology network; then taking the abnormal node as the starting point and the water conservancy monitoring system as the terminal, the data transmission topology network is traversed to obtain a plurality of available transmission paths, it is to be explained here that when there is no intersection between the monitoring tasks of two sensor nodes, due to the lack of corresponding identification algorithm for data, the two sensor nodes can only be unable to communicate with each other, and the available transmission path is a transmission path composed of a plurality of stable nodes capable of data communication;
[0097] Then, the path state of the plurality of available transmission paths is calculated respectively, and the path state includes the load average, the delay time average and the packet loss rate average, wherein the load average reflects the data processing capacity of the available transmission path, the delay time average reflects the network congestion degree, and the packet loss rate average reflects the interference degree of the monitoring information. Although each stable node has been screened by the threshold value, the determination threshold value of the state information of each stable node is not the same, so that for one stable node, the load may be sufficient, and for another stable node, the load may be overloaded. Therefore, the transmission performance score of the plurality of available transmission paths also needs to be considered comprehensively, which is specifically:
[0098] Firstly, the path length and the number of nodes of the plurality of available transmission paths are obtained, it can be understood that when the path length of the available transmission path is longer or the number of nodes is more, the probability and degree of interference are also greater, the path length here refers to the actual physical distance, that is, there may be a plurality of path nodes in the available transmission path, but the path length is very short. Then, according to the path length and the number of nodes of the plurality of available transmission paths, the path state weight of the plurality of available transmission paths is calculated, wherein the path state weight includes the load average weight, the delay time average weight and the packet loss rate average weight, and the specific calculation method is as follows:
[0099]
[0100]
[0101]
[0102] Wherein, , , are the load average weight, the delay time average weight and the packet loss rate average weight respectively, is the path length, and N is the number of nodes.
[0103] In the above formula, each available transmission path adopts the above calculation method to obtain the corresponding path state weight, wherein for the load average weight Since longer path and more nodes can make the load distribution more dispersed, the impact on the load amount is relatively small, so the greater the sum of the path length L and the number of nodes N, the smaller the load amount weight; for the delay time average weight When the path length L increases, the data delay time increases, and its weight also relatively increases, when the number of nodes increases, the proportion of node processing delay in the total delay is larger, so that the proportion of the impact of path length on delay time in the overall delay is relatively small, that is, the impact of path length on delay time weight is weakened by the increase of nodes, but the overall is still dominated by path length, the reason is that path length dominates data transmission, and sensor node dominates data processing; for the average weight of packet loss rate Similar to the delay time weight, when the number of nodes increases, the packet loss rate weight increases, but as the path length increases, the proportion of path length in the total packet loss rate is larger, so that the proportion of the impact of node quantity on packet loss rate in the overall is relatively small, but the overall is still dominated by node data amount, the reason is that sensor node dominates data processing, and path length dominates data transmission.
[0104] After calculating the path state weight of the plurality of available transmission paths, the enhanced sum is calculated according to the path state of the plurality of available transmission paths, to obtain the transmission performance score of the plurality of available transmission paths, and then the available transmission path with the highest transmission performance score is selected from the transmission performance scores of the plurality of available transmission paths as the data transmission path of the abnormal node, so as to solve the problem of unstable data transmission of the abnormal node.
[0105] Referring to Figure 2 The application also provides a water conservancy project real-time monitoring system based on Internet of Things. The system is a water conservancy project monitoring system, which comprises an acquisition module 1, a processing module 2 and a sending module 3.
[0106] The acquisition module 1 is used for acquiring a sensor network of the water conservancy project, and the sensor network comprises monitoring information of a plurality of sensor nodes.
[0107] The processing module 2 is used for performing abnormal analysis on the monitoring information of the plurality of sensor nodes to determine an abnormal node, and querying node states of the plurality of sensor nodes to determine a plurality of stable nodes. The node states comprise a plurality of state information, and the plurality of state information comprises a load amount, a delay time and a packet loss rate.
[0108] The sending module 3 is used for configuring a data transmission path of the abnormal node according to the node state of the abnormal node and the node states of the plurality of stable nodes, so that the monitoring information of the abnormal node is transmitted to the water conservancy project monitoring system according to the data transmission path.
[0109] It should be noted that the apparatus provided in the above examples is only used as an example for the division of the above functional modules in realizing its functions, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the apparatus and method embodiments provided in the above examples belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be described here.
[0110] The present application also discloses an electronic device. Referring to Figure 3 , Figure 3 is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application. The electronic device 300 can include at least one processor 301, at least one network interface 304, a user interface 303, a memory 305, and at least one communication bus 302.
[0111] The communication bus 302 is used to realize the connection and communication between the components.
[0112] The user interface 303 can include a display screen (Display) and a camera (Camera), and the optional user interface 303 can further include a standard wired interface and a wireless interface.
[0113] The network interface 304 can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0114] The processor 301 can include one or more processing cores. The processor 301 connects various parts within the server through various interfaces and lines, performs various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 305, and calling data stored in the memory 305. Alternatively, the processor 301 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 301 can integrate a combination of one or more of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes operating systems, user interfaces, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 301, but can be realized by a separate chip.
[0115] The memory 305 can include a random access memory (RAM) and a read-only memory (ROM). Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area can store data involved in the above-mentioned various method embodiments, etc. The memory 305 can also be at least one storage device located away from the aforementioned processor 301. Referring to Figure 3 The memory 305 as a computer storage medium can include an operating system, a network communication module, a user interface module, and an application program of the real-time monitoring method for water conservancy projects based on the Internet of Things.
[0116] In Figure 3In the electronic device 300 shown, the user interface 303 is mainly used to provide an interface for the user to input, and obtain data input by the user; and the processor 301 can be used to invoke an application program of the water conservancy project real-time monitoring method based on the Internet of Things stored in the memory 305, and when executed by one or more processors 301, the electronic device 300 executes the method described in one or more of the above embodiments. It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all described as a combination of a series of actions, but those skilled in the art should know that the present application is not limited to the order of the actions described, because according to the present application, some steps can be performed in other order or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0117] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0118] In the several embodiments provided by the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic. The division of the units is only a logical function division. There can be another division during actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical or other forms.
[0119] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0120] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0121] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable memory. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a memory and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned memory includes: a U disk, a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0122] The above-described are only exemplary embodiments of the present disclosure, and cannot limit the scope of the present disclosure. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure are still within the scope of the present disclosure. Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon considering the specification and practicing the true principles of the present disclosure.
[0123] The present application is intended to cover any variations, uses, or adaptive changes of the present disclosure that follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not recorded in the present disclosure. The specification and examples are only considered as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A real-time monitoring method for water conservancy projects based on the Internet of Things, characterized in that, The method, applied to a water conservancy project monitoring system, includes: Acquire the sensor network of the water conservancy project, wherein the sensor network includes monitoring information from multiple sensor nodes; Anomaly analysis is performed on the monitoring information of multiple sensor nodes to identify abnormal nodes, specifically including: Obtain historical monitoring information of the first sensing node, wherein the first sensing node is any one of the plurality of sensing nodes; The historical monitoring information of the first sensor node is dynamically sampled to obtain the training dataset; Based on the training dataset, construct an isolated forest model for monitoring information; The current monitoring information of the first sensor node is input into the isolated forest model of the monitoring information to obtain the anomaly score of the first sensor node. The current monitoring information of the first sensor node includes data points corresponding to multiple monitoring data types, specifically: ; in, The anomaly score for the first sensing node. Let C be the average tree height of the data point corresponding to the i-th monitoring data type of the first sensor node in the isolated forest model of monitoring information. i (N) is the standardization factor determined by the number of data points N of the i-th data type, W(i) is the monitoring data time decay coefficient of the i-th monitoring data type of the first sensing node, and n is the total number of monitoring data types under the jurisdiction of the first sensing node. If the abnormal score is greater than or equal to the abnormal score threshold, then the first sensing node is determined to be an abnormal node. Specifically, the step of dynamically sampling the historical monitoring information of the first sensing node to obtain the training dataset includes: Obtain the regional attributes of the area governed by the first sensing node; Based on the regional attributes, the monitoring information of the first sensing node is divided into key monitoring information and non-key monitoring information. Calculate the ratio of the total amount of data for the critical monitoring information to the total amount of data for the non-critical monitoring information; Based on the data volume ratio, determine the sampling ratio of the key monitoring information to the non-key monitoring information; According to the sampling ratio, the monitoring information of the first sensing node is sampled to obtain the training dataset; The node status of multiple sensor nodes is queried to determine multiple stable nodes. The node status includes multiple status information, including load, latency, and packet loss rate. Based on the node status of the abnormal node and the node status of multiple stable nodes, an optimal data transmission path is configured for the abnormal node, so that the monitoring information of the abnormal node is transmitted to the water conservancy project monitoring system according to the optimal data transmission path.
2. The method according to claim 1, characterized in that, The non-critical monitoring information includes monitoring data of various non-critical monitoring information types. The step of sampling the monitoring information of the first sensing node according to the sampling ratio to obtain the training dataset further includes: Based on the functional attributes of the various non-critical monitoring information types, the various non-critical monitoring information types are divided into multiple functional combinations; For each of the aforementioned functional combinations, select monitoring data corresponding to any non-critical monitoring information type as the sampling database for the non-critical monitoring information.
3. The method according to claim 1, characterized in that, The step of dynamically sampling the historical monitoring information of the first sensing node to obtain the training dataset also includes: Acquire historical environmental monitoring data within a preset time period within the area under the jurisdiction of the first sensing node; Read the time points of change in the historical environmental monitoring data; Based on the time of the anomaly, the preset time period is divided into a first time period and a second time period; Based on the time span of the first time period and the time span of the second time period, the sampling ratio of historical monitoring information within the preset time period is determined; Based on the sampling ratio, the historical monitoring information is dynamically sampled to obtain the training dataset.
4. The method according to claim 1, characterized in that, The process of querying the node status of multiple sensing nodes to determine multiple stable nodes specifically involves: Multiple state information of the second sensing node are matched and compared with a preset state information threshold table. The second sensing node is any one of the multiple sensing nodes. The preset state information threshold table stores the relationship between state information and state information thresholds. If the load of the second sensor node is less than the preset load threshold, the delay time is less than the delay time threshold, and the packet loss rate is less than the packet loss rate threshold, then the second sensor node is determined to be a stable node.
5. The method according to claim 1, characterized in that, The step of configuring the data transmission path for the abnormal node based on the node status of the abnormal node and the node status of multiple stable nodes specifically involves: The abnormal nodes, multiple stable nodes, and the water conservancy project monitoring system are jointly constructed into a data transmission topology network; Starting from the abnormal node and ending at the water conservancy project monitoring system, the data transmission topology is traversed to obtain multiple available transmission paths; Calculate the path status of multiple available transmission paths, the path status including average load, average latency, and average packet loss rate; Based on the path length and number of nodes of the multiple available transmission paths, the path state weights of the multiple available transmission paths are calculated. The path state weights include the average load weight, the average latency weight, and the average packet loss rate weight. Based on the path status and path status weight of the multiple available transmission paths, the transmission performance score of the multiple available transmission paths is calculated. From the transmission performance scores of the multiple available transmission paths, the available transmission path with the highest transmission performance score is selected as the data transmission path of the abnormal node.
6. The method according to claim 5, characterized in that, The step of calculating the path state weights of the multiple available transmission paths based on the path lengths and number of nodes of the multiple available transmission paths is specifically as follows: ; ; ; in, , , These are the average weights for load, latency, and packet loss rate, respectively. Where N is the path length and N is the number of nodes.
7. A real-time monitoring system for water conservancy projects based on the Internet of Things, characterized in that, The system performs the method as described in any one of claims 1-6, wherein the system is a water conservancy project monitoring system, and the system includes an acquisition module (1), a processing module (2), and a transmission module (3), wherein: The acquisition module (1) is used to acquire the sensor network of the water conservancy project, the sensor network including the monitoring information of multiple sensor nodes; The processing module (2) is used to perform anomaly analysis on the monitoring information of multiple sensor nodes to identify abnormal nodes; query the node status of multiple sensor nodes to identify multiple stable nodes, wherein the node status includes multiple status information, including load, latency and packet loss rate. The sending module (3) is used to configure the optimal data transmission path for the abnormal node according to the node status of the abnormal node and the node status of multiple stable nodes, so that the monitoring information of the abnormal node is transmitted to the water conservancy project monitoring system according to the optimal data transmission path.
Citation Information
Patent Citations
System and method for detecting and tracing abnormal data operation of distribution automation system
CN114116733A
Hydraulic fan automatic assembly line monitoring system based on Internet of Things data
CN117007135A