A water quality pollutant early warning method and related equipment based on a large ecological environment monitoring data model

By using the target reduction mapping component and the clustering technology of attention-oriented vector sets in the large model of ecological environment monitoring data, the problem of low efficiency of existing water quality monitoring methods is solved, and rapid and accurate early warning of water quality pollutants is achieved.

CN118365499BActive Publication Date: 2024-09-06HOLLY TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410789669.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-09-06
Estimated Expiration
2044-06-19

AI Technical Summary

Technical Problem

Existing water quality monitoring methods are inefficient and difficult to monitor and respond to sudden water pollution events in real time. They also require large amounts of calculations and slow processing speeds when processing massive ecological environment monitoring data, making it difficult to filter out water quality pollutants useful for early warning from the data. key features.

Method used

A water quality pollutant early warning method based on a large model of ecological environment monitoring data is adopted. Through the target restoration mapping component and the clustering of attention-oriented vector sets, the number of attention-oriented vectors processed is reduced, the processing speed and accuracy are improved, and the attention mechanism is used to focus on Key information in the data enables rapid monitoring and early warning of water quality pollutants.

Benefits of technology

It improves the timeliness and accuracy of water quality pollutant monitoring and early warning, reduces the difficulty of model processing, increases the reliability and efficiency of early warning, and can more accurately characterize the water quality pollutant early warning results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118365499B
    Figure CN118365499B
Patent Text Reader

Abstract

The present application provides a water quality pollutant early warning method and related equipment based on a large model of ecological environment monitoring data. The method clusters all the attention-oriented vectors to be processed by a target restoration mapping component to obtain multiple attention-oriented vector sets, and then causes the target restoration mapping component to process the data representation vectors corresponding to each attention-oriented vector set and the ecological environment monitoring data to be analyzed based on the clustering results to obtain restored attention-oriented vectors corresponding to each attention-oriented vector in each attention-oriented vector set; the number of attention-oriented vectors processed by the target restoration mapping component each time can be reduced. At the same time, because the number of processed attention-oriented vectors is reduced, the processing difficulty of the target restoration mapping component is reduced, the processing speed is improved, and it helps to quickly monitor and warn of water quality pollutants and improve the timeliness of the warning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to but is not limited to the field of data processing technology, and in particular to a water quality pollutant early warning method and related equipment based on a large ecological environment monitoring data model. Background Art

[0002] Traditional water quality monitoring methods often rely on manual sampling and laboratory analysis, which is not only inefficient, but also difficult to detect and respond to sudden water pollution incidents in a timely manner. Therefore, it is particularly important to develop a water quality pollutant monitoring and early warning computer device that can monitor in real time and quickly warn. In recent years, the development of big data technology and artificial intelligence algorithms has provided new ideas for the monitoring and early warning of water quality pollutants. By collecting massive amounts of ecological environment monitoring data and using machine learning, deep learning and other algorithms to analyze and process these data, real-time monitoring and early warning of water quality pollutants can be achieved. At present, although some water quality pollutant monitoring and early warning computer devices based on big data and artificial intelligence have been proposed, these computer devices often face problems such as large computational complexity and slow processing speed when processing massive data. In addition, since the ecological environment monitoring data contains a lot of noise and redundant information, how to screen out key features that are useful for water quality pollutant early warning from these data is also a problem that needs to be solved. Summary of the invention

[0003] In view of this, the embodiment of the present application at least provides a water quality pollutant early warning method based on a large ecological environment monitoring data model. The technical solution of the present application is implemented as follows:

[0004] On the one hand, the present application provides a water quality pollutant early warning method based on an ecological environment monitoring data big model, the method comprising: determining an ecological environment monitoring data sample representation vector corresponding to an ecological environment monitoring data sample; based on a target restoration mapping component in the ecological environment monitoring data big model, based on multiple sample attention-oriented vector sets and the ecological environment monitoring data sample representation vector, determining the sample restoration attention-oriented vectors corresponding to each sample attention-oriented vector in the multiple sample attention-oriented vector sets; wherein the multiple sample attention-oriented vector sets are obtained by clustering the respective proposed processing attention-oriented vectors corresponding to the target restoration mapping component; the proposed processing attention-oriented vector is determined based on the debugging initial attention-oriented vector, or is obtained by selecting from each sample restoration attention-oriented vector output by a previous restoration mapping component of the target restoration mapping component according to a target significance index; the target restoration mapping component is a restoration mapping component in the ecological environment monitoring data big model; for each of the sample attention-oriented vector sets, based on the sample restoration attention-oriented vectors corresponding to each sample attention-oriented vector and the prior annotation information corresponding to the ecological environment monitoring data sample, determining the error value corresponding to the sample attention-oriented vector set; based on the error values ​​corresponding to the multiple sample attention-oriented vector sets, determining The method comprises the following steps: determining an error value corresponding to the target reduction mapping component; debugging the ecological environment monitoring data big model according to the error values ​​corresponding to the reduction mapping components of each layer in the ecological environment monitoring data big model, and stopping the debugging when the model converges; extracting a data representation vector corresponding to the ecological environment monitoring data to be analyzed, wherein the ecological environment monitoring data to be analyzed includes water body physical parameters, water body chemical parameters, water body biological parameters and specific pollutant parameters; based on the target reduction mapping component in the ecological environment monitoring data big model, based on multiple attention-oriented vector sets and the data representation vector, determining the reduction attention-oriented vectors corresponding to each attention-oriented vector in the multiple attention-oriented vector sets; the multiple attention-oriented vector sets are obtained by clustering the respective attention-oriented vectors to be processed corresponding to the target reduction mapping component; the intended processing attention-oriented vector is determined based on the initial attention-oriented vector, or is obtained by selecting the reduction attention-oriented vectors output by the previous reduction mapping component of the target reduction mapping component according to the target significance index, and the target reduction mapping component is a reduction mapping component in the ecological environment monitoring data big model; based on the reduction attention-oriented vectors output by the last reduction mapping component in the ecological environment monitoring data big model, determining the water quality pollutant warning result corresponding to the ecological environment monitoring data to be analyzed.

[0005] In some embodiments, the error value corresponding to the sample attention-oriented vector set is determined based on the sample restoration attention-oriented vector corresponding to each sample attention-oriented vector and the prior annotation information corresponding to the ecological environment monitoring data sample, including: based on the sample restoration attention-oriented vector corresponding to each sample attention-oriented vector in the sample attention-oriented vector set, determining the inferred water quality pollutant warning results corresponding to each sample restoration attention-oriented vector; through a bipartite graph matching mechanism, based on each of the inferred water quality pollutant warning results and the prior annotation information, determining the optimal correspondence corresponding to the sample attention-oriented vector set; the optimal correspondence is used to characterize the optimal pairing strategy between each of the inferred water quality pollutant warning results and the prior annotation information; based on the optimal correspondence, determining the error value corresponding to the sample attention-oriented vector set.

[0006] In some embodiments, the method also includes: based on the current debugging process of the ecological environment monitoring data big model, determining the correlation ratio between the prior annotation information and the inferred water quality pollutant warning result; determining the optimal correspondence corresponding to the sample attention-oriented vector set based on each of the inferred water quality pollutant warning results and the prior annotation information through the bipartite graph matching mechanism, including: through the bipartite graph matching mechanism, according to the correlation ratio, based on each of the inferred water quality pollutant warning results and the prior annotation information, determining the optimal correspondence corresponding to the sample attention-oriented vector set.

[0007] In some embodiments, if the target restoration mapping component is not the first restoration mapping component in the ecological environment monitoring data large model, the respective attention-steering vectors to be processed corresponding to the target restoration mapping component are determined based on the following process: based on the respective restoration attention-steering vectors output by the previous restoration mapping component, the water quality pollutant warning results corresponding to the respective restoration attention-steering vectors are determined; the water quality pollutant warning results include the category confidence corresponding to the water quality pollutants indicated by the restoration attention-steering vectors; based on the category confidence in the water quality pollutant warning results corresponding to the respective restoration attention-steering vectors, the restoration attention-steering vector that meets the target significance index is determined in each of the restoration attention-steering vectors, and is determined as the attention-steering vector to be processed corresponding to the target restoration mapping component.

[0008] In some embodiments, the loading information of the previous restoration mapping component includes clustering the attention-oriented vectors to be processed corresponding to the previous restoration mapping component to obtain multiple attention-oriented vector sets; the output information of the previous restoration mapping component includes the restoration attention-oriented vector sets corresponding to the multiple attention-oriented vector sets; the restoration attention-oriented vectors that meet the target significance index are determined in each of the restoration attention-oriented vectors based on the category confidence in the water quality pollutant warning results corresponding to each of the restoration attention-oriented vectors, and are determined as the attention-oriented vectors to be processed corresponding to the target restoration mapping component, including: for each of the restoration attention-oriented vector sets, based on the category confidence in the water quality pollutant warning results corresponding to each of the restoration attention-oriented vectors, the restoration attention-oriented vectors that meet the target significance index are determined in the restoration attention-oriented vector set, and are determined as the attention-oriented vectors to be processed corresponding to the target restoration mapping component.

[0009] In some embodiments, if the target restoration mapping component is the first restoration mapping component in the ecological environment monitoring data big model, each of the attention-oriented vectors to be processed corresponding to the target restoration mapping component is obtained based on the following steps: each of the initial attention-oriented vectors is determined as the attention-oriented vector to be processed corresponding to the target restoration mapping component; or; the vector index corresponding to each of the initial attention-oriented vectors is determined; based on the vector indicators corresponding to each of the initial attention-oriented vectors, the initial attention-oriented vector that meets the preset vector indicator requirements is determined from each of the initial attention-oriented vectors, and is determined as the attention-oriented vector to be processed corresponding to the target restoration mapping component.

[0010] In some embodiments, the attention-directed vector set is determined based on one or more of the following strategies: Strategy 1: According to a preset number of clusters, each of the attention-directed vectors to be processed corresponding to the target restoration mapping component is arbitrarily divided into the multiple attention-directed vector sets; Strategy 2: Determine the vector indicators corresponding to each of the attention-directed vectors to be processed corresponding to the target restoration mapping component; According to the preset number of clusters, based on the vector indicators corresponding to each of the attention-directed vectors to be processed, add each of the attention-directed vectors to the multiple attention-directed vector sets; Strategy 3: Determine the position information of each of the attention-directed vectors to be processed corresponding to the target restoration mapping component in the representation vector domain; According to the preset number of clusters, based on the position information of each of the attention-directed vectors to be processed in the representation vector domain, add each of the attention-directed vectors to the multiple attention-directed vector sets.

[0011] In some embodiments, the target restoration mapping component based on the large model of ecological environment monitoring data determines the restored attention-oriented vectors corresponding to each attention-oriented vector in the multiple attention-oriented vector sets based on multiple attention-oriented vector sets and the data representation vector, including: based on the target restoration mapping component, through an internal weight focusing strategy, based on each of the attention-oriented vector sets, determining the transition attention-oriented vector set corresponding to each of the attention-oriented vector sets; the transition attention-oriented vector set includes the transition attention-oriented vectors corresponding to each of the attention-oriented vector sets in its corresponding attention-oriented vector set; based on the target restoration mapping component, through a weight focusing strategy, based on each of the transition attention-oriented vector sets and the data representation vector, determining the restored attention-oriented vector set corresponding to each of the transition attention-oriented vector sets; the restored attention-oriented vector set includes the restored attention-oriented vectors corresponding to each of the transition attention-oriented vector sets in its corresponding transition attention-oriented vector set.

