Multi-scale spatiotemporal graph convolution cyanobacteria prediction method and device based on hydrodynamic perception

By introducing a hydrodynamic sensing mechanism into STGCN, constructing a multi-scale spatiotemporal graph convolutional network, and combining hydrodynamic factors for feature enhancement and model training, the existing technology solves the problems of simple graph structure and failure to consider hydrodynamic characteristics. , significantly improving the accuracy of cyanobacteria forecast.

CN119026085BActive Publication Date: 2025-01-21POWERCHINA HUADONG ENG CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411489223.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-01-21
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

In the prediction of cyanobacteria outbreaks of existing space-time graph convolution network (STGCN), the graph structure is too simple to fully reflect the complex relationship between monitoring sites in water bodies, and the spatial structure and hydrodynamics of water bodies system are not fully considered. The prediction accuracy is low.

Method used

A multi-scale spatio-temporal graph convolution cyanobacteria forecasting method based on hydrodynamic perception is used to construct an edge weight matrix by obtaining the spatial distance between water quality monitoring stations and preset adjustable scale parameters, and setting up a set of graph theory indicators for feature enhancement to construct a multi-scale Scale spatiotemporal convolutional network, combined with hydrodynamic factors for model training.

Benefits of technology

It has significantly improved the accuracy of cyanobacteria forecasting, can better capture the complex spatiotemporal dependencies in the process of cyanobacteria outbreaks, improved the simulation and prediction accuracy of water quality changes, and provided reliable scientific basis for water environment management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026085B_ABST
    Figure CN119026085B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for predicting cyanobacteria based on multi-scale spatiotemporal graph convolution of hydrodynamic perception, which relates to the technical field of water environment prediction, including: obtaining the spatial distances between various water quality monitoring stations preset in the area to be detected, and determining the edge weight matrix based on the spatial distance and the preset adjustable scale parameter; setting a graph theory indicator set, and performing feature enhancement processing on the original features based on the graph theory indicator set to determine the target input features; constructing a multi-scale spatiotemporal convolutional network based on the edge weight matrix, and sending the target input features to the multi-scale spatiotemporal convolutional network, performing model training processing on the multi-scale spatiotemporal convolutional network, and determining the target multi-scale spatiotemporal convolutional network, so as to use the multi-scale spatiotemporal convolutional network to predict the outbreak of cyanobacteria. The present invention can significantly improve the accuracy of cyanobacteria prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of water environment prediction, and in particular to a method and device for predicting cyanobacteria using multi-scale spatiotemporal graph convolution based on hydrodynamic perception. Background Art

[0002] Blue algae outbreaks are an environmental problem that seriously threatens aquatic ecosystems and human health. Therefore, accurate prediction of blue algae outbreaks is crucial for water environment management and protection. At present, relevant technologies have proposed that the Spatio-Temporal Graph Convolutional Network (STGCN) can be used to simultaneously capture the dependencies of spatial and temporal dimensions, process spatiotemporal data, and predict blue algae.

[0003] However, when the existing STGCN model is applied to the prediction of cyanobacteria outbreaks, the graph structure is relatively simple and cannot fully reflect the complex relationship between monitoring stations in the water body. In addition, the existing data-driven cyanobacteria outbreak prediction methods are mainly based on traditional time series analysis or simple machine learning models, which fail to fully consider the spatial structure and hydrodynamic characteristics of the water system, resulting in low prediction accuracy, especially under complex hydrodynamic conditions. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a multi-scale spatiotemporal graph convolution cyanobacteria prediction method and device based on hydrodynamic perception, which can significantly improve the accuracy of cyanobacteria prediction.

[0005] In the first aspect, an embodiment of the present invention provides a multi-scale spatiotemporal graph convolution cyanobacteria prediction method based on hydrodynamic perception, the method comprising: obtaining the spatial distances between various water quality monitoring stations preset in the area to be detected, and determining an edge weight matrix based on the spatial distance and a preset adjustable scale parameter, wherein the edge weight matrix is ​​used to determine the edge weights between any two nodes in the water quality monitoring station, and the preset adjustable scale parameter is used to adjust the influence of the spatial distance on the edge weight; setting a graph theory indicator set, and performing feature enhancement processing on the original features based on the graph theory indicator set to determine the target input features, wherein the graph theory indicator set includes: graph diameter, average spatial distance and degree matrix; constructing a multi-scale spatiotemporal convolutional network based on the edge weight matrix, and sending the target input features to the multi-scale spatiotemporal convolutional network, performing model training processing on the multi-scale spatiotemporal convolutional network, and determining the target multi-scale spatiotemporal convolutional network, so as to use the multi-scale spatiotemporal convolutional network to predict cyanobacteria outbreaks.

[0006] In one embodiment, the step of setting a set of graph theory indicators includes: calculating the distance between any two nodes in the water quality monitoring station through a preset spatial distance matrix and a preset adjacency matrix, and determining the graph diameter of the hydrodynamic constraint, wherein the graph diameter is the maximum value of the spatial distance between any two nodes, and the graph diameter is used to reflect the connectivity between the two farthest monitoring points in the water system.

[0007] In one embodiment, the step of setting a graph theory indicator set also includes: obtaining the number of monitoring stations, and determining the average spatial distance based on the number of monitoring stations and the spatial distance between nodes, wherein the average spatial distance is used to reflect the average efficiency of material transmission in the water system.

[0008] In one embodiment, the step of setting a set of graph theory indicators also includes: using a weight matrix to obtain the edge weight between any two nodes, and determining the weighted degree corresponding to the node based on the edge weight and the hydrodynamic factors contained between the nodes, wherein the hydrodynamic factors are parameters related to the hydrodynamic mechanism; based on the weighted degree and the number of monitoring stations, determining the degree matrix, wherein the degree matrix is ​​used to reflect the local hydrodynamic influence intensity of each monitoring point.

[0009] In one embodiment, before the step of performing feature enhancement processing on the original features based on a graph theory indicator set and determining the target input features, it includes: determining the water quality indicator parameters and hydrodynamic mechanism-related parameters detected by each water quality monitoring station at each time step as feature dimensions; determining the spatiotemporal graph sequence of the convolutional network based on the feature dimensions, the number of monitoring stations and the time step, and determining the spatiotemporal graph sequence as the original features.

