Water quality detection method and system

By performing modal decomposition and feature fusion on water quality testing data, the lag problem of traditional COD detection methods is solved, achieving efficient and accurate water quality prediction, which is suitable for short-term prediction of long-term series.

CN121141981APending Publication Date: 2025-12-16SHANGHAI ANGLIN SCI INSTR CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202511409024.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

Traditional COD detection methods rely on manual operation and laboratory analysis, which are time-consuming, costly, and have a time lag, making it difficult to meet the needs of modern wastewater treatment.

Method used

By performing mode decomposition on water quality testing data to obtain high-frequency and low-frequency component sequences, global and local features are extracted using an attention mechanism, and linear fusion is performed based on fusion weights to reconstruct the target detection results.

Benefits of technology

It achieves efficient and accurate prediction and detection of water quality, is suitable for short-term prediction of long-term series, captures the abrupt change characteristics and long-term time-series features of data, and improves the accuracy and efficiency of prediction and detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121141981A_ABST
    Figure CN121141981A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of water treatment, discloses a water body detection method, and particularly relates to a water quality detection method and system. Multiple pieces of detection data of a water body in unit time are acquired, modal decomposition is performed on the multiple pieces of detection data to obtain corresponding high-frequency components and low-frequency components, and feature extraction is performed on the high-frequency components and the low-frequency components to obtain corresponding prediction results based on extracted features. And the prediction results are fused to obtain a target detection result corresponding to the water body at the next time point. Compared with the prior art, the embodiment of the invention can be more suitable for a short-term prediction detection task of a long time sequence, the expression of the features is more complete compared with the mode that mutation features and long-time-sequence features corresponding to data can be captured in a mode of modal segmentation in the last year, and the overall features and the local features are fused, so that the accuracy of the short-term prediction detection task is improved. And the characteristic relation of the long time sequence data integrity can be captured, so that the accuracy of a prediction detection result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of water treatment technology, specifically a water quality testing method and system. Background Technology

[0002] Chemical Oxygen Demand (COD), as a crucial indicator of water pollution levels, reflects the content of organic matter in water. Its real-time monitoring is essential for the effectiveness of wastewater treatment. Traditional COD detection methods often rely on manual operation and laboratory analysis, which are not only time-consuming and costly but also suffer from real-time delays, making them unsuitable for modern wastewater treatment needs. Therefore, there is an urgent need for efficient and intelligent COD prediction technologies for wastewater treatment to improve the accuracy and efficiency of wastewater treatment. Summary of the Invention

[0003] To address the aforementioned technical problems, this invention provides a water quality testing method and system. By analyzing multiple test data collected within a testing area, it achieves the acquisition of water quality data and early prediction within that area. To achieve the above objectives, the technical solution adopted by this invention is as follows:

[0004] In a first aspect, a water quality detection method is provided, the method comprising: decomposing multiple detection data sequences of water bodies in a detection area collected per unit time based on their distribution state to obtain high-frequency component sequences and low-frequency component sequences corresponding to each detection data sequence; the multiple detection data include pH value, dissolved oxygen, ammonia nitrogen content, and wastewater temperature; combining the multiple high-frequency component sequences to obtain first data, combining the multiple low-frequency component sequences to obtain second data, acquiring global features corresponding to the first data and the second data respectively based on an attention mechanism, and extracting local features corresponding to the first data and the second data based on the global features through hierarchical segmentation, and fusing the global features and the local features to obtain first features and second features corresponding to the first data and the second data; acquiring detection results of the first features and the second features respectively, determining fusion weights based on the distribution of the high-frequency component sequences and the low-frequency component sequences, and reconstructing the detection results based on the fusion weights using linear fusion to obtain a target detection result.

[0005] In some specific implementations, the multiple detection data sequences are decomposed based on the distribution state, including: decomposing the modal components of each detection data based on initial parameters, determining the degree of deviation based on the decomposition results, determining update parameters based on the degree of deviation, performing iterative decomposition based on the update parameters until the degree of deviation meets the preset requirements to determine the optimal decomposition parameters, and decomposing the modal components of each detection data based on the optimal decomposition parameters to obtain high-frequency component sequences and low-frequency component sequences.

[0006] In some specific implementations, the degree of deviation is determined based on the decomposition results, including: obtaining the feature density of each modal component in the decomposition results, obtaining the average distribution result of the feature density, and determining the degree of deviation based on the average distribution result.

[0007] In some specific implementations, obtaining the local features corresponding to the first data and the second data includes: integrating multiple global features into a global feature sequence, dividing the global feature sequence into blocks, and extracting the local feature sequence corresponding to the block-processed feature sequence.

[0008] In some specific implementations, the global features are divided into blocks, including: arranging, updating and combining the features in the global feature sequence based on odd and even elements to obtain the corresponding first feature sequence and second feature sequence.

[0009] In some specific implementations, the extraction of the first local feature and the second local feature includes: obtaining the hidden state corresponding to each feature in the first feature sequence and the second feature sequence, and performing cross-update based on the hidden state to obtain the first intermediate feature sequence and the second intermediate feature sequence; and obtaining the hidden state corresponding to each feature in the first intermediate feature sequence and the second intermediate feature sequence, and performing a second cross-update based on the hidden state to obtain the first local feature and the second local feature.