[0012] In some embodiments, each restoration mapping component in the ecological environment monitoring data big model is the target restoration mapping component; or, the first x restoration mapping components in the ecological environment monitoring data big model are the target restoration mapping components; x is a positive integer less than the number of restoration mapping components in the ecological environment monitoring data big model.

[0013] In a second aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the steps in the above-described method when executing the program.

[0014] The beneficial effects of the present application include at least: the present application provides a water quality pollutant early warning method based on a large model of ecological environment monitoring data, based on clustering all the attention-oriented vectors to be processed by the target restoration mapping component, to obtain multiple attention-oriented vector sets, and then let the target restoration mapping component process according to the clustering results, according to each attention-oriented vector set and the data representation vector corresponding to the ecological environment monitoring data to be analyzed, to obtain the restored attention-oriented vectors corresponding to each attention-oriented vector in each attention-oriented vector set; it can reduce the number of attention-oriented vectors processed by the target restoration mapping component each time. At the same time, because the number of processed attention-oriented vectors is reduced, the processing difficulty of the target restoration mapping component is reduced, the processing speed is improved, which helps to quickly monitor and warn of water quality pollutants and improve the timeliness of the warning. Further, the attention-oriented vector to be processed by the target restoration mapping component can be selected from the restored attention-oriented vectors output by the previous restoration mapping component according to the target significance index. Based on this, the attention-oriented vectors to be processed by the target restoration mapping component are all high-quality attention-oriented vectors. The target restoration mapping component is processed according to the above-mentioned attention-oriented vectors to be processed, and a higher-quality restored attention-oriented vector can be obtained, that is, the restored attention-oriented vector obtained can more accurately characterize the water quality pollutant warning results, increase the accuracy of the target restoration mapping component, and help increase the reliability and accuracy of the water quality pollutant warning results determined based on the restored attention-oriented vector output by the last restoration mapping component in the large model of the ecological environment monitoring data. In addition, selecting the attention-oriented vector to be processed by the target restoration mapping component according to the target significance index can also reduce the number of attention-oriented vectors that the target restoration mapping component needs to process, so as to reduce the processing difficulty of the target restoration mapping component, increase the processing speed of the target restoration mapping component, improve the warning efficiency of water quality pollutants, and improve the timeliness of warning. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0016] Figure 1 A schematic diagram of the implementation process of a water quality pollutant early warning method based on a large model of ecological environment monitoring data provided in an embodiment of the present application.

[0017] Figure 2 A hardware entity diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0019] The embodiment of the present application provides a water quality pollutant early warning method based on a large ecological environment monitoring data model, which can be executed by a processor of a computer device, wherein the computer device can refer to a device with data processing capabilities such as a server, a laptop, a tablet computer, and a desktop computer.

[0020] Specifically, this application provides a water quality pollutant early warning method based on a large model of ecological environment monitoring data, please refer to Figure 1 , the method includes a model training phase and a model application phase:

[0021] 1. The model training phase includes the following steps S100~S500:

[0022] Step S100: Determine the ecological environment monitoring data sample representation vector corresponding to the ecological environment monitoring data sample.

[0023] In the embodiment of the present application, the ecological environment monitoring data sample usually contains multiple parameters to comprehensively reflect the physical, chemical, biological state of the water body and various parameters that can reflect the water quality, such as specific pollutants. For example, the physical parameters of the water body may include parameters such as water temperature and transparency. The temperature of the water body is usually measured in degrees Celsius (℃). For example, the water temperature of a monitoring point at a certain moment is 25℃. Transparency indicates the clarity of the water body, which is usually measured using a Secchi disk. For example, a transparency of 2 meters means that the Secchi disk can still be seen at a depth of 2 meters. Water body chemical parameters may include, for example, dissolved oxygen (DO), pH value, conductivity, ammonia nitrogen content, etc. Dissolved oxygen (DO) is used to measure the content of dissolved oxygen in water, and the unit is usually milligrams per liter (mg / L). For example, the DO value is 8.5 mg / L. The pH value indicates the acidity and alkalinity of the water body. For example, a pH value of 7.2 indicates that the water body is slightly alkaline. Conductivity reflects the index of ion concentration in water, and the unit is usually microsiemens per centimeter (μS / cm). For example, the conductivity is 500 μS / cm. Ammonia nitrogen is used to measure the content of ammonia and ammonium ions in water. It is one of the important indicators of water pollution. The unit is usually milligrams per liter (mg / L). For example, the concentration of ammonia nitrogen is 0.5 mg / L. Water biological parameters include chlorophyll a concentration, biodiversity index, etc. Chlorophyll a concentration reflects the index of algae biomass in water, and the unit is usually micrograms per liter (μg / L). For example, the concentration of chlorophyll a is 10 μg / L. Biodiversity indices such as the Shannon-Wiener index are used to assess the richness and uniformity of biological species in water bodies. The higher the index value, the higher the biodiversity. For example, the index is 3.5. Specific pollutant parameters include heavy metal content, organic pollutant concentration, etc. Heavy metal content such as lead (Pb) and mercury (Hg) are usually expressed in micrograms per liter (μg / L). For example, the lead content is 1.2 μg / L. Organic pollutant concentrations such as polycyclic aromatic hydrocarbons (PAHs) and volatile organic compounds (VOCs) depend on the specific pollutants. For example, the total amount of PAHs is 5 ng / L.

[0024] Ecological environment monitoring data are usually stored in the form of matrices or sequences, where each row represents the monitoring data at a time point and each column represents a parameter. Feature extraction is performed on the matrix-formatted ecological environment monitoring data samples to obtain the corresponding ecological environment monitoring data sample representation vector, which usually involves a series of data processing and analysis steps. For example, data preprocessing is performed first. This process usually involves missing value processing, outlier processing, data standardization or normalization, feature selection, feature extraction, feature characterization, etc. Specifically:

[0025] Missing value processing: Check whether there are missing values ​​in the data matrix, and choose to fill (such as using the mean, median, or interpolation method) or directly delete samples with missing values ​​according to the actual situation.

[0026] Outlier handling: Identify and handle outliers, which may be due to measurement errors or extreme events. This may include removing outliers, replacing them with the mean or median, or using more sophisticated statistical methods.

[0027] Data standardization or normalization: In order to eliminate the dimensional differences between different parameters, the data needs to be standardized or normalized. Standardization usually converts the data into a distribution with a mean of 0 and a standard deviation of 1, while normalization scales the data to a specified range (such as 0 to 1).

[0028] Then, feature selection is performed. In ecological environment monitoring data, there may be a large number of parameters, but not all parameters are useful for subsequent analysis. Feature selection aims to identify the subset of parameters that have the greatest impact on the analysis target. This can be done through statistical methods (such as correlation analysis, variance analysis), model selection methods (such as recursive feature elimination, model-based feature selection) or expert knowledge.

[0029] Next, feature extraction is performed. For the selected features, further feature extraction may be required to obtain more representative feature vectors. Common feature extraction methods include principal component analysis (PCA), linear discriminant analysis (LDA), multidimensional scaling analysis (MDS), etc. Taking PCA as an example, it obtains a set of new mutually orthogonal features (i.e., principal components) by linearly combining the original features. These principal components are sorted by variance and can capture the main change patterns in the data. By selecting the first few principal components, most of the information can be retained while reducing the data dimension.

[0030] After feature selection and extraction, a set of more representative features will be obtained. These features can be combined into a characterization vector to represent the original ecological environment monitoring data sample. Each element of the characterization vector corresponds to a feature, and its value reflects the performance of the feature in the sample. After constructing the characterization vector, its effect can be verified by some evaluation indicators, such as classification accuracy, R-square value of the regression model, etc. These indicators can help understand whether the characterization vector can accurately represent the original data and support subsequent analysis tasks. Feature extraction and characterization vector construction is an iterative process, which can be adjusted and optimized according to the actual data and analysis objectives. At the same time, different feature extraction methods and parameter settings will also affect the results, so sufficient experiments and verification are required in practical applications.

[0031] Specifically, in step S100, the computer device converts the collected ecological environment monitoring data samples into a representation vector suitable for processing by the machine learning model. As can be seen above, the ecological computer device monitoring data samples may include various water quality parameters, such as water temperature, dissolved oxygen, pH value, conductivity, ammonia nitrogen concentration, heavy metal content, etc., as well as possible pollutant types and concentrations. These raw data usually exist in the form of numerical values ​​or texts and cannot be directly input into the machine learning model. Therefore, they need to be converted into representation vectors through feature engineering and data preprocessing steps. For example, suppose a set of data samples containing different water quality parameters and pollutant concentrations are collected. First, the computer device cleans these data to remove missing values ​​or outliers. Then, it selects a suitable feature extraction method based on the characteristics of the data. For numerical data, standardization or normalization can be used directly to scale the features to eliminate the dimensional differences between different features. For text data (such as pollutant types), it may be necessary to use word embedding technology (such as Word2Vec or GloVe) to convert it into a numerical vector. After the feature extraction is completed, the computer device will obtain a set of representation vectors containing multiple features. Each element in these representation vectors corresponds to a feature in the original data and has been appropriately scaled or transformed so that the machine learning model can effectively use them. For example, a representation vector may contain the following feature values: [0.23, 0.76, -0.12, 0.45, 0.08, 0.32], where each value corresponds to the standardized feature value of water temperature, dissolved oxygen, pH, conductivity, ammonia nitrogen concentration, and heavy metal content.

[0032] Step S200: Based on the target restoration mapping component in the ecological environment monitoring data big model, based on multiple sample attention-oriented vector sets and the sample representation vector of the ecological environment monitoring data, determine the sample restoration attention-oriented vectors corresponding to each sample attention-oriented vector in the multiple sample attention-oriented vector sets; wherein, the multiple sample attention-oriented vector sets are obtained by clustering the respective proposed processing attention-oriented vectors corresponding to the target restoration mapping component; the proposed processing attention-oriented vector is determined based on the debugging initial attention-oriented vector, or is selected from the sample restoration attention-oriented vectors output by the previous restoration mapping component of the target restoration mapping component according to the target significance index; the target restoration mapping component is a restoration mapping component in the ecological environment monitoring data big model.

[0033] In step S200, the computer device uses the target restoration mapping component in the ecological environment monitoring data big model to process the ecological environment monitoring data sample representation vector, and determines the sample restoration attention orientation vector corresponding to each sample attention orientation vector based on multiple sample attention orientation vector sets. This process involves the use of the attention mechanism, the purpose of which is to enable the model to focus on the key information in the data and improve the accuracy of water quality pollutant warning.

[0034] Specifically, first, the computer device clusters the attention-oriented vectors to be processed corresponding to the target restoration mapping component, that is, completes the grouping, and forms multiple sets of sample attention-oriented vectors. These attention-oriented vectors to be processed may be determined based on the debugging initial attention-oriented vector, or selected from the sample restoration attention-oriented vectors output by the previous restoration mapping component according to the target significance index. The target significance index is usually set according to a certain evaluation standard (such as accuracy, recall rate, etc.) in the model training process, and is used to measure the importance or quality of the feature.