[0010] In one embodiment, the step of performing feature enhancement processing on the original features based on a set of graph theory indicators to determine the target input features includes: performing integration and expansion processing on the graph diameter and the average spatial distance to determine the first global feature vector set corresponding to the graph diameter and the second global feature vector set corresponding to the average spatial distance, wherein the number of nodes contained in the global feature vector set is the same as the number of nodes contained in the original feature matrix; performing feature enhancement processing on the original feature matrix using the first global feature vector set and the second global feature vector set to concatenate the first global feature vector, the second global feature vector and the original feature corresponding to each node to determine the target input features.

[0011] In one embodiment, the target input features are sent to a multi-scale spatiotemporal convolutional network, the multi-scale spatiotemporal convolutional network is subjected to model training processing, and the step of determining the target multi-scale spatiotemporal convolutional network includes: sending the target input features to the graph convolution layer and the time convolution layer of the multi-scale spatiotemporal convolutional network, so that each branch in the multi-scale spatiotemporal convolutional network performs graph convolution processing and time convolution processing in sequence to determine features corresponding to different scales; using a preset attention fusion mechanism, the features corresponding to different scales are subjected to feature fusion processing to determine the target fusion features, so as to determine the target multi-scale spatiotemporal convolutional network using the target fusion features.

[0012] In the second aspect, an embodiment of the present invention also provides a multi-scale spatiotemporal graph convolution cyanobacteria prediction device based on hydrodynamic perception, the device comprising: a matrix construction module, which obtains the spatial distances between various water quality monitoring stations preset in the area to be detected, and determines the edge weight matrix based on the spatial distance and the preset adjustable scale parameter, wherein the edge weight matrix is ​​used to determine the edge weights between any two nodes in the water quality monitoring station, and the preset adjustable scale parameter is used to adjust the influence of the spatial distance on the edge weight; a feature enhancement module, which sets a graph theory indicator set, and performs feature enhancement processing on the original features based on the graph theory indicator set to determine the target input features, wherein the graph theory indicator set includes: graph diameter, average spatial distance and degree matrix; a model training module, which constructs a multi-scale spatiotemporal convolutional network based on the edge weight matrix, and sends the target input features to the multi-scale spatiotemporal convolutional network, performs model training processing on the multi-scale spatiotemporal convolutional network, and determines the target multi-scale spatiotemporal convolutional network, so as to use the multi-scale spatiotemporal convolutional network to predict cyanobacteria outbreaks.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement any one of the methods provided in the first aspect.

[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement any one of the methods provided in the first aspect.

[0015] The embodiments of the present invention bring the following beneficial effects:

[0016] An embodiment of the present invention provides a method and device for predicting cyanobacteria based on multi-scale spatiotemporal graph convolution and hydrodynamic perception. After obtaining the spatial distances between various water quality monitoring stations preset in the area to be detected, the method determines the edge weight matrix based on the spatial distances and preset adjustable scale parameters, then sets a graph theory indicator set, and performs feature enhancement processing on the original features based on the graph theory indicator set to determine the target input features. Finally, a multi-scale spatiotemporal convolutional network is constructed based on the edge weight matrix, and the target input features are sent to the multi-scale spatiotemporal convolutional network. The multi-scale spatiotemporal convolutional network is model trained and processed to determine the target multi-scale spatiotemporal convolutional network, so as to use the multi-scale spatiotemporal convolutional network to predict cyanobacteria outbreaks. The embodiment of the present invention can significantly improve the accuracy of cyanobacteria forecasting.

[0017] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0018] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A schematic flow chart of a multi-scale spatiotemporal graph convolution cyanobacteria prediction method based on hydrodynamic perception provided by an embodiment of the present invention;

[0021] Figure 2 A schematic diagram of a weighted directed graph provided by an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of a specific process of a multi-scale spatiotemporal graph convolution cyanobacteria prediction method based on hydrodynamic perception provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of the structure of a multi-scale spatiotemporal graph convolution cyanobacteria prediction device based on hydrodynamic perception provided by an embodiment of the present invention;

[0024] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described in combination with the embodiments below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] At present, cyanobacteria prediction methods are a multidisciplinary research field involving ecology, environmental science, data science, and computational models. Common cyanobacteria prediction methods mainly use data-driven models or hydrodynamics-water quality-cyanobacteria coupling models. Among them, the data-driven model is based on historical data and expert experience to build a rule-based prediction model, and use statistical methods such as regression analysis and time series analysis to predict the growth trend of cyanobacteria. Machine learning algorithms such as support vector machines (SVM) and random forests are applied to predict the growth of cyanobacteria. Finally, deep neural networks such as convolutional neural networks (CNN) and recurrent neural networks (RNN) are used to process spatiotemporal data and predict cyanobacteria outbreaks. The hydrodynamics-water quality-cyanobacteria coupling model is based on fluid dynamics and material transport equations to simulate the diffusion and aggregation process of cyanobacteria in water bodies, and then an ecological model is constructed to consider the interaction between cyanobacteria and other biological and environmental factors.

[0027] Existing technology suggests that spatio-temporal graph convolutional network (STGCN) can be used to predict cyanobacteria outbreaks. STGCN is a deep learning model that combines graph convolutional network (GCN) and time series analysis methods to process data with complex spatial and temporal dependencies. STGCN is particularly suitable for traffic flow prediction, urban computing, social network analysis and other fields. The data in these fields usually exhibit time series characteristics in the graph structure.

[0028] Among them, the core idea of ​​STGCN is to regard the time series data on the graph structure as signals on the graph, and capture the spatiotemporal correlation between nodes through graph convolution operations. STGCN usually consists of the following parts: Graph structure: defines the spatial relationship of the data, which can be a traffic network, social network, etc.; Node features: The feature vector of each node in the time series, such as traffic flow, user behavior, etc.; Graph convolution layer: Through graph convolution operations, capture the local connection pattern and time dependency between nodes; Time convolution layer: Process the dynamic characteristics of time series data and capture time dependency; Pooling layer: Used to reduce data dimensions and extract main features; Output layer: Perform regression or classification according to task requirements. The STGCN model effectively captures the complex patterns in spatiotemporal data through the above mechanism, providing a powerful tool for solving spatiotemporal prediction problems.

