An adaptive anti-interference water quality detection method, system, device and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF ELECTRONIC SCI & TECH OF CHINA CHENGDU COLLEGE
- Filing Date
- 2026-03-02
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies for using unmanned equipment to detect water quality data suffer from problems such as large errors in polluted areas and noise errors in the detection data, resulting in low accuracy of water quality detection results.
An adaptive anti-interference water quality detection method is adopted. The data acquisition equipment cruises along the mission parameter path to identify the core pollution area, collect high-density water quality data, generate a digital twin map, and use the Dig Flow denoising algorithm to purify the signal to ensure accurate data transmission.
It improves the accuracy and uniformity of water quality testing results, reduces the problems of poor accuracy in source tracing and poor communication reliability, and enhances testing efficiency and data reliability.
Smart Images

Figure CN121741141B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of water quality testing technology, and relates to a water quality testing method and system, and more particularly to an adaptive anti-interference water quality testing method, system, equipment and medium. Background Technology
[0002] Water pollution monitoring is one of the core tasks in the field of environmental protection. The development of water quality monitoring technology has always evolved in tandem with human needs for ecological protection. Currently, the main water quality monitoring methods are divided into three types: laboratory monitoring methods, mobile monitoring methods, and monitoring station detection methods.
[0003] Laboratory monitoring methods involve staff traveling by boat or other means to sampling points to collect samples, followed by detailed water quality analysis in a laboratory to generate a report. This method is primarily used for periodic water quality monitoring and assessment, and its results are generally highly accurate. Monitoring station methods involve establishing water quality monitoring stations to conduct water quality tests, and this is currently the main method. This method is highly resistant to external environmental interference, improving the accuracy of water quality data. Mobile monitoring methods are specifically designed for emergency and periodic water quality inspections. There are two main approaches: one involves personnel using mobile monitoring boats to collect and analyze water samples at the testing points; the other involves manually controlling unmanned equipment equipped with sensors specifically designed for water quality monitoring to collect and analyze water samples in the target water area.
[0004] Unmanned aerial vehicles (UAVs) and unmanned surface vessels (USVs), as two types of unmanned equipment with high mobility and flexibility, are widely used in the field of water quality monitoring. Whether it's a UAV or an USV, collecting water quality data involves a navigation path. Before the mission begins, operators plan one or more fixed navigation paths for the unmanned equipment based on historical experience, geographical information, and expected monitoring targets. The unmanned equipment is equipped with various water quality sensors, such as pH, dissolved oxygen, turbidity, and specific pollutant sensors, and relies on a positioning and navigation system to accurately navigate along the preset path and collect data.
[0005] Patent application number 202310962432.X discloses a water quality monitoring and inspection method, device, and equipment based on cross-domain sea-air collaboration. The method first acquires the target monitoring area and multiple preset monitoring points within that area. Then, it controls a drone to conduct preliminary detection of the target monitoring area, identifying suspected contaminated areas. Based on the location information of the suspected contaminated areas and the preset monitoring points, a global monitoring path is obtained within the target monitoring area. Finally, an unmanned surface vessel (USV) is controlled to perform precise detection of the target monitoring area according to this global monitoring path, yielding the monitoring results. This inspection method fully leverages the advantages of both drones and USVs, enabling USVs to accurately reach their destinations for precise detection, avoiding meaningless repetitive patrols, and solving the problem of limited drone endurance, thus significantly improving detection efficiency.
[0006] Patent application number 202511502059.5 discloses a method and system for detecting complex water pollution based on adaptive cruise technology, comprising: Step 1: The master vehicle generates an initial global pollution distribution estimate covering the target water area based on initial information; Step 2: Based on the initial global pollution distribution estimate, an initial cruise path is generated for at least two slave vehicles; Step 3: Each slave vehicle navigates along its initial cruise path and collects water environment data in real time using its onboard sensor array; then, based on the environmental data, the location of the slave vehicle is estimated in real time by a local computing unit. The system measures the local pollution concentration and gradient direction at the location and sends this information to the master vehicle. Step 4: The master vehicle receives and integrates the data from all slave vehicles, updating the global pollution distribution estimate. Based on the updated global pollution distribution estimate, the master vehicle identifies the core migration path and / or pollution hotspots of the pollution plume. Based on the identification results, the master vehicle dynamically generates and distributes local path instructions guiding the slave vehicles to move in the direction of the rising pollution concentration gradient. Step 5: Each slave vehicle receives the local path instructions and adjusts its flight path to actively track the pollution plume. This detection method uses slave vehicles to perceive the local pollution concentration and gradient direction in real time, and the master vehicle integrates all data to update the global pollution distribution estimate. The system can dynamically identify the core migration path and pollution hotspots of the pollution plume, enabling the vehicle to always operate around the core pollution area, avoiding ineffective cruising in clean or low-concentration areas. Therefore, with the same time and energy consumption, it achieves monitoring efficiency and high-value data density far exceeding traditional methods.
[0007] Similar to the aforementioned patent application, existing technologies for collecting water quality data from polluted areas using unmanned surface vessels (USVs) largely rely on planning the cruise route and coordinating among USVs. The polluted area and its distribution are then estimated based on the data collected. However, estimating the polluted area and its distribution solely based on collected water quality data is flawed. Firstly, the estimation itself contains errors. Secondly, there is a lack of water quality testing data for the estimated polluted area or core area. Therefore, the final obtained polluted area and its distribution are inaccurate, resulting in low accuracy in water quality testing results. Furthermore, since USVs transmit data to the backend via signal transmission after measurement, this process lacks data purification and noise reduction, leading to noise in the data and further reducing the accuracy of water quality testing results. Summary of the Invention
[0008] The purpose of this invention is to address the technical problems of low accuracy in water quality testing results caused by large errors in detecting polluted areas and noise errors in the detection data when using unmanned equipment in the prior art, and to provide an adaptive anti-interference water quality testing method, system, equipment and medium.
[0009] To achieve the above objectives, the present invention specifically adopts the following technical solution:
[0010] An adaptive anti-interference water quality detection method includes:
[0011] Step 1: Load task parameters;
[0012] The task parameters are loaded into the main control unit of the data acquisition device via wireless communication. The main control unit controls the thrust of the data acquisition device's pusher based on the data collected by the attitude sensor of the data acquisition device, thereby stabilizing the preset depth and attitude of the data acquisition device.
[0013] Step 2: Global route navigation;
[0014] The data acquisition equipment cruises along the cruise path in the mission parameters and collects water quality parameter data, water quality sample data, and environmental perception data at each sampling point. It also integrates the cruise data to construct an underwater environment map.
[0015] Step 3: Identify the core pollution area;
[0016] The main control unit processes water quality parameter data to initially screen suspected pollution points; it calculates the comprehensive pollution index of suspected pollution points and sorts them according to the comprehensive pollution index to identify the core pollution area with the highest degree of pollution.
[0017] Step 4: Sampling in the core contaminated area;
[0018] Based on the location of the core pollution area and in conjunction with the underwater environmental map, the optimal sampling route is planned; the data acquisition equipment proceeds to the core pollution area according to the optimal sampling route; upon arrival at the core pollution area, high-density mesh sampling is performed; during sampling, the data acquisition equipment re-measures water quality parameter data and acquires images; the gradient magnitude is calculated using the spatial grid pollution gradient algorithm to locate the pollution center point and collect water quality samples.
[0019] Step 5: Generate a digital twin map;
[0020] By integrating the water quality parameter data measured in step 2, the water quality parameter data of the core pollution area measured in step 4, and the location data of the sampling points, the source tracing direction angle is calculated using a pollution gradient fitting algorithm to generate a digital twin map that overlays the pollution concentration distribution and the source tracing direction.
[0021] Step 6: Map transmission and signal denoising;
[0022] The digital twin map and sampling data are transmitted to the buoy via a communication cable. The signal emitted by the buoy is transmitted to the signal receiver. The signal receiver uses the Dig Flow denoising algorithm to denoise and purify the transmitted signal. After verification, the signal is uploaded to the shore-based platform to complete the water quality test.
[0023] Furthermore, step 3, in identifying the core pollution area, specifically involves the following steps:
[0024] Step 3-1: Data Cleaning;
[0025] The main control unit processes water quality parameter data, including normalization and outlier removal.
[0026] Step 3-2: Initial screening of suspected contamination points;
[0027] For the water quality parameter data after data processing, the absolute threshold comparison method and the relative deviation comparison method are used in sequence to screen and identify suspected pollution points.
[0028] Step 3-3: Calculate the comprehensive pollution index;
[0029] Based on the water quality parameter data of suspected pollution points, the pollution deviation coefficient is first calculated, then the comprehensive pollution score is calculated based on the pollution deviation coefficient, and finally the comprehensive pollution scores of each suspected pollution point are sorted from largest to smallest.
[0030] Steps 3-4: Identify the core pollution area;
[0031] Based on the comprehensive pollution classification, the core pollution area was identified.
[0032] Furthermore, in step 4, the method for locating the center of pollution is as follows:
[0033] Step 4-1: Calculate the relative contamination level of the grid;
[0034] After the core pollution area is gridded, the relative pollution degree of each grid is calculated;
[0035] ;
[0036] Step 4-2: Locate the center of pollution;
[0037] Calculate the pollution gradient magnitude; when the pollution gradient magnitude is equal to 0, the sampling point is the pollution center point; the formula for calculating the pollution gradient magnitude is:
[0038] ;
[0039] Step 4-3: Verify authenticity;
[0040] Using validation parameters The identified pollution center point needs to be verified. If the value is greater than the threshold, the identified pollution center location is correct; verify the parameters. The calculation formula is:
[0041] ;
[0042] in, This represents the relative contamination level of the m-th and n-th grids. This represents the combined pollution score of the m-th and n-th grids. This represents the lowest composite pollution score across all grids within the core pollution zone. This represents the highest overall pollution score across all grids within the core pollution zone. This represents a small change in the overall pollution composition. It represents a small change in the x-direction. It represents a small change in the y-direction. This represents the partial derivative of the overall pollution CPI with respect to x. This represents the partial derivative of the overall pollution CPI with respect to y. This indicates the average comprehensive pollution score of the core area. This represents the average comprehensive pollution score across the entire region.
[0043] Furthermore, in step 5, the method for determining the source tracing direction angle is as follows:
[0044] Step 5-1: Fit the pollution diffusion pattern;
[0045] A line is plotted using the coordinates of all sampling points across the entire region and the comprehensive pollution distribution, and the pollution diffusion pattern is fitted; the fitting formula for the pollution diffusion pattern is:
[0046] ;
[0047] Step 5-2: Calculate the source tracing direction;
[0048] like =0, which means the boundary of the pollution source has been found, and the source tracing should stop; if If >0, it indicates that the pollution is spreading in the positive direction along the x-axis (the pollution source is in the negative direction); if If the value is less than 0, it indicates that the pollution diffuses in the negative direction along the x-axis (positive direction from the pollution source); according to the slope... , source tracing direction angle That is, the source direction and the source direction angle. The calculation formula is:
[0049] ;
[0050] in, This represents the pattern of pollution composition as a function of coordinates. Represents the x-coordinate of the sampling point. This represents the slope of the fitted line. This represents the initial value of dissolved oxygen concentration when the sampling depth is 0.
[0051] Furthermore, in step 6, when using the Dig Flow denoising algorithm to denoise and purify the signal, a hybrid model is pre-deployed in the programmable chip of the signal receiver. The hybrid model includes CNN convolutional neural network, RNN recurrent neural network, Transformer encoder, and liquid neural network LNN. The specific method for signal denoising and purification is as follows:
[0052] Step 6-1, Signal preprocessing;
[0053] The noisy signal acquired by the signal receiver is filtered to obtain the effective data segment; the effective data segment is then normalized to map the signal amplitude to the [-1,1] interval, resulting in the normalized signal. ; Perform frame segmentation processing on the normalized signal;
[0054] Step 6-2: Time-frequency dual-domain feature extraction;
[0055] RNN (Recurrent Neural Network) and CNN (Convolutional Neural Network) were used to normalize the signal for each frame, respectively. Feature extraction is performed to obtain the corresponding temporal feature vector. Frequency domain eigenvectors ;
[0056] Step 6-3: Cross-domain feature fusion;
[0057] Time-domain feature vectors Frequency domain eigenvectors Perform one-dimensional concatenation to obtain cross-domain feature vectors. ; cross-domain feature vectors The input is a Transformer encoder. The output of the Transformer encoder is processed by layer normalization and linear layers to obtain the global fused feature vector. ;
[0058] Step 6-4: Calculation of dynamic parameters;
[0059] Globally fuse feature vectors Inputting a liquid neural network (LNN), updating the neuron states of the LNN in real time, and outputting an intermediate feature vector from the LNN. ; to the intermediate feature vector The input is a linear layer, and the output of the linear layer is mapped to the interval [-1, 1] through the Sigmoid activation function to obtain the final in-phase amplitude coefficients. Inverting amplitude coefficient ;
[0060] Step 6-5: Generate cancellation signal and return input signal to zero;
[0061] Based on the in-phase amplitude coefficient Inverting amplitude coefficient and normalized signal Generate cancellation signal ; normalize the signal With cancellation signal Superimpose the data and use the zero-return condition to solve for the noise waveform. ;
[0062] Calculate the zeroing error. If the error is less than or equal to the threshold, the noise waveform extraction is valid; if the error is greater than 0, return to step 6-4 to fine-tune the in-phase amplitude coefficient. Inverting amplitude coefficient ;
[0063] Step 6-6: Restoration of clean signal;
[0064] Using normalized signals Noise subtraction waveform Normalized pure signal is obtained ; for normalized pure signals Perform inverse normalization to obtain a clean digital signal. .
[0065] An adaptive anti-interference water quality detection system, comprising:
[0066] The task parameter loading module is used to load task parameters to the main control unit of the data acquisition device via wireless communication. The main control unit controls the thrust of the data acquisition device's pusher based on the data collected by the attitude sensor of the data acquisition device, thereby stabilizing the preset depth and attitude of the data acquisition device.
[0067] The full-domain path navigation module is used by the data acquisition device to cruise along the navigation path in the task parameters, and collect water quality parameter data, water quality sample data, and environmental perception data at each sampling point, and integrate the trajectory data to build an underwater environment map.
[0068] The core pollution area identification module is used by the main control unit to process water quality parameter data, initially screen suspected pollution points, calculate the comprehensive pollution index of suspected pollution points, sort them according to the comprehensive pollution index, and lock the core pollution area with the highest degree of pollution.
[0069] The core pollution area sampling module is used to plan the optimal sampling path based on the location of the core pollution area and the underwater environment map; the data acquisition equipment travels to the core pollution area according to the optimal sampling path; after arriving at the core pollution area, high-density mesh sampling is performed; during sampling, the data acquisition equipment re-measures water quality parameter data and acquires images; the gradient magnitude is calculated through the spatial grid pollution gradient algorithm to locate the pollution center point and collect water quality samples.
[0070] The digital twin map generation module is used to integrate water quality parameter data measured by the full-domain path navigation module, water quality parameter data of the pollution core area measured by the pollution core area sampling module, and sampling point location data. It calculates the source tracing direction angle through a pollution gradient fitting algorithm to generate a digital twin map that overlays the pollution concentration distribution and source tracing direction.
[0071] The map transmission and signal denoising module is used to transmit the digital twin map and sampling data to the buoy via a communication cable. The signal emitted by the buoy is transmitted to the signal receiver, which uses the Dig Flow denoising algorithm to denoise and purify the transmitted signal. After verification, the signal is uploaded to the shore-based platform to complete the water quality testing.
[0072] A computer device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method described above.
[0073] A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the above-described method.
[0074] The beneficial effects of this invention are as follows:
[0075] 1. In this invention, a comprehensive pollution index is first calculated based on water quality data obtained from patrols, and the core pollution area is determined according to the ranking of the comprehensive pollution index. Then, water quality data and samples from the core pollution area are collected, and a digital twin map is generated after tracing the source, which is then transmitted to a signal receiver via buoys. Finally, a hybrid model deployed within the signal receiver denoises and purifies the signal. Therefore, the water quality parameter data obtained by the shore-based platform more accurately reflects the water quality of the polluted area, effectively avoiding the impact of sampling points not belonging to the core pollution area or noise during data transmission on the transmitted water quality parameter data. The final water quality parameter data is more accurate and precise, the water quality detection results are more accurate, and the detection coverage uniformity and operational efficiency are effectively improved. This effectively solves the problems of low detection and tracing accuracy, poor communication reliability, and low operational efficiency in existing technologies, demonstrating significant technical advantages and application value.
[0076] 2. In this invention, a pollution assessment scheme integrating multiple parameters (pH, conductivity, dissolved oxygen, water temperature, total phosphorus, ammonia nitrogen, total nitrogen, etc.) is adopted. Compared with the existing single-parameter judgment, the pollution identification accuracy of CPI comprehensive assessment is improved to over 95%. Combined with spatial gradient and concentration fitting algorithms, the source tracing error is controlled within 0.5m. In addition, the DigFlow denoising algorithm, compared with traditional wavelet transform, reduces the signal error rate (SER) by 60% and improves the signal-to-noise ratio by over 15dB in complex underwater noise environments with SNR=-10dB, ensuring the reliable transmission of critical data.
[0077] 3. In this invention, during the signal denoising and purification process, a dual-domain feature extraction and phase signal cancellation mechanism of CNN, RNN, Transformer and LNN is integrated to improve the signal purification effect in complex underwater noise environments and reduce the data transmission error rate. Attached Figure Description
[0078] Figure 1 This is a flowchart illustrating the present invention;
[0079] Figure 2 This is a schematic diagram of the process for identifying the core pollution area in this invention;
[0080] Figure 3 This is a schematic diagram of the signal denoising and purification process in this invention;
[0081] Figure 4 This is the SLAM detection map obtained when measured using the method of Example 1 in the experimental examples of this invention;
[0082] Figure 5 This is a pollution thermal analysis map generated using the method in Example 1 of the present invention. Detailed Implementation
[0083] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0084] Therefore, all other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0085] Explanation of technical terms:
[0086] The Comprehensive Pollution Index (CPI) is a dimensionless index obtained by merging multiple water quality parameters (such as pH, conductivity, dissolved oxygen, water temperature, total phosphorus, ammonia nitrogen, and total nitrogen) through weighting and normalization. The higher the value, the higher the degree of pollution, and it is used to quantitatively assess the pollution status of water bodies.
[0087] A digital twin map is a virtual map built based on underwater acoustic, positioning, and water quality data collected by data acquisition equipment. It can overlay information such as pollution concentration distribution and source tracing direction to achieve a visual presentation of the underwater environment and pollution status.
[0088] Dig Flow denoising algorithm is a digital signal purification method based on hybrid neural networks and phase signal cancellation mechanism. It identifies noise waveforms through time-frequency dual-domain analysis and achieves noise cancellation by using anti-phase superposition. It is suitable for signal optimization in harsh underwater communication environments.
[0089] Liquid Neural Network (LNN) is a neural network with dynamic weight adjustment capabilities. It employs leaky integral ignition (LIF) neurons, enabling it to quickly respond to time-varying signal characteristics and adapt to real-time signal processing in complex environments.
[0090] Simultaneous Localization and Mapping (SLAM) refers to the technology that allows data acquisition devices to build environmental maps in real time using their own sensor data in unknown environments, while simultaneously determining their own location.
[0091] Example 1
[0092] This embodiment provides an adaptive, interference-resistant water quality detection method for preliminary water quality testing, identifying polluted areas, and collecting water quality data and samples from the polluted areas to achieve water quality detection. Figure 1As shown, the specific steps of this detection method are as follows:
[0093] Step 1: Load task parameters;
[0094] Task parameters are loaded into the main control unit of the data acquisition device via wireless communication. The main control unit controls the thrust of the data acquisition device's thrusters based on the data collected by the attitude sensor of the data acquisition device, thereby stabilizing the preset depth and attitude of the data acquisition device.
[0095] The data acquisition equipment can be existing unmanned surface vessels or underwater robots. The data acquisition equipment is not the innovation of this application. Those skilled in the art can select and apply relevant equipment according to their needs, or add auxiliary functions to existing equipment to meet the use of this application, without any creative effort required.
[0096] When loading task parameters into the main control unit of the data acquisition device, the task parameters include, but are not limited to: working water area boundary, S-shaped cruise path (path spacing is set according to requirements, such as 2m, covering the entire water area), number of sampling points (set according to requirements), depth stability error (±0.1m), and attitude sensor monitoring parameters (pitch angle, roll angle), etc.
[0097] After the data acquisition device enters the water, its attitude sensors collect data such as pitch angle and roll angle in real time. The main control unit then fine-tunes the thrust of the data acquisition device's propeller based on this data to quickly counteract water flow disturbances, stabilizing the data acquisition device at a preset depth (set according to requirements, with an error of ±0.1m) and maintaining a horizontal attitude.
[0098] Step 2: Global route navigation;
[0099] The data acquisition equipment cruises along the cruise path specified in the mission parameters, and collects water quality parameter data, water quality sample data, and environmental perception data at each sampling point. It then integrates the cruise data to construct an underwater environment map.
[0100] The data acquisition equipment cruises along the S-shaped cruise path in the task parameters. When the data acquisition equipment cruises to each sampling point, the data acquisition equipment will complete three tasks: (1) Water quality parameter acquisition, the sensor collects data such as pH, conductivity, dissolved oxygen, water temperature, total phosphorus, ammonia nitrogen, and total nitrogen in real time, and associates and stores them with information such as time and location; (2) Fixed-point water sample collection, after the equipment arrives at the preset key sampling point, it controls the corresponding chamber of the water storage tank of the data acquisition equipment to collect water samples and seal and mark them; (3) Environmental perception and map construction, the ultrasonic module of the data acquisition equipment detects obstacles in real time and avoids obstacles, and at the same time integrates the trajectory data to construct an underwater environment map.
[0101] The data acquisition equipment's cruise and data acquisition, water quality sample collection, environmental perception, and map building can all be directly applied to existing technologies according to the needs of this application, without requiring any creative effort.
[0102] Step 3: Identify the core pollution area;
[0103] The main control unit processes water quality parameter data to initially screen suspected pollution points; it calculates the comprehensive pollution index of suspected pollution points and sorts them according to the comprehensive pollution index to identify the core pollution area with the highest degree of pollution.
[0104] After the full-area patrol is completed, the main control unit calls the data processing algorithm (an algorithm that can be directly applied to existing technologies) to analyze the collected water quality, and preliminarily screens out suspected pollution points by comparing the absolute threshold of a single parameter with the relative deviation (an existing comparison method can be directly applied); then it calculates and sorts the pollution by the comprehensive pollution index (CPI) to lock in the core pollution area with the highest degree of pollution.
[0105] The core innovation of this application lies in its calculation, ranking, and identification of the most polluted core areas by the Comprehensive Pollution Index (CPI).
[0106] When identifying the core pollution area, such as Figure 2 As shown, the specific steps are as follows:
[0107] Step 3-1: Data Cleaning;
[0108] The main control unit processes water quality parameter data, including normalization and outlier removal.
[0109] Because the data measured by the sensors of the data acquisition equipment may contain errors, data cleaning and filtering are necessary to ensure data reliability. Data cleaning mainly includes data normalization (to eliminate unit differences, such as unifying data like pH and conductivity into numbers between 0 and 1 for easier comparison) and outlier removal (to delete obviously erroneous data).
[0110] The formula for normalization is:
[0111] ;
[0112] The criteria for identifying outliers are:
[0113] .
[0114] Step 3-2: Initial screening of suspected contamination points;
[0115] For the water quality parameter data after data processing, the absolute threshold comparison method and the relative deviation comparison method are used in sequence to screen and identify suspected pollution points.
[0116] The data acquisition equipment cruises along the path, measuring data at each point and quickly identifying potentially contaminated locations. It does not require in-depth analysis; it only needs to circle the suspicious areas (i.e., suspected contamination points).
[0117] When identifying suspected contamination points, the absolute threshold comparison method was used for rapid initial screening (i.e., to see if a single indicator exceeds the "safe range"), and the relative deviation comparison method was used for secondary confirmation (i.e., to compare with the average value of all sampling points to see if it deviates too much).
[0118] The formula for calculating the absolute threshold comparison method is:
[0119] .
[0120] For example, the actual pH value measured at sampling point A is 8.1, while the safe pH benchmark for that water body is 7.5, and the maximum allowable pH fluctuation for that water body is 0.5; because Therefore, the sampling point was marked as a "suspected contamination point" and will be closely monitored in the future.
[0121] The formula for calculating the relative deviation comparison method is:
[0122] ;
[0123] like ≥ If the sum is 0, it indicates an anomaly; otherwise, it indicates that the anomaly is not an anomaly.
[0124] For example, if the average conductivity of all sampling points is 300 μS / cm, what is the maximum allowable deviation value for this region? The deviation is 15%; the actual measured conductivity at sampling point A is 360 μS / cm, and the deviation percentage of this sampling point is: This indicates a high suspicion of contamination at the sampling point. Therefore, the water quality parameters at sampling point A exceeded the standards in both comparisons, leading to its identification as a suspected contamination point.
[0125] Step 3-3: Calculate the comprehensive pollution index;
[0126] Based on the water quality parameter data of suspected pollution points, the pollution deviation coefficient is first calculated, then the comprehensive pollution score is calculated based on the pollution deviation coefficient, and finally, the comprehensive pollution scores of each suspected pollution point are sorted from largest to smallest.
[0127] After identifying suspected pollution points, it's not feasible to check them one by one; instead, we need to find the "most severely polluted area." Therefore, this step innovatively adopts the "Comprehensive Pollution Index (CPI)," which combines seven indicators—pH, conductivity, dissolved oxygen, water temperature, total phosphorus, ammonia nitrogen, and total nitrogen—to avoid misjudgment based on a single indicator (for example, a high pH value alone is not considered severe; all seven indicators must exceed the standard to be considered a core area).
[0128] The specific steps for calculating the comprehensive pollution index are as follows:
[0129] First, calculate the pollution deviation coefficient. The formula for calculating the pollution deviation coefficient is:
[0130] , .
[0131] For example, the safety benchmark value of the j-th indicator (such as pH value) It is 7.5, the pollution threshold. The value is 10; the pH value at sampling point B is 9.5, then... The deviation is significant;
[0132] Next, calculate the comprehensive pollution score. The formula for calculating the comprehensive pollution score is:
[0133] , (This formula represents the sum of the "deviation coefficient * weight" of the seven indicators).
[0134] For example, at a certain sampling point C 0.8 0.9 0.7 0.2 0.85 0.9 The corresponding weight is 0.8. The values are 0.1, 0.15, 0.2, 0.05, 0.2, 0.15, and 0.15 respectively. Therefore, the overall pollution at this sampling point is categorized as follows:
[0135]
[0136] =0.79, which is a high score and indicates severe pollution (the specific classification criteria can be set by those skilled in the art according to their needs, without the need for creative effort).
[0137] Steps 3-4: Identify the core pollution area;
[0138] Based on the comprehensive pollution classification, the core pollution area was identified.
[0139] All sampling points By sorting the samples from largest to smallest, the area covered by the top 5% of the comprehensive pollution points is identified as the core pollution zone. The next step for the data sampling equipment is to collect data and samples from this area.
[0140] in, Indicates the first The sampling point of the first sampling point Measured values of the water quality indicators Indicates the first The minimum reasonable values for each water quality indicator. Indicates the first The highest reasonable value for each water quality indicator Indicates the number of all sampling points. The average value of each water quality indicator Indicates the first The difference in the labeling of water quality indicators Indicates the safety benchmark value for the water area. This indicates the upper limit of allowed fluctuations. Indicates the first The sampling point of the first sampling point The deviation rate of each water quality indicator Indicates the maximum allowable offset ratio. Indicates the first The sampling point of the first sampling point Pollution deviation coefficient of each water quality indicator Indicates the first Safety benchmark values for water quality indicators Indicates the first The pollution threshold values for the water quality indicators Indicates the first The comprehensive pollution score of each sampling point Indicates the first The importance weight of each water quality indicator.
[0141] Step 4: Sampling in the core contaminated area;
[0142] Based on the location of the core pollution area and in conjunction with the underwater environmental map, the optimal sampling path is planned; the data acquisition equipment proceeds to the core pollution area according to the optimal sampling path; upon arrival at the core pollution area, high-density mesh sampling is performed (i.e., 1m*1m mesh sampling is used, with L_frame=256 (single frame sampling points) and L_step=128 when divided into frames); during sampling, the data acquisition equipment re-measures water quality parameter data and acquires images; the gradient magnitude is calculated using the spatial grid pollution gradient algorithm to locate the pollution center point and collect water quality samples.
[0143] After locating the core pollution area, the optimal sampling path (avoiding obstacles and using the shortest route) is planned based on the constructed underwater environmental map, and the data acquisition equipment is driven to reach the core pollution area. Upon arrival, a high-density mesh scan (grid accuracy 1m*1m) is performed. The sensors of the data acquisition equipment re-measure water quality parameters, and the camera and supplementary lighting of the equipment are activated to acquire images of the core pollution area. The system then controls the reserved chamber in the water storage tank to collect the finally confirmed water samples. Finally, the gradient magnitude is calculated using a spatial grid pollution gradient algorithm to pinpoint the pollution center point, and water samples are collected.
[0144] When locating the center of pollution, the method for locating the center of pollution is as follows:
[0145] Step 4-1: Calculate the pollution level;
[0146] After the core pollution area is gridded, the pollution score of the core area is converted into a percentage, and the relative pollution level of each grid is calculated.
[0147] .
[0148] For example, the relative contamination level of a certain grid. If the value is 90%, then this grid is the Top level in the core area (the specific division criteria can be set by those skilled in the art according to their needs, without the need for creative effort).
[0149] Step 4-2: Locate the center of pollution;
[0150] Calculate the pollution gradient magnitude; when the pollution gradient magnitude equals 0, the sampling point is the pollution center (with the highest pollution level, and all surrounding areas are less polluted), and the data acquisition equipment collects the "final sample" at this sampling point; the formula for calculating the pollution gradient magnitude is:
[0151] .
[0152] Step 4-3: Verify authenticity;
[0153] Using validation parameters The identified pollution center point needs to be verified. If the value is greater than a threshold (which is determined by those skilled in the art based on actual needs, and is typically set to 5%~10%), then the identified contamination center point is correct; verification parameters. The calculation formula is:
[0154] ;
[0155] in, This represents the relative contamination level of the m-th and n-th grids. This represents the combined pollution score of the m-th and n-th grids. This represents the lowest composite pollution score across all grids within the core pollution zone. This represents the highest overall pollution score across all grids within the core pollution zone. This represents a small change in the overall pollution composition. It represents a small change in the x-direction. It represents a small change in the y-direction. This represents the partial derivative of the overall pollution CPI with respect to x. This represents the partial derivative of the overall pollution CPI with respect to y. This indicates the average comprehensive pollution score of the core area. This represents the average comprehensive pollution score across the entire region.
[0156] The sampling of the core contaminated area in step 4, like in step 2, can be directly performed using existing technologies.
[0157] Step 5: Generate a digital twin map;
[0158] By integrating the water quality parameter data measured in step 2, the water quality parameter data of the core pollution area measured in step 4, and the location data of the sampling points, the source tracing direction angle is calculated using a pollution gradient fitting algorithm to generate a digital twin map that overlays the pollution concentration distribution and the source tracing direction.
[0159] Once the core pollution area is identified, it's crucial to trace its source and determine the direction from which the pollution spread—essentially locating the "approximate location of the pollution source." Therefore, after the data acquisition equipment returns or is retrieved, water quality parameter data and location data from the entire region and the core pollution area are integrated. A pollution concentration gradient fitting algorithm is then used to calculate the source tracing direction angle, generating a digital twin map that overlays the pollution concentration distribution and the source tracing direction (the generated digital twin map can be directly applied to existing technologies).
[0160] The method for determining the source tracing direction angle is as follows:
[0161] Step 5-1: Fit the pollution diffusion pattern;
[0162] A line is plotted using the coordinates of all sampling points across the entire region and the comprehensive pollution score, and the pollution diffusion pattern is fitted (the pattern of pollution score variation with location is found); the fitting formula for the pollution diffusion pattern is:
[0163] ;
[0164] Step 5-2: Calculate the source tracing direction;
[0165] like =0, which means the boundary of the pollution source has been found, and the source tracing should stop; if If >0, it indicates that the pollution is spreading in the positive direction along the x-axis (the pollution source is in the negative direction); if If the value is less than 0, it indicates that the pollution diffuses in the negative direction along the x-axis (positive direction from the pollution source); according to the slope... , source tracing direction angle That is, the source direction and the source direction angle. The calculation formula is:
[0166] ;
[0167] The tracing direction angle It will be displayed directly on the underwater map of the data acquisition device, and you can get closer to the pollution source by following the arrows.
[0168] in, This represents the pattern of pollution composition as a function of coordinates. Represents the x-coordinate of the sampling point. This represents the slope of the fitted line. This represents the initial value of dissolved oxygen concentration when the sampling depth is 0.
[0169] Step 6: Map transmission and signal denoising;
[0170] The digital twin map and sampling data are transmitted to the buoy via a communication cable. The digital signal emitted by the buoy is transmitted to the signal receiver. The signal receiver uses the Dig Flow denoising algorithm to denoise and purify the transmitted digital signal. After verification, the signal is uploaded to the shore-based platform to complete the water quality test.
[0171] Data transmission is an existing technology, but the signal receiver innovatively uses the Dig Flow denoising algorithm to denoise and purify the transmitted signal, which is the core innovation of this application.
[0172] When using the Dig Flow denoising algorithm to denoise and purify signals, a hybrid model is pre-deployed in the programmable chip of the signal receiver to denoise digital signals in real time (mainly targeting noise such as thermal noise, 50Hz electromagnetic interference, and sudden noise from water flow), achieving efficient denoising and solving the problem of scarce real water quality transmission data. This hybrid model includes a CNN convolutional neural network, an RNN recurrent neural network, a Transformer encoder, and a liquid neural network (LNN).
[0173] Before performing signal denoising and purification, the following preparations are necessary: First, set up the hardware operating environment to ensure that the hybrid model can run in real time on the programmable chip (FPGA) of the signal receiver; then, perform INT8 quantization and 20% sparse pruning on the hybrid model to reduce computing power / memory usage; next, burn the optimized hybrid model into the programmable chip (FPGA) of the signal receiver, connect it to the digital signal output interface of the signal receiver, and set the data transmission rate to be synchronized with the signal sampling rate (e.g., 1kHz); then configure the chip operating parameters, with an inference latency threshold of ≤1.5ms / frame and logic unit occupancy of ≤30%, to ensure that the original signal reception function of the receiver is not affected; finally, standardize the original noisy digital signal to eliminate outliers and unit differences, providing qualified data for subsequent input models.
[0174] The Dig Flow denoising algorithm is used to denoise and clean the signal, such as... Figure 3 As shown, the specific method is as follows:
[0175] Step 6-1, Signal preprocessing;
[0176] The noisy signal acquired by the signal receiver is filtered (abnormal segments with signal loss or amplitude abrupt changes are removed) to obtain the valid data segments. Next, the valid data segments are preprocessed, including normalization and framing. Normalization is performed on the valid data segments, mapping the signal amplitude to the [-1, 1] interval to obtain the normalized signal. The normalized signal is framed to maintain temporal continuity and avoid missing noise timing features. The entire process is executed in real time within the chip.
[0177] When normalizing the valid data segment, the normalization formula is:
[0178] ;
[0179] When performing frame segmentation on a normalized signal, the frame segmentation formula is:
[0180] ;
[0181] in, The value is 256 (i.e., the number of sampling points per frame). The value is 128 (i.e., frame shift, corresponding to 50% overlap).
[0182] Step 6-2: Time-frequency dual-domain feature extraction;
[0183] RNN (Recurrent Neural Network) and CNN (Convolutional Neural Network) were used to normalize the signal for each frame, respectively. Feature extraction is performed to obtain the corresponding temporal feature vector. Frequency domain eigenvectors .
[0184] The purpose of this step is to: capture the temporal characteristics of noise in the time domain (such as the duration and amplitude variation of sudden water flow noise); capture the frequency characteristics of noise in the frequency domain (such as the frequency range and energy distribution of 50Hz electromagnetic interference); and provide basic feature data for subsequent cross-domain feature fusion to achieve comprehensive noise identification.
[0185] Extracting temporal feature vectors using recurrent neural networks (RNNs) At that time, the normalized signal of each frame The input is a bidirectional gated recurrent unit (which replaces the traditional LSTM, is more lightweight, and is compatible with FPGAs). The bidirectional gated recurrent unit processes the signal from both the forward and reverse directions to capture the temporal dependencies of the signal within the frame. The hidden states at the last moment of the bidirectional gated recurrent unit are concatenated to obtain the temporal feature vector of the frame.
[0186] The core formula of the bidirectional gated recurrent unit (GRU) for bidirectional GRU (temporal feature extraction) is:
[0187] .
[0188] Extracting frequency domain feature vectors using CNN convolutional neural networks At that time, the normalized signal of each frame is first processed. (Right now The signal undergoes a Short-Time Fourier Transform (STFT) to convert the time-domain signal into a frequency-domain time-spectrum (amplitude matrix, discarding phase interference). This frequency-domain time-spectrum is then input into a CNN (2D, 2 convolutional layers + 1 pooling layer) to extract spatial frequency features (such as noise frequency peaks and frequency ranges). These spatial frequency features (i.e., the feature map output by the CNN) are flattened to obtain the frequency-domain feature vector for that frame. .
[0189] The formula for calculating the frequency domain conversion of the Short-Time Fourier Transform (STFT) is as follows:
[0190] ;
[0191] The convolution formula for frequency domain feature extraction in a CNN (Convolutional Neural Network) is as follows:
[0192] ;
[0193] in, Indicates spatial frequency characteristics, This represents the activation function. Represents the frequency domain spectrum. This represents a two-dimensional convolution operation. Represents a 2D convolution kernel; This represents the bias term paired with parameter D, whose function is to adjust... The baseline value of the calculation result is used to avoid gradient vanishing.
[0194] STFT, convolution, and gating operations can all be implemented in parallel on the FPGA, with a single frame processing time of ≤0.3ms, meeting real-time requirements; and the time-frequency dual-domain features are complementary, avoiding the omission of noise in a single dimension (such as 50Hz interference that is difficult to identify in the time domain, but can be accurately located in the frequency domain).
[0195] Step 6-3: Cross-domain feature fusion;
[0196] Time-domain feature vectors Frequency domain eigenvectors Perform one-dimensional concatenation to obtain cross-domain feature vectors. ; cross-domain feature vectors The input is a Transformer encoder. The output of the Transformer encoder is processed by layer normalization and linear layers to obtain the global fused feature vector. .
[0197] This step integrates time-domain and frequency-domain features to eliminate the information barrier between the two domains; it also captures the long-range dependency features of noise and outputs a condensed global feature vector to provide high-quality input for subsequent dynamic parameter calculation.
[0198] When performing one-dimensional stitching, the formula for one-dimensional stitching is:
[0199] ;
[0200] The Transformer encoder (1 layer only, 8-head attention) mines cross-domain feature vectors through a multi-head attention mechanism. Internal long-range dependencies; the multi-head attention formula of the Transformer encoder is:
[0201] ;
[0202] ;
[0203] Global fusion feature vector The formula is:
[0204] .
[0205] Step 6-4: Calculation of dynamic parameters;
[0206] Globally fuse feature vectors The input is a liquid neural network (LNN), configured with 50 leakage integral ignition (LIF) neurons, and the time constant of the neurons is dynamically adjusted. (Adapting to time-varying noise); The Liquid Neural Network (LNN) updates the neuron state in real time based on changes in input features, captures the time-varying patterns of noise, and outputs intermediate feature vectors. ; take the intermediate feature vector The input is a linear layer, and the output of the linear layer is mapped to the interval [-1, 1] through the Sigmoid activation function to obtain the final in-phase amplitude coefficients. Inverting amplitude coefficient This coefficient applies to ( , This is the core basis for generating the subsequent cancellation signal, and it can be adjusted in real time according to changes in noise.
[0207] This step is based on globally fused feature vectors. It calculates two core amplitude parameters in real time and dynamically, and constrains the coefficient range to [-1,1] to ensure that the subsequently generated cancellation signal is not too strong or too weak, that is, it can cancel noise without destroying the effective signal; it adapts to time-varying noise (such as sudden water flow noise and electromagnetic interference with varying intensity) and realizes real-time adjustment of parameters.
[0208] The formula for updating the neuron state in a liquid neural network (LNN) is:
[0209] ;
[0210] ;
[0211] Dynamic adjustment: , The noise is a time-varying frequency.
[0212] The output of the linear layer is mapped to the [-1, 1] interval using the Sigmoid activation function. The calculation formula is as follows:
[0213] ;
[0214] in, , Used to map the output from [0,1] to [-1,1].
[0215] Step 6-5: Generate cancellation signal and return input signal to zero;
[0216] Based on the in-phase amplitude coefficient Inverting amplitude coefficient and normalized signal Generate cancellation signal ; normalize the signal With cancellation signal Superimpose the data and use the zero-return condition to solve for the noise waveform. ;
[0217] Calculate the zeroing error. If the error is ≤ a threshold (this threshold is set by those skilled in the art according to their needs, and is usually set to 10), then... -5 ~10 -4 For example, error ≤ 10 -5 If the noise waveform extraction is successful, then the noise waveform extraction is successful; if the error is greater than 0, then return to step 6-4 to fine-tune the in-phase amplitude coefficient. Inverting amplitude coefficient .
[0218] This step is based on coefficients. , A mixed in-phase and out-of-phase cancellation signal is generated, and the input signal is zeroed out using the zeroing condition "noisy signal + cancellation signal = 0," thus accurately "extracting" the noise waveform. The core logic is that noise is represented by "+1," and the out-of-phase signal by "-1." After superposition, the signal is zeroed out, separating the clean signal from the noise signal. The specific steps are as follows:
[0219] 1. Generate a cancellation signal;
[0220] According to the coefficient , Combined with normalized signal Generate cancellation signal ; cancellation signal The formula for generating it is:
[0221] ;
[0222] 2. Signal returned to zero;
[0223] Normalized signal With cancellation signal Superposition and using the zero-return condition, the noise waveform is solved. ;
[0224] The formula for the zeroing condition is:
[0225] ;
[0226] noise waveform The solution formula is:
[0227] ;
[0228] 3. Verify the zeroing effect;
[0229] Calculate the zeroing error. If the error is less than or equal to the threshold, the noise waveform extraction is valid; if the error is greater than 0, return to step 6-4 to fine-tune the in-phase amplitude coefficient. Inverting amplitude coefficient .
[0230] Step 6-6: Restoration of clean signal;
[0231] Using normalized signals Noise subtraction waveform Normalized pure signal is obtained ; for normalized pure signals Perform inverse normalization to obtain a clean digital signal. .
[0232] This step involves removing the extracted noise waveform from the original noisy digital signal to recover the true, clean digital signal; then, the clean signal is denormalized to restore its amplitude range to that of the original signal, adapting it for subsequent data processing by the receiver. The specific steps are as follows:
[0233] 1. Pure signal recovery (normalized state);
[0234] Using normalized signals Subtract the extracted noise waveform Normalized pure signal is obtained The recovery formula is:
[0235] ;
[0236] 2. Inverse normalization processing;
[0237] Normalize the pure signal By using the inverse normalization formula, the amplitude range of the original signal is restored, resulting in the final pure digital signal. The formula for inverse normalization is:
[0238] ;
[0239] 3. Validity verification;
[0240] Two core metrics—mean square error (MSE, deviation from the true clean signal) and signal-to-noise ratio (SNR, signal quality after denoising)—are calculated to verify the denoising effect. The formula for calculating the mean square error (MSE) is as follows:
[0241] ;
[0242] The formula for calculating the signal-to-noise ratio (SNR) is:
[0243] .
[0244] in, This represents the normalized signal of the signal at time t. This represents the noisy signal received by the signal receiver at time t. This represents the mean of the noisy signal in a single frame. This represents the standard deviation of the noisy signal in a single frame. This represents a stable minimum value. Indicates the first Frame time domain signal, Indicates the first Frame time domain signal, Indicates frame shift, Indicates frame length, This indicates that the gate output value is reset at time t. This represents the Sigmoid activation function. Represents the gate weight matrix. Represents the hidden features at time t-1. This represents the gating bias vector. This indicates that the gate output value is updated at time t. Represents the gate weight matrix. This represents the gating bias vector. This represents the candidate hidden state at time t. This represents the hyperbolic tangent activation function. Represents the weight of the candidate state. This indicates the candidate state bias. This represents the hidden feature at time t. It represents the Hadamah accumulation. This represents the k-th sampling point within the frame (values range from 0 to 255). Indicates the sampling period. This represents the Hanning window function. Represents the imaginary unit. This represents the k-th discrete frequency point. , , These represent the query, key, and value vectors, respectively. Indicates the first One point of attention, , , They represent the first A query, key, and value vector for each attention head. This represents the output projection weight matrix of the Transformer encoder. , , They represent the first The query, key, and value projection weight matrix of each attention head. Indicates transpose. Representation layer normalization, Represents the neuron's time constant. This represents the state value of the c-th neuron. This represents the weight matrix of an LNN neuron. Represents the globally fused feature vector. This represents the bias vector of an LNN neuron. This represents the output value of the c-th LNN neuron. Indicates the activation threshold of LNN neurons. This represents the weight matrix of the linear layer (a 2*50 dimensional learnable matrix, meaning the input is 50-dimensional and the output is 2-dimensional). , ), This represents the intermediate feature vector of an LNN. This represents the bias vector of the linear layer. Indicates the in-phase amplitude coefficient. Indicates the inverting amplitude coefficient; This represents the total number of signal sampling points (each t corresponds to 1 sampling point, which is the length of this signal; that is, in single-frame verification, N=256 (single-frame sampling points); in global verification, N=total number of sampling points * 256). It represents a true, pure signal, which is a noise-free standard signal obtained through laboratory calibration, high-precision sensor acquisition, etc. It is used as a reference signal to verify the denoising effect.
[0245] Example 2
[0246] This embodiment provides an adaptive anti-interference water quality detection system, which includes:
[0247] The task parameter loading module is used to load task parameters to the main control unit of the data acquisition device via wireless communication. The main control unit controls the thrust of the data acquisition device's pusher based on the data collected by the attitude sensor of the data acquisition device, thereby stabilizing the preset depth and attitude of the data acquisition device.
[0248] The full-domain path navigation module is used by the data acquisition device to cruise along the navigation path in the task parameters, and collect water quality parameter data, water quality sample data, and environmental perception data at each sampling point, and integrate the trajectory data to build an underwater environment map.
[0249] The core pollution area identification module is used by the main control unit to process water quality parameter data, initially screen suspected pollution points, calculate the comprehensive pollution index of suspected pollution points, sort them according to the comprehensive pollution index, and lock the core pollution area with the highest degree of pollution.
[0250] The core pollution area sampling module is used to plan the optimal sampling path based on the location of the core pollution area and the underwater environment map; the data acquisition equipment travels to the core pollution area according to the optimal sampling path; after arriving at the core pollution area, high-density mesh sampling is performed; during sampling, the data acquisition equipment re-measures water quality parameter data and acquires images; the gradient magnitude is calculated through the spatial grid pollution gradient algorithm to locate the pollution center point and collect water quality samples.
[0251] The digital twin map generation module is used to integrate water quality parameter data measured by the full-domain path navigation module, water quality parameter data of the pollution core area measured by the pollution core area sampling module, and sampling point location data. It calculates the source tracing direction angle through a pollution gradient fitting algorithm to generate a digital twin map that overlays the pollution concentration distribution and source tracing direction.
[0252] The map transmission and signal denoising module is used to transmit the digital twin map and sampling data to the buoy via a communication cable. The signal emitted by the buoy is transmitted to the signal receiver, which uses the Dig Flow denoising algorithm to denoise and purify the transmitted signal. After verification, the signal is uploaded to the shore-based platform to complete the water quality testing.
[0253] Example 3
[0254] A computer device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of an adaptive anti-interference water quality detection method.
[0255] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.
[0256] The memory includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or D-interface display memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory may be an internal storage unit of the computer device, such as the hard disk or memory of the computer device. In other embodiments, the memory may also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device. Of course, the memory may include both internal storage units and external storage devices of the computer device. In this embodiment, the memory is often used to store the operating system and various application software installed on the computer device, such as the program code of the adaptive anti-interference water quality detection method. In addition, the memory can also be used to temporarily store various types of data that have been output or will be output.
[0257] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor is typically used to control the overall operation of the computer device. In this embodiment, the processor is used to run program code stored in the memory or process data, for example, to run the program code of the adaptive anti-interference water quality detection method.
[0258] Example 4
[0259] A computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of an adaptive anti-interference water quality detection method.
[0260] The computer-readable storage medium stores an interface display program that can be executed by at least one processor to cause the at least one processor to perform the steps of the adaptive anti-interference water quality detection method described above.
[0261] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the adaptive anti-interference water quality detection method described in the embodiments of this application.
[0262] Test case
[0263] I. Objective of the experiment;
[0264] The adaptive anti-interference water quality detection method described in Example 1 was used to test the water quality of the applicant's campus swimming pool to verify the accuracy of the water quality detection method in Example 1.
[0265] II. Test time and location;
[0266] Test date: November 22, 2025;
[0267] Test location: Swimming pool at the Chengdu College of the University of Electronic Science and Technology of China.
[0268] III. Test Instruments;
[0269] Underwater robot, buoy, signal receiver (with a hybrid model deployed in its programmable chip (FPGA), pH meter (model: PHS-3C), conductivity meter (model: DDS-307A), dissolved oxygen meter (model: JPB-607A), precision digital thermometer (model: JM624), total phosphorus meter (model: 5B-3P), total nitrogen meter (model: 5B-3N), ammonia nitrogen meter (model: 5B-3NH), electronic balance (model: FA2004).
[0270] The underwater robot, used as a data acquisition device, is equipped with a pH sensor, conductivity sensor, dissolved oxygen sensor, digital water temperature sensor, online total phosphorus detection module, online total nitrogen detection module, online ammonia nitrogen detection module, underwater attitude sensor, radar sensor, mechanical scanning forward-looking sonar module, underwater sealed binocular vision camera module, and underwater depth sensor module.
[0271] IV. Experimental Procedure;
[0272] First, the water quality testing method of Example 1 was used to test and sample the water quality in the swimming pool;
[0273] Water samples collected from the core pollution area will then be tested in the laboratory.
[0274] V. Test Results;
[0275] When the swimming pool is detected using the method described in Embodiment 1 of this application, the constructed simultaneous localization and mapping (i.e., SLAM detection map) is as follows: Figure 4 As shown; a pollution thermal analysis map generated using the detection data, such as Figure 5 As shown.
[0276] The water quality data of different points at the same depth in the swimming pool were detected using the water quality testing method of Embodiment 1 of this application, as shown in Table 1.
[0277] Table 1 shows water quality data at different depths obtained using the adaptive anti-interference water quality detection method of Example 1.
[0278]
[0279] The water quality data from laboratory tests on the collected water samples are shown in Table 2.
[0280] Table 2. Water quality data from laboratory tests at different depths of water samples.
[0281]
[0282] VI. Experimental Conclusions;
[0283] Based on the water quality data measured in Tables 1 and 2 above, combined with the machine-generated visual SLAM map ( Figure 4 , Figure 5 We can conclude that:
[0284] The data for this scenario meet the requirements of the "Swimming Pool Water Quality Standard" (GB / T 18267-2019): pH 7.2~7.8, total phosphorus ≤0.3mg / L, total nitrogen ≤2.0mg / L (total nitrogen at sampling point 3 was 2.70mg / L, which is slightly exceeding the standard), and ammonia nitrogen ≤0.2mg / L (ammonia nitrogen at sampling point 3 was 0.26mg / L, which is slightly exceeding the standard).
[0285] The robot measurements (i.e., measurements taken using the method described in Example 1) achieved an accuracy of 70% compared to laboratory measurements: the inlet and outlet were less polluted, with smaller deviations; the central and deep water areas were slightly more polluted, with slightly larger deviations. The pollution source was located in the middle of the deep water pool bottom, corresponding to sampling point number 3 in the test data. The pollution source was concentrated in the middle of the deep water pool bottom and did not spread to the pool wall.
[0286] Analysis revealed that the main reasons for the concentration of pollution sources in the middle of the deep-water pool bottom include:
[0287] 1. Accumulation of sediment at the bottom of the pool: The water circulation speed in the deep water area is relatively slow. After long-term use, a small amount of skin flakes, sweat residue and trace excrement shed by swimmers accumulate at the bottom of the pool. After the sediment decomposes, it releases pollutants such as total phosphorus, total nitrogen and ammonia nitrogen, forming a continuous source of pollution, which is consistent with the pattern that the pollution indicators are the highest in the deep water area.
[0288] 2. Cleaning and maintenance blind spots: The middle part of the bottom of the deep water pool is a blind spot for cleaning tools (such as pool vacuum cleaners), which cannot completely remove sediment, leading to long-term accumulation of pollutants and gradually forming local pollution. This matches the "slight pollution" setting in the test scenario and avoids excessive pollution from affecting the safety of the test.
[0289] 3. Minor human-induced introduction: Simulating the activity scenario of swimmers in a public swimming pool, a small number of swimmers enter the pool without fully showering. The trace pollutants carried on their bodies (such as cosmetic residue and sweat) are carried by the water flow to the deep water area (where the water circulation is slow and it is not easy to spread), further aggravating the pollution level in that area.
Claims
1. An adaptive anti-interference water quality detection method, characterized in that, include: Step 1: Load task parameters; The task parameters are loaded into the main control unit of the data acquisition device via wireless communication. The main control unit controls the thrust of the data acquisition device's pusher based on the data collected by the attitude sensor of the data acquisition device, thereby stabilizing the preset depth and attitude of the data acquisition device. Step 2: Global route navigation; The data acquisition equipment cruises along the cruise path in the mission parameters and collects water quality parameter data, water quality sample data, and environmental perception data at each sampling point. It also integrates the cruise data to construct an underwater environment map. Step 3: Identify the core pollution area; The main control unit processes water quality parameter data to initially screen suspected pollution points; it calculates the comprehensive pollution index of suspected pollution points and sorts them according to the comprehensive pollution index to identify the core pollution area with the highest degree of pollution. Step 4: Sampling in the core contaminated area; Based on the location of the core pollution area and in conjunction with the underwater environmental map, the optimal sampling route is planned; the data acquisition equipment proceeds to the core pollution area according to the optimal sampling route; upon arrival at the core pollution area, high-density mesh sampling is performed; during sampling, the data acquisition equipment re-measures water quality parameter data and acquires images; The gradient magnitude was calculated using a spatial grid pollution gradient algorithm to pinpoint the pollution center and collect water samples. Step 5: Generate a digital twin map; By integrating the water quality parameter data measured in step 2, the water quality parameter data of the core pollution area measured in step 4, and the location data of the sampling points, the source tracing direction angle is calculated using a pollution gradient fitting algorithm to generate a digital twin map that overlays the pollution concentration distribution and the source tracing direction. Step 6: Map transmission and signal denoising; The digital twin map and sampling data are transmitted to the buoy via a communication cable. The signal emitted by the buoy is transmitted to the signal receiver. The signal receiver uses the Dig Flow denoising algorithm to denoise and purify the transmitted signal. After verification, the signal is uploaded to the shore-based platform to complete the water quality test. In step 6, when using the Dig Flow denoising algorithm to denoise and clean the signal, a hybrid model is pre-deployed in the programmable chip of the signal receiver. The hybrid model includes CNN convolutional neural network, RNN recurrent neural network, Transformer encoder, and liquid neural network LNN. The specific method for signal denoising and cleansing is as follows: Step 6-1, Signal preprocessing; The noisy signal acquired by the signal receiver is filtered to obtain the effective data segment; the effective data segment is then normalized to map the signal amplitude to the [-1,1] interval, resulting in the normalized signal. ; Perform frame segmentation processing on the normalized signal; When normalizing the valid data segment, the normalization formula is: ; When performing frame segmentation on a normalized signal, the frame segmentation formula is: ; Step 6-2: Time-frequency dual-domain feature extraction; RNN (Recurrent Neural Network) and CNN (Convolutional Neural Network) were used to normalize the signal for each frame, respectively. Feature extraction is performed to obtain the corresponding temporal feature vector. Frequency domain eigenvectors ; Extracting temporal feature vectors using recurrent neural networks (RNNs) At that time, the normalized signal of each frame The input is a bidirectional gated loop unit, which processes signals from both the forward and reverse directions to capture the temporal dependencies of signals within the frame. The hidden states at the last moment of the bidirectional gated recurrent unit are concatenated to obtain the temporal feature vector of the frame. Extracting frequency domain feature vectors using CNN convolutional neural networks At that time, the normalized signal of each frame is first processed. Perform a short-time Fourier transform to obtain the frequency domain time-spectrum; input the frequency domain time-spectrum into a CNN convolutional neural network to extract the spatial frequency features of the spectrum; Flattening the spatial frequency features yields the frequency domain feature vector of the frame. ; The bidirectional GRU formula for a bidirectional gated cyclic unit is: ; The formula for calculating the short-time Fourier transform is: ; Step 6-3: Cross-domain feature fusion; Time-domain feature vectors Frequency domain eigenvectors Perform one-dimensional concatenation to obtain cross-domain feature vectors. ; cross-domain feature vectors The input is a Transformer encoder. The output of the Transformer encoder is processed by layer normalization and linear layers to obtain the global fused feature vector. The one-dimensional splicing formula is as follows: ; The Transformer encoder mines cross-domain feature vectors through a multi-head attention mechanism. Internal long-range dependencies; the multi-head attention formula of the Transformer encoder is: ; ; Global fusion feature vector The formula is: ; Step 6-4: Calculation of dynamic parameters; Globally fuse feature vectors Inputting a liquid neural network (LNN), updating the neuron states of the LNN in real time, and outputting an intermediate feature vector from the LNN. ; to the intermediate feature vector The input is a linear layer, and the output of the linear layer is mapped to the interval [-1, 1] through the Sigmoid activation function to obtain the final in-phase amplitude coefficients. Inverting amplitude coefficient The formula for updating the neuron state in a liquid neural network (LNN) is as follows: ; ; The output of the linear layer is mapped to the [-1, 1] interval using the Sigmoid activation function. The calculation formula is as follows: ; Step 6-5: Generate cancellation signal and return input signal to zero; Based on the in-phase amplitude coefficient Inverting amplitude coefficient and normalized signal Generate cancellation signal ; normalize the signal With cancellation signal Superimpose the data and use the zero-return condition to solve for the noise waveform. ; cancellation signal The formula for generating it is: ; The formula for the zeroing condition is: ; noise waveform The solution formula is: ; Calculate the zeroing error. If the error is less than or equal to the threshold, the noise waveform extraction is valid; if the error is greater than 0, return to step 6-4 to fine-tune the in-phase amplitude coefficient. Inverting amplitude coefficient ; Step 6-6: Restoration of clean signal; Using normalized signals Noise subtraction waveform Normalized pure signal obtained ; for normalized pure signals Perform inverse normalization to obtain a clean digital signal. Among them, the normalized pure signal The recovery formula is: ; The formula for inverse normalization is: ; in, This represents the normalized signal of the signal at time t. This represents the noisy signal received by the signal receiver at time t. This represents the mean of the noisy signal in a single frame. This represents the standard deviation of the noisy signal in a single frame. This represents a stable minimum value. Indicates the first Frame time domain signal, Indicates the first Frame time domain signal, Indicates frame shift, Indicates frame length, This indicates that the gate output value is reset at time t. This represents the Sigmoid activation function. Represents the gate weight matrix. Represents the hidden features at time t-1. This represents the gating bias vector. This indicates that the gate output value is updated at time t. Represents the gate weight matrix. This represents the gating bias vector. This represents the candidate hidden state at time t. This represents the hyperbolic tangent activation function. Represents the weight of the candidate state. This indicates the candidate state bias. This represents the hidden feature at time t. It represents the Hadamah accumulation. This represents the k-th sampling point within the frame. Indicates the sampling period. This represents the Hanning window function. Represents the imaginary unit. This represents the k-th discrete frequency point. , , These represent the query, key, and value vectors, respectively. Indicates the first One point of attention, , , They represent the first A query, key, and value vector for each attention head. This represents the output projection weight matrix of the Transformer encoder. , , They represent the first The query, key, and value projection weight matrix of each attention head. Indicates transpose. Representation layer normalization, Represents the neuron's time constant. This represents the state value of the c-th neuron. This represents the weight matrix of an LNN neuron. Represents the globally fused feature vector. This represents the bias vector of an LNN neuron. This represents the output value of the c-th LNN neuron. Indicates the activation threshold of LNN neurons. This represents the weight matrix of the linear layer. This represents the intermediate feature vector of an LNN. This represents the bias vector of the linear layer. Indicates the in-phase amplitude coefficient. This represents the inverting amplitude coefficient.
2. The adaptive anti-interference water quality detection method as described in claim 1, characterized in that, Step 3, in identifying the core pollution area, involves the following steps: Step 3-1: Data Cleaning; The main control unit processes water quality parameter data, including normalization and outlier removal. Step 3-2: Initial screening of suspected contamination points; For the water quality parameter data after data processing, the absolute threshold comparison method and the relative deviation comparison method are used in sequence to screen and identify suspected pollution points. Step 3-3: Calculate the comprehensive pollution index; Based on the water quality parameter data of suspected pollution points, the pollution deviation coefficient is first calculated, then the comprehensive pollution score is calculated based on the pollution deviation coefficient, and finally the comprehensive pollution scores of each suspected pollution point are sorted from largest to smallest. Steps 3-4: Identify the core pollution area; Based on the comprehensive pollution classification, the core pollution area was identified.
3. The adaptive anti-interference water quality detection method as described in claim 2, characterized in that: In step 3-1, the normalization calculation formula is as follows: ; The criteria for identifying outliers are: ; In step 3-2, the calculation formula for the absolute threshold comparison method is: ; The formula for calculating the relative deviation comparison method is: ; like ≥ If the sum is 0, it indicates an anomaly; otherwise, it indicates that the anomaly is not an anomaly. In step 3-3, the formula for calculating the pollution deviation coefficient is: ; The formula for calculating the comprehensive pollution score is: ; In steps 3-4, based on the overall pollution score, the area covered by the top 5% of sampling points in terms of overall pollution score is identified as the core pollution area. in, Indicates the first The sampling point of the first sampling point Measured values of the water quality indicators Indicates the first The minimum reasonable values for each water quality indicator. Indicates the first The highest reasonable value for each water quality indicator Indicates the number of all sampling points. The average value of each water quality indicator Indicates the first The difference in the labeling of water quality indicators Indicates the safety benchmark value for the water area. This indicates the upper limit of allowed fluctuations. Indicates the first The sampling point of the first sampling point The deviation rate of each water quality indicator Indicates the maximum allowable offset ratio. Indicates the first The sampling point of the first sampling point Pollution deviation coefficient of each water quality indicator Indicates the first Safety benchmark values for water quality indicators Indicates the first The pollution threshold values for several water quality indicators Indicates the first The comprehensive pollution score of each sampling point Indicates the first The importance weight of each water quality indicator.
4. The adaptive anti-interference water quality detection method as described in claim 1, characterized in that, In step 4, the method for locating the center of pollution is as follows: Step 4-1: Calculate the relative contamination level of the grid; After the core pollution area is gridded, the relative pollution degree of each grid is calculated; ; Step 4-2: Locate the center of pollution; Calculate the pollution gradient magnitude; when the pollution gradient magnitude is equal to 0, the sampling point is the pollution center point; the formula for calculating the pollution gradient magnitude is: ; Step 4-3: Verify authenticity; Using validation parameters The identified pollution center point needs to be verified. If the value is greater than the threshold, the identified pollution center location is correct; verify the parameters. The calculation formula is: ; in, This represents the relative contamination level of the m-th and n-th grids. This represents the combined pollution score of the m-th and n-th grids. This represents the lowest composite pollution score across all grids within the core pollution zone. This represents the highest overall pollution score across all grids within the core pollution zone. This represents a small change in the overall pollution composition. It represents a small change in the x-direction. It represents a small change in the y-direction. This represents the partial derivative of the overall pollution CPI with respect to x. This represents the partial derivative of the overall pollution CPI with respect to y. This indicates the average comprehensive pollution score of the core area. This represents the average comprehensive pollution score across the entire region.
5. The adaptive anti-interference water quality detection method as described in claim 1, characterized in that, In step 5, the method for determining the source tracing direction angle is as follows: Step 5-1: Fit the pollution diffusion pattern; A line is plotted using the coordinates of all sampling points across the entire region and the comprehensive pollution distribution, and the pollution diffusion pattern is fitted; the fitting formula for the pollution diffusion pattern is: ; Step 5-2: Calculate the source tracing direction; like =0, which means the boundary of the pollution source has been found, and the source tracing should stop; if If >0, it indicates that the pollution is spreading in the positive direction along the x-axis; if If the value is less than 0, it indicates that the pollution diffuses in the negative direction along the x-axis; according to the slope... , source tracing direction angle That is, the source direction and the source direction angle. The calculation formula is: ; in, This represents the pattern of pollution composition as a function of coordinates. Represents the x-coordinate of the sampling point. This represents the slope of the fitted line. This represents the initial value of dissolved oxygen concentration when the sampling depth is 0.
6. An adaptive anti-interference water quality detection system, characterized in that, include: The task parameter loading module is used to load task parameters to the main control unit of the data acquisition device via wireless communication. The main control unit controls the thrust of the data acquisition device's pusher based on the data collected by the attitude sensor of the data acquisition device, thereby stabilizing the preset depth and attitude of the data acquisition device. The full-domain path navigation module is used by the data acquisition device to cruise along the navigation path in the task parameters, and collect water quality parameter data, water quality sample data, and environmental perception data at each sampling point, and integrate the trajectory data to build an underwater environment map. The core pollution area identification module is used by the main control unit to process water quality parameter data, initially screen suspected pollution points, calculate the comprehensive pollution index of suspected pollution points, sort them according to the comprehensive pollution index, and lock the core pollution area with the highest degree of pollution. The core pollution area sampling module is used to plan the optimal sampling path based on the location of the core pollution area and in conjunction with the underwater environmental map; the data acquisition equipment then travels to the core pollution area according to the optimal sampling path. Upon arrival at the core pollution area, high-density mesh sampling was conducted; during sampling, data acquisition equipment retested water quality parameters and collected images. The gradient magnitude was calculated using a spatial grid pollution gradient algorithm to pinpoint the pollution center and collect water samples. The digital twin map generation module is used to integrate water quality parameter data measured by the full-domain path navigation module, water quality parameter data of the pollution core area measured by the pollution core area sampling module, and sampling point location data. It calculates the source tracing direction angle through a pollution gradient fitting algorithm to generate a digital twin map that overlays the pollution concentration distribution and source tracing direction. The map transmission and signal denoising module is used to transmit the digital twin map and sampling data to the buoy via a communication cable. The signal emitted by the buoy is transmitted to the signal receiver. The signal receiver uses the Dig Flow denoising algorithm to denoise and purify the transmitted signal, and after verification, it is uploaded to the shore-based platform to complete the water quality test. In the map transmission and signal denoising module, when using the Dig Flow denoising algorithm to denoise and clean the signal, a hybrid model is pre-deployed in the programmable chip of the signal receiver. This hybrid model includes CNN convolutional neural networks, RNN recurrent neural networks, Transformer encoders, and liquid neural networks (LNNs). The specific methods for signal denoising and cleansing are as follows: Step 6-1, Signal preprocessing; The noisy signal acquired by the signal receiver is filtered to obtain the effective data segment; the effective data segment is then normalized to map the signal amplitude to the [-1,1] interval, resulting in the normalized signal. ; Perform frame segmentation processing on the normalized signal; When normalizing the valid data segment, the normalization formula is: ; When performing frame segmentation on a normalized signal, the frame segmentation formula is: ; Step 6-2: Time-frequency dual-domain feature extraction; RNN (Recurrent Neural Network) and CNN (Convolutional Neural Network) were used to normalize the signal for each frame, respectively. Feature extraction is performed to obtain the corresponding temporal feature vector. Frequency domain eigenvectors ; Extracting temporal feature vectors using recurrent neural networks (RNNs) At that time, the normalized signal of each frame The input is a bidirectional gated loop unit, which processes signals from both the forward and reverse directions to capture the temporal dependencies of signals within the frame. The hidden states at the last moment of the bidirectional gated recurrent unit are concatenated to obtain the temporal feature vector of the frame. Extracting frequency domain feature vectors using CNN convolutional neural networks At that time, the normalized signal of each frame is first processed. Perform a short-time Fourier transform to obtain the frequency domain time-spectrum; input the frequency domain time-spectrum into a CNN convolutional neural network to extract the spatial frequency features of the spectrum; Flattening the spatial frequency features yields the frequency domain feature vector of the frame. ; The bidirectional GRU formula for a bidirectional gated cyclic unit is: ; The formula for calculating the short-time Fourier transform is: ; Step 6-3: Cross-domain feature fusion; Time-domain feature vectors Frequency domain eigenvectors Perform one-dimensional concatenation to obtain cross-domain feature vectors. Cross-domain feature vectors The input is a Transformer encoder. The output of the Transformer encoder is processed by layer normalization and linear layers to obtain the global fused feature vector. The one-dimensional splicing formula is as follows: ; The Transformer encoder mines cross-domain feature vectors through a multi-head attention mechanism. Internal long-range dependencies; the multi-head attention formula of the Transformer encoder is: ; ; Global fusion feature vector The formula is: ; Step 6-4: Calculation of dynamic parameters; Globally fuse feature vectors Inputting a liquid neural network (LNN), updating the neuron states of the LNN in real time, and outputting an intermediate feature vector from the LNN. ; to the intermediate feature vector The input is a linear layer, and the output of the linear layer is mapped to the interval [-1, 1] through the Sigmoid activation function to obtain the final in-phase amplitude coefficients. Inverting amplitude coefficient The formula for updating the neuron state in a liquid neural network (LNN) is as follows: ; ; The output of the linear layer is mapped to the [-1, 1] interval using the Sigmoid activation function. The calculation formula is as follows: ; Step 6-5: Generate cancellation signal and return input signal to zero; Based on the in-phase amplitude coefficient Inverting amplitude coefficient and normalized signal Generate cancellation signal ; normalize the signal With cancellation signal Superimpose the data and use the zero-return condition to solve for the noise waveform. ; cancellation signal The formula for generating it is: ; The formula for the zeroing condition is: ; noise waveform The solution formula is: ; Calculate the zeroing error. If the error is less than or equal to the threshold, the noise waveform extraction is valid; if the error is greater than 0, return to step 6-4 to fine-tune the in-phase amplitude coefficient. Inverting amplitude coefficient ; Step 6-6: Restoration of clean signal; Using normalized signals Noise subtraction waveform Normalized pure signal obtained ; for normalized pure signals Perform inverse normalization to obtain a clean digital signal. Among them, the normalized pure signal The recovery formula is: ; The formula for inverse normalization is: ; in, This represents the normalized signal of the signal at time t. This represents the noisy signal received by the signal receiver at time t. This represents the mean of the noisy signal in a single frame. This represents the standard deviation of the noisy signal in a single frame. Indicates a numerically stable minimum value. Indicates the first Frame time domain signal, Indicates the first Frame time domain signal, Indicates frame shift, Indicates frame length, This indicates that the gate output value is reset at time t. This represents the Sigmoid activation function. Represents the gate weight matrix. Represents the hidden features at time t-1. This represents the gating bias vector. This indicates that the gate output value is updated at time t. Represents the gate weight matrix. This represents the gating bias vector. This represents the candidate hidden state at time t. This represents the hyperbolic tangent activation function. Represents the weight of the candidate state. This indicates the candidate state bias. This represents the hidden feature at time t. It represents the Hadamah accumulation. This represents the k-th sampling point within the frame. Indicates the sampling period. This represents the Hanning window function. Represents the imaginary unit. This represents the k-th discrete frequency point. , , These represent the query, key, and value vectors, respectively. Indicates the first One's attention, , , They represent the first A query, key, and value vector for each attention head. This represents the output projection weight matrix of the Transformer encoder. , , They represent the first The query, key, and value projection weight matrix of each attention head. Indicates transpose. Representation layer normalization, Represents the neuron's time constant. This represents the state value of the c-th neuron. This represents the weight matrix of an LNN neuron. Represents the globally fused feature vector. This represents the bias vector of an LNN neuron. This represents the output value of the c-th LNN neuron. Indicates the activation threshold of LNN neurons. This represents the weight matrix of the linear layer. This represents the intermediate feature vector of an LNN. This represents the bias vector of the linear layer. Indicates the in-phase amplitude coefficient. This represents the inverting amplitude coefficient.
7. A computer device, characterized in that: It includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The device stores a computer program that, when executed by a processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 5.