[0035] For example, suppose that the target reduction mapping component is a decoding layer in the large model of ecological environment monitoring data, which is responsible for decoding the encoded feature vector back to the original data space or a more understandable feature space. In this decoding process, the decoder needs to focus on the key information in the data in order to accurately restore the original data. To achieve this, the decoder uses an attention mechanism to guide the decoding process through multiple sample attention-oriented vector sets. Each sample attention-oriented vector set can be regarded as a set of query vectors (query), which represent the aspects that the model should pay attention to when decoding different parts of the data. For example, one sample attention-oriented vector set may focus on physical parameters such as water temperature and dissolved oxygen, while another set may focus more on chemical pollutant parameters such as ammonia nitrogen and heavy metals. Next, the computer device inputs these sample attention-oriented vector sets together with the sample representation vectors of the ecological environment monitoring data into the target reduction mapping component. The decoder decodes the representation vector according to the guidance of the attention-oriented vector and generates the corresponding sample reduction attention-oriented vector. These sample reduction attention-oriented vectors are generated by the decoder when paying attention to specific feature sets, and they reflect the model's understanding and representation of these feature sets.

[0036] Through this process, the computer equipment can ensure that the model can focus on the key information in the data when decoding, thereby improving the accuracy of water quality pollutant warnings. At the same time, due to the use of the attention mechanism, the model can also flexibly process data of different scales and complexities and adapt to different application scenarios.

[0037] Step S300: For each of the sample attention-steering vector sets, determine the error value corresponding to the sample attention-steering vector set based on the sample restoration attention-steering vectors corresponding to each of the sample attention-steering vectors and the prior annotation information corresponding to the ecological environment monitoring data sample.

[0038] In step S300 of the model training phase, the computer device uses the sample attention-oriented vector set and their corresponding sample restoration attention-oriented vectors, combined with the prior annotation information of the ecological environment monitoring data samples, to determine the error value corresponding to each sample attention-oriented vector set.

[0039] Prior annotation information usually refers to the true value of the known water quality pollutant concentration or other related parameters. These data may come from laboratory analysis, historical records, or expert judgment, and they are used as reference standards for model training. Next, consider how to calculate the error value. Assume that the mean squared error (MSE) is used as the loss function, which is a commonly used loss function for regression problems. The calculation formula for the mean squared error is as follows:

[0040]

[0041] Where N is the number of samples, yi is the prior annotation information (true value) of the i-th sample, is the model's predicted value for the i-th sample.

[0042] In step S300, since multiple sample attention-oriented vector sets are processed, it is necessary to calculate the error value, also called the loss value, for each set separately. For each sample attention-oriented vector set, its corresponding sample restored attention-oriented vector can be regarded as the prediction result of the model for the features of the set. Then, these prediction results are compared with the corresponding prior annotation information, and the error value is calculated using the mean square error or other appropriate loss function.

[0043] Let's take an example to illustrate this process. Suppose there is a set of sample attention-oriented vectors that focus on three parameters: water temperature, dissolved oxygen, and ammonia nitrogen. For this set, the model generates corresponding sample restored attention-oriented vectors, which contain the model's predicted values ​​for these three parameters. Then, these predicted values ​​are compared with the true values ​​of the three parameters (prior annotation information), and the mean square error is used to calculate the error value. This error value reflects the prediction performance of the model when focusing on these three parameters.

[0044] Through this process, the computer device can determine an error value for each sample attention-directed vector set, and these error values ​​will be used in subsequent model optimization steps (such as step S500). By minimizing these error values, the computer device can adjust the parameters of the model to improve the model's prediction accuracy for water quality pollutants.

[0045] Step S400: Based on the error values ​​corresponding to the multiple sample attention-guided vector sets, determine the error value corresponding to the target restoration mapping component.

[0046] In step S400, the computer device further determines the error value of the target restoration mapping component as a whole based on the error values ​​corresponding to the multiple sample attention-oriented vector sets. This step is a key link in evaluating and optimizing model performance, especially when dealing with complex models with multiple attention-oriented vector sets and corresponding decoding outputs. In practical applications, when processing ecological environment monitoring data, the target restoration mapping component can generate multiple corresponding sample restoration attention-oriented vectors (i.e., decoding outputs) based on multiple different sample attention-oriented vector sets (i.e., different sets of features or focus points). Each sample attention-oriented vector set represents a part of the key features or focus points in the data, and the corresponding sample restoration attention-oriented vector is the model's prediction or decoding result for these features.

[0047] In order to evaluate the performance of the target restoration mapping component, the computer device needs to calculate the error value corresponding to each sample attention-oriented vector set. These error values ​​are usually calculated by comparing the sample restored attention-oriented vector (predicted value) with the corresponding prior annotation information (true value), such as using loss functions such as mean square error (MSE) and cross entropy loss. After determining the error value corresponding to each sample attention-oriented vector set, the computer device combines these error values ​​to obtain the overall error value of the target restoration mapping component. This process may involve weighted averaging, summing, or other forms of aggregation operations on the individual error values, depending on the model design and optimization goals.

[0048] For example, assume that the target reduction mapping component processes three different sets of sample attention-oriented vectors, corresponding to the three key water quality parameters of water temperature, dissolved oxygen, and ammonia nitrogen. For each set of sample attention-oriented vectors, the model generates a corresponding sample reduction attention-oriented vector, that is, the model's predicted values ​​for these three parameters. Then, the computer device calculates the error values ​​between the three predicted values ​​and the true values ​​respectively (for example, using mean square error). Finally, it may weighted average the three error values ​​(giving different weights to different parameters) to obtain the error value of the target reduction mapping component as a whole. By calculating the error value of the target reduction mapping component as a whole, the computer device can more comprehensively evaluate the performance of the model in the decoding or prediction process. This error value will serve as the basis for subsequent model optimization steps (such as step S500) to guide the adjustment and optimization of model parameters to improve the accuracy of the model's early warning of water quality pollutants.

[0049] Step S500: Debug the ecological environment monitoring data model according to the error values ​​corresponding to the restoration mapping components of each layer in the ecological environment monitoring data model, and stop debugging when the model converges.

[0050] In step S500, the computer device debugs and trains the model according to the error values ​​corresponding to the restoration mapping components of each layer in the ecological environment monitoring data model. This process aims to optimize the parameters of the model (such as weights, biases, learning rates, etc.) so that the model can better fit the training data and improve the accuracy and efficiency of water quality pollutant early warning.

[0051] In practical applications, model training is usually an iterative process. In each iteration cycle, the computer device first inputs the ecological environment monitoring data sample into the model, and obtains the model output (i.e., water quality pollutant warning results) through forward propagation calculation. Then, the computer device calculates the error value of each layer of the restored mapping component based on the difference between the output and the prior annotation information (the actual water quality pollutant concentration or category). These error values ​​reflect the prediction performance of the model under the current parameter settings.

[0052] Next, the computer device uses the back propagation algorithm to update the parameters of the model according to the calculated error value. The back propagation algorithm calculates the gradient of the error value to the model parameter by the chain rule, and then updates the parameter in the opposite direction of the gradient to reduce the error value. This process usually uses optimization algorithms (such as gradient descent algorithm, Adam optimizer, etc.) to accelerate the parameter update process and control hyperparameters such as learning rate to avoid overfitting or underfitting. During the model training process, the computer device continuously repeats the process of forward propagation, error value calculation and back propagation parameter update until the conditions for model convergence are met. There can be many conditions for model convergence, such as the number of debugging rounds reaching the preset maximum number of times, or the error value is reduced to below the preset minimum threshold. When these conditions are met, the model training process will stop, and the model parameters obtained at this time will be regarded as the optimal parameters for subsequent water quality pollutant early warning tasks.

[0053] To illustrate with a specific example, suppose there is a large ecological environment monitoring data model containing multiple decoding layers, and each decoding layer corresponds to a restoration mapping component. During the model training process, the computer device first inputs the ecological environment monitoring data sample into the model, and obtains the output of each decoding layer through forward propagation calculation. Then, the computer device calculates the error value corresponding to each decoding layer based on the difference between the output and the prior annotation information. Next, the computer device uses the backpropagation algorithm and the gradient descent optimizer to update the parameters of the model to reduce the error value. This process will be repeated until the error value of the model is reduced to below the preset minimum threshold or reaches the preset maximum number of iterations. At this point, the computer device will stop training and save the obtained model parameters for subsequent water quality pollutant warning tasks.

[0054] Through the model debugging process of step S500, the computer equipment can continuously optimize the performance of the ecological environment monitoring data large model to make it more adaptable to the actual water quality monitoring and early warning needs. This is of great significance for timely discovery and response to sudden water pollution incidents, and helps to protect water resources and the ecological environment.

[0055] 2. Model application stage, including the following steps S10~S30:

[0056] Step S10: extracting data characterization vectors corresponding to the ecological environment monitoring data to be analyzed, wherein the ecological environment monitoring data to be analyzed includes water body physical parameters, water body chemical parameters, water body biological parameters and specific pollutant parameters.

[0057] Step S10 can refer to the aforementioned step S100. In step S10 of the model application stage, the computer device first needs to process the ecological environment monitoring data to be analyzed and extract the corresponding data representation vector. This step is crucial for subsequent water quality pollutant warnings because it converts the raw data into a form that can be understood by the machine learning model.

[0058] In practical applications, the ecological environment monitoring data to be analyzed usually contains multiple parameters, such as water body physical parameters, water body chemical parameters, water body biological parameters and specific pollutant parameters. These parameters together reflect the comprehensive status of the water body and are an important basis for early warning of water quality pollutants. Specifically, water body physical parameters may include water temperature, transparency, flow rate, etc., which describe the basic physical properties of the water body. Water body chemical parameters involve dissolved oxygen, pH value, conductivity, ammonia nitrogen, heavy metals, etc. These parameters can reveal the chemical composition and pollution status of the water body. Water body biological parameters such as chlorophyll a concentration and biodiversity index reflect the ecological health status of the water body. Specific pollutant parameters target specific pollutants, such as organic pollutants and pesticide residues, which are of great significance for assessing the specific pollution risks of water bodies.

[0059] In the process of extracting data representation vectors, the computer equipment will first clean and preprocess the original data to remove outliers and missing values ​​to ensure the accuracy and completeness of the data. Then, according to the type and characteristics of the data, select the appropriate feature extraction method. For numerical data, you can directly use standardization or normalization methods to scale features; for text data or categorical data, you may need to use One-Hot Encoding, Word Embedding and other technologies for conversion.

[0060] Take dissolved oxygen as an example, assuming the monitored dissolved oxygen concentration is 8.5 mg / L. The computer equipment normalizes this value and converts it into a standardized value within a specific range (for example, after normalization, the value may be 0.6). Similarly, similar processing is performed for other parameters such as pH value, conductivity, etc.

[0061] Through the data characterization vector extraction process in step S10, the computer device can convert the original ecological environment monitoring data into a form suitable for machine learning model processing. These data characterization vectors will be used as the input of the model for subsequent water quality pollutant early warning analysis. This process not only improves the utilization and interpretability of the data, but also provides more abundant and accurate information support for the model.

[0062] Step S20: Based on the target restoration mapping component in the ecological environment monitoring data big model, based on multiple attention-oriented vector sets and the data representation vector, determine the restored attention-oriented vectors corresponding to each attention-oriented vector in the multiple attention-oriented vector sets; the multiple attention-oriented vector sets are obtained by clustering the respective proposed processing attention-oriented vectors corresponding to the target restoration mapping component; the proposed processing attention-oriented vector is determined based on the initial attention-oriented vector, or is selected from the respective restored attention-oriented vectors output by the previous restoration mapping component of the target restoration mapping component according to the target significance index, and the target restoration mapping component is a restoration mapping component in the ecological environment monitoring data big model.