[0029] However, in the above schemes, the cyanobacteria outbreak prediction method is mainly based on traditional time series analysis or simple machine learning models, which fails to fully consider the spatial structure and hydrodynamic characteristics of the water system, resulting in insufficient prediction accuracy, especially under complex hydrodynamic conditions. Although time series characteristics and spatial structure information are considered in some schemes, the method only considers the impact of spatial factors such as "wind direction and wind speed" on cyanobacteria, while ignoring the most critical "hydrodynamic process" on cyanobacteria. Therefore, there is a lack of in-depth consideration of hydrodynamic processes, and it is difficult to accurately simulate the dynamics of cyanobacteria in complex water environments, which leads to the lack of interpretability of the prediction model and difficulty in providing effective guidance for water environment management. In addition, the existing STGCN model graph structure construction is too simple and fails to fully reflect the complex relationship between monitoring stations in the water body. Therefore, it is necessary to develop a STGCN cyanobacteria outbreak prediction algorithm that can combine hydrodynamic mechanisms and optimize graph structure construction, make full use of the spatial structure of the water quality monitoring network, and effectively integrate hydrodynamic knowledge to improve the accuracy and reliability of the prediction.

[0030] Based on this, the multi-scale spatio-temporal graph convolution cyanobacteria prediction method and device based on hydrodynamic perception provided by the present invention adopts a multi-scale spatio-temporal graph convolutional network (MS-STGCN) structure, and introduces the graph structure relationship between monitoring stations on the basis of traditional STGCN, so as to better capture the complex spatio-temporal dependencies in the process of cyanobacteria outbreaks, thereby significantly improving the accuracy of cyanobacteria forecasting.

[0031] See also Figure 1 The flowchart of a multi-scale spatiotemporal graph convolution cyanobacteria prediction method based on hydrodynamic perception is shown, and the method mainly includes the following steps S102 to S106:

[0032] Step S102, obtain the spatial distances between various water quality monitoring stations preset in the area to be detected, and determine the edge weight matrix based on the spatial distance and the preset adjustable scale parameter, wherein the edge weight matrix is ​​used to determine the edge weights between any two nodes in the water quality monitoring station, and the preset adjustable scale parameter is used to adjust the influence of the spatial distance on the edge weight. Specifically, the adjustable scale parameter can adjust the relative importance of long-distance and short-distance connections in the network composed of the monitoring stations. The larger the adjustable scale parameter value, that is, Value will make exp(- / ) is close to 1, thus weakening the effect of distance on the weight; conversely, a smaller adjustable scale parameter value causes the weight to decay rapidly with increasing distance.

[0033] In one embodiment, see Figure 2 The schematic diagram of a weighted directed graph is shown in FIG. Based on the spatial distance between water quality monitoring stations, a weighted directed graph is constructed. The weighted directed graph can be expressed as: G(V, E, W), where V is a node set (monitoring station), E is an edge set, and W is an edge weight matrix. Defined as:

[0034]

[0035] in, is the spatial distance between monitoring stations i and j, is an adjustable scale parameter.

[0036] In practical applications, for large lake systems, larger adjustable scale parameter values ​​are required to capture long-range hydrodynamic interactions, while for small river networks, smaller adjustable scale parameter values ​​are more suitable for reflecting local water quality changes. Different scale parameter ranges can be set according to water body types (such as large lakes, small and medium-sized rivers, etc.). The value method is shown in Table 1 below:

[0037] Table 1. Suggested value table

[0038]

[0039] Step S104, setting a graph theory indicator set, and performing feature enhancement processing on the original features based on the graph theory indicator set to determine the target input features, wherein the graph theory indicator set includes: graph diameter, average spatial distance and degree matrix. In one embodiment, the above graph theory indicators together constitute a mathematical framework that describes the topological structure of the water quality monitoring network. In addition, in addition to constructing a graph based on spatial distance, a graph can also be constructed using water quality similarity, or the connection relationship of the graph can be dynamically adjusted according to seasonal changes or hydrological conditions. In practical applications, these indicators can be integrated into a multi-scale spatiotemporal graph convolutional network (MS-STGCN) as the predictive capability of a global feature enhancement model. Specifically, the hydrodynamic significance of the above graph theory indicators includes: graph diameter D: represents the connectivity between the farthest monitoring points; average spatial distance L: indicates the average efficiency of material transmission; degree matrix : Characterize the local hydrodynamic influence intensity of each monitoring point. That is to say, by introducing three graph theory indicators, the graph diameter can be used to calculate based on the spatial distance matrix to reflect the actual water flow path between the farthest monitoring points; the average spatial distance can be used to reflect the overall connectivity of the network and the material transmission efficiency respectively; the degree matrix can be used to introduce hydrodynamic factors to consider the transmission time and flow rate.

[0040] Step S106, constructing a multi-scale spatiotemporal convolutional network based on the edge weight matrix, and sending the target input features to the multi-scale spatiotemporal convolutional network, performing model training processing on the multi-scale spatiotemporal convolutional network, determining the target multi-scale spatiotemporal convolutional network, and using the multi-scale spatiotemporal convolutional network to predict the blue algae outbreak. In one embodiment, the target input features can be sent to the graph convolution layer and the time convolution layer of the multi-scale spatiotemporal convolutional network, so that each branch in the multi-scale spatiotemporal convolutional network performs graph convolution processing and time convolution processing in sequence, determines the features corresponding to different scales, and uses a preset attention fusion mechanism to perform feature fusion processing on the features corresponding to different scales, determines the target fusion features, and uses the target fusion features to determine the target multi-scale spatiotemporal convolutional network. Specifically, introducing an attention mechanism based on hydrodynamic knowledge can enable the model to adaptively adjust the feature weights according to different hydrodynamic conditions, and use the attention mechanism to fuse features of different scales. For each scale k, the attention weight is calculated:

[0041]

[0042] in, , and is a learnable parameter, and the fused features are:

[0043]