[0010] In some specific implementations, a secondary cross-update is performed on the first intermediate feature sequence and the second intermediate feature sequence based on the hidden state, including: obtaining the secondary hidden states corresponding to the first intermediate feature sequence and the second intermediate feature sequence respectively, filtering the hidden states based on a dynamic threshold, and performing secondary updates on the first intermediate feature sequence and the second intermediate feature sequence based on the filtered hidden states to obtain the first local feature and the second local feature.

[0011] In some specific implementations, the distribution difference between the secondary hidden state corresponding to each feature and a preset hidden state threshold is obtained, and the secondary hidden state is filtered based on the distribution difference.

[0012] In some specific implementations, the distribution of the high-frequency component sequence and the low-frequency component sequence includes the first gap and the second gap corresponding to the high-frequency component sequence and the low-frequency component sequence. Determining the fusion weight based on the distribution includes: determining the difference in magnitude between the first gap and the second gap, determining the corresponding fusion weight according to the difference in magnitude, updating the detection result based on the fusion weight, and reconstructing the target detection result based on the updated detection result.

[0013] Secondly, a water quality testing system is provided, comprising a data acquisition unit, a data transmission unit, and a data processing unit. The data acquisition unit includes multiple data acquisition devices for acquiring multiple test data within a test area, and transmitting the multiple test data to the data processing unit via the data transmission unit based on a unit time. The data transmission unit includes node devices corresponding to the multiple data acquisition devices. The data processing unit is used to execute any of the above-described water quality testing methods. The data processing unit includes a data decomposition device for decomposing multiple test data sequences based on their distribution state to obtain a high-frequency component sequence and a low-frequency component sequence corresponding to each test data sequence. The multiple test data include pH value, chemical oxygen demand, ammonia nitrogen content, and wastewater temperature. A feature extraction device is used to combine multiple high-frequency component sequences to obtain first data, and combine multiple low-frequency component sequences to obtain second data. It acquires global features corresponding to the first data and the second data based on an attention mechanism, performs hierarchical segmentation based on the global features to extract local features corresponding to the first data and the second data, and fuses the global features and the local features to obtain a first feature and a second feature corresponding to the first data and the second data. A detection device is used to acquire detection results for the first feature and the second feature, determine fusion weights based on the distribution of the high-frequency component sequences and the low-frequency component sequences, and reconstruct the detection results based on linear fusion using the fusion weights to obtain a target detection result.

[0014] The technical solution provided in this application involves acquiring multiple detection data points of water body within a unit time period, performing mode decomposition on these data points to obtain corresponding high-frequency and low-frequency components, extracting features from the high-frequency and low-frequency components respectively, and obtaining corresponding prediction results based on the extracted features. These prediction results are then fused to obtain the target detection result for the water body at the next time point, enabling the prediction and detection of target data in the water body. Compared to existing technologies, this application is more suitable for short-term prediction and detection tasks in long-term time series. It captures the abrupt changes and long-term features of the data through mode segmentation, resulting in a more complete feature expression. Furthermore, by fusing global and local features, it captures the overall feature relationships of long-term data, thereby improving the accuracy of the prediction and detection results. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] The methods, systems, and / or procedures shown in the accompanying drawings will be further described with reference to exemplary embodiments. These exemplary embodiments will be described in detail with reference to the drawings. These exemplary embodiments are non-limiting exemplary embodiments, wherein example figures represent similar mechanisms in the various views of the drawings.

[0017] Figure 1 This is a schematic diagram of the water quality testing system provided in the embodiments of this application.

[0018] Figure 2 This is a schematic diagram of the water quality testing method provided in the embodiments of this application.

[0019] Figure 3 This is a schematic diagram of the decomposition result of high-frequency components and low-frequency components in an embodiment of this application.

[0020] Figure 4 These are comparative images and text showing the actual effects of the water quality testing methods provided in the embodiments of this application.

[0021] Figure 5 This is a schematic diagram of the data processing unit structure provided in the embodiments of this application.

[0022] Figure 6 This is a schematic diagram of the terminal device structure provided in the embodiments of this application. Detailed Implementation

[0023] To better understand the above technical solutions, the technical solutions of this application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of this application and the specific features in the embodiments are detailed descriptions of the technical solutions of this application, rather than limitations on the technical solutions of this application. In the absence of conflict, the embodiments of this application and the technical features in the embodiments can be combined with each other.

[0024] In the detailed description below, numerous specific details are illustrated with examples to provide a comprehensive understanding of the relevant guidance. However, it will be apparent to those skilled in the art that this application can be practiced without these details. In other instances, well-known methods, procedures, systems, components, and / or circuits have been described at a relatively high level without detail to avoid unnecessarily obscuring aspects of this application.

[0025] This application uses flowcharts to illustrate the execution process performed by a system according to embodiments of this application. It should be clearly understood that the execution processes in the flowcharts may not be executed sequentially. Instead, these execution processes may be executed in reverse order or simultaneously. Additionally, at least one other execution process may be added to the flowchart. One or more execution processes may be deleted from the flowchart.

[0026] Before providing a further detailed description of the embodiments of the present invention, the nouns and terms involved in the embodiments of the present invention will be explained, and the nouns and terms involved in the embodiments of the present invention shall be interpreted as follows.

[0027] (1) In response to, used to indicate the conditions or states on which the operation is performed depends. When the conditions or states on which the operation is performed are met, one or more operations may be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.