[0063] In step S20, the computer device uses the target reduction mapping component in the large model of ecological environment monitoring data to process real-time ecological environment monitoring data. The core of this step is to focus on the key information in the data through the attention mechanism so as to more accurately predict the status of water quality pollutants. First, the computer device needs to extract data representation vectors from the real-time collected ecological environment monitoring data. These data representation vectors contain information such as water body physical parameters (such as water temperature, flow rate), water body chemical parameters (such as dissolved oxygen, pH value, ammonia nitrogen concentration), water body biological parameters (such as chlorophyll a concentration) and specific pollutant parameters (such as heavy metal content). After preprocessing and feature extraction, these data form a representation form that can be understood by the model. Next, the computer device uses the target reduction mapping component to process these data representation vectors. In this process, the attention mechanism plays a key role. Multiple attention-oriented vector sets are obtained by clustering (grouping) the attention-oriented vectors to be processed corresponding to the target reduction mapping component. These attention-oriented vector sets represent the aspects that the model needs to pay attention to when decoding different features or focus points.

[0064] There are two ways to determine the attention vector to be processed. One is to determine it directly based on the initial attention vector, which is usually used in the initial stage of model training or for new types of monitoring data. The other way is to select from the restored attention vectors output by the previous restored mapping component based on the target significance index. This method ensures that the model can focus on more important or significant features when processing data.

[0065] Taking water pollution warning as an example, suppose there is a set of attention-oriented vectors focusing on ammonia nitrogen concentration. In this set, each attention-oriented vector represents a different aspect that the model should pay attention to when decoding ammonia nitrogen concentration. For example, one attention-oriented vector may focus on the relationship between ammonia nitrogen concentration and water temperature, while another vector may pay more attention to the correlation between ammonia nitrogen concentration and dissolved oxygen concentration.

[0066] When the computer device receives real-time ecological environment monitoring data, it inputs the data representation vector together with these attention-oriented vector sets into the target reduction mapping component. The target reduction mapping component decodes the data representation vector according to the guidance of the attention-oriented vector and generates the corresponding reduction attention-oriented vector. These reduction attention-oriented vectors reflect the decoding results of the model on the data when paying attention to a specific feature set. Taking the prediction of ammonia nitrogen concentration as an example, the target reduction mapping component decodes the input data representation vector according to the attention-oriented vector set that pays attention to ammonia nitrogen concentration and generates a reduction attention-oriented vector. This vector contains the model's predicted value of ammonia nitrogen concentration and other relevant information. By comparing this predicted value with a preset threshold or historical data, the computer device can determine whether the current water quality has the risk of ammonia nitrogen pollution and take corresponding early warning measures. Through the processing process of step S20, the computer device can make full use of the attention mechanism to pay attention to the key information in the data and improve the accuracy and efficiency of water quality pollutant early warning. This is of great significance for timely discovery and response to water pollution incidents, and helps to protect the safety of water resources and ecological environment.

[0067] Step S30: Based on each restored attention-oriented vector output by the last restored mapping component in the large ecological environment monitoring data model, determine the water quality pollutant warning result corresponding to the ecological environment monitoring data to be analyzed.

[0068] In step S30, the computer device uses the restored attention-oriented vectors output by the last restored mapping component in the large ecological environment monitoring data model to determine the water quality pollutant warning results corresponding to the ecological environment monitoring data to be analyzed. This step is the core of the model application, which converts the model's deep understanding and analysis of the data into specific warning information to provide decision support for water quality management.

[0069] In practical applications, the output of the last reduction mapping component is usually a set of reduction attention vectors, which represent the model's comprehensive understanding and analysis of the input data. These vectors contain the key information extracted by the model when focusing on different features or points of interest, and are the basis for the model to predict the status of water quality pollutants.

[0070] In order to determine the warning results of water quality pollutants, the computer device further processes and analyzes these restored attention-oriented vectors. Specifically, it can use one or more machine learning algorithms or models (such as logistic regression, random forest, neural network, etc.) to classify or regress these vectors. These algorithms or models can identify the type and concentration of water quality pollutants based on the information in the vector and output the corresponding warning results. Taking the logistic regression model as an example, the computer device can use the restored attention-oriented vector as an input feature and calculate the probability of water quality pollutants exceeding the standard through the trained logistic regression model. If the probability exceeds the preset threshold (such as 95%), the warning mechanism is triggered and the warning information of water quality pollutants exceeding the standard is output. This information may include information such as the type of pollutants, concentration range, degree of exceeding the standard, and possible sources of pollution, which will help relevant departments to take timely response measures.

[0071] For example, suppose the real-time ecological environment monitoring data received by the model includes multiple parameters such as water temperature, dissolved oxygen, and ammonia nitrogen concentration. After the data representation vector is extracted and processed by the attention mechanism, the model outputs the corresponding restored attention-oriented vector. The computer device inputs these vectors into the logistic regression model for analysis and finds that the probability of ammonia nitrogen concentration exceeding the standard exceeds the preset threshold. Therefore, the computer device triggers the early warning mechanism and outputs an early warning result containing information about ammonia nitrogen concentration exceeding the standard. After receiving the early warning information, the relevant departments can quickly take measures to limit the discharge of pollution sources and avoid further deterioration of water quality.

[0072] Through the processing of step S30, the computer equipment can accurately convert the ecological environment monitoring data into water quality pollutant warning results, providing strong technical support for water quality management and protection. This is of great significance for timely discovery and response to water quality pollution incidents, and helps to protect the safety of water resources and ecological environment.

[0073] As an implementation manner, the step S300, based on the sample restored attention steering vectors corresponding to each sample attention steering vector and the prior annotation information corresponding to the ecological environment monitoring data sample, determines the error value corresponding to the sample attention steering vector set, which may specifically include:

[0074] Step S310: Based on the sample restoration attention steering vectors corresponding to each sample attention steering vector in the sample attention steering vector set, determine the inferred water quality pollutant warning results corresponding to each sample restoration attention steering vector.

[0075] Specifically, in step S310, the computer device first focuses on the sample attention-oriented vector set. These vector sets are obtained by clustering the attention-oriented vectors to be processed corresponding to the target reduction mapping component, and each vector set represents the attention to a specific feature or focus in the data. For example, one vector set may focus specifically on physical parameters such as water temperature and dissolved oxygen, while another vector set may focus more on chemical pollutant parameters such as ammonia nitrogen and heavy metals. Next, the computer device checks the sample reduction attention-oriented vector corresponding to each sample attention-oriented vector. These vectors are generated by the model while focusing on a specific feature set, and they contain the model's understanding and representation of these features. These representations may be high-dimensional vectors, in which each dimension corresponds to a certain encoding of a feature or attribute in the data. In order to convert these high-dimensional vectors into human-understandable water quality pollutant warning results, the computer device needs to apply some form of decoding or classification algorithm. Here, it can be assumed that the model has learned how to map the sample reduction attention-oriented vector to a specific water quality pollutant type and concentration range during the training process. This mapping may be achieved through a multi-layer perceptron (MLP), logistic regression, support vector machine (SVM) or other classification algorithms. Taking logistic regression as an example, the computer device can restore the attention-oriented vector of each sample as the input of the logistic regression model, and the model will output a probability distribution, indicating the possibility of the type and concentration range of water pollutants corresponding to the vector. For example, for the vector set focusing on ammonia nitrogen concentration, the logistic regression model can output a probability value, indicating the possibility of the ammonia nitrogen concentration exceeding the standard at the current monitoring point.

[0076] In this way, the computer equipment can transform the complex representation within the model into specific water quality pollutant warning results. These results are not only easy for humans to understand, but also can provide decision support for environmental protection departments, helping them to detect and respond to potential water quality pollution incidents in a timely manner.

[0077] Step S320: Through a bipartite graph matching mechanism, based on each of the inferred water quality pollutant warning results and the prior annotation information, determine the optimal correspondence corresponding to the sample attention-oriented vector set; the optimal correspondence is used to characterize the optimal pairing strategy between each of the inferred water quality pollutant warning results and the prior annotation information.

[0078] In step S320, the computer device uses a bipartite graph matching mechanism (also known as a Bipartite Matching algorithm) to determine the best correspondence between the inferred water quality pollutant warning result and the prior annotation information. This step plays a key role in the model evaluation and optimization process, and helps to improve the accuracy and reliability of water quality pollutant warnings. First, it is necessary to understand the basic principles of the bipartite graph matching mechanism. A bipartite graph is a special graph structure in which a vertex set can be divided into two non-overlapping subsets, and the two vertices connected by each edge in the graph belong to these two different subsets. In step S320, the computer device regards the inferred water quality pollutant warning result and the prior annotation information as two vertex subsets of the bipartite graph, each inference result and the prior annotation information is one of the vertices, and the possible matching relationship between them constitutes the edge of the graph. Then, the computer device applies a bipartite graph matching algorithm to find the best correspondence. The goal of this algorithm is to maximize the number of matching edges or minimize a certain cost function under the premise of satisfying certain constraints (such as each vertex can only match one edge). In the scenario of water pollutant warning, these constraints may include that each inference result can only be matched with one prior annotation information, and vice versa.

[0079] For example, suppose there are five inference water quality pollutant warning results (denoted as R1, R2, R3, R4, R5), which correspond to the model's prediction of water quality pollutants at five different monitoring points; at the same time, there are five prior annotation information (denoted as L1, L2, L3, L4, L5), which are real water quality pollutant data obtained through laboratory analysis or other reliable means. The task of the bipartite graph matching algorithm is to find a matching method so that each inference result can be paired with the closest prior annotation information.

[0080] When executing the bipartite graph matching algorithm, the computer device can use various heuristic strategies to optimize the matching results. For example, it can calculate the similarity or distance (such as Euclidean distance, cosine similarity, etc.) between each inference result and each prior annotation information, and then try to pair the inference result with the highest similarity with the prior annotation information. This process may require multiple iterations until a matching scheme that satisfies all constraints and has the lowest cost is found. Ultimately, the bipartite graph matching algorithm outputs an optimal correspondence, that is, the optimal pairing strategy between each inference water quality pollutant warning result and the prior annotation information. This correspondence not only reflects the predictive performance of the model on a specific data set, but also provides important guidance for subsequent model optimization. By continuously iterative training and optimizing model parameters, computer equipment can gradually improve the accuracy and reliability of water quality pollutant warnings and make greater contributions to protecting water resources and the ecological environment.

[0081] Step S330: Determine the error value corresponding to the sample attention-directed vector set based on the optimal corresponding relationship.

[0082] In step S330, the computer device calculates the error value corresponding to the sample attention-oriented vector set according to the best correspondence determined by the bipartite graph matching mechanism. This step is a key step in evaluating the prediction performance of the model. It helps to understand the performance of the model on a specific data set and provides guidance for subsequent model optimization.

[0083] In step S330, the computer device has first found the best correspondence between the inferred water quality pollutant warning result and the prior annotation information through a bipartite graph matching mechanism (such as the Kuhn-Munkres algorithm). This correspondence is actually a series of matching pairs, each matching pair containing an inference result and a corresponding prior annotation information. Next, the computer device needs to calculate the error between each matching pair. The calculation of the error is usually based on a loss function that quantifies the difference between the predicted value and the true value. In the scenario of water quality pollutant warning, the loss function may select mean square error (MSE), absolute error (MAE) or cross entropy loss, etc., depending on the nature of the problem and the design of the model.

[0084] Taking the mean square error as an example, for each matching pair (inference result Ri and prior annotation information Li), the calculation formula of the mean square error is:

[0085] ;

[0086] The computer device then averages the mean square errors of all matching pairs to obtain the overall error value corresponding to the sample attention-directed vector set:

[0087] ;

[0088] Where N is the number of matching pairs.