[0044] The above-mentioned multi-scale spatiotemporal graph convolution cyanobacteria prediction method based on hydrodynamic perception provided by the embodiment of the present invention first constructs a weighted directed graph of hydrodynamic perception, introduces an adjustable scale parameter, and flexibly adjusts the edge weight according to the water body type. Then, three multi-dimensional graph theory indicators are designed, including the graph diameter, average spatial distance, and degree matrix of hydrodynamic perception, which comprehensively describe the topological structure of the water quality monitoring network, and proposes a multi-scale spatiotemporal graph convolution network (MS-STGCN) architecture, which combines multi-scale graph convolution and time convolution to effectively capture the dependency of water quality changes on different spatial and temporal scales. This method also introduces the design of hydrodynamic-related feature dimensions, integrates traditional water quality parameters and hydrodynamic parameters, and associates each parameter with the hydrodynamic process. Finally, by designing K parallel graph convolution branches, each branch uses receptive fields of different sizes, including graph convolution operations and temporal convolution layers, and uses convolution kernels of different scales to capture short-term and long-term hydrodynamic processes, and realizes adaptive fusion of features of different scales through the attention fusion mechanism. Therefore, the present invention can significantly improve the simulation and prediction accuracy of water quality changes in complex water environment systems, and provide a reliable scientific basis for water environment management.

[0045] See also Figure 3 The specific process diagram of a method for predicting cyanobacteria based on a multi-scale spatiotemporal graph convolution of hydrodynamic perception is shown. The embodiment of the present invention also provides an implementation method for predicting cyanobacteria based on a multi-scale spatiotemporal graph convolution model of hydrodynamic perception, see (A) to (C) below for details:

[0046] (A) After constructing a hydrodynamically aware weighted directed graph and introducing an adjustable scale parameter, graph theory metrics are calculated, including the following (a) to (c):

[0047] (a) The distance between any two nodes in the water quality monitoring station is calculated and processed by a preset spatial distance matrix and a preset adjacency matrix to determine the graph diameter of the hydrodynamic constraint, wherein the graph diameter is the maximum value of the spatial distance between any two nodes. The graph diameter is used to reflect the connectivity between the two farthest monitoring points in the water system. In one embodiment, the graph diameter can be expressed as:

[0048]

[0049] Among them, a larger diameter indicates that there are long-distance water flow paths or isolated areas in the water system, which will affect the spread and dilution process of pollutants. In the present invention, the calculation of the graph diameter can be based on two methods: spatial distance matrix or adjacency matrix. For details, see (1) to (2) below:

[0050] (1) Calculation based on spatial distance matrix:

[0051] Using the spatial distance matrix to calculate the graph diameter can more accurately reflect the actual characteristics of the water system. The elements in the spatial distance matrix D are , represents the actual water flow path length from monitoring station i to j, that is, the diameter of the graph is calculated as:

[0052]

[0053] This takes into account the actual path of water flow and can better reflect the time scale of pollutant transmission and the connectivity of water bodies.

[0054] (2) Calculation based on the adjacency matrix:

[0055] In the absence of detailed hydrodynamic data, the graph diameter can be calculated using the adjacency matrix A, which in this case represents the longest spatial distance in the network:

[0056]

[0057] in, Represents the (i, j) element of the adjacency matrix A to the power of k.

[0058] In order to compare the two methods, the present invention provides a simplified water quality monitoring network example, see Table 2 below:

[0059] Table 2. Sample data table of water quality monitoring station network

[0060]

[0061] Based on the above data, the diameter of the spatial distance graph can be calculated:

[0062]

[0063] Among them, from A to D, there are 2 edges, so the diameter of the topological graph from A to D is:

[0064]

[0065] That is to say, the above two methods will produce different results. The diameter of the spatial distance map provides a more accurate physical meaning, reflecting the actual flow distance between the two farthest points in the water body, while the diameter of the topological map reflects the overall structural characteristics of the network without considering the actual physical distance.

[0066] Furthermore, the above two solutions can be used in combination to provide a more comprehensive description of network characteristics:

[0067]

[0068] Among them, α∈ [0, 1] is the weight coefficient, which can be adjusted according to research needs. This combined graph diameter reflects both the spatial distance and the topological structure, providing a more comprehensive perspective for water quality monitoring network analysis. In actual water quality models, this combined graph diameter can be used to adjust model parameters.

[0069] (b) Obtain the number of monitoring stations and determine the average spatial distance based on the number of monitoring stations and the spatial distance between nodes. The average spatial distance is used to reflect the average efficiency of material transmission in the water system. A shorter average spatial distance means faster material transmission in the system, which will affect the diffusion rate of pollutants and the spread of water quality changes:

[0070]

[0071] in, is the spatial distance between nodes, and n is the number of monitoring stations.

[0072] (c) Use the weight matrix to obtain the edge weights between any two nodes, and determine the weighted degree corresponding to the node based on the edge weights and the hydrodynamic factors contained between the nodes. Based on the weighted degree and the number of monitoring stations, determine the degree matrix, where the degree matrix is ​​used to reflect the local hydrodynamic impact intensity of each monitoring point, and the hydrodynamic factor is a parameter related to the hydrodynamic mechanism. Specifically, the degree matrix is a diagonal matrix whose diagonal elements represent the degree of each node (i.e., the number of edges connected to the node). Considering the hydrodynamic characteristics, the degree matrix can be defined as:

[0073]

[0074] Where n is the number of monitoring stations, is the weighted degree of the ith node, defined as:

[0075]

[0076] in, is the edge weight between nodes i and j. The hydrodynamic interpretation of edge weight is: the edge weight based on the hydrodynamic distance, It is a hydrodynamic factor. The hydrodynamic interpretation of the hydrodynamic factor is: hydrodynamic factors such as flow rate, flow velocity or hydraulic slope.

[0077] Furthermore, the hydrodynamic factor is a key innovation that directly introduces hydrodynamic characteristics into the graph structure. The value of the hydrodynamic factor should reflect the strength of the hydrodynamic connection between sites and can be defined as:

[0078]

[0079] in, is the transmission time of water from station i to j, is the characteristic time scale, is the flow from i to j, is the maximum flow in the system, It is an adjustable parameter. The above definition takes into account two key factors: transmission time (reflecting distance and flow velocity) and flow rate (reflecting material transmission intensity).

[0080] In addition, the present invention can set these parameters as follows: flow : Average flow between stations estimated based on historical data and hydrological models; Transmission time : obtained through hydrodynamic model simulation or measured data; characteristic time scale : It can be set to 24 hours, corresponding to the daily cycle of cyanobacteria growth. For long-term (such as daily or weekly) cyanobacteria growth, other values ​​will be used. ;parameter : It can be initially set to 0.5 and then optimized through model training.