[0028] (2) Based on, used to indicate the conditions or states on which the operation is performed depends. When the conditions or states on which it depends are met, one or more operations can be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order of execution of the multiple operations.

[0029] Water quality monitoring systems combine sensor technology with wireless communication technology to enable real-time monitoring and management of water quality parameters. Early water quality monitoring relied primarily on manual observation, using visual characteristics such as water color and odor to roughly assess water quality; for example, aquaculture workers could infer nitrite levels based on changes in water color. However, with advancements in science and technology, especially the development of the Internet of Things, sensor technology, and automated devices, water quality monitoring has entered a new stage of high automation and precision.

[0030] However, wastewater quality data collection is complex, resulting in sparse, discontinuous data with limited coverage in time, space, and frequency. Furthermore, the complex physical and biochemical reactions in effluent wastewater introduce uncertainty and time lag, leading to low timeliness of effluent quality parameter data collected by sensors. Treating deteriorated water only after sensors detect substandard effluent quality significantly increases operating costs for wastewater treatment plants. If effluent quality parameters could be predicted in advance, targeted treatment measures could be implemented for untreated water, purification processes could be adjusted proactively, effluent quality could be improved, and deterioration could be prevented.

[0031] Therefore, in view of this technical background, in order to achieve forward-looking water quality detection, a water quality detection system is provided. This system collects multiple detection data of water bodies in the area to be detected within a unit of time, and obtains feature data corresponding to the multiple detection data through mode decomposition and feature extraction. Based on the feature data, a prediction model is used to obtain the target water quality data result of the area to be detected at the next time point.

[0032] Specifically, the target water quality data is COD (Chemical Oxygen Demand) data. COD is a crucial indicator of water pollution levels, reflecting the content of organic matter in the water; its real-time monitoring is essential for the effectiveness of wastewater treatment. Currently, COD detection results mainly rely on manual water source acquisition and laboratory analysis, which suffers from long cycles and detection lag. However, with the development of information technology, real-time detection or prediction of COD data has begun to be achieved through machine learning. For example, by using an improved particle swarm optimization algorithm and backpropagation neural network (BP neural network) as a COD prediction model, COD prediction results for a given time period can be obtained; and algorithms such as GRU and LSTM can be used to predict COD results for a given time period by analyzing collected time-series data. However, these prediction methods still have corresponding technical challenges. First, because water quality parameter data has strong nonlinearity and strong fluctuation, the accuracy of the above technical solutions depends on the completeness of the training dataset. In actual use, due to the large number and variety of data obtained, feature extraction alone will generate massive amounts of feature data, resulting in high time costs and delayed prediction results for the two technical solutions. To reduce time costs and improve real-time prediction, it is necessary to sacrifice the input features, thereby reducing prediction accuracy and making the prediction inaccurate.

[0033] Therefore, the water quality testing system provided in this application is used to optimize the water quality testing in the prior art to address this technical problem, thereby reducing time costs and improving the implementation effect of the prediction results while ensuring the accuracy of the prediction.

[0034] For details, please refer to Figure 1 The water quality testing system 10 includes a data acquisition unit 11, a data transmission unit 12, and a data processing unit 13. The data acquisition unit includes multiple data acquisition devices, each used to collect data on a specific type of water body. Since the target detection data in this embodiment is COD data, Pearson correlation analysis and a p-test are used to verify the significance of the Pearson correlation coefficient. pH, dissolved oxygen, conductivity, ammonia nitrogen concentration, and water temperature are considered to be positively correlated with COD changes; these are the data acquired by the data acquisition unit in this embodiment. Therefore, the data acquisition unit in this embodiment includes a first data acquisition device 111, a second data acquisition device 111, a third data acquisition device 111, a fourth data acquisition device 111, and a fifth data acquisition device 111, which are used to acquire pH, dissolved oxygen, conductivity, ammonia nitrogen concentration, and water temperature, respectively. All of these data acquisition devices are sensors, and these sensors are all existing technologies, which will not be described in detail here.

[0035] In this embodiment, the data acquisition devices communicate with the data processing unit via a data transmission unit. The data transmission unit includes node devices 121 corresponding to multiple data acquisition devices. The data acquisition devices package the acquired detection data into JSON format and upload it to the data processing unit via the node devices. The node devices utilize RS-485 and wireless communication to achieve a master-slave star topology between the data acquisition unit and the data processing unit. Specifically, the node devices use an RS-485 serial bus based on the Modbus-RTU protocol to poll and acquire data from multiple sensors. After parsing the raw data and performing numerical calibration, they construct JSON data packets using a lightweight cJSON library. The encapsulation format includes the device ID, timestamp, multi-dimensional detection data, and time. Then, a TCP / IP connection is established through an embedded wireless communication module, and a request message is constructed based on the HTTP / 1.1 protocol specification to push the time-series detection data to the application layer interface of the data processing unit, thereby enabling the data processing unit to obtain the data.

[0036] In this embodiment, the data processing unit includes a front-end and a back-end. The back-end is used to execute water quality detection methods to predict and detect COD data in water bodies, while the front-end is used to display the detection results and other application items such as the acquired detection data. The relevant technical solutions for the front-end of the data processing unit can be implemented using existing front-end technologies, and will not be elaborated upon in this embodiment. Only the water quality detection methods for the back-end will be described in detail.