[0089] To illustrate with a specific example, suppose there are three inference results (R1=10), (R2=15), (R3=8), which correspond to three prior annotation information (L1=10.5), (L2=14.8), (L3=7.9) respectively. Through the bipartite graph matching mechanism, the best correspondence is found (that is, each inference result matches its closest prior annotation information). Then, the mean square error of each matching pair is calculated: (MSE1=(10-10.5) 2 =0.25), (MSE2=(15-14.8) 2 =0.04), (MSE3=(8-7.9) 2 =0.01).

[0090] Finally, calculate the overall error value: (MSE total =(0.25+0.04+0.01) / 3=0.1).

[0091] This overall error value reflects the model's predictive performance when focusing on a specific set of features (represented by the sample attention-directed vector set). If the error value is large, it means that there is a large difference between the model's prediction results and the true values, and it may be necessary to further adjust the model parameters or optimize the model structure. On the contrary, if the error value is small, it means that the model's predictive performance is good and can more accurately predict the status of water quality pollutants. By continuously iterating and optimizing the model, computer equipment can gradually improve the accuracy and reliability of water quality pollutant warnings.

[0092] As an implementation mode, during the model training stage, the method may further include: Step S500: determining the correlation ratio between the prior annotation information and the inferred water quality pollutant warning result based on the current debugging process of the large ecological environment monitoring data model.

[0093] In the model training phase, step S500 introduces a dynamic adjustment mechanism, which determines the correlation ratio between the prior annotation information and the inferred water quality pollutant warning results based on the current debugging process (i.e., the training status) of the large ecological environment monitoring data model. The purpose of this dynamic adjustment strategy is to more reasonably utilize the prior annotation information at different training stages, thereby optimizing the training effect of the model.

[0094] Specifically, in the early stages of model training, because the model has not yet fully learned the inherent laws and characteristics of the data, the accuracy of the inference results of water quality pollutant warnings is often low. At this time, if a one-to-one matching method is directly adopted (that is, each inference result can only match one prior annotation information), a large number of inference results may not be able to find matching prior annotation information, thus affecting the training efficiency and convergence speed of the model.

[0095] In order to solve this problem, step S500 allows the computer device to dynamically adjust the correlation ratio between the prior annotation information and the reasoning results according to the current training state of the model. Specifically, in the early stage of training, due to the poor performance of the model, the computer device will increase the correlation ratio so that one prior annotation information can match multiple reasoning results. This one-to-many matching method can increase the proportion of positive samples, improve matching efficiency, and thus accelerate the convergence speed of the model. For example, suppose that in the early stage of training, the model's prediction performance for ammonia nitrogen concentration is low. At this time, the computer device can set the correlation ratio to 1:4, that is, allowing a priori annotated ammonia nitrogen concentration value to match up to 4 reasoning results. In this way, even if there is a certain deviation between the ammonia nitrogen concentration value predicted by the model and the actual value, it can ensure that there are enough positive samples for model training, thereby improving training efficiency.

[0096] As the training progresses, the performance of the model gradually improves, and the accuracy of the reasoning results will also increase accordingly. At this point, the computer device gradually reduces the relevant ratio to make the matching method more refined and accurate. Specifically, when the performance of the model on the validation set reaches a preset threshold, the computer device can reduce the relevant ratio, such as from 1:4 to 1:3, or even eventually restore to a 1:1 matching method. This process of gradually reducing the relevant ratio helps the model to optimize performance more carefully and improve the accuracy of early warning. Through the dynamic adjustment strategy of step S500, the computer device provides more reasonable evaluation and optimization guidance for the model at different training stages. This strategy not only speeds up the convergence speed of the model, but also improves the accuracy and reliability of the model's early warning, providing strong technical support for water quality pollutant early warning.

[0097] Based on step S500, step S320, through a bipartite graph matching mechanism, based on each of the inferred water quality pollutant warning results and the prior annotation information, determines the optimal correspondence corresponding to the sample attention-oriented vector set, which may specifically include: through the bipartite graph matching mechanism, according to the correlation ratio, based on each of the inferred water quality pollutant warning results and the prior annotation information, determines the optimal correspondence corresponding to the sample attention-oriented vector set.

[0098] In this implementation, a bipartite graph matching mechanism is used to determine the best correspondence between the sample attention-oriented vector set and the prior annotation information. The special feature of this step is that it dynamically adjusts the matching strategy according to the correlation ratio determined in the previous step S500, thereby optimizing the training effect of the model at different training stages.

[0099] In the early stage of model training, because the model has not yet fully learned the inherent laws and characteristics of the data, the accuracy of its inference of water quality pollutant warning results is often low. At this time, according to step S500, the computer device increases the correlation ratio between the prior annotation information and the inference results, allowing one prior annotation information to match multiple inference results. In step S321, the computer device will use this higher correlation ratio to determine the correspondence between the sample attention-oriented vector set and the prior annotation information through a bipartite graph matching mechanism.

[0100] Specifically, the computer device first constructs a bipartite graph based on the similarity or distance between each inference water quality pollutant warning result and the prior annotation information. In this graph, the inference results and the prior annotation information are located in two different sets, and the possible matching relationships between them constitute the edges of the graph. Then, the computer device adjusts the weights of these edges according to the correlation ratio. Due to the high correlation ratio, the computer device gives higher weights to those inference results that are more similar or closer to the prior annotation information.

[0101] Next, the computer device runs a bipartite graph matching algorithm to determine the best correspondence based on the adjusted weights. This algorithm will try to find a matching method that maximizes the sum of the weights of all matching pairs or minimizes the sum of the weights of unmatched edges. Since the weight of the inference result is calculated based on its similarity or distance to the prior annotation information and the correlation ratio, this matching method can ensure that in the early stage of training, even if the accuracy of the inference result is not high, the training efficiency and convergence speed of the model can be improved by increasing the proportion of positive samples. As the debugging proceeds, the performance of the model gradually improves, and the accuracy of the inference result will also increase accordingly. At this time, according to step S500, the computer device will gradually reduce the correlation ratio to make the matching method more refined and accurate. In step S321, the computer device adjusts the weight setting in the bipartite graph matching process accordingly. As the correlation ratio decreases, the computer device will give higher weights to those inference results that more accurately match the prior annotation information, thereby making the matching results more accurate and reliable.

[0102] For example, suppose that at the beginning of training, the model's prediction performance for ammonia nitrogen concentration is low. At this time, the correlation ratio is high, allowing a priori annotated ammonia nitrogen concentration value to match multiple reasoning results. In step S321, the computer device finds a matching method through a bipartite graph matching mechanism so that all reasoning results close to the prior annotated value can be matched, thereby improving the proportion of positive samples and training efficiency. As the training progresses, when the model's prediction performance for ammonia nitrogen concentration improves, the correlation ratio will gradually decrease, and the matching method will become more refined and accurate, ensuring that only those reasoning results that are very close to the prior annotated value can be matched. Through the dynamic adjustment strategy of step S321, the computer device can provide more reasonable evaluation and optimization guidance for the model at different training stages. This strategy not only improves the training efficiency and convergence speed of the model, but also ensures the accuracy and reliability of the model warning, providing strong technical support for water quality pollutant warning.

[0103] As an implementation mode, if the target restoration mapping component is not the first restoration mapping component in the ecological environment monitoring data large model, each of the attention orientation vectors to be processed corresponding to the target restoration mapping component is determined based on the following process:

[0104] Step S20a: Based on each restored attention steering vector output by the previous restoration mapping component, determine the water quality pollutant warning results corresponding to each of the restored attention steering vectors; the water quality pollutant warning results include the category confidence corresponding to the water quality pollutant indicated by the restored attention steering vector.

[0105] In the model application stage, when processing the attention-oriented vector to be processed of the target restoration mapping component, step S20a determines the water quality pollutant warning results corresponding to each restoration attention-oriented vector output by the previous restoration mapping component. These warning results include not only the model's prediction of the water quality pollutant category, but also the model's degree of certainty about the prediction, that is, the category confidence.

[0106] Specifically, after the previous reduction mapping component completes its work, it outputs a series of reduction attention-oriented vectors. These vectors are actually a high-dimensional representation of the input data, which contains the model's understanding and extraction of key information in the data. In the scenario of water quality pollutant warning, these vectors may represent different water quality parameters, pollutant characteristics, or information about potential sources of pollution. Next, the computer device further processes and analyzes these reduction attention-oriented vectors. It can use one or more machine learning algorithms or models (such as logistic regression, random forest, neural network, etc.) to decode or classify these vectors. These algorithms or models have been learned and optimized through a large amount of labeled data during the training phase of the model, so they can accurately extract information related to water quality pollutants from the reduction attention-oriented vectors.

[0107] Taking a neural network as an example, a computer device can use each reduced attention-oriented vector as the input of the neural network, and the network will output one or more probability distributions, indicating the category of water quality pollutants corresponding to the vector and its confidence. For example, for a specific reduced attention-oriented vector, the neural network may output the following results: the probability of ammonia nitrogen pollutants is 0.8 (high confidence), the probability of heavy metal pollutants is 0.1 (low confidence), and the probability of other pollutants is 0.1 (low confidence). This means that the model is highly confident that ammonia nitrogen pollution exists at the current monitoring point, but is less certain about the existence of heavy metals and other pollutants.

[0108] In this way, step S20a not only converts the high-dimensional vector output by the previous reduction mapping component into a human-understandable water quality pollutant warning result, but also provides the model's confidence assessment of these warning results. This is crucial for subsequent decision support, risk assessment and emergency response, because it can help environmental protection departments understand the current water quality status more accurately, so as to take more effective and targeted measures to protect water resources and the ecological environment.

[0109] Step S20b: Based on the category confidence in the water pollutant warning results corresponding to each of the restored attention-steering vectors, a restored attention-steering vector that meets the target significance index is determined from among the restored attention-steering vectors, and is determined as the proposed processing attention-steering vector corresponding to the target restoration mapping component.

[0110] In the model application stage, when determining the attention-oriented vector to be processed corresponding to the target restoration mapping component, step S20b plays a key screening role. This step is based on the category confidence in the water quality pollutant warning result corresponding to each restored attention-oriented vector obtained in the previous step S20a, to further screen out the restored attention-oriented vector that meets the target significance index.

[0111] In step S20a, the computer device has determined the corresponding water quality pollutant warning results, including the category confidence of each type of pollutant, based on the various restored attention-oriented vectors output by the previous restoration mapping component. These category confidences reflect the degree of certainty of the model for the existence of specific pollutants and are important indicators for evaluating the reliability of warning results. Next, in step S20b, the computer device screens these restored attention-oriented vectors according to preset target significance indicators. The target significance indicator is set according to specific application scenarios and requirements, and is used to measure the importance or significance of vectors or results. In the scenario of water quality pollutant warning, the target significance indicator may include category confidence thresholds, the degree of attention to specific pollutants, and the like.

[0112] Taking the threshold of category confidence as an example, assuming that a threshold of 0.7 is set, it means that only those water quality pollutant warning results with a model prediction confidence of more than 70% are of interest. The computer device traverses all water quality pollutant warning results corresponding to the restored attention-oriented vectors and compares the category confidence with the set threshold. If the category confidence in the water quality pollutant warning result corresponding to a restored attention-oriented vector is greater than or equal to 0.7, then the vector is considered to meet the target significance index and will be selected as the attention-oriented vector to be processed corresponding to the target restoration mapping component.