[0081] That is to say, the above parameterization method embeds the hydrodynamic process directly into the graph structure, enabling the MS-STGCN model to more accurately capture the spatiotemporal evolution of water quality parameters in the graph. For example, when predicting cyanobacteria outbreaks, the model can automatically adjust the weights of upwind or upstream sites to reflect the impact of hydrodynamics on algae distribution. In this way, the model not only considers static spatial relationships, but also incorporates dynamic hydrological processes, thereby improving the modeling capabilities of complex water environment systems.

[0082] (B) Based on the graph theory indicator set, the original features are enhanced to determine the target input features, which include the following (d) to (e):

[0083] (d) Determine the water quality index parameters and hydrodynamic mechanism related parameters detected by each water quality monitoring station at each time step as feature dimensions, and determine the spatiotemporal graph sequence of the convolutional network based on the feature dimensions, the number of monitoring stations and the time step, and determine the spatiotemporal graph sequence as the original feature. In one embodiment, the multi-scale spatiotemporal graph convolutional network MS-STGCN consists of three main components: a multi-scale graph convolution branch, a temporal convolution layer and a feature fusion module. The input of the network is the spatiotemporal graph sequence:

[0084] X ∈ R^(N×T×F)

[0085] Among them, N is the number of monitoring stations, T is the time step, and F is the feature dimension. In the multi-scale spatiotemporal graph convolutional network (MS-STGCN) of the water quality monitoring network, the feature dimension F represents the set of parameters measured by each monitoring station at each time step. These features include not only conventional water quality indicators, but also parameters related to hydrodynamic mechanisms. The following is a detailed expansion of the feature dimension F and its connection with the hydrodynamic mechanism. The expansion of the feature dimension F can be expressed as:

[0086]

[0087] Among them, each Represents a specific feature. For example, considering water quality monitoring and hydrodynamic mechanisms, the present invention can expand F as:

[0088] F=[DO,pH,Temp,TN,TP,Chl-a,Turb,Flow,Depth, , ,τ,Re]

[0089] In one embodiment, the present invention provides specific content of characteristic dimension F and its association with hydrodynamics, see Table 3 below:

[0090] Table 3. Specific content of characteristic dimension F and its correlation with hydrodynamics

[0091]

[0092] The above feature design closely combines water quality parameters with hydrodynamic parameters, so that the MS-STGCN model can simultaneously consider water quality changes and hydrodynamic processes. Specifically, the hydrodynamic mechanism is interconnected with the feature dimension F in the following ways: Flow, Depth, , , τ and Re directly describe the dynamic characteristics of water bodies, and these parameters can be obtained through field measurements or hydrodynamic model simulations. Water quality parameters such as DO, pH, TN, TP and Chl-a are closely related to the hydrodynamic process.

[0093] Furthermore, inputting the average hydrodynamic distance (i.e., average spatial distance) (L) and graph diameter (D) as additional features into the multi-scale spatiotemporal graph convolutional network (MS-STGCN) can significantly enhance the model's perception of the overall connectivity of the water system, thereby improving the accuracy of water quality prediction. Specifically, the present invention can use L and D as a global feature and fuse them with the original node-level features to construct a more comprehensive feature representation.

[0094] (e) Integrate and expand the graph diameter and the average spatial distance to determine the first global feature vector set corresponding to the graph diameter and the second global feature vector set corresponding to the average spatial distance, and use the first global feature vector set and the second global feature vector set to perform feature enhancement processing on the original feature matrix, so that the first global feature vector, the second global feature vector and the original feature corresponding to each node are concatenated to determine the target input feature, wherein the number of nodes contained in the global feature vector set is the same as that in the original feature matrix, specifically including the following (3) to (4):

[0095] (3) Integrate the graph diameter D and determine the first set of global feature vectors corresponding to the graph diameter: Inputting the graph diameter (D) as a global feature into the multi-scale spatiotemporal graph convolutional network (MS-STGCN) is an effective method to enhance the model's perception of the overall structure of the water system, thereby improving the accuracy of water quality prediction. The graph diameter D is input into the MS-STGCN model as a global feature. The present invention adopts a simple and effective feature enhancement method, that is, expanding D into a vector with the same number of nodes:

[0096]

[0097] Where N is the number of monitoring stations. Next, the present invention concatenates this global feature vector with the original node feature matrix:

[0098]

[0099] in, is the original node feature matrix, and F is the original feature dimension. This method introduces the graph diameter D as an additional global feature into the feature representation of each node, so that the model can take into account the overall scale and connectivity of the water system while performing local feature extraction. This is particularly important for capturing long-distance water quality correlations and system-level dynamic changes, especially when dealing with large lakes or complex river network systems.

[0100] (4) Integrate the average spatial distance L and determine the second global feature vector set corresponding to the average spatial distance: In order to integrate L into the MS-STGCN model, the present invention can adopt a feature enhancement method. Specifically, the present invention can expand L into a vector with the same number of nodes:

[0101]

[0102] Where N is the number of monitoring stations.

[0103] Furthermore, the above global feature vector is concatenated with the original node feature matrix:

[0104]

[0105] in, is the original node feature matrix, and F is the original feature dimension. This feature enhancement method enables the model to consider the average connectivity of the entire water system in each graph convolution operation. In this way, the average hydrodynamic distance L is effectively integrated into the MS-STGCN model as a global feature, so that the model can consider the overall connectivity of the water system while performing local feature extraction.

[0106] (C) Sending the target input features to the graph convolution layer and the temporal convolution layer of the multi-scale spatiotemporal convolutional network, so that each branch in the multi-scale spatiotemporal convolutional network performs graph convolution processing and temporal convolution processing in turn to determine the features corresponding to different scales, including the following (f) to (g):

[0107] (f) Graph convolution: K parallel graph convolution branches are designed. Each branch uses a receptive field of different sizes to capture spatial dependencies of different scales. The graph convolution operation of the kth branch can be expressed as:

[0108]

[0109] in, is the adjacency matrix, is the corresponding degree matrix, is the learnable weight matrix, σ is the activation function, is the input feature, where N is the number of monitoring stations, T is the time step, and F is the feature dimension. is the output feature, is the output feature dimension of the graph convolution layer. Unlike the input dimension F, graph convolution mainly operates on the spatial dimension N, but it does this for each time step and each feature. σ is the activation function that can learn the weight matrix For feature transformation, its dimension is × ,in, is the input feature dimension, is the output feature dimension. In order to more clearly demonstrate these relationships, the present invention provides an example of water quality monitoring network parameters, see Table 4 below:

[0110] Table 4. Example table of water quality monitoring network parameters

[0111]

[0112] In the above example, the shape of the input feature X is 30×24×5, and the degree matrix The shape is 30×30, and the weight matrix can be learned The shape of is 5×64, and the mathematical expansion of the graph convolution operation can be expressed as:

[0113]

[0114] In one embodiment, the operation can be decomposed into the following steps: Spatial feature aggregation: Weighted aggregation of the features of each node and the features of the adjacency matrix; Feature transformation: Map the aggregated features to a new feature space; Non-linear activation: σ(...) introduces non-linearity to enhance the expressiveness of the model. This design allows the model to capture both spatial dependencies (through degree matrices and adjacency matrices) and feature correlations (through learnable weight matrices) at the same time.

[0115] Further, to illustrate the interaction between matrices, the present invention provides an example of simplified numerical values ​​of a watershed water quality monitoring network, see Table 5 below:

[0116] Table 5. Simplified numerical example of watershed water quality monitoring network

[0117]

[0118] Assumptions for:

[0119]

[0120] Then for node 1, the result of the graph convolution operation is:

[0121]

[0122] Among them, N(1) represents the neighborhood of node 1.

[0123] (g) Temporal convolution layer: In each graph convolution branch, the graph convolution layer is followed by a temporal convolution layer to capture dependencies in the temporal dimension:

[0124]

[0125] Wherein, TCN represents the time convolution network operation. For a one-dimensional time convolution network (TCN), the present invention can Expands to:

[0126]

[0127] Among them, l represents the number of TCN layers, * represents the convolution operation, is the convolution kernel weight of layer l, is the bias term of the lth layer, is the output of the previous layer (for the first layer, = ), ReLU is the activation function, the present invention has T time steps, F features, and the convolution kernel size is d, then the matrix form can be expressed as:

[0128]

[0129] Among them, in the multi-scale spatiotemporal graph convolutional network (MS-STGCN), the parameters of the temporal convolutional network (TCN) are closely linked to the hydrodynamic process, and together they build a prediction framework that can capture complex water quality dynamics. The convolution kernel weights of TCN and the bias term They play a key role in the model. They extract the temporal characteristics of the water body layer by layer through the learning process, thereby reflecting the multi-scale characteristics of the hydrodynamic process. These weights can be regarded as the importance indicators of hydrodynamic events at different time scales, while the bias term represents the basic state of the water body and the characteristics of inter-layer transmission. It carries water quality information that has been processed in multiple layers, including spatiotemporal dependencies from local to global. The introduction of the nonlinear activation function ReLU enables the model to simulate threshold effects and nonlinear relationships in hydrodynamics, which is crucial for capturing water quality mutations.

[0130] The choice of hyperparameters such as time step number T, feature number F, and convolution kernel size d directly affects the model's ability to perceive hydrodynamic processes. The time step number T determines the scope of historical information considered by the model, the feature number F reflects the comprehensiveness of water quality and hydrological parameters considered by the model, and the convolution kernel size d affects the model's ability to capture features of different time scales. Time convolution kernels of different scales are used to capture short-term (such as hourly) and long-term (such as daily and weekly) hydrodynamic processes. The synergy of these parameters enables MS-STGCN to adapt to a variety of complex hydrodynamic environments, from rapidly changing river systems to slowly changing lake ecosystems.

[0131] The present invention considers the multi-scale characteristics of the hydrodynamic process and associates the convolution kernel size with the characteristic time scale of the water body. For different types of water bodies, the present invention proposes examples of convolution kernel size design, see Table 6 below:

[0132] Table 6. Recommended values ​​for convolution kernel size d

[0133]

[0134] Among them, the above design takes into account the time scale of the hydrodynamic characteristics of different water bodies. For example, the hydrodynamic changes in river systems are usually faster, so the short-term convolution kernel size is smaller; while the changes in lake systems are relatively slow, and the long-term convolution kernel size is larger.

[0135] Taking the cyanobacteria outbreak prediction model as an example, considering the seasonal characteristics of cyanobacteria growth and its sensitivity to short-term environmental changes, the present invention can set the following parameters: time step number T=168 (corresponding to one week of hourly data), feature number F=10 (including water temperature, pH, dissolved oxygen, total nitrogen, total phosphorus, chlorophyll a, wind speed, light intensity, etc.), convolution kernel size d=24 (to capture daily scale changes), the number of convolution layers can be set to 3, and the number of neurons in each layer can be set to 64, 128, 256, increasing layer by layer to capture higher-level features. This configuration allows the model to simultaneously consider the impact of short-term meteorological changes and medium-term nutrient accumulation on cyanobacteria growth, thereby providing more accurate outbreak predictions. Through this parameter setting, the MS-STGCN model can effectively integrate hydrological, meteorological and water quality data, reveal the potential mechanism of cyanobacteria outbreaks, and provide a scientific basis for water environment management.

[0136] In summary, the present invention achieves the adaptability of the model to water systems of different types and sizes by introducing adjustable scale parameters, allows flexible adjustment of the relative importance of long-distance and short-distance connections, optimizes the weight distribution, enables the model to more accurately reflect the characteristics of different water systems, and improves the application effect of the model in different water bodies such as large lakes and small river networks.

[0137] In addition, the present invention uses multi-dimensional graph theory indicators (including graph diameter, average spatial distance, and degree matrix) to construct a mathematical framework that comprehensively describes the topological structure of the water quality monitoring network, enriches the static and dynamic characteristics description of the water quality monitoring network, reveals the intrinsic connection between water quality changes and hydrodynamic processes, and provides a more comprehensive network feature description, which helps to improve the accuracy of water quality predictions.

[0138] Furthermore, the present invention effectively captures the dependencies of water quality changes at different spatial and temporal scales through the design of a multi-scale spatiotemporal graph convolutional network (MS-STGCN), combines multi-scale graph convolution and temporal convolution to improve the expressive power of the model, and realizes adaptive adjustment of features at different scales through the attention fusion mechanism, thereby being able to simultaneously consider water quality parameters and hydrodynamic parameters, providing more comprehensive modeling capabilities.