[0037] For details, please refer to Figure 2 This refers to a water quality testing method provided in the embodiments of this application, which includes the following steps:

[0038] Step S21. Decompose multiple detection data sequences of water bodies in the detection area collected per unit time based on the distribution state to obtain the high-frequency component sequence and low-frequency component sequence corresponding to each detection data sequence.

[0039] In this embodiment, multiple detection data points are used, including pH, dissolved oxygen, conductivity, ammonia nitrogen concentration, and water temperature. These data are collected within the same unit of time. Water quality parameters in a water body are time-series data, exhibiting strong correlations and characteristics of high nonlinearity, lag, and seasonality. While the acquired water quality parameter detection data within a unit time period often reveals future trends, the time-series data represents a process of data change over time. It is difficult to obtain correlations between multiple detection data points solely through time-series data, and considering the non-linear nature of water body data, establishing a mapping relationship between multiple detection data points and the target detection data is also challenging. Therefore, to improve the accuracy and timeliness of subsequent prediction results, it is necessary to decompose the multiple detection data points to obtain data types that better express the correlations or ease of correlation between the data.

[0040] In this embodiment, the data transformation involves converting the detection data from time-series data to frequency-domain data. Frequency-domain data, compared to time-series data, can better represent the distribution and variation of the data. Generally, the transformation between time-series and frequency-domain data is achieved by performing empirical mode decomposition (EMD) or variational mode decomposition (VMD). EMD can perform feature multi-scale decomposition on time-series data, resulting in multiple intrinsic mode functions (IMFs) and a residual component to extract the variation trend features of the original time-series data at different scales. The multiple IMFs represent the vibration modes of the data sequence at different frequencies or time scales, thus achieving a frequency-domain representation of the data. Variational mode decomposition (VMD) also utilizes mode decomposition methods to transform data. Its approach involves assuming that the center frequency and bandwidth of each decomposed mode are finite, and under the constraint that the sum of all mode components equals the original signal, iteratively searching for the optimal solution of the variational model determines the center frequency and bandwidth of each decomposed component. The final objective is to estimate the sum of the bandwidths of all modes, thereby achieving frequency domain segmentation and effective separation of mode components in the data sequence signal. Compared to empirical mode decomposition methods, which rely on the extreme values ​​of the data sequence to calculate the envelope and are susceptible to noise interference, variational mode decomposition methods have better noise resistance and effectively solve the mode aliasing problem.

[0041] Therefore, in this embodiment, variational mode decomposition (VMD) is preferred for data type conversion of multiple detection data. However, the VMD method in this embodiment differs significantly from existing technologies. The number of mode decompositions and the second-order penalty factor are the most critical indicators affecting the decomposition results. The number of mode decompositions is typically determined by multiple trial-and-error decompositions and calculation of their center frequencies; the second-order penalty factor is generally determined empirically. This method of determining key parameters easily leads to computational complexity when decomposing data sequences. While this has little impact on short-term data, it can cause error accumulation and unclear modal components in the long-term, multi-type data presented in this embodiment. This can be understood as the determination of the decomposition parameters relying on experience and single data feature representation, resulting in significant overlap between the decomposed modes, hindering accurate decomposition and affecting subsequent feature extraction.

[0042] Therefore, to solve this technical problem, this embodiment first decomposes the modal components of each detection data using initial parameters, and determines the degree of deviation based on the decomposition results. The degree of deviation reflects the degree of deviation between the real-time decomposition results and the target decomposition results. Then, update parameters are determined based on the degree of deviation, and the decomposition process is iterated based on the update parameters until the maximum number of iterations is reached to determine the optimal decomposition parameters. Finally, modal components of each detection data are decomposed based on the optimal decomposition parameters.

[0043] In this embodiment, the multiple modal components after decomposition represent multiple frequency distributions corresponding to the detection data. Generally, the goal of modal component decomposition is to find high-frequency components, which represent the maximum distribution state corresponding to the data. Subsequent feature processing is then performed based on the representation of the data using these high-frequency components, while low-frequency components are discarded. Although this method retains the frequency distributions that best represent data changes, the discarding of data results in a certain loss of accuracy in subsequent feature extraction and prediction detection. This is because high-frequency components typically correspond to rapidly changing noise or short-term fluctuations, while low-frequency components usually represent certain trend information. The detection and prediction task in this embodiment requires a focus on local features with short-term characteristics. Therefore, in this embodiment, low-frequency components are also retained, and both are used as common inputs for subsequent feature extraction.

[0044] Specifically, in this embodiment, the degree of deviation is determined by obtaining the feature density of each modal component in the decomposition result and then obtaining the average distribution of the feature density. The feature density is determined by obtaining the envelope entropy of the modal components, and the average distribution is the average value of the envelope entropy. This can be understood as follows: in this embodiment, modal decomposition is first performed on the detection data based on initial parameters, and the envelope entropy corresponding to each decomposed modal component is obtained. The degree of deviation is then determined based on the average value of the envelope entropy. A smaller envelope entropy value indicates a lower density of decomposed modes and a higher degree of separation, indicating that the original data sequence has been effectively decomposed. Conversely, a larger envelope entropy value indicates a risk of modal aliasing and spurious modes in each component.