[0113] For example, suppose there are three reduced attention-oriented vectors, which correspond to the warning results of ammonia nitrogen, heavy metals, and organic pollutants, respectively. Among them, the category confidence of ammonia nitrogen pollutants is 0.85, the category confidence of heavy metal pollutants is 0.65, and the category confidence of organic pollutants is 0.9. According to the set category confidence threshold of 0.7, the computer device selects the reduced attention-oriented vectors of ammonia nitrogen and organic pollutants as the attention-oriented vectors to be processed, because their corresponding category confidences are higher than the threshold. The reduced attention-oriented vector of heavy metal pollutants will be excluded because its category confidence is lower than the threshold.

[0114] In this way, step S20b ensures that only those water quality pollutant warning results with high model prediction confidence and significant importance will be further processed and analyzed. This not only improves the accuracy and reliability of the warning, but also helps the environmental protection department to understand the current water quality status more accurately, so as to take more effective and targeted measures to protect water resources and the ecological environment.

[0115] As an implementation method, the loading information of the previous restoration mapping component includes clustering the attention-oriented vectors to be processed corresponding to the previous restoration mapping component to obtain multiple attention-oriented vector sets; the output information of the previous restoration mapping component includes the restoration attention-oriented vector sets corresponding to the multiple attention-oriented vector sets. Based on this, the step S20b, based on the category confidence in the water quality pollutant warning results corresponding to each of the restoration attention-oriented vectors, determines the restoration attention-oriented vector that meets the target significance index in each of the restoration attention-oriented vectors, and determines it as the attention-oriented vector to be processed corresponding to the target restoration mapping component, which may specifically include:

[0116] Step S20b1: For each of the restored attention-steering vector sets, based on the category confidence in the water pollutant warning results corresponding to each of the restored attention-steering vectors, a restored attention-steering vector that meets the target significance index is determined in the restored attention-steering vector set, and is determined as the proposed processing attention-steering vector corresponding to the target restoration mapping component.

[0117] In the model application stage, step S20b and its sub-step S20b1 involve further processing and analysis of multiple attention-oriented vector sets output by the previous restoration mapping component to determine the attention-oriented vectors to be processed corresponding to the target restoration mapping component. The output of the previous restoration mapping component includes multiple attention-oriented vector sets, which are obtained by clustering the corresponding attention-oriented vectors to be processed. Each attention-oriented vector set represents a feature or focus of a specific aspect in the data, such as different water quality parameters, pollutant types or pollution source characteristics. At the same time, each attention-oriented vector set also corresponds to a restoration attention-oriented vector set, which contains the model's decoding or prediction results for these specific focus points. In step S20b, the computer device determines which vectors meet the target significance index based on the category confidence in the water quality pollutant warning results corresponding to each restoration attention-oriented vector, and then becomes the attention-oriented vector to be processed of the target restoration mapping component. Step S20b1 is a refinement of this process, which performs independent analysis and screening for each restoration attention-oriented vector set.

[0118] Specifically, in step S20b1, the computer device first focuses on a specific set of restored attention-oriented vectors. For each restored attention-oriented vector in the set, the computer device checks the category confidence in the corresponding water quality pollutant warning result. These confidences reflect the model's degree of certainty about the presence of water quality pollutants under the feature or focus represented by the vector.

[0119] Next, the computer device selects these vectors according to a preset target significance index. The target significance index may include a threshold of category confidence, the degree of attention paid to a specific pollutant, etc. For example, if a category confidence threshold is set to 0.7, then the computer device will only select those restored attention-oriented vectors with a confidence greater than or equal to 0.7.

[0120] Taking water quality pollutant warning as an example, suppose there is a set of restored attention-oriented vectors that focuses specifically on the warning of ammonia nitrogen pollutants. In this set, there are three restored attention-oriented vectors corresponding to three different monitoring points. The category confidences in the water quality pollutant warning results corresponding to these three vectors are 0.8, 0.5, and 0.9, respectively. If the category confidence threshold is set to 0.7, the computer device selects two vectors with confidences of 0.8 and 0.9 as vectors that meet the target significance index, and determines them as the attention-oriented vectors to be processed corresponding to the target restoration mapping component.

[0121] In this way, step S20b1 ensures that each attention-directed vector set can be analyzed and screened independently and in a targeted manner, thereby selecting those attention-directed vectors to be processed that have a significant impact on the water quality pollutant warning results. This not only improves the accuracy and reliability of the warning, but also helps the environmental protection department to understand the current water quality status more accurately, providing strong support for subsequent decision support and emergency response.

[0122] As another implementation, if the target restoration mapping component is the first restoration mapping component in the ecological environment monitoring data large model, then the respective attention-steering vectors to be processed corresponding to the target restoration mapping component are obtained based on the following steps: each of the initial attention-steering vectors is determined as the respective attention-steering vectors to be processed corresponding to the target restoration mapping component.

[0123] In an embodiment of the present application, if the target restoration mapping component is the first restoration mapping component in the model and there are no specific screening conditions or requirements, the computer device can directly determine each initial attention steering vector as the intended processing attention steering vector corresponding to the component.

[0124] Initial attention-oriented vectors are usually generated based on the features or focus points of the input data (i.e., ecological and environmental monitoring data), and they represent key information from different aspects of the data. In the scenario of water pollutant warning, these vectors may correspond to different water quality parameters (such as water temperature, pH value, dissolved oxygen, etc.), pollutant types (such as ammonia nitrogen, heavy metals, etc.) or other features related to water quality conditions. Since the target reduction mapping component is the first processing unit in the model, it is responsible for extracting and integrating key information from the initial attention-oriented vector to generate higher-level feature representations or prediction results. Therefore, directly using the initial attention-oriented vector as the proposed processing attention-oriented vector is a simple and direct method to ensure that the model can fully utilize all the key information in the input data.

[0125] Alternatively, each of the attention-steering vectors to be processed corresponding to the target restoration mapping component is obtained based on the following steps: determining the vector index corresponding to each of the initial attention-steering vectors; based on the vector indicators corresponding to each of the initial attention-steering vectors, determining the initial attention-steering vector that meets the preset vector indicator requirements among each of the initial attention-steering vectors, and determining it as the attention-steering vector to be processed corresponding to the target restoration mapping component.

[0126] In some cases, the computer device may wish to filter the initial attention-directed vectors according to specific vector indicators to determine a more satisfactory attention-directed vector to be processed. These vector indicators can be defined according to specific application scenarios and requirements, such as the length, direction, and correlation of the vector with other vectors.

[0127] In the scenario of water quality pollutant warning, the computer device can define some vector indicators related to water quality pollutant warning. For example, the similarity or distance between each initial attention-oriented vector and the known pollutant feature vector can be calculated to evaluate the correlation between the vector and a specific pollutant type. Then, according to the preset vector indicator requirements (such as the similarity threshold), the initial attention-oriented vectors that meet the requirements are screened out as the attention-oriented vectors to be processed. Taking the similarity indicator as an example, it is assumed that there is a known heavy metal pollutant feature vector, and the cosine similarity between each initial attention-oriented vector and the feature vector is calculated. If the preset similarity threshold is 0.7, only those initial attention-oriented vectors with a similarity greater than or equal to 0.7 will be selected as the attention-oriented vectors to be processed. These vectors will be given higher weights or attention in subsequent processing and analysis because they are more closely associated with heavy metal pollutants.

[0128] In this way, the computer device can filter the initial attention-directing vector according to specific vector indicators, so as to more accurately focus on the key information that has a significant impact on the early warning of water pollutants. This helps to improve the accuracy and reliability of early warnings and provide more targeted decision-making support for environmental protection departments.

[0129] As an embodiment, the attention-directed vector set is determined based on one or more of the following strategies:

[0130] Strategy 1: According to a preset number of clusters, each of the attention-oriented vectors to be processed corresponding to the target restoration mapping component is arbitrarily divided into the multiple attention-oriented vector sets.

[0131] Strategy 2: Determine the vector indicators corresponding to each of the attention-oriented vectors to be processed corresponding to the target restoration mapping component; according to the preset number of clusters, based on the vector indicators corresponding to each of the attention-oriented vectors to be processed, add each of the attention-oriented vectors to the multiple attention-oriented vector sets.

[0132] Strategy three: determine the position information of each attention-oriented vector to be processed corresponding to the target restoration mapping component in the representation vector domain; according to the preset number of clusters, based on the position information of each attention-oriented vector to be processed in the representation vector domain, add each attention-oriented vector to the multiple attention-oriented vector sets.

[0133] In the model application stage, Strategy 1 provides a direct and simple way to determine the attention-oriented vector set. The core idea of ​​this strategy is to arbitrarily divide the attention-oriented vectors corresponding to the target restoration mapping component into equal parts according to the preset number of clusters, thereby obtaining multiple attention-oriented vector sets.

[0134] Assume that the computer device has completed the processing and analysis of the ecological environment monitoring data and generated a series of attention-oriented vectors to be processed. These vectors represent the key features or focus points in the data and are of great significance for water quality pollutant early warning. Next, the computer device divides these attention-oriented vectors to be processed according to the preset number of clusters. The number of clusters is a parameter set according to the specific application scenario and requirements, which determines the number of attention-oriented vector sets finally generated. In the scenario of water quality pollutant early warning, the number of clusters may be determined based on factors such as the number of monitoring points, the type of pollutants, and the complexity of the data. For example, suppose there are 100 attention-oriented vectors to be processed and the preset number of clusters is 5. Then, the computer device arbitrarily divides these 100 vectors into 5 groups, each containing 20 vectors. This process does not need to consider the similarity or correlation between vectors, but simply divides them equally according to the number.

[0135] Each equally divided attention-oriented vector set represents a specific set of features or focus points. In the scenario of water quality pollutant warning, these vector sets may correspond to different pollutant types, monitoring point locations or time periods. Since the equal division is arbitrary, different division methods can obtain different vector set combinations, but the number of vectors in each vector set is equal.

[0136] In this way, Strategy 1 can quickly organize a large number of attention-oriented vectors to be processed into multiple attention-oriented vector sets, providing effective data support for subsequent water quality pollutant warnings. Although this method does not consider the intrinsic relationship between vectors, in some scenarios, this simple and direct division method can meet the needs and has high execution efficiency.

[0137] In the model application stage, Strategy 2 provides a method to cluster the attention-oriented vectors to be processed based on vector indicators to determine the set of attention-oriented vectors. This method is particularly suitable for scenarios where vectors need to be grouped in a refined manner to capture subtle differences between different features or focus points.

[0138] First, the computer device needs to determine the vector indicators corresponding to each of the attention-oriented vectors to be processed corresponding to the target restoration mapping component. These vector indicators can be descriptive features of the vector itself, or they can be relationship measures between the vector and other vectors or data. In the scenario of water quality pollutant warning, vector indicators may include the length, direction, and similarity with known pollutant feature vectors of the vector. For example, suppose there is a set of attention-oriented vectors to be processed, each of which represents a specific water quality parameter or pollutant characteristic. The computer device can calculate the cosine similarity between each vector and the known heavy metal pollutant feature vector as a vector indicator. Cosine similarity can measure the similarity of two vectors in direction, and the closer the value is to 1, the more similar they are. Next, the computer device adds the vector to multiple attention-oriented vector sets based on the vector indicators corresponding to each of the attention-oriented vectors to be processed according to the preset number of clusters. This process usually involves the application of clustering algorithms, such as the K-means clustering algorithm.

[0139] Specifically, the computer device first randomly selects K vectors as the initial cluster centers (K is the preset number of clusters). Then, for each attention-oriented vector to be processed, the similarity between it and the K cluster centers is calculated (cosine similarity in this case), and it is assigned to the attention-oriented vector set corresponding to the cluster center with the highest similarity. Next, based on the vectors in each attention-oriented vector set, the position of the cluster center is recalculated (usually the average of all vectors in the set is taken). This process is iterated until the position of the cluster center no longer changes significantly, or the preset maximum number of iterations is reached. Finally, the computer device obtains K attention-oriented vector sets, each of which contains a set of attention-oriented vectors to be processed that are similar in vector indicators. These vector sets represent different combinations of water quality parameters or pollutant characteristics, providing more refined data support for water quality pollutant warnings.