[0139] For the multi-scale spatiotemporal graph convolution cyanobacteria prediction method based on hydrodynamic perception provided in the above embodiment, the embodiment of the present invention provides a multi-scale spatiotemporal graph convolution cyanobacteria prediction device based on hydrodynamic perception, see Figure 4 The schematic diagram of the structure of a multi-scale spatiotemporal graph convolution cyanobacteria prediction device based on hydrodynamic perception is shown, and the device includes the following parts:

[0140] The matrix construction module 402 obtains the spatial distances between various water quality monitoring stations preset in the area to be detected, and determines an edge weight matrix based on the spatial distances and a preset adjustable scale parameter, wherein the edge weight matrix is ​​used to determine the edge weights between any two nodes in the water quality monitoring station, and the preset adjustable scale parameter is used to adjust the influence of the spatial distance on the edge weight;

[0141] The feature enhancement module 404 sets a graph theory indicator set, and performs feature enhancement processing on the original feature based on the graph theory indicator set to determine the target input feature, wherein the graph theory indicator set includes: graph diameter, average spatial distance and degree matrix;

[0142] The model training module 406 constructs a multi-scale space-time convolutional network based on the edge weight matrix, sends the target input features to the multi-scale space-time convolutional network, performs model training processing on the multi-scale space-time convolutional network, and determines the target multi-scale space-time convolutional network to use the multi-scale space-time convolutional network to predict cyanobacteria outbreaks.

[0143] The above-mentioned multi-scale spatiotemporal graph convolution cyanobacteria prediction device based on hydrodynamic perception provided in the embodiment of the present application can significantly improve the accuracy of cyanobacteria forecasting.

[0144] In one embodiment, when performing the step of setting a graph theory indicator set, the feature enhancement module 404 is also used to: calculate the distance between any two nodes in the water quality monitoring station through a preset spatial distance matrix and a preset adjacency matrix, and determine the graph diameter of the hydrodynamic constraint, wherein the graph diameter is the maximum value of the spatial distance between any two nodes, and the graph diameter is used to reflect the connectivity between the two farthest monitoring points in the water system.

[0145] In one embodiment, when performing the step of setting a graph theory indicator set, the feature enhancement module 404 is also used to: obtain the number of monitoring stations, and determine the average spatial distance based on the number of monitoring stations and the spatial distance between nodes, wherein the average spatial distance is used to reflect the average efficiency of material transmission in the water system.

[0146] In one embodiment, when performing the step of setting a graph theory indicator set, the feature enhancement module 404 is also used to: use a weight matrix to obtain the edge weight between any two nodes, and determine the weighted degree corresponding to the node based on the edge weight and the hydrodynamic factor contained between the nodes, wherein the hydrodynamic factor is a parameter related to the hydrodynamic mechanism; based on the weighted degree and the number of monitoring stations, determine the degree matrix, wherein the degree matrix is ​​used to reflect the local hydrodynamic influence intensity of each monitoring point.

[0147] In one embodiment, before performing feature enhancement processing on the original features based on a graph theory indicator set to determine the target input features, the feature enhancement module 404 is also used to: determine the water quality indicator parameters and hydrodynamic mechanism-related parameters detected by each water quality monitoring station at each time step as feature dimensions; determine the spatiotemporal graph sequence of the convolutional network based on the feature dimensions, the number of monitoring stations and the time step, and determine the spatiotemporal graph sequence as the original features.

[0148] In one embodiment, when performing feature enhancement processing on the original features based on a graph theory indicator set to determine the target input features, the feature enhancement module 404 is also used to: perform integration and expansion processing on the graph diameter and the average spatial distance to determine the first global feature vector set corresponding to the graph diameter and the second global feature vector set corresponding to the average spatial distance, wherein the number of nodes contained in the global feature vector set is the same as the number of nodes contained in the original feature matrix; perform feature enhancement processing on the original feature matrix using the first global feature vector set and the second global feature vector set to concatenate the first global feature vector, the second global feature vector and the original feature corresponding to each node to determine the target input features.

[0149] In one embodiment, when sending the target input features to the multi-scale spatiotemporal convolutional network, performing model training processing on the multi-scale spatiotemporal convolutional network, and determining the target multi-scale spatiotemporal convolutional network, the above-mentioned model training module 406 is also used to: send the target input features to the graph convolution layer and the time convolution layer of the multi-scale spatiotemporal convolutional network, so that each branch in the multi-scale spatiotemporal convolutional network performs graph convolution processing and time convolution processing in turn to determine the features corresponding to different scales; use a preset attention fusion mechanism to perform feature fusion processing on the features corresponding to different scales, determine the target fusion features, and use the target fusion features to determine the target multi-scale spatiotemporal convolutional network.

[0150] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0151] An embodiment of the present invention provides an electronic device. Specifically, the electronic device includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes the method described in any one of the above-mentioned implementation methods.

[0152] Figure 5A structural diagram of an electronic device provided in an embodiment of the present invention, the electronic device 100 includes: a processor 50, a memory 51, a bus 52 and a communication interface 53, wherein the processor 50, the communication interface 53 and the memory 51 are connected via the bus 52; the processor 50 is used to execute an executable module stored in the memory 51, such as a computer program.

[0153] The memory 51 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 53 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0154] The bus 52 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0155] Among them, the memory 51 is used to store programs, and the processor 50 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 50 or implemented by the processor 50.

[0156] The processor 50 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 50. The above processor 50 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to be executed, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 51, and the processor 50 reads the information in the memory 51 and completes the steps of the above method in combination with its hardware.

[0157] The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be referred to the previous method embodiments, which will not be repeated here.

[0158] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, electronic device, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.