[0045] Furthermore, the iterative process in this embodiment is an optimization process. To make the acquisition of hyperparameters more complete and reduce the problem of getting trapped in local optima during the optimization process, an improved optimization algorithm is used in the above iterative process. Specifically, multiple initial iteration parameters are set for this iterative process. These initial iteration parameters can be configured using parameters from the gray wolf optimization algorithm, including the gray wolf population size, optimization dimension, and number of iterations. The gray wolf population size, optimization dimension, iteration parameters, number of mode decompositions, and penalty factor are used as update parameters. Specifically, the gray wolf population size, optimization dimension, and iteration parameters are iteration parameters, while the number of mode decompositions and penalty factor are mode decomposition parameters. In this embodiment, the iteration parameters are continuously optimized using the degree of deviation, and the optimized iteration parameters are used to iterate the mode decomposition process to obtain the optimal decomposition parameters.

[0046] Specifically, the optimization process of the Grey Wolf Optimization Algorithm first selects four positions corresponding to solutions in the Grey Wolf population based on the degree of deviation: the optimal solution position, the second-best solution position, the third-best solution position, and the candidate solution position. Here, "position" refers to a vector position. Then, a coordination coefficient vector is determined based on the convergence factor, and the distances between the optimal, second-best, and third-best solution positions and the target position are obtained based on this coordination coefficient vector. The candidate solution positions are then updated based on these distances. The process iterates based on the current candidate solution positions to obtain the number of mode decompositions and the penalty factor after each iteration. The degree of deviation is then updated based on this number of mode decompositions and the penalty factor. It is determined whether the updated value of deviation meets a preset requirement. If not, the process continues, selecting four positions corresponding to solutions in the Grey Wolf population based on the current updated value of deviation, and repeating the above steps until the final updated value of deviation meets the preset requirement. The iteration then stops, and the final number of mode decompositions and penalty factor are obtained.

[0047] It is worth noting that in the Grey Wolf optimization iteration process, the convergence factor is a key factor affecting the accuracy of the iteration results. The change in the synergy coefficient vector obtained through the convergence factor directly affects the ability to determine candidate solutions. In the existing Grey Wolf optimization iteration, due to the linear change of the convergence factor, its value decreases linearly from 2 to 0 as the iteration unfolds. This processing method has a significant impact on the balance between global and local search capabilities. Furthermore, because the detection data obtained in the water quality detection scenario of this application embodiment is relatively complex and the data changes non-linearly, using a linear processing method would cause a large error.

[0048] Therefore, to address this issue, this embodiment replaces the linear convergence factor with a non-linear convergence factor, causing its value to decrease more slowly in the early stages of iteration, increasing the global search time to enhance global search capability, and decreasing rapidly in the later stages of iteration to enhance the algorithm's local optimization capability. Specifically, the convergence factor in this embodiment is updated based on the number of iterations, dynamically changing according to the iterations, as expressed by the following formula: ,in The initial value of the convergence factor 'a' is represented by 't', the current iteration number is 'tmax', the maximum iteration number is 'tmax', and 'e' indicates that the iteration weight is constant. By updating the convergence factor based on the change in the iteration number, the optimization capability is improved.

[0049] In one implementation, the distribution of the optimal solution position, the second-best solution position, and the third-best solution position is used to guide the updating of candidate solution positions. Generally, updating the candidate solution position vector is achieved by averaging the positions of these three position vectors. However, position vectors at different levels have different correlations with the generation of candidate solution position vectors. If an average distribution is used for inference, it will slow down the convergence speed and lead to getting stuck in local optima. To solve this technical problem, in this embodiment, the updating mechanism of the above position vectors is configured with corresponding weights, so that they have different correlations in guiding the generation of candidate solution position vectors.

[0050] Specifically, the weights of the three position vectors mentioned above are obtained based on their proportion in the overall distribution. This can be understood as follows: the larger the proportion of a position vector, the greater its corresponding weight. Furthermore, as the three position vectors are iteratively updated, their corresponding weights are also updated accordingly, thus ensuring timely convergence of the iterative process. For example, the weight corresponding to the optimal solution position is expressed by the following formula: ,in This represents the weight corresponding to the position of the optimal solution. , and These represent the position vectors of the optimal solution, the second-best solution, and the third-best solution, respectively.

[0051] In this embodiment, the modal decomposition result corresponding to each detection data can be obtained through the above-described modal decomposition and iterative process. Specifically, in this embodiment, the purpose of modal decomposition is to capture the frequency information in the time series data and decompose the data in different frequency ranges, wherein the decomposition result includes four high-frequency component sequences and four low-frequency component sequences.

[0052] For details regarding this decomposition result, please refer to [link / reference]. Figure 3 As shown, in Figure 3The diagram shows the fourth high-frequency component in a four-high-frequency component sequence and the first low-frequency component in a four-low-frequency component sequence. The two components have low frequency differentiation, and typically, frequency overlap occurs during mode decomposition, resulting in unclear segmentation. However, through… Figure 3 The distribution results of the mid-frequency components show that there is a clear boundary between them, indicating that the above method can accurately segment the modes to obtain accurate low-frequency and high-frequency components.