[0140] By applying Strategy 2, the computer equipment can meaningfully cluster the attention-oriented vectors to be processed based on vector indicators, thereby better capturing key information and patterns in the data. This method helps to improve the accuracy and reliability of water quality pollutant warnings and provide more effective decision-making support for environmental protection departments.

[0141] In the model application stage, Strategy 3 provides a method to determine the attention-oriented vector set based on the position information of the vector in the representation vector domain. This method can capture the distribution characteristics of the vector in the high-dimensional space and then aggregate similar vectors into the same attention-oriented vector set.

[0142] First, the computer device needs to determine the position information of each attention-oriented vector to be processed corresponding to the target restoration mapping component in the representation vector domain. The representation vector domain is usually a high-dimensional space, in which each point corresponds to a vector. In the scenario of water pollutant warning, these vectors may represent different water quality parameters, pollutant characteristics or other information related to water quality conditions. In order to obtain the position information of the vectors, the computer device can perform dimensionality reduction on these vectors. Dimensionality reduction is a technique that maps high-dimensional data to a low-dimensional space, which helps to visualize the distribution and structure of the data. Common dimensionality reduction methods include principal component analysis (PCA), t-SNE, etc. Through these methods, the computer device can project the attention-oriented vector to be processed from the original high-dimensional space to a two-dimensional or three-dimensional space, which is convenient for observation and analysis.

[0143] In the reduced-dimensional space, each attention-oriented vector to be processed corresponds to a point. The positions of these points reflect the relative relationship of the vectors in the representation vector domain. For example, points with similar positions may correspond to similar vectors, while points with farther positions may correspond to vectors with greater differences. Next, the computer device adds each attention-oriented vector to be processed to multiple attention-oriented vector sets based on the position information of each attention-oriented vector in the reduced-dimensional space according to the preset number of clusters. This process usually involves the application of clustering algorithms, such as the K-means clustering algorithm. Specifically, the computer device first randomly selects K points as the initial cluster centers (K is the preset number of clusters). Then, for each point in the reduced-dimensional space (i.e., each attention-oriented vector to be processed), the distance between it and the K cluster centers (such as the Euclidean distance) is calculated, and it is assigned to the attention-oriented vector set corresponding to the nearest cluster center. Next, based on the points in each attention-oriented vector set, the position of the cluster center is recalculated (usually the average of all points in the set is taken). This process is iterated until the position of the cluster center no longer changes significantly or the preset maximum number of iterations is reached. Finally, the computer device obtains K attention-oriented vector sets, each of which contains a group of attention-oriented vectors to be processed that are close in position in the dimensionality reduction space. These vector sets represent different combinations of water quality parameters or pollutant characteristics, providing more refined data support for water quality pollutant warnings.

[0144] By applying strategy three, the computer device can meaningfully cluster the attention-directed vectors to be processed based on the position information of the vectors in the representation vector domain. This method not only considers the similarity between vectors, but also captures the distribution characteristics of vectors in high-dimensional space, which helps to improve the accuracy and reliability of water quality pollutant warnings.

[0145] As an implementation mode, in the model application stage, the step S20, based on the target restoration mapping component in the ecological environment monitoring data big model, based on multiple attention-oriented vector sets and the data representation vector, determines the restored attention-oriented vectors corresponding to each attention-oriented vector in the multiple attention-oriented vector sets, which may specifically include:

[0146] Step S21: Based on the target restoration mapping component, through the internal weight focusing strategy, based on each of the attention-guided vector sets, determine the transition attention-guided vector set corresponding to each of the attention-guided vector sets; the transition attention-guided vector set includes the transition attention-guided vectors corresponding to each of the attention-guided vector sets.

[0147] In the model application phase, step S21 processes each attention-oriented vector set based on the target reduction mapping component and the internal weight focusing strategy to determine the transition attention-oriented vector set corresponding to each set. The internal weight focusing strategy can be understood as a self-attention mechanism, which allows the model to calculate representations based on information at different positions in the input sequence when processing sequence data (matrix data is essentially also a sequence data). In step S21, each attention-oriented vector set can be regarded as an input sequence, in which each vector represents a specific water quality parameter or pollutant feature.

[0148] When the computer device executes step S21, each attention-directed vector set is first processed by the self-attention mechanism in the target reduction mapping component. This process involves several key steps:

[0149] Calculate attention weights: For each vector in each attention-directed vector set, the self-attention mechanism calculates its attention weights with respect to other vectors in the set. These weights reflect the relevance or importance between different vectors. In the context of water quality pollutant warnings, this means that the model evaluates the correlation between different water quality parameters or pollutant features.

[0150] Generate context vector: Based on the calculated attention weights, the self-attention mechanism generates a context vector for each vector. This context vector is actually the weighted sum of all vectors in the set, where the weights are calculated by the attention mechanism. Therefore, the context vector contains information about other vectors that are most relevant to the current vector.

[0151] Generate transition attention vector: Finally, the self-attention mechanism combines the original representation of each vector with the corresponding context vector to generate a transition attention vector. This transition vector not only contains the information of the original vector, but also incorporates the contextual information of other related vectors in the set.

[0152] Through this process, step S21 generates a corresponding transitional attention-oriented vector set for each attention-oriented vector set. These transitional vector sets will be used to generate restored attention-oriented vector sets in subsequent steps, thereby supporting the decision-making process of water quality pollutant warning.

[0153] Taking water pollutant warning as an example, suppose there is an attention-oriented vector set focusing on ammonia nitrogen pollutants. This set may include vectors related to ammonia nitrogen concentration, water temperature, pH value, etc. In step S21, the self-attention mechanism evaluates the correlation between these vectors and generates a context vector for each vector. Then, the original vector and the context vector are combined to generate a transition attention-oriented vector set. These transition vectors will more accurately reflect the relationship between ammonia nitrogen pollutants and other water quality parameters, providing strong support for subsequent water pollutant warnings.

[0154] Step S22: Based on the target restoration mapping component, through a weighted focusing strategy, based on each of the transition attention-oriented vector sets and the data representation vector, determine the restoration attention-oriented vector set corresponding to each of the transition attention-oriented vector sets; the restoration attention-oriented vector set includes the restoration attention-oriented vectors corresponding to each of the transition attention-oriented vector sets.

[0155] In step S22, the computer device further processes the transition attention-oriented vector set using the target restoration mapping component and the weighted focus strategy (i.e., the attention mechanism), and combines the data representation vector to determine the restoration attention-oriented vector set corresponding to each transition attention-oriented vector set. This step allows the model to accurately focus on key features based on the current specific data situation, thereby generating more accurate warning results.

[0156] The weighted focus strategy allows the model to dynamically assign different weights to different parts of the input data when processing information. In this scenario, this means that the model can adjust the attention paid to each vector in the transition attention-oriented vector set based on the key information in the data representation vector (i.e., real-time ecological environment monitoring data). In step S22, the computer device first receives the data representation vector, which contains comprehensive information about the current ecological environment monitoring data, such as water temperature, dissolved oxygen, ammonia nitrogen concentration and other key water quality parameters. Next, the computer device traverses each set of transition attention-oriented vectors, which are generated by the self-attention mechanism in step S21, and the vectors in each set represent a specific focus point or feature in the data.

[0157] For each set of transition attention-oriented vectors, the computer calculates the relevance or importance between each transition vector in the set and the data representation vector based on a weighted focusing strategy (attention mechanism). This calculation process usually involves a scoring function that evaluates the similarity or matching degree between the transition vector and the data representation vector. For example, dot product, cosine similarity, or a more complex neural network can be used to calculate the score. Based on the calculated score, the computer device assigns a weight to each transition vector. This weight reflects the importance or significance of the transition vector in the context of the current data representation vector. Transition vectors with higher weights mean that they are more relevant to the current data situation and should therefore be given higher attention. Finally, the computer performs a weighted sum or weighted average of each vector in the transition attention-oriented vector set based on the assigned weights to generate the corresponding restored attention-oriented vector set. This restored vector set contains the model's comprehensive understanding and judgment of the current data situation, and is an important basis for subsequent water quality pollutant warning decisions.

[0158] Taking water pollutant warning as an example, suppose there is a transition attention-oriented vector set focusing on ammonia nitrogen pollutants. In step S22, the computer will calculate the correlation between each transition vector in the set and the current data based on the current ecological environment monitoring data (data characterization vector). If a transition vector is highly correlated with the current abnormal ammonia nitrogen concentration, it will be given a higher weight. The final generated reduction attention-oriented vector set will highlight the features closely related to ammonia nitrogen pollution, providing strong support for subsequent warning decisions.

[0159] As an implementation mode, each restoration mapping component in the ecological environment monitoring data big model is the target restoration mapping component; or, the first x restoration mapping components in the ecological environment monitoring data big model are the target restoration mapping components; x is a positive integer less than the number of restoration mapping components in the ecological environment monitoring data big model.

[0160] In the model application phase, it is necessary to determine which restoration mapping components, that is, the decoding layer, are regarded as the target restoration mapping components, so as to apply specific processing procedures, such as clustering and filtering of attention-oriented vectors. This design choice directly affects the computational efficiency and warning accuracy of the model.

[0161] In the examples of the present application, two implementation methods are provided.

[0162] The first implementation mode: all restore mapping components are target restore mapping components.

[0163] Assuming that the ecological environment monitoring data model contains four reduction mapping components, in this implementation, all four components will be regarded as target reduction mapping components. For each target reduction mapping component, its input data (i.e., attention-oriented vectors) need to be clustered to form multiple attention-oriented vector sets. Then, based on these vector sets, the target reduction mapping component generates the corresponding reduction attention-oriented vector sets. Before output, these reduction attention-oriented vectors are also screened according to the target significance index to ensure that only those vectors that have a significant impact on the water quality pollutant warning results are passed to the next reduction mapping component. The advantage of this design is that all reduction mapping components use the same processing mechanism, thereby reducing the amount and complexity of calculations for each component. Since each component only processes the clustered attention-oriented vector set instead of all vectors, the computational efficiency is significantly improved. At the same time, since each component has screened the target significance index, the output reduction attention-oriented vector is more accurate and reliable, which helps to improve the accuracy of water quality pollutant warnings.

[0164] Second implementation: the first x reduction mapping components are target reduction mapping components.

[0165] It is also assumed that there are four reduction mapping components in the model, but this time only the first two components are determined as target reduction mapping components. For the first target reduction mapping component, it clusters the initial attention-oriented vectors and generates reduction attention-oriented vectors based on the clustering results. These vectors are screened by the target significance index before output, and the vectors that have a significant impact on the water quality pollutant warning results are screened as the input of the second target reduction mapping component. For the second target reduction mapping component, it also clusters the input vectors and generates reduction attention-oriented vectors, but these vectors are no longer screened when output, but are directly passed to the third non-target reduction mapping component. The advantage of this design is that it combines the different processing mechanisms of the first two reduction mapping components. The first two target reduction mapping components reduce the amount of calculation and improve the accuracy through clustering and screening, while the third non-target reduction mapping component can process more attention-oriented vectors, thereby ensuring the comprehensiveness of the warning results. This flexibility enables the model to adjust its processing flow according to specific needs and data characteristics, which not only ensures computational efficiency but also improves the accuracy of warnings.