[0159] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A multi-scale spatiotemporal graph convolution cyanobacteria prediction method based on hydrodynamic perception, characterized in that: The method comprises: Obtaining the spatial distances between various water quality monitoring stations preset in the area to be detected, and determining an edge weight matrix based on the spatial distances and a preset adjustable scale parameter, wherein the edge weight matrix is ​​used to determine the edge weights between any two nodes in the water quality monitoring station, and the preset adjustable scale parameter is used to adjust the influence of the spatial distance on the edge weight; A graph theory indicator set is set, and feature enhancement processing is performed on the original features based on the graph theory indicator set to determine the target input features, wherein the graph theory indicator set includes: graph diameter, average spatial distance and degree matrix; A multiscale spatiotemporal convolutional network is constructed based on the edge weight matrix, and the target input feature is sent to the multiscale spatiotemporal convolutional network, model training is performed on the multiscale spatiotemporal convolutional network, and a target multiscale spatiotemporal convolutional network is determined, so as to use the multiscale spatiotemporal convolutional network to predict the outbreak of cyanobacteria; The step of setting a graph theory indicator set includes: calculating the distance between any two nodes in the water quality monitoring station through a preset spatial distance matrix and a preset adjacency matrix to determine the graph diameter of the hydrodynamic constraint, wherein the graph diameter is the maximum value of the spatial distance between any two nodes, and the graph diameter is used to reflect the connectivity between the two farthest monitoring points in the water system; The step of setting the graph theory indicator set further includes: obtaining the number of monitoring stations, and determining the average spatial distance based on the number of monitoring stations and the spatial distance between nodes, wherein the average spatial distance is used to reflect the average efficiency of material transmission in the water system; The step of setting the graph theory indicator set further includes: using the weight matrix to obtain the edge weight between any two nodes, and determining the weighted degree corresponding to the node according to the edge weight and the hydrodynamic factor contained between the nodes, wherein the hydrodynamic factor is a parameter related to the hydrodynamic mechanism; based on the weighted degree and the number of monitoring stations, determining the degree matrix, wherein the degree matrix is ​​used to reflect the local hydrodynamic influence intensity of each monitoring point; Among them, the step of performing feature enhancement processing on the original features based on the graph theory indicator set to determine the target input features includes: performing integration and expansion processing on the graph diameter and the average spatial distance to determine the first global feature vector set corresponding to the graph diameter and the second global feature vector set corresponding to the average spatial distance, wherein the number of nodes contained in the global feature vector set is the same as the number of nodes contained in the original feature matrix; performing feature enhancement processing on the original feature matrix using the first global feature vector set and the second global feature vector set to concatenate the first global feature vector, the second global feature vector and the original feature corresponding to each node to determine the target input features.

2. The multi-scale spatiotemporal graph convolution cyanobacteria prediction method based on hydrodynamic perception according to claim 1 is characterized in that: Before the step of performing feature enhancement processing on the original features based on the graph theory indicator set to determine the target input features, the method includes: The water quality index parameters and hydrodynamic mechanism-related parameters detected by each water quality monitoring station at each time step are determined as characteristic dimensions; According to the feature dimension, the number of monitoring stations and the time step, a spatiotemporal graph sequence of the convolutional network is determined, and the spatiotemporal graph sequence is determined as the original feature.

3. The multi-scale spatiotemporal graph convolution cyanobacteria prediction method based on hydrodynamic perception according to claim 1 is characterized in that: The step of sending the target input feature to the multi-scale spatiotemporal convolutional network, performing model training processing on the multi-scale spatiotemporal convolutional network, and determining the target multi-scale spatiotemporal convolutional network includes: Sending the target input features to the graph convolution layer and the time convolution layer of the multi-scale spatiotemporal convolutional network, so that each branch in the multi-scale spatiotemporal convolutional network performs graph convolution processing and time convolution processing in sequence to determine features corresponding to different scales; By using a preset attention fusion mechanism, features corresponding to different scales are fused to determine target fusion features, so as to determine the target multi-scale spatiotemporal convolutional network by using the target fusion features.

4. A multi-scale spatiotemporal graph convolution cyanobacteria prediction device based on hydrodynamic perception, characterized in that: The device comprises: A matrix construction module, which obtains the spatial distances between various water quality monitoring stations preset in the area to be detected, and determines an edge weight matrix based on the spatial distances and a preset adjustable scale parameter, wherein the edge weight matrix is ​​used to determine the edge weights between any two nodes in the water quality monitoring station, and the preset adjustable scale parameter is used to adjust the influence of the spatial distance on the edge weight; A feature enhancement module is configured to set a graph theory indicator set, and perform feature enhancement processing on the original features based on the graph theory indicator set to determine the target input features, wherein the graph theory indicator set includes: graph diameter, average spatial distance and degree matrix; A model training module, constructing a multi-scale spatiotemporal convolutional network based on the edge weight matrix, sending the target input features to the multi-scale spatiotemporal convolutional network, performing model training processing on the multi-scale spatiotemporal convolutional network, and determining a target multi-scale spatiotemporal convolutional network, so as to use the multi-scale spatiotemporal convolutional network to predict cyanobacteria outbreaks; The step of setting a graph theory indicator set includes: calculating the distance between any two nodes in the water quality monitoring station through a preset spatial distance matrix and a preset adjacency matrix to determine the graph diameter of the hydrodynamic constraint, wherein the graph diameter is the maximum value of the spatial distance between any two nodes, and the graph diameter is used to reflect the connectivity between the two farthest monitoring points in the water system; The step of setting the graph theory indicator set further includes: obtaining the number of monitoring stations, and determining the average spatial distance based on the number of monitoring stations and the spatial distance between nodes, wherein the average spatial distance is used to reflect the average efficiency of material transmission in the water system; The step of setting the graph theory indicator set further includes: using the weight matrix to obtain the edge weight between any two nodes, and determining the weighted degree corresponding to the node according to the edge weight and the hydrodynamic factor contained between the nodes, wherein the hydrodynamic factor is a parameter related to the hydrodynamic mechanism; based on the weighted degree and the number of monitoring stations, determining the degree matrix, wherein the degree matrix is ​​used to reflect the local hydrodynamic influence intensity of each monitoring point; Among them, the step of performing feature enhancement processing on the original features based on the graph theory indicator set to determine the target input features includes: performing integration and expansion processing on the graph diameter and the average spatial distance to determine the first global feature vector set corresponding to the graph diameter and the second global feature vector set corresponding to the average spatial distance, wherein the number of nodes contained in the global feature vector set is the same as the number of nodes contained in the original feature matrix; performing feature enhancement processing on the original feature matrix using the first global feature vector set and the second global feature vector set to concatenate the first global feature vector, the second global feature vector and the original feature corresponding to each node to determine the target input features.

5. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method according to any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Channel water level prediction method and device based on space-time diagram convolutional network, and storage medium

    CN116644831A

  • Short-term traffic flow prediction method based on space-time convolutional network

    CN117037493A