[0053] Step S22. Combine multiple high-frequency component sequences to obtain first data, combine multiple low-frequency component sequences to obtain second data, obtain global features corresponding to the first data and the second data based on an attention mechanism, perform hierarchical segmentation based on the global features to extract local features corresponding to the first data and the second data, and fuse the global features and the local features to obtain the first feature and the second feature corresponding to the first data and the second data.

[0054] In this embodiment, step S21 acquires four high-frequency components and four low-frequency components. Further, to extract features from the detection data, the four high-frequency components are combined to obtain a high-frequency component data group, and the four low-frequency components are combined to obtain a low-frequency component data group, which are used to characterize the components of the detection data in two different frequency regions. The combination of components can be performed using existing techniques, as the high accuracy of modal segmentation in step S21 avoids the technical problem of data overlap during combination.

[0055] The high-frequency and low-frequency components are used to characterize the short-term fluctuations and trends of the detection data, respectively. In this embodiment, feature data from both components are extracted to obtain deeper feature representation results, and these features provide accurate input data for subsequent predictive detection.

[0056] Specifically, in this embodiment, the acquisition of the first and second features begins by determining the global features corresponding to the first and second data groups. These global features refer to features obtained based on time-step dependencies. In this embodiment, the acquisition of these global features is implemented using a self-attention mechanism. This can be understood as follows: for the first and second data groups, the self-attention mechanism is first used to extract dependencies across time steps, obtaining feature associations between contexts in the data, thereby acquiring global features and mapping these global features into a feature matrix. The self-attention mechanism can effectively capture long-term dependencies in water quality by dynamically calculating the association weights across time steps. The processing of the self-attention mechanism can employ existing technologies and will not be elaborated upon in this embodiment.

[0057] In the scenario described in this embodiment, global features cannot accurately capture the dynamic relationship between the detection data. In order to obtain the local relationship between different time scales, it is also necessary to obtain the local features corresponding to the first data group and the second data group respectively. Then, the local features and global features are combined to obtain the final first feature and second feature.

[0058] In this embodiment, the acquisition of local features first involves dividing the global features into two sub-sequences based on parity-even segmentation. These two sub-sequences are then processed by a one-dimensional convolutional filtering module to obtain their corresponding hidden states. These hidden states are then cross-updated to obtain the first and second intermediate features. Next, a one-dimensional convolutional filtering module is used to obtain the secondary hidden states corresponding to the first and second intermediate features, respectively. These secondary hidden states are then filtered based on a dynamic threshold. Based on the filtered hidden states, the first and second intermediate feature sequences are updated twice to obtain the first and second local feature sequences.

[0059] Then, the first and second local feature sequences are processed a second time based on the above-mentioned odd-even segmentation and feature extraction, resulting in four corresponding local feature sequences. These four local feature sequences are further decomposed based on subsequent hierarchical settings. It can be understood that the acquisition of local features in this embodiment is achieved by setting multiple hierarchical units. Each hierarchical unit has a corresponding module for segmenting and extracting the input feature sequence, and the local feature sequence obtained at this layer is used as the input for the next layer. Specifically, the hierarchical unit in this embodiment includes three layers, meaning the final output local feature sequence includes eight local feature sequences. Then, every two subsequences in the final eight local feature sequences are rearranged according to their odd and even elements until all eight local feature sequences are completely rearranged, resulting in a new feature sequence, which is then used as the local feature in this embodiment.

[0060] In this embodiment, the one-dimensional convolutional filtering module first pads the input sequence with 0.5 to maintain the sequence length, then processes it through a one-dimensional convolutional layer with a kernel size of 3 and based on the LR activation function, and finally outputs it through a one-dimensional convolutional layer with a kernel size of 3 and based on the Tanh activation function.

[0061] Specifically, taking the first layer processing as an example, the two segmented subsequences are processed using two different one-dimensional convolutional filtering modules to obtain the corresponding two hidden states, namely the first hidden state and the second hidden state. Then, based on the natural exponential function, the first hidden state is multiplied by the features in the second subsequence through element-wise multiplication to obtain the second intermediate feature sequence. The second hidden state is then multiplied by the features in the first subsequence to obtain the first intermediate feature sequence. Next, two different one-dimensional convolutional filtering modules are used again to obtain the third and fourth hidden states corresponding to the above two intermediate feature sequences. Then, the third and fourth hidden states are filtered based on dynamic thresholds to determine the third and fourth updated hidden states. Finally, the first intermediate feature sequence is subtracted from the fourth updated hidden state, and the second intermediate feature sequence is subtracted from the third updated hidden state to obtain the final first local feature sequence and the second local feature sequence, respectively.

[0062] In this embodiment, the mechanism for updating the third and fourth hidden states using a dynamic threshold is used to address redundant features during the interaction process. The processing logic involves adjusting the update result in real-time based on the distribution of the current hidden state vectors, thereby avoiding the generation of duplicate hidden state vectors. Specifically, the dynamic threshold is obtained by determining the distribution difference between the secondary hidden state vector corresponding to each feature in the feature sequence and a preset hidden state threshold, and then filtering the secondary hidden state vectors based on this distribution difference.

[0063] Specifically, if the quadratic hidden state vector corresponding to a feature is greater than a threshold, then that quadratic hidden state vector is selected; if it is less than the threshold, then it is discarded. Obtaining the binary distribution of the quadratic hidden state vector effectively alleviates the problems of gradient vanishing and gradient exploding. Furthermore, truncating the quadratic hidden state vector enables feature selection, accelerates gradient updates of salient features, suppresses interference from insignificant features, and reduces interference from redundant features in subsequence components.