[0166] In summary, by rationally selecting which reduction mapping components to use as target reduction mapping components and applying specific processing flows in these components, the performance and efficiency of the large ecological environment monitoring data model in the water quality pollutant early warning task can be significantly improved.

[0167] It should be noted that in the embodiment of the present application, if the water quality pollutant early warning method based on the large model of ecological environment monitoring data is implemented in the form of a software function module, and when it is sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read Only Memory, ROM), disk or CD-ROM and other various media that can store program code. The embodiment of the present application is not limited to any specific hardware, software or firmware, or any combination of hardware, software and firmware.

[0168] An embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.

[0169] The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.

[0170] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.

[0171] The embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.

[0172] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.

[0173] Figure 2 A hardware entity diagram of a computer device provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the hardware entity of the computer device 1000 includes: a processor 1001 and a memory 1002, wherein the memory 1002 stores a computer program that can be run on the processor 1001, and the processor 1001 implements the steps in the method of any of the above embodiments when executing the program.

[0174] The memory 1002 stores a computer program that can be run on the processor. The memory 1002 is configured to store instructions and applications executable by the processor 1001. It can also cache data to be processed or processed by the processor 1001 and each module in the computer device 1000 (for example, image data, audio data, voice communication data, and video communication data), which can be realized by flash memory (FLASH) or random access memory (Random Access Memory, RAM). When the processor 1001 executes the program, any of the steps of the water quality pollutant early warning method based on the large model of ecological environment monitoring data is implemented. The processor 1001 usually controls the overall operation of the computer device 1000.

[0175] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For the technical details not disclosed in the storage medium and device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding. The above processor can be at least one of a target application integrated circuit (Application Specific Integrated Circuit, ASIC), a digital signal processor (Digital Signal Processor, DSP), a digital signal processing device (Digital Signal Processing Device, DSPD), a programmable logic device (Programmable Logic Device, PLD), a field programmable gate array (Field Programmable Gate Array, FPGA), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, and a microprocessor. It can be understood that the electronic device that realizes the above processor function can also be other, and the embodiments of the present application are not specifically limited.

[0176] The above-mentioned computer storage medium / memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and the like; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0177] It should be understood that the "one embodiment" or "one embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" appearing in various places throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence number of the embodiment of the present application is only for description and does not represent the advantages and disadvantages of the embodiment. It should be noted that, in this article, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.

[0178] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0179] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, the functional units in the embodiments of the present application may be all integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above integrated units may be implemented in the form of hardware, or in the form of hardware plus software functional units.

[0180] It can be understood by a person skilled in the art that all or part of the steps of the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiment are executed; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, read-only memory (ROM), magnetic disks or optical disks. Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. And the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, magnetic disks or optical disks.

[0181] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A water quality pollutant early warning method based on a large ecological environment monitoring data model, characterized in that: The method comprises: Determine the ecological environment monitoring data sample representation vector corresponding to the ecological environment monitoring data sample; Based on the target restoration mapping component in the ecological environment monitoring data big model, based on multiple sample attention-oriented vector sets and the sample representation vector of the ecological environment monitoring data, determine the sample restoration attention-oriented vectors corresponding to each sample attention-oriented vector in the multiple sample attention-oriented vector sets; wherein the multiple sample attention-oriented vector sets are obtained by clustering the respective proposed processing attention-oriented vectors corresponding to the target restoration mapping component; the proposed processing attention-oriented vector is determined based on the debugging initial attention-oriented vector, or is selected from each sample restoration attention-oriented vector output by the previous restoration mapping component of the target restoration mapping component according to the target significance index, wherein the target significance index is used to measure the importance or significance of a vector or result, and the target significance index includes a threshold value of category confidence or the degree of concern of a specific pollutant; the target restoration mapping component is a restoration mapping component in the ecological environment monitoring data big model, and the restoration mapping component is a decoding layer in the ecological environment monitoring data big model, which is used to decode the encoded feature vector back to the original data space or a feature space that is easier to understand; For each of the sample attention-oriented vector sets, based on the sample restoration attention-oriented vectors corresponding to each of the sample attention-oriented vectors and the prior annotation information corresponding to the ecological environment monitoring data sample, determining an error value corresponding to the sample attention-oriented vector set; Determining an error value corresponding to the target restoration mapping component based on the error values ​​respectively corresponding to the plurality of sample attention-directed vector sets; Debugging the ecological environment monitoring data big model according to the error values ​​corresponding to the restoration mapping components of each layer in the ecological environment monitoring data big model, and stopping when the model converges; Extracting data representation vectors corresponding to the ecological environment monitoring data to be analyzed, wherein the ecological environment monitoring data to be analyzed includes water body physical parameters, water body chemical parameters, water body biological parameters, and specific pollutant parameters; Based on the target restoration mapping component in the ecological environment monitoring data big model, based on multiple attention-oriented vector sets and the data representation vector, determine the restored attention-oriented vectors corresponding to each attention-oriented vector in the multiple attention-oriented vector sets; the multiple attention-oriented vector sets are obtained by clustering the respective proposed attention-oriented vectors corresponding to the target restoration mapping component; the proposed attention-oriented vector is determined based on the initial attention-oriented vector, or is selected from the respective restored attention-oriented vectors output by the previous restoration mapping component of the target restoration mapping component according to the target significance index, and the target restoration mapping component is a restoration mapping component in the ecological environment monitoring data big model; Based on each restored attention-oriented vector output by the last restored mapping component in the large ecological environment monitoring data model, the water quality pollutant warning results corresponding to the ecological environment monitoring data to be analyzed are determined.

2. The method according to claim 1, characterized in that: The step of determining the error value corresponding to the set of sample attention-oriented vectors based on the sample restored attention-oriented vectors corresponding to each of the sample attention-oriented vectors and the priori labeling information corresponding to the ecological environment monitoring data sample comprises: Based on the sample restored attention oriented vectors respectively corresponding to the sample restored attention oriented vectors in the sample attention oriented vector set, determining the inferred water quality pollutant warning results respectively corresponding to the sample restored attention oriented vectors; Through a bipartite graph matching mechanism, based on each of the inferred water quality pollutant warning results and the prior annotation information, the optimal correspondence relationship corresponding to the sample attention-oriented vector set is determined; the optimal correspondence relationship is used to characterize the optimal pairing strategy between each of the inferred water quality pollutant warning results and the prior annotation information; According to the optimal corresponding relationship, the error value corresponding to the sample attention-directed vector set is determined.

3. The method according to claim 2, characterized in that The method further comprises: Based on the current debugging process of the ecological environment monitoring data big model, determining the correlation ratio between the prior annotation information and the inferred water quality pollutant warning result; The method of determining the optimal correspondence between the sample attention-oriented vector set and the inferred water quality pollutant warning results and the prior annotation information through a bipartite graph matching mechanism includes: Through the bipartite graph matching mechanism, according to the correlation ratio, based on each of the inferred water quality pollutant warning results and the prior annotation information, the optimal corresponding relationship corresponding to the sample attention-oriented vector set is determined.

4. The method according to claim 1, characterized in that If the target restoration mapping component is not the first restoration mapping component in the ecological environment monitoring data large model, each of the attention orientation vectors to be processed corresponding to the target restoration mapping component is determined based on the following process: Based on each restored attention steering vector output by the previous restored mapping component, determining the water quality pollutant warning results corresponding to each of the restored attention steering vectors; the water quality pollutant warning results include the category confidence corresponding to the water quality pollutant indicated by the restored attention steering vector; Based on the category confidence in the water pollutant warning results corresponding to each of the restored attention-steering vectors, a restored attention-steering vector that meets the target significance index is determined among the restored attention-steering vectors, and is determined as the proposed processing attention-steering vector corresponding to the target restoration mapping component.

5. The method according to claim 4, characterized in that The loading information of the previous restoration mapping component includes clustering the attention-oriented vectors to be processed corresponding to the previous restoration mapping component to obtain multiple attention-oriented vector sets; the output information of the previous restoration mapping component includes the restoration attention-oriented vector sets corresponding to the multiple attention-oriented vector sets respectively; The method of determining a restored attention-oriented vector that meets the target significance index from among the restored attention-oriented vectors based on the category confidences in the water pollutant warning results corresponding to the restored attention-oriented vectors, and determining the restored attention-oriented vector to be processed corresponding to the target restored mapping component, includes: For each of the restored attention-steering vector sets, based on the category confidence in the water pollutant warning results corresponding to each of the restored attention-steering vectors, a restored attention-steering vector that meets the target significance index is determined in the restored attention-steering vector set, and is determined as the proposed processing attention-steering vector corresponding to the target restoration mapping component.

6. The method according to claim 1, characterized in that If the target restoration mapping component is the first restoration mapping component in the ecological environment monitoring data large model, each of the attention-oriented vectors to be processed corresponding to the target restoration mapping component is obtained based on the following steps: Determine each of the initial attention-directed vectors as each of the to-be-processed attention-directed vectors corresponding to the target restoration mapping component; or; Determine the vector index corresponding to each of the initial attention-steering vectors; based on the vector indexes corresponding to each of the initial attention-steering vectors, determine the initial attention-steering vector that meets the preset vector index requirements among the initial attention-steering vectors, and determine it as the attention-steering vector to be processed corresponding to the target restoration mapping component.

7. The method according to any one of claims 1 to 6, characterized in that: The set of attention-directed vectors is determined based on one or more of the following strategies: Strategy 1: According to a preset number of clusters, each of the attention-oriented vectors to be processed corresponding to the target restoration mapping component is arbitrarily divided into the plurality of attention-oriented vector sets; Strategy 2: determining the vector indexes corresponding to the respective attention-oriented vectors to be processed corresponding to the target restoration mapping component; adding the respective attention-oriented vectors to be processed to the plurality of attention-oriented vector sets based on the vector indexes corresponding to the respective attention-oriented vectors to be processed according to the preset number of clusters; Strategy 3: Determine the position information of each attention-oriented vector to be processed corresponding to the target restoration mapping component in the representation vector domain; According to a preset number of clusters, and based on position information of each of the attention-directing vectors to be processed in the representation vector domain, each of the attention-directing vectors to be processed is added to the plurality of attention-directing vector sets.

8. The method according to any one of claims 1 to 6, characterized in that: The target restoration mapping component in the ecological environment monitoring data big model determines the restored attention-oriented vectors corresponding to each attention-oriented vector in the multiple attention-oriented vector sets based on the multiple attention-oriented vector sets and the data representation vector, including: Based on the target restoration mapping component, through an internal weight focusing strategy, based on each of the attention-oriented vector sets, a transition attention-oriented vector set corresponding to each of the attention-oriented vector sets is determined; the transition attention-oriented vector set includes transition attention-oriented vectors corresponding to each of the attention-oriented vector sets corresponding to the transition attention-oriented vectors; Based on the target restoration mapping component, through a weighted focusing strategy, based on each of the transition attention-oriented vector sets and the data representation vector, a restoration attention-oriented vector set corresponding to each of the transition attention-oriented vector sets is determined; the restoration attention-oriented vector set includes restoration attention-oriented vectors corresponding to each of the transition attention-oriented vector sets.

9. The method according to any one of claims 1 to 6, characterized in that: Each restoration mapping component in the ecological environment monitoring data big model is the target restoration mapping component; or, the first x restoration mapping components in the ecological environment monitoring data big model are the target restoration mapping components; x is a positive integer less than the number of restoration mapping components in the ecological environment monitoring data big model.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the program, the steps in the method according to any one of claims 1 to 9 are implemented.