Artificial Intelligence-Based Wireless Ultrasonic Open Channel Flow Prediction Method
By constructing an adjacency matrix based on the physical transmission law of water flow and introducing an adaptive feature selection layer, combining multi-layer perceptron and self-attention mechanism, the accuracy and environmental adaptability problems in open channel flow prediction are solved, and efficient flow prediction is achieved.
Patent Information
- Application Number
- CN202411881975.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2044-12-19
AI Technical Summary
The existing open channel flow prediction methods ignore physical correlation and space-time dynamics, resulting in poor accuracy of traffic prediction results, and do not have the ability to adapt to environmental changes in real time, and have weak ability to deal with noise and incomplete traffic data.
The physical transmission matrix is constructed based on the physical transmission law of water flow, and the adjacency matrix is constructed in combination with hydrological characteristics. Multi-layer perceptron and adaptive feature selection layer are used to predict flow through graph structure and self-attention mechanism to adapt to abnormal fluctuations in long-term spans and different environmental conditions.
It significantly improves the accuracy and stability of flow forecasting, can process a large amount of hydrological data and adapt to environmental changes, and improves the professionalism of open channel flow forecasting.
Smart Images

Figure CN119862370B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flow prediction, and specifically refers to a wireless ultrasonic open channel flow prediction method based on artificial intelligence. Background Art
[0002] Open channel flow prediction methods refer to a class of technical methods used to predict the flow rate or velocity of fluids in open water channels. The goal of such methods is usually to establish a mathematical model based on flow-related data collected over a certain period of time to estimate or predict future flow rates. Such predictions have important practical significance for fields such as water resource management, flood warning, environmental monitoring, and agricultural irrigation. However, general open channel flow prediction methods have problems such as ignoring physical correlations and spatio-temporal dynamics, resulting in poor accuracy of flow prediction results; general open channel flow prediction methods are easily affected by environmental changes, lack real-time adaptability, and have poor ability to process noisy flow data and incomplete flow data, thereby leading to poor open channel flow prediction effects. Summary of the Invention
[0003] In view of the above situation, to overcome the defects of the prior art, the present invention provides a wireless ultrasonic open channel flow prediction method based on artificial intelligence. Aiming at the problem that general open channel flow prediction methods ignore physical correlations and spatio-temporal dynamics, resulting in poor accuracy of flow prediction results, this solution constructs a physical transmission matrix based on the physical transmission law of water flow, calculates the weights of the adjacency matrix, and constructs the adjacency matrix in combination with hydrological characteristics. Nodes can simultaneously represent different types of hydrological features, fully mining the interconnection relationships between nodes, so that when dealing with a large amount of hydrological data, the accuracy of flow prediction can be significantly improved; aiming at the problem that general open channel flow prediction methods are easily affected by environmental changes, lack real-time adaptability, have poor ability to process noisy flow data and incomplete flow data, and thus lead to poor open channel flow prediction effects, this solution updates and optimizes the state of each node to better adapt to flow changes and environmental disturbances, improving the stability of flow prediction; introducing an adaptive feature selection layer and a self-attention mechanism to adaptively perform flow prediction according to different spatio-temporal backgrounds; through the combination of a graph structure and a multi-layer perceptron, it can adapt to abnormal fluctuations in long time spans and different environmental conditions during open channel flow prediction, thereby improving the professionalism of open channel flow prediction.
[0004] The technical solution adopted by the present invention is as follows: The wireless ultrasonic open channel flow prediction method based on artificial intelligence provided by the present invention includes the following steps:
[0005] Step S1: Data collection;
[0006] Step S2: Data preprocessing;
[0007] Step S3: Establish an open channel flow prediction model;
[0008] Step S4: Open-channel flow prediction.
[0009] Further, in step S1, the data collection is to collect historical wireless ultrasonic open-channel flow data; the historical wireless ultrasonic open-channel flow data includes meteorological data, hydrological data, soil data, sensor data, sampling time, and open-channel flow evaluation level; the sensor data is collected by installing wireless ultrasonic sensors at different positions of the open-channel; the open-channel flow evaluation level is used as the data label.
[0010] Further, in step S2, the data preprocessing is to perform data cleaning, data conversion, normalization processing, and graph structure construction on the collected data; the data cleaning is to process the missing values and duplicate values in the collected data; the data conversion is to convert the data into vector form; the normalization processing is to normalize the data based on the maximum-minimum normalization method; the graph structure construction is to construct a graph structure based on the historical wireless ultrasonic open-channel flow data after normalization processing, where each node represents the data collected at a specific position, and an adjacency matrix is constructed, and the adjacency matrix represents the connection relationship between nodes; the construction of the adjacency matrix is specifically: construct a physical transmission matrix based on the physical transmission law of water flow, expressed as: ; calculate the weight of the adjacency matrix, expressed as: ; ; and then complete the construction of the adjacency matrix, expressed as: ; where, K ij is the element of the physical transmission matrix of the i-th node and the j-th node, reflecting the physical characteristics between nodes; α is the intensity coefficient; h ij , , and are respectively the height difference of water levels, sediment concentration difference, water temperature difference, and precipitation difference between nodes; L ij is the horizontal distance of water levels between nodes; is the weight element of the adjacency matrix; and are respectively the values of the i-th node and the j-th node on the k-th feature; N is the total number of features; and are respectively the feature average values of the i-th node and the j-th node; is the element of the adjacency matrix; and are the matrix weights; is the time difference of node data; is the time adjustment factor; β is the adjustment parameter; is the characteristic factor; , , and is the adjustment coefficient; , , and are the maximum water level height difference, sediment concentration difference, water temperature difference and precipitation difference between all nodes respectively; is the time decay factor.
[0011] Furthermore, in step S3, the establishment of the open channel flow prediction model processes the graph structure of historical wireless ultrasonic open channel flow data, specifically including the following steps:
[0012] Step S31: Model design; The open channel flow prediction model updates the node information through a multi-layer perceptron. The information of each layer of nodes is aggregated through the adjacency matrix of the graph structure and then combined through the MLP to update the features of the nodes, expressed as:
[0013] ; where, and are the feature vectors of node v at the k-th layer and the k-1-th layer respectively; A vu represents the adjacency matrix element between node v and neighbor node u; N(·) is the set of neighbor nodes; is a learnable parameter used to control the weight of self-connection; MLP k is the multi-layer perceptron of the k-th layer; n is the number of neighbor nodes;
[0014] Step S32: Predict the evaluation level of open channel flow; Before the output layer, an adaptive feature selection layer is added to perform weighted selection on the features of different layers by introducing the self-attention mechanism, expressed as: ; Finally, the Softmax function is used to map the updated node features to the flow evaluation level, expressed as: ; where, is the predicted evaluation level of open channel flow; Softmax(·) is the Softmax function; W out is the weight matrix of the output layer; is the node feature after adaptive feature selection; is the self-attention mechanism processing; is the learning parameter of the self-attention mechanism;
[0015] Step S33: Model training; The historical wireless ultrasonic open channel flow data is pre-divided into a test set and a training set; During the training process, the training set is used for supervised learning, and the loss function uses cross-entropy loss and introduces a mixed regularization term to control the complexity, expressed as: ; where, n1 is the number of perceptron layers, is the weight matrix of the i1-th layer multi-layer perceptron; is the cross-entropy loss; is the regularization coefficient; The model updates the learning parameters using the gradient descent method; When the loss converges or the maximum number of training times is reached, the open-channel flow prediction model training is completed. There is a preset accuracy threshold. When the prediction accuracy of the trained open-channel flow prediction model for the test set is higher than the accuracy threshold, the open-channel flow prediction model is established; Otherwise, re-partition the dataset, adjust the initial learning parameters, and re-train the open-channel flow prediction model.
[0016] Further, in step S4, the open-channel flow prediction is based on the established open-channel flow prediction model. Meteorological data, hydrological data, soil data, sensor data, and sampling time are collected in real time. After preprocessing, they are input into the open-channel flow prediction model, and the open-channel flow evaluation level output by the model is used as the open-channel flow prediction result.
[0017] The beneficial effects achieved by the present invention using the above solution are as follows:
[0018] (1) Aiming at the problem that general open-channel flow prediction methods ignore physical correlation and spatio-temporal dynamics, resulting in poor accuracy of flow prediction results, this solution constructs a physical transmission matrix based on the physical transmission law of water flow, calculates the weights of the adjacency matrix, and constructs the adjacency matrix in combination with hydrological characteristics. Nodes can represent different types of hydrological features at the same time, fully mining the interconnection relationship between nodes, so that when dealing with a large amount of hydrological data, the accuracy of flow prediction can be significantly improved.
[0019] (2) Aiming at the problem that general open-channel flow prediction methods are easily affected by environmental changes, do not have real-time adaptability, and have poor ability to process noisy flow data and incomplete flow data, resulting in poor open-channel flow prediction effect, this solution updates and optimizes the state of each node to better adapt to flow changes and environmental disturbances, improving the stability of flow prediction; Introduce an adaptive feature selection layer and a self-attention mechanism to adaptively perform flow prediction according to different spatio-temporal backgrounds; Through the combination of the graph structure and the multi-layer perceptron, it can adapt to abnormal fluctuations in long time spans and different environmental conditions during open-channel flow prediction, thereby improving the professionalism of open-channel flow prediction. Description of the Drawings
[0020] Figure 1 is a schematic flowchart of the wireless ultrasonic open-channel flow prediction method based on artificial intelligence provided by the present invention;
[0021] Figure 2 is a schematic flowchart of step S3.
[0022] The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention. Detailed implementation manners
[0023] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0024] In the description of the present invention, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc. indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be construed as a limitation to the present invention.
[0025] Embodiment 1, refer to Figure 1 , the wireless ultrasonic open-channel flow prediction method based on artificial intelligence provided by the present invention, the method includes the following steps:
[0026] Step S1: Data collection, collect historical wireless ultrasonic open-channel flow data;
[0027] Step S2: Data preprocessing, perform data cleaning, data conversion, normalization processing and graph structure construction on the collected data;
[0028] Step S3: Establish an open-channel flow prediction model, process the historical wireless ultrasonic open-channel flow data through the graph structure, update the node features, evaluate the flow level, and then complete the establishment of the open-channel flow prediction model;
[0029] Step S4: Open-channel flow prediction, perform open-channel flow prediction on the real-time collected data based on the established open-channel flow prediction model.
[0030] Embodiment 2, refer to Figure 1, this embodiment is based on the above - mentioned embodiment. In step S1, the historical wireless ultrasonic open - channel flow data includes meteorological data, hydrological data, soil data, sensor data, sampling time, and open - channel flow evaluation level; the sensor data is collected by installing wireless ultrasonic sensors at different positions of the open - channel; the open - channel flow evaluation level is used as the data label; the meteorological data includes precipitation data, evaporation data, air temperature and humidity, and wind speed; the hydrological data includes flow velocity data, flow rate data, precipitation, and water quality data; the soil data includes sediment concentration and groundwater level height; the sensor data includes flow velocity and water temperature; the open - channel flow evaluation level includes low - flow level, normal - flow level, flood - risk level, and overload - flow level.
[0031] Embodiment Three, refer to Figure 1 , this embodiment is based on the above - mentioned embodiment. In step S2, data cleaning is to process the missing values and duplicate values of the collected data; data conversion is to convert the data into vector form; the normalization process is to normalize the data based on the maximum - minimum normalization method; the graph - structure construction is to construct a graph structure based on the historical wireless ultrasonic open - channel flow data after normalization processing. Each node represents the data collected at a specific position, and an adjacency matrix is constructed. The adjacency matrix represents the connection relationship between nodes; the specific construction of the adjacency matrix is as follows: construct a physical - transmission matrix based on the physical transmission law of water flow, expressed as: ; calculate the weight of the adjacency matrix, expressed as: ; ; and then complete the construction of the adjacency matrix, expressed as: ; where, K ij is the element of the physical - transmission matrix between the i - th node and the j - th node, reflecting the physical characteristics between nodes; α is the intensity coefficient; h ij , , and are respectively the height difference of water levels, sediment - concentration difference, water - temperature difference, and precipitation difference between nodes; L ij is the horizontal distance of water levels between nodes; is the element of the adjacency - matrix weight; and are respectively the values of the i - th node and the j - th node on the k - th feature; N is the total number of features; and are respectively the feature averages of the i - th node and the j - th node; is the element of the adjacency matrix; and are the matrix weights; is the time difference of node data; is the time - adjustment factor; β is the adjustment parameter; is the characteristic factor; , , and are adjustment coefficients; , , and are respectively the maximum water level height difference, sediment concentration difference, water temperature difference, and precipitation difference among all nodes; is the time decay factor.
[0032] By performing the above operations, for the problem that the general open channel flow prediction method ignores physical correlations and spatio-temporal dynamics, resulting in poor accuracy of flow prediction results, this solution constructs a physical transmission matrix based on the physical transmission law of water flow, calculates the weights of the adjacency matrix, and constructs the adjacency matrix in combination with hydrological characteristics. Nodes can represent different types of hydrological characteristics simultaneously, fully exploring the interconnection relationship between nodes, so that when dealing with a large amount of hydrological data, the accuracy of flow prediction can be significantly improved.
[0033] Example 4, referring to Figure 1 and Figure 2 , based on the above example, in step S3, establishing the open channel flow prediction model processes the graph structure of historical wireless ultrasonic open channel flow data, specifically including the following steps:
[0034] Step S31: Model design; The open channel flow prediction model updates the node information through a multi-layer perceptron. The information of each layer of nodes is aggregated through the adjacency matrix of the graph structure, and then combined through the MLP to update the characteristics of the nodes, expressed as:
[0035] ; where and are respectively the feature vectors of node v at the k-th layer and the k-1-th layer; A vu represents the adjacency matrix element of node v and its neighbor node u; N(·) is the set of neighbor nodes; is a learnable parameter used to control the weight of self-connection; MLP k is the multi-layer perceptron at the k-th layer; n is the number of neighbor nodes;
[0036] Step S32: Predict the evaluation grade of open channel flow; Before the output layer, an adaptive feature selection layer is added to weight and select the features of different layers by introducing the self-attention mechanism, expressed as: ; Finally, the Softmax function is used to map the updated node features to the flow evaluation grade, expressed as: ; where is the predicted evaluation grade of open channel flow; Softmax(·) is the Softmax function; Wout is the weight matrix of the output layer; is the node feature after adaptive feature selection; is the self-attention mechanism processing; is the learning parameter of the self-attention mechanism;
[0037] Step S33: Model training; The historical wireless ultrasonic open-channel flow data is pre-divided into a test set and a training set; During the training process, the training set is used for supervised learning, the loss function adopts cross-entropy loss, and a mixed regularization term is introduced to control the complexity, expressed as: ; where, n1 is the number of perceptron layers, is the weight matrix of the i1-th layer multi-layer perceptron; is the cross-entropy loss; is the regularization coefficient; The model updates the learning parameters using the gradient descent method; When the loss converges or the maximum number of training times is reached, the open-channel flow prediction model training is completed. There is a preset accuracy threshold. When the prediction accuracy of the trained open-channel flow prediction model for the test set is higher than the accuracy threshold, the open-channel flow prediction model is established; Otherwise, re-divide the data set, adjust the initial learning parameters and re-train the open-channel flow prediction model.
[0038] By performing the above operations, for the problem that the general open-channel flow prediction method is easily affected by environmental changes, does not have real-time adaptation ability, and has poor ability to process noisy flow data and incomplete flow data, resulting in poor open-channel flow prediction effect, this solution updates and optimizes the state of each node to better adapt to flow changes and environmental disturbances, and improves the stability of flow prediction; Introduce an adaptive feature selection layer and a self-attention mechanism to adaptively perform flow prediction according to different spatio-temporal backgrounds; Through the combination of the graph structure and the multi-layer perceptron, it can adapt to abnormal fluctuations in long time spans and different environmental conditions during open-channel flow prediction, thereby improving the professionalism of open-channel flow prediction.
[0039] Example Five, refer to Figure 1 , based on the above example, in step S4, the open-channel flow prediction is based on the established open-channel flow prediction model, and meteorological data, hydrological data, soil data, sensor data and sampling time are collected in real time. After preprocessing, they are input into the open-channel flow prediction model, and the open-channel flow evaluation level output by the model is used as the open-channel flow prediction result.
[0040] It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device.
[0041] Although embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the invention.
[0042] The above describes the present invention and its embodiments, and this description is not restrictive. What is shown in the drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. In summary, if those of ordinary skill in the art are inspired by it and, without departing from the purpose of the present invention, design similar structural forms and embodiments to this technical solution without creative efforts, they shall fall within the protection scope of the present invention.
Claims
1. A wireless ultrasonic open-channel flow prediction method based on artificial intelligence, characterized in that: The method includes the following steps: Step S1: Data collection, collecting historical wireless ultrasonic open-channel flow data; Step S2: Data preprocessing; Step S3: Establishing an open-channel flow prediction model; Step S4: Open-channel flow prediction, predicting the open-channel flow based on the established open-channel flow prediction model for the real-time collected data; In step S3, it includes step S31: Model design; The open-channel flow prediction model updates the node information through a multi-layer perceptron. The information of each layer of nodes is aggregated through the adjacency matrix of the graph structure, and then combined through the MLP to update the features of the nodes, expressed as: ; where and are the feature vectors of node v at the k-th layer and the (k - 1)-th layer respectively; A vu represents the adjacency matrix element between node v and neighbor node u; N(·) is the set of neighbor nodes; is a learnable parameter used to control the weight of the self-connection; MLP k is the multi-layer perceptron at the k-th layer; n is the number of neighbor nodes; In step S2, the data preprocessing includes graph structure construction; the graph structure construction is to construct a graph structure based on the standardized historical wireless ultrasonic open channel flow data. Each node represents the data collected at a specific location, and an adjacency matrix is constructed, where the adjacency matrix represents the connection relationship between nodes; specifically constructing the adjacency matrix is as follows: Based on the physical transmission law of water flow, a physical transmission matrix is constructed, expressed as: ; Calculate the weight of the adjacency matrix, expressed as: ; ; Then complete the construction of the adjacency matrix, expressed as: ; where K ij is the element of the physical transmission matrix between the i-th node and the j-th node, reflecting the physical characteristics between nodes; α is the intensity coefficient; h ij , , and are respectively the height difference of water levels, sediment concentration difference, water temperature difference and precipitation difference between nodes; L ij is the horizontal distance of water levels between nodes; is the element of the adjacency matrix weight; and are respectively the values of the i-th node and the j-th node on the k-th feature; N is the total number of features; and are respectively the feature average values of the i-th node and the j-th node; is the element of the adjacency matrix; and are the matrix weights; is the time difference of node data; is the time adjustment factor; β is the adjustment parameter; is the characteristic factor; , , and are the adjustment coefficients; , , and are respectively the maximum height difference of water levels, sediment concentration difference, water temperature difference and precipitation difference between all nodes; is the time decay factor.
2. The wireless ultrasonic open channel flow prediction method based on artificial intelligence according to claim 1, characterized in that: In step S3, the establishment of the open-channel flow prediction model processes the graph structure of the historical wireless ultrasonic open-channel flow data, specifically including the following steps: Step S31: Model design; Step S32: Predict the open channel flow evaluation level; before the output layer, an adaptive feature selection layer is added, and the features of different layers are weighted and selected by introducing the self-attention mechanism, which is expressed as: ; finally, the Softmax function is used to map the updated node features to the flow evaluation level, which is expressed as: ; where is the predicted open channel flow evaluation level; Softmax(·) is the Softmax function; W out is the weight matrix of the output layer; is the node feature after adaptive feature selection; is the self-attention mechanism processing; is the learning parameter of the self-attention mechanism; Step S33: Model training; the historical wireless ultrasonic open-channel flow data is pre-divided into a test set and a training set; during the training process, the training set is used for supervised learning, the loss function adopts cross-entropy loss, and a mixed regularization term is introduced to control the complexity, expressed as: ; where, n1 is the number of perceptron layers, is the weight matrix of the i1-th multi-layer perceptron; is the cross-entropy loss; is the regularization coefficient; the model updates the learning parameters using the gradient descent method; when the loss converges or the maximum number of training times is reached, the open-channel flow prediction model training is completed. A correct rate threshold is preset in advance. When the prediction correct rate of the trained open-channel flow prediction model for the test set is higher than the correct rate threshold, the open-channel flow prediction model is established; otherwise, the data set is re-divided, the initial learning parameters are adjusted, and the open-channel flow prediction model is re-trained.
3. The wireless ultrasonic open channel flow prediction method based on artificial intelligence according to claim 2, wherein: In step S2, the data preprocessing further includes data cleaning, data transformation, and normalization processing for the collected data; The data cleaning is to process the missing values and duplicate values in the collected data; The data transformation is to convert the data into a vector form; The normalization processing is to normalize the data based on the maximum-minimum normalization method.
4. The wireless ultrasonic open channel flow prediction method based on artificial intelligence according to claim 1, characterized in that: In step S1, the historical wireless ultrasonic open-channel flow data includes meteorological data, hydrological data, soil data, sensor data, sampling time, and open-channel flow assessment level; The sensor data is collected by installing wireless ultrasonic sensors at different positions of the open channel; The open-channel flow assessment level is used as the data label.
5. The wireless ultrasonic open channel flow prediction method based on artificial intelligence according to claim 1, characterized in that: In step S4, the open-channel flow prediction is based on the established open-channel flow prediction model. The meteorological data, hydrological data, soil data, sensor data, and sampling time are collected in real time, preprocessed, and then input into the open-channel flow prediction model. The open-channel flow assessment level output by the model is used as the open-channel flow prediction result.