[0064] In this embodiment, the above processing can obtain local features corresponding to the first data group and the second data group respectively. Then, for the first and second features finally obtained, it is necessary to fuse the global features and the local features. The fused features are the first and second features corresponding to the first data group and the second data group in this embodiment.

[0065] The fusion of global and local features is performed using residual connections, and the resulting new feature sequence is the final first and second feature.

[0066] Step S23. Obtain the detection results of the first feature and the second feature respectively, and determine the fusion weight based on the distribution of the high-frequency component sequence and the low-frequency component sequence. Based on the fusion weight, reconstruct the detection results based on linear fusion to obtain the target detection result.

[0067] Step S22 can obtain the first and second features corresponding to the high-frequency and low-frequency components. Both the first and second features are derived from the fusion of the corresponding global and local features. In terms of the expression of the overall features, it can not only reflect the characteristics across time steps but also reflect the deep local features.

[0068] In this embodiment of the application, the detection logic obtains the prediction results corresponding to the two features mentioned above, and then combines the two prediction results to obtain the final prediction result.

[0069] Specifically, the prediction results for the two features mentioned above are obtained based on the GRU model. In this embodiment, a three-layer GRU network is used, where the output of the previous layer is the input of the next layer, and after passing through the last GRU hidden layer, the output is sent to the fully connected layer. The fully connected layer combines all features to capture the relationships between them, and finally performs inverse normalization using the Sigmoid function to output the prediction results corresponding to the first and second features.

[0070] In this embodiment, the fusion of the prediction results corresponding to the first feature and the second feature is implemented using a linear fusion strategy. Furthermore, the linear fusion strategy in this embodiment includes a weighting mechanism for updating the weights of the prediction results of the first and second features. Specifically, the weighting mechanism sets fusion weights for the first and second features, and the corresponding weight updates are guided by obtaining the rate of change between high-frequency and low-frequency components.

[0071] Specifically, the highest and lowest values ​​of the high-frequency and low-frequency components are obtained respectively. Based on the highest and lowest values, the distribution gaps corresponding to the high-frequency and low-frequency components are determined. Based on the distribution gaps, the data changes of the high-frequency and low-frequency components, as well as the weights corresponding to the first and second features, are determined. Features corresponding to components with higher distribution gaps are assigned more weights, while features corresponding to components with lower distribution gaps are assigned fewer weights. Furthermore, the sum of the weights corresponding to the first and second features is 1. This can be understood as assigning more weight values ​​to features corresponding to components with larger distribution gaps in this embodiment, so that the final prediction result better reflects the result corresponding to that feature. In this embodiment, the specific processing procedure of the GRU model can be implemented using methods in existing technologies, and will not be elaborated further.

[0072] In this embodiment, the prediction results can be found in [reference needed]. Figure 4 As shown. In Figure 4 The figure illustrates the distribution of detection results obtained by the method in the embodiments of this application, the actual values ​​of manual laboratory testing, and the detection results obtained by machine learning methods in the prior art. As can be seen from this figure, the difference between the detection results obtained by the technical solution of the embodiments of this application and the results corresponding to the actual values ​​of manual laboratory testing is smaller than the difference between the results obtained by machine learning methods in the prior art.

[0073] The water quality detection method provided in this application involves acquiring multiple detection data points of the water body within a unit time period, performing mode decomposition on these data points to obtain corresponding high-frequency and low-frequency components, extracting features from the high-frequency and low-frequency components respectively, and obtaining corresponding prediction results based on the extracted features. These prediction results are then fused to obtain the target detection result for the water body at the next time point, enabling the prediction and detection of target data in the water body. Compared to existing technologies, this application is more suitable for short-term prediction and detection tasks in long-term time series. It captures the abrupt changes and long-term features of the data through mode segmentation, resulting in a more complete feature expression. Furthermore, by fusing global and local features, it captures the overall feature relationships of long-term data, thereby improving the accuracy of the prediction and detection results.

[0074] See Figure 5 The data processing unit 13 in this embodiment specifically includes the following modules:

[0075] The data decomposition device 131 is used to decompose multiple detection data sequences based on their distribution states to obtain the high-frequency component sequence and the low-frequency component sequence corresponding to each detection data sequence.

[0076] The feature extraction device 132 is used to combine multiple high-frequency component sequences to obtain a first data group, combine multiple low-frequency component sequences to obtain a second data group, and respectively obtain a first feature sequence and a second feature sequence corresponding to the first data group and the second data group.

[0077] The detection device 133 is used to acquire the detection results of the first feature and the second feature respectively, and reconstruct the detection results based on linear fusion to obtain the target detection result.

[0078] See Figure 6The above methods can also be integrated into the provided terminal device 600. Since the device may vary significantly due to different configurations or performance, it may include one or more processors 601 and memories 602. The memory 602 may store one or more application programs or data. The memory 602 can be temporary or persistent storage. The application programs stored in the memory 602 may include one or more modules (not shown in the figure), each module may include a series of computer-executable instructions from the terminal device. Furthermore, the processor 601 may be configured to communicate with the memory 602, and the terminal device may execute the series of computer-executable instructions stored in the memory 602. The terminal device may also include one or more power supplies 603, one or more wired / wireless network interfaces 604, one or more input / output interfaces 605, one or more keyboards 606, etc.

[0079] In one specific embodiment, the terminal device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for use in the terminal device, and is configured to be executed by one or more processors. The one or more programs include computer-executable instructions for performing the following:

[0080] Multiple detection data sequences of water bodies in the detection area collected per unit time are decomposed based on the distribution state to obtain the high-frequency component sequence and low-frequency component sequence corresponding to each detection data sequence;

[0081] Multiple high-frequency component sequences are combined to obtain a first data group, and multiple low-frequency component sequences are combined to obtain a second data group. The first feature sequence and the second feature sequence corresponding to the first data group and the second data group are obtained respectively.

[0082] The detection results of the first feature and the second feature are obtained respectively, and the detection results are reconstructed based on linear fusion to obtain the target detection result.

[0083] Optionally, the processor can perform various functions, such as the above-mentioned functions, by running or executing software programs stored in memory and by calling data stored in memory. Figure 2 The method shown.

[0084] In a specific implementation, as one example, the processor may include one or more microprocessors.

[0085] The memory is used to store the software program that executes the solution of this application, and the execution is controlled by the processor. The specific implementation method can be referred to the above method embodiment, which will not be repeated here.

[0086] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0087] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0088] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0089] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0090] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0091] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A water quality detection method, characterized in that, The method comprises: The method comprises: The method comprises: The method comprises:

2. The water quality detection method according to claim 1, wherein, The method comprises:

3. The water quality detection method according to claim 2, wherein, The method comprises:

4. The water quality detection method of claim 1, wherein, The method comprises:

5. The water quality detection method of claim 4, wherein, The method comprises:

6. The water quality detection method of claim 5, wherein, The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises:

7. The water quality detection method of claim 6, wherein, The first intermediate feature sequence and the second intermediate feature sequence are updated twice based on the hidden state, including: obtaining the second hidden state corresponding to the first intermediate feature sequence and the second intermediate feature sequence respectively, and screening the hidden state based on a dynamic threshold, and updating the first intermediate feature sequence and the second intermediate feature sequence based on the screened hidden state respectively to obtain the first local feature and the second local feature.

8. The water quality detection method of claim 7, wherein, The distribution difference between the second hidden state corresponding to each feature and the pre-set hidden state threshold is obtained, and the second hidden state is screened based on the distribution difference.

9. The water quality detection method of claim 1, wherein, The distribution of the high-frequency component sequence and the low-frequency component sequence includes the first drop and the second drop corresponding to the high-frequency component sequence and the low-frequency component sequence, and the fusion weight is determined based on the distribution, including: determining the size difference of the first drop and the second drop, and determining the corresponding fusion weight according to the difference size, updating the detection result based on the fusion weight, and reconstructing the target detection result based on the updated detection result.

10. A water quality detection system characterized by, It includes a data acquisition unit, a data transmission unit and a data processing unit; the data acquisition unit includes a plurality of data acquisition devices for acquiring a plurality of detection data in a detection area, and transmitting the detection data to the data processing unit based on the data transmission unit based on unit time, the data transmission unit includes a node device corresponding to a plurality of data acquisition devices, the data processing unit is used to execute the water quality detection method of any one of claims 1-9, and the data processing unit includes: The data decomposition device is used to decompose a plurality of detection data sequences based on the distribution state to obtain a high-frequency component sequence and a low-frequency component sequence corresponding to each detection data sequence; the plurality of detection data includes PH value, chemical oxygen demand, ammonia nitrogen content and sewage temperature; The feature extraction device is used to combine a plurality of high-frequency component sequences to obtain first data, combine a plurality of low-frequency component sequences to obtain second data, obtain global features corresponding to the first data and the second data based on an attention mechanism, and extract local features corresponding to the first data and the second data based on hierarchical segmentation based on the global features, and fuse the global features and the local features to obtain first features and second features corresponding to the first data and the second data; the detection device is used to obtain detection results of the first features and the second features respectively, and determine a fusion weight based on the distribution of the high-frequency component sequence and the low-frequency component sequence, and reconstruct the target detection result based on linear fusion based on the detection result based on the fusion weight. The feature extraction device is used to combine a plurality of high-frequency component sequences to obtain first data, combine a plurality of low-frequency component sequences to obtain second data, obtain global features corresponding to the first data and the second data based on an attention mechanism, and extract local features corresponding to the first data and the second data based on hierarchical segmentation based on the global features, and fuse the global features and the local features to obtain first features and second features corresponding to the first data and the second data; the detection device is used to obtain detection results of the first features and the second features respectively, and determine a fusion weight based on the distribution of the high-frequency component sequence and the low-frequency component sequence, and reconstruct the target detection result based on linear fusion based on the detection result based on the fusion weight.

Citation Information

Patent Citations

  • A method for implementing an improved DE-GWO algorithm

    CN109002892A

  • Power distribution transformer area electricity sales accurate prediction method based on modal GRU learning network

    CN111784043A

  • Space load situation awareness method based on artificial intelligence technology

    CN113449912A

  • Wind power plant ultra-short-term wind direction prediction method based on CEEMDAN-IGWO-N-BEATS

    CN115600725A

  • Dissolved oxygen content prediction method and system based on environmental factor influence

    CN116522124A