Similar pollutant identification method based on three-dimensional fluorescence spectrum point cloud spherical transformation

CN122990356APending Publication Date: 2026-10-27HANGZHOU COMPASS STAR TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611479087.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-22
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

然而,在实际水环境中,许多物质具有相似的荧光峰位置和形状,使得其激发—发射矩阵数据的数值分布差异微弱,仅依赖原始光谱数据难以对这些污染物进行有效区分

Benefits of technology

[0050]1、本基于三维荧光光谱点云球形变换的相似污染物识别方法将荧光强度矩阵映射为三维光谱点云,再将各三维光谱点映射至球面空间的球坐标,最后将各球坐标转换为三维直角坐标系中的云,该过程中球形变换非线性调整各点的空间位置,使相似污染物之间原本不明显的光谱结构差异得到放大,提高了不同类别光谱点云的空间可分性;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990356A_ABST
    Figure CN122990356A_ABST
Patent Text Reader

Abstract

The application discloses a similar pollutant identification method based on three-dimensional fluorescence spectrum point cloud spherical transformation, and comprises the following steps: collecting a data set containing multiple water samples; for each water sample: performing three-dimensional fluorescence spectrum measurement on the water sample to obtain an emission-excitation matrix, and performing pretreatment on the emission-excitation matrix to obtain a fluorescence intensity matrix; and converting the fluorescence intensity matrix into a point cloud in a three-dimensional rectangular coordinate system; the similar pollutant identification method based on three-dimensional fluorescence spectrum point cloud spherical transformation maps the fluorescence intensity matrix into a three-dimensional spectral point cloud, then maps each three-dimensional spectral point to a spherical coordinate in a spherical space, and finally converts each spherical coordinate into a cloud in the three-dimensional rectangular coordinate system; in the process, the spherical transformation nonlinearly adjusts the spatial positions of the points, so that the originally unobvious spectral structure difference between similar pollutants is amplified, and the spatial separability of different categories of spectral point clouds is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of water quality testing technology, specifically relating to a method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds. Background Technology

[0002] Various pollutants, when left behind in aquatic environments for extended periods, not only disrupt the balance of aquatic ecosystems but also pose health risks through drinking water intake and accumulation in the food chain. Therefore, achieving rapid and accurate detection of pollutants in water bodies is crucial for water environment monitoring, pollution early warning, and prevention and control.

[0003] Three-dimensional fluorescence spectroscopy, with its advantages of high sensitivity, fast response speed, and no need for complex pretreatment, is widely used in the detection of water pollutants. This technique simultaneously acquires fluorescence response information of the analyte from both excitation and emission wavelengths, providing richer feature representation compared to one-dimensional spectroscopy methods, and showing promising application prospects in water pollution analysis. However, in real-world aquatic environments, many substances have similar fluorescence peak positions and shapes, resulting in only slight differences in the numerical distribution of their excitation-emission matrix data. Relying solely on the original spectral data is insufficient for effectively distinguishing these pollutants. Furthermore, three-dimensional fluorescence spectra contain a large amount of redundant information, which weakens the main fluorescence response information and increases the complexity of subsequent calculations and classification. Therefore, how to enhance the subtle differences between spectrally similar pollutants while preserving key structures and removing redundant information is a critical problem that urgently needs to be solved in this field. Summary of the Invention

[0004] The purpose of this invention is to address the problems mentioned in the background art by proposing a method for identifying similar pollutants based on the spherical transformation of three-dimensional fluorescence spectral point clouds.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] This invention proposes a method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds, comprising:

[0007] Collect a dataset containing multiple water samples, and address each water sample as follows:

[0008] Three-dimensional fluorescence spectroscopy was performed on the water sample to obtain the emission-excitation matrix, and the emission-excitation matrix was preprocessed to obtain the fluorescence intensity matrix;

[0009] The fluorescence intensity matrix is ​​converted into a point cloud in a three-dimensional Cartesian coordinate system;

[0010] Persistent cohomology is performed on the point cloud to obtain the death scale set. Feature points are filtered for the connected components of each death scale, and all the filtered feature points constitute the feature point set of the corresponding death scale. The energy retention rate of the corresponding death scale is calculated based on the feature point set. The feature point set corresponding to the first time the energy retention rate falls below the preset value is taken as the spectral feature point set of the current water sample.

[0011] A recognition network is constructed, and the spectral feature point set is used as the input of the recognition network. The recognition network is trained using the spectral feature point set corresponding to all water samples in the dataset to obtain the trained recognition network. The recognition network includes a feature encoding module, a feature extraction module, a max pooling module, a classification head, and a Softmax function.

[0012] The water sample to be identified is obtained, the corresponding spectral feature point set is generated, and it is used as the input of the trained recognition network to obtain the category probability of the water sample to be identified. The category corresponding to the highest category probability is taken as the category of pollutant in the water sample to be identified.

[0013] Preferably, the preprocessing process is as follows: calibrating the fluorescence intensity in the emission-excitation matrix, subtracting the water blank value, and removing the scattering peaks of the emission-excitation matrix using the Delaunay triangulation method to obtain the fluorescence intensity matrix.

[0014] Preferably, the step of converting the fluorescence intensity matrix into a point cloud in a three-dimensional Cartesian coordinate system includes:

[0015] The fluorescence intensity matrix of each water sample is mapped to a three-dimensional spectral point cloud, and each three-dimensional spectral point in the three-dimensional spectral point cloud contains the emission wavelength, excitation wavelength and corresponding fluorescence intensity;

[0016] Each three-dimensional spectral point is mapped to spherical coordinates in spherical space, and the azimuth and polar angles of the spherical coordinates are determined by the excitation and emission wavelengths, while the radial distance of the spherical coordinates is determined by the fluorescence intensity.

[0017] Each spherical coordinate is converted into a point in a three-dimensional rectangular coordinate system, and these points are called transformation points. All transformation points constitute a point cloud.

[0018] Preferably, the process of obtaining the feature point set for each death scale includes:

[0019] Calculate the Euclidean distance between any two transformation points in the point cloud, and arrange the Euclidean distances in ascending order, with each Euclidean distance serving as a distance scale;

[0020] The distance scales are traversed sequentially in the order of arrangement. A VR complex is constructed for each traversed distance scale. When the distance between two transformation points is less than the corresponding distance scale, a connecting edge is constructed between the two current transformation points. Transformation points connected by the connecting edge belong to the same connected component. When all transformation points in the point cloud belong to the same connected component, the traversal of the distance scales is stopped.

[0021] All VR complexes constitute a VR complex sequence, and persistent cohomology calculation is performed on the VR complex sequence to obtain a set of finite persistent intervals. The death scale of each finite persistent interval in the set of finite persistent intervals is extracted to form a death scale set, and the death scales in the death scale set are sorted in ascending order.

[0022] For each death scale in the death scale set, all connected components are extracted. For each connected component, if there is only one transition point, it is directly retained as a feature point. If there are two transition points, the transition point with the highest fluorescence intensity is selected as the feature point. If there are at least three transition points, for any transition point in the connected component, the sum of the Euclidean distances from the current transition point to the other transition points in the connected component is calculated, and the transition point with the smallest sum of distances is selected as the feature point.

[0023] All feature points selected from all connected components at the current death scale are used as the feature point set at the current death scale.

[0024] Preferably, the process of obtaining the spectral feature point set includes:

[0025] Calculate the first total energy of all spectra in the emission-excitation matrix, and for each death scale in the death scale set, calculate the second total energy of the corresponding feature point set. The ratio of the second total energy to the first total energy is taken as the energy retention rate of the current death scale.

[0026] When the energy retention rate falls below the preset value for the first time, the set of feature points corresponding to the current energy retention rate is taken as the spectral feature point set of the current water sample.

[0027] Preferably, in the recognition network, each feature point in the spectral feature point set is used as the input of the feature encoding module to obtain the initial point-level features corresponding to each feature point, and each initial point-level feature is used as the input of the feature extraction module to obtain the final point-level features corresponding to each feature point, thus forming the final point-level feature set. The final point-level feature set is then processed by the max pooling module to obtain the global features, and the global features are then processed by the classification head and the Softmax function in sequence to obtain the class probability of the corresponding water sample.

[0028] In the feature encoding module, each feature point in the spectral feature point set is encoded into a feature vector based on the corresponding spherical coordinates, and the feature vector of each feature point is represented as follows: ,in, For the first spectral feature point in the set The spherical coordinates of a feature point , and The order is number 1 The azimuth, polar angle, and radial distance of each feature point;

[0029] The feature vectors are then processed through a multilayer perceptron to obtain initial point-level features.

[0030] Preferably, the feature extraction module includes three feature extraction units executed sequentially;

[0031] In each feature extraction unit, for each feature point in the spectral feature point set, another A feature points are selected from the corresponding spectral feature point set as the relation points of the current feature point;

[0032] Any selected relation point With current feature point The relevant features are input into the multilayer perceptron to obtain and The relative distribution characteristics between them, where the relative characteristics include those of the previous feature extraction unit. The output of the previous feature extraction unit is for Output and targeting The difference between the outputs and The spherical angular distance between them, and and The radial distance difference between them, where for the first feature extraction unit, the corresponding initial point-level feature is used as the feature of the previous feature extraction unit. or The output;

[0033] Calculate the aggregate weights of all relative distribution features of the current feature point, and use the aggregate weights and the previous feature extraction unit's... The output of each feature extraction unit is calculated based on the output of the current feature point and the relative distribution features of all current feature points, and the formula is as follows:

[0034] ;

[0035] in, For the current number Each feature extraction unit targets The output, For the previous feature extraction unit against The output, In the first In each feature extraction unit and The relative distribution characteristics between them In the first In each feature extraction unit and Aggregate weights based on the relative distribution characteristics among them;

[0036] The output of the last feature extraction unit is used as the output of the feature extraction module and is called the final point-level feature.

[0037] For the spectral feature point set, the final point-level features corresponding to all feature points in the spectral feature point set are obtained, and they constitute the final point set feature set.

[0038] Preferably, the process of selecting A additional feature points from the set of spectral feature points as relation points of the current feature point includes:

[0039] Assign a central angle to each of the three feature extraction units;

[0040] In each feature extraction unit, the deviation of the spherical angular distance between other feature points and the current feature point relative to the central angle of the current feature extraction unit is calculated, and the A other feature points with the smallest deviation are selected as the relation points of the current feature point.

[0041] Preferably, in the max pooling module, all final point-level features in the final point-level feature set are subjected to dimension-wise max pooling to obtain global features;

[0042] The classification head comprises a fully connected layer, a layer normalization layer, an activation function, a Dropout layer, a fully connected layer, a layer normalization layer, an activation function, and a Dropout layer connected in sequence.

[0043] Preferably, the loss function of the recognition network The calculation formula is as follows:

[0044] ;

[0045] in,

[0046] ;

[0047] ;

[0048] in, For classifying losses, For the center angle spacing constraint loss, The weights for the center angle spacing constraint loss are... For the index of water samples in the dataset, This represents the total amount of water samples in the dataset. This represents the total number of pollutant categories in the water sample. An index for the categories of pollutants in water samples. For the first The water sample belongs to the first The true label of the class, To identify the network prediction of the first The water sample belongs to the first Class probability, The preset center angle interval between adjacent feature extraction units, and The first The central angle of the first feature extraction unit and the first The central angle of each feature extraction unit This indicates taking the maximum value.

[0049] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0050] 1. This method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds maps the fluorescence intensity matrix into a three-dimensional spectral point cloud, then maps each three-dimensional spectral point to spherical coordinates in spherical space, and finally converts each spherical coordinate into a cloud in a three-dimensional rectangular coordinate system. In this process, the spherical transformation nonlinearly adjusts the spatial position of each point, amplifying the originally inconspicuous spectral structure differences between similar pollutants and improving the spatial separability of spectral point clouds of different categories.

[0051] 2. This method utilizes persistent cohomology analysis to analyze the connectivity of point clouds at different distance scales, and selects feature points from each connected component at the selection scale. Based on the feature point set, the energy retention rate at the corresponding death scale is calculated. The feature point set corresponding to the first time the energy retention rate falls below the preset value is taken as the spectral feature point set of the current water sample. While preserving the main spatial morphology of the point cloud, redundant information in local dense areas is reduced, thus obtaining the spectral feature point set.

[0052] 3. This method extracts the relative distribution features between feature points within different angular distance ranges step by step based on the difference between the spherical angular distance and the radial distance between spectral feature points. This enables the subtle morphological differences enhanced by spherical transformation to be effectively used for category discrimination, thereby improving the accuracy and stability of identifying spectrally similar pollutants. Attached Figure Description

[0053] Figure 1 This is a flowchart illustrating the similar pollutant identification method based on spherical transformation of three-dimensional fluorescence spectral point cloud according to the present invention.

[0054] Figure 2 This is a structural block diagram of the identification network in this invention;

[0055] Figure 3 This is a schematic diagram of the three-dimensional fluorescence spectrum of the fluorescence intensity matrix corresponding to the enrofloxacin and norfloxacin water samples of the present invention;

[0056] Figure 4 This is a schematic diagram of the three-dimensional fluorescence spectrum of the fluorescence intensity matrix corresponding to the ciprofloxacin and moxifloxacin water samples of the present invention.

[0057] Figure 5 This is a diagram showing the transformation results of enrofloxacin and norfloxacin water samples in this invention;

[0058] Figure 6 This is a transformation result diagram of the ciprofloxacin water sample and the moxifloxacin water sample in this invention;

[0059] Figure 7 This is the persistent barcode image corresponding to the enrofloxacin water sample in this invention;

[0060] Figure 8 This is the persistent barcode image corresponding to the norfloxacin water sample in this invention;

[0061] Figure 9 This is the persistent barcode image corresponding to the ciprofloxacin water sample in this invention;

[0062] Figure 10 This is the persistent barcode image corresponding to the moxifloxacin water sample in this invention. Detailed Implementation

[0063] 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 only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to limit the invention.

[0065] In one embodiment, such as Figures 1-2 As shown, a method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds is provided, including:

[0066] Step 1: Collect a dataset containing multiple water samples. For each water sample (perform steps 2-5):

[0067] Step 2: Perform three-dimensional fluorescence spectroscopy on the water sample to obtain the emission-excitation matrix, and preprocess the emission-excitation matrix to obtain the fluorescence intensity matrix;

[0068] Specifically: emission-excitation matrix Where X is the number of sampling points in the emission wavelength dimension, Y is the number of sampling points in the excitation wavelength dimension, and I(x, y) represents the fluorescence intensity at the emission wavelength Em index x (x=1, …, X) and the excitation wavelength Ex index y (y=1, …, Y). The emission-excitation matrix is ​​preprocessed to obtain the fluorescence intensity matrix. ;

[0069] The preprocessing steps are as follows: calibrating the fluorescence intensity in the emission-excitation matrix (using Raman scattering peaks to calibrate the fluorescence intensity), subtracting the water blank value, and using the Delaunay triangulation method to remove the scattering peaks in the emission-excitation matrix to obtain the fluorescence intensity matrix.

[0070] Step 3: Convert the fluorescence intensity matrix into a point cloud in a three-dimensional Cartesian coordinate system (to enhance the subtle differences between spectrally similar pollutants, this step first constructs the fluorescence intensity matrix into a point cloud in a three-dimensional Cartesian coordinate system, and then performs a spherical transformation on the point cloud, so that the subtle spectral changes of different substances form more obvious morphological differences, thereby enhancing the distinguishability between similar spectra).

[0071] Specifically: Step 3.1: Map the fluorescence intensity matrix of the water sample into a three-dimensional spectral point cloud, and each three-dimensional spectral point cloud contains the emission wavelength, excitation wavelength and corresponding fluorescence intensity;

[0072] The three-dimensional spectral point cloud is represented as: ,in, , and They represent the first Three-dimensional spectral points The emission wavelength, excitation wavelength, and fluorescence intensity, This represents the number of three-dimensional spectral point clouds in the set of three-dimensional spectral point clouds.

[0073] Step 3.2: Map each three-dimensional spectral point to spherical coordinates in spherical space, and determine the azimuth and polar angles of the spherical coordinates using the excitation and emission wavelengths, and determine the radial distance of the spherical coordinates using the fluorescence intensity;

[0074] The corresponding mapping formula is as follows:

[0075] ;

[0076] ;

[0077] ;

[0078] in, Indicates the first Three-dimensional spectral points Corresponding spherical coordinates express The azimuth angle about the central axis of the spherical coordinate system. express The polar angle relative to the central axis of the spherical coordinate system. express radial distance, The preset base radius (e.g., 1). and These represent the maximum and minimum emission wavelengths, respectively. and These represent the maximum and minimum excitation wavelengths, respectively. The radial mapping coefficient of fluorescence intensity (e.g., 1).

[0079] Step 3.3: Convert each spherical coordinate into a point in a three-dimensional rectangular coordinate system, and call them transformation points. All transformation points constitute a point cloud.

[0080] The corresponding conversion formula is as follows:

[0081] ;

[0082] ;

[0083] ;

[0084] in, Indicates the first A three-dimensional spectral point cloud Corresponding conversion point ,in, , and They represent the first One conversion point The coordinates are given, and the point cloud is represented as... .

[0085] Through the coordinate transformation process in step 3, subtle differences between similar spectra that are difficult to capture directly are effectively amplified, thus enhancing the distinguishability of similar spectra.

[0086] Step 4: Perform persistent cohomology analysis on the point cloud to obtain the death scale set. Feature points are selected from the connected components of each death scale, and all selected feature points constitute the feature point set for the corresponding death scale. The energy retention rate of the corresponding death scale is calculated based on the feature point set. The feature point set corresponding to the first time the energy retention rate falls below a preset value is taken as the spectral feature point set of the current water sample. (It should be noted that, in order to extract the key structures that reflect the main spatial morphology of the point cloud, this step performs persistent cohomology analysis on the point cloud after spherical transformation to obtain the multi-scale connectivity relationships formed by the point cloud as the distance threshold increases, obtaining a persistent interval set. Representative points are selected from the connected components corresponding to the death values ​​of each persistent interval, and the spectral feature point set is determined based on the energy retention rate of the representative point set.)

[0087] Step 4.1, the process of obtaining the feature point set for each death scale includes:

[0088] Step 4.1.1: Calculate the Euclidean distance between any two transformation points in the point cloud, and arrange the Euclidean distances in ascending order, with each Euclidean distance serving as a distance scale;

[0089] Step 4.1.2: Traverse each distance scale sequentially according to the arrangement order. Construct a Vietoris-Rips complex for each traversed distance scale. When the distance between two transformation points is less than the corresponding distance scale, construct a connecting edge between the two current transformation points. Transformation points connected by the connecting edge belong to the same connected component. When all transformation points in the point cloud belong to the same connected component, stop traversing the distance scale. The total number of traversed distance scales is represented as... ;

[0090] Among them, in the first Distance scale Below, the VR complex is represented as: , Indicates a simplex;

[0091] Step 4.1.3: All VR complexes form a VR complex sequence, and persistent cohomology calculation is performed on the VR complex sequence to obtain a set of finite persistent intervals. Extract the death scale of each finite duration interval from the set of finite duration intervals to form a death scale set, and sort the death scales in the death scale set in ascending order.

[0092] Among them, the set of finite persistence intervals The expression is: , ,in For the first Persistent bars corresponding to each connected component (and) to (Constructing a persistent barcode image), where 0 represents the birth scale of each connected component. For the first The death metric of a connected component;

[0093] The death scale set is represented as ;

[0094] Step 4.1.4: For each death scale in the death scale set, extract all connected components. For each connected component, if there is only one transition point in the connected component, it is directly retained as a feature point. If there are two transition points in the connected component, the transition point with the highest fluorescence intensity is selected as the feature point. If there are at least three transition points in the connected component, for any transition point in the connected component, calculate the sum of the Euclidean distances from the current transition point to the other transition points in the connected component, and select the transition point with the smallest sum of distances as the feature point.

[0095] All feature points selected from all connected components at the current death scale are used as the feature point set at the current death scale.

[0096] Step 4.2, the process of obtaining the spectral feature point set includes:

[0097] Calculate the first total energy of all spectra in the emission-excitation matrix (where the energy of a single spectrum is the square of the corresponding fluorescence intensity), and for each death scale in the death scale set, calculate the second total energy of the corresponding feature point set (where the energy of a single feature point is the square of the corresponding fluorescence intensity). The ratio of the second total energy to the first total energy is taken as the energy retention rate of the current death scale (the energy retention rate gradually decreases as the death scale increases).

[0098] When the energy retention rate first falls below a preset value (e.g., 85%), the set of feature points corresponding to the current energy retention rate is taken as the spectral feature point set of the current water sample (the spectral feature point set is represented as...). ).

[0099] Step 5: Construct a recognition network and use the spectral feature point set as the input of the recognition network. Train the recognition network using the spectral feature point set corresponding to all water samples in the dataset to obtain a trained recognition network. The recognition network includes a feature encoding module, a feature extraction module, a max pooling module, a classification head, and a Softmax function.

[0100] Specifically, in the recognition network, each feature point in the spectral feature point set is used as the input of the feature encoding module to obtain the initial point-level features corresponding to each feature point. The initial point-level features are then used as the input of the feature extraction module to obtain the final point-level features corresponding to each feature point, forming the final point-level feature set. The final point-level feature set is then processed by the max pooling module to obtain the global features. The global features are then processed by the classification head and the Softmax function to obtain the class probability of the corresponding water sample.

[0101] Step 5.1: In the feature encoding module, each feature point in the spectral feature point set is encoded into a feature vector based on the corresponding spherical coordinates, and the feature vector of each feature point is represented as follows: ,in, For the first spectral feature point in the set The spherical coordinates of a feature point , and The spectral feature points are in the following order: The azimuth, polar angle, and radial distance of each feature point;

[0102] The feature vectors are then processed through a multilayer perceptron (which consists of two fully connected layers with shared parameters, each followed by a layer normalization and ReLU activation function, and the output dimension of each fully connected layer is 32) to obtain the initial point-level features (i.e., the output of the feature encoding module).

[0103] It should be noted that the spherical coordinates corresponding to each feature point in the spectral feature point set are represented as follows: , , and These are the first points in the spectral feature point set. The azimuth, polar angle, and radial distance of each feature point;

[0104] The encoding process for each feature point is to perform sine and cosine mapping on the azimuth and polar angles respectively, and then concatenate them with the radial distance to form a feature vector.

[0105] Step 5.2: The feature extraction module consists of three feature extraction units that are executed sequentially.

[0106] Step 5.2.1: In each feature extraction unit, for each feature point in the spectral feature point set, select A additional feature points from the corresponding spectral feature point set as relation points for the current feature point; set any selected relation point... With current feature point ( For the first spectral feature point in the set The relevant features of (a number of feature points) are input into a multilayer perceptron (which includes two fully connected layers with output dimensions of 64 and 32, respectively), to obtain... and The relative distribution characteristics between them, where the relative characteristics include those of the previous feature extraction unit. The output of the previous feature extraction unit is for Output and targeting The difference between the outputs and The spherical angular distance between them, and and The radial distance difference between them, where for the first feature extraction unit (i.e. When the value is 1, the corresponding initial point-level features are used as the previous feature extraction unit for... or Output ( The corresponding initial point-level features are... The input to the feature encoding module is used for forward propagation to obtain the output of the feature encoding module; The corresponding initial point-level features are... The input to the feature encoding module is used for forward propagation to obtain the output of the feature encoding module.

[0107] Specifically, the process of selecting A additional feature points from the set of spectral feature points as relation points of the current feature point includes:

[0108] Each of the three feature extraction units is assigned a central angle (the central angle is learnable and is initially randomly initialized, for example, the central angles of the three feature extraction units are initialized sequentially as follows). , and (As the model is continuously trained and updated).

[0109] In each feature extraction unit, the deviation of the spherical angular distance between the other feature points (other feature points are feature points other than the current feature point in the spectral feature point set) and the current feature point relative to the central angle of the current feature extraction unit is calculated, and the A other feature points with the smallest deviation are selected as the relation points of the current feature point (e.g., A is 32).

[0110] The formula for calculating the relative distribution characteristics is as follows:

[0111] ;

[0112] in,

[0113] ;

[0114] , ;

[0115] in, For the selected relation points, the first A relationship point, In the first In each feature extraction unit and The relative distribution characteristics between them In the first The feature extraction unit contains a multilayer perceptron (which includes two fully connected layers with output dimensions of 64 and 32, respectively). For the first The feature extraction unit targets the first feature point in the spectral feature point set. Feature points The output (i.e., the output of) As input to the recognition network, it undergoes forward propagation to obtain the first... (output of each feature extraction unit) For the first The feature extraction unit targets the first feature point in the spectral feature point set. Feature points The output (i.e., the output of) As input to the recognition network, it undergoes forward propagation to obtain the first... (output of each feature extraction unit) for and The spherical angular distance between them for and The radial distance difference between them , and In order The azimuth, polar angle, and radial distance.

[0116] Step 5.2.2: Calculate the aggregate weights of all relative distribution features of the current feature point, and use the aggregate weights and the previous feature extraction unit's... The output of each feature extraction unit is calculated based on the output of the current feature point and the relative distribution features of all current feature points, and the formula is as follows:

[0117] ;

[0118] in,

[0119] ;

[0120] in, For the current number Each feature extraction unit targets The output is used as the input to the next feature extraction unit. For the previous feature extraction unit against The output, For the first In each feature extraction unit and The relative distribution characteristics between them In the first In each feature extraction unit and Aggregate weights based on the relative distribution characteristics between them. For the first The central angle of each feature extraction unit For the first The angular response width of each feature extraction unit (the angular response width is learnable and is initially randomly initialized, e.g., the angular response widths of all three feature extraction units are initialized). (and is continuously updated as the model is trained). This refers to the softmax function.

[0121] Step 5.2.3: Take the output of the last feature extraction unit as the output of the feature extraction module, and call it the final point-level feature;

[0122] For the spectral feature point set, the final point-level features corresponding to all feature points in the spectral feature point set are obtained, and they constitute the final point set feature set.

[0123] Step 5.3: In the max pooling module, perform dimension-wise max pooling on all final point-level features in the final point-level feature set to obtain the global features (32 dimensions).

[0124] Step 5.4: Pass the global features through a classification head (which consists of a fully connected layer (output dimension 128), layer normalization, activation function (ReLU), dropout layer (dropout rate 0.3), fully connected layer (output dimension 64), layer normalization, activation function (ReLU), and dropout layer (dropout rate 0.3) in sequence) to obtain the pollutant category score of the corresponding water sample (e.g., scores containing four categories). Then, pass the pollutant category score through the Softmax function to obtain the pollutant category probability of the water sample (probabilities containing multiple categories). The highest category probability is taken as the predicted pollutant category of the water sample.

[0125] Loss function of identification network The calculation formula is as follows:

[0126] ;

[0127] in,

[0128] ;

[0129] ;

[0130] in, For classifying losses, For the center angle spacing constraint loss, The weights for the center angle spacing constraint loss are... For the index of water samples in the dataset, This represents the total amount of water samples in the dataset. This represents the total number of pollutant categories in the water sample. An index for the categories of pollutants in water samples. For the first The water sample belongs to the first The actual label of the class (0 or 1). To identify the network prediction of the first The water sample belongs to the first Class probability, The preset center angle interval between adjacent feature extraction units, and The first The central angle of the first feature extraction unit and the first The central angle of each feature extraction unit This indicates taking the maximum value.

[0131] During the training of the recognition network using a dataset, the parameters of the recognition network are updated via backpropagation using a loss function until the recognition network converges, resulting in a trained recognition network. The parameters involved in the training process of the recognition network are set as follows:

[0132] Step 7: Obtain the water sample to be identified, generate the corresponding spectral feature point set (i.e., follow the process of steps 2-4), and use it as the input of the trained identification network to obtain the category probability of the water sample to be identified, and take the category corresponding to the highest category probability as the category of pollutant in the water sample to be identified.

[0133] In another embodiment, such as Figures 3-10 As shown, the following experiment was conducted to verify the effectiveness of this method:

[0134] This embodiment uses four spectrally similar pollutants—enrofloxacin, ciprofloxacin, norfloxacin, and moxifloxacin—as experimental subjects. Standard solutions of these chemicals were prepared in deionized water using a Milli-Q water purification system. Polluted water samples were simulated by adding these pollutants to river water samples collected from a river near a school. A total of 80 simulated polluted water samples were prepared, 20 of each substance, with concentrations ranging from 50 to 1000 mg / L. The number of samples and concentration ranges are shown in Table 1.

[0135] Table 1

[0136]

[0137] Following step 2, three-dimensional fluorescence spectroscopy measurements were performed on the 80 water samples to obtain the corresponding emission-excitation matrices. The sampling range for both excitation and emission wavelengths was 220–600 nm, with a sampling interval of 5 nm. Each sample formed a 77×77 excitation-emission matrix. The three-dimensional fluorescence spectra of the fluorescence intensity matrices for the four substances in the water samples are shown below. Figures 3-4 As shown, where Figure 3 The three-dimensional fluorescence spectra are the fluorescence intensity matrices corresponding to the enrofloxacin and norfloxacin water samples. Figure 4 The three-dimensional fluorescence spectra of the fluorescence intensity matrices corresponding to the ciprofloxacin and moxifloxacin water samples are shown.

[0138] Following step 3, the fluorescence intensity matrix of each water sample was converted into a point cloud in a three-dimensional Cartesian coordinate system, resulting in 5929 point clouds (corresponding to one water sample); For example... Figures 5-6 The image shown is a spherical transformation diagram of the spectral point cloud corresponding to four substances in the water sample. Figure 5 The image shows the transformation results for enrofloxacin-treated and norfloxacin-treated water samples. Figure 6 The transformation results are shown for the ciprofloxacin and moxifloxacin water samples.

[0139] Perform persistent co-homogenization of the point cloud according to step 4; the persistent barcode images corresponding to the four substances in the water sample are as follows: Figures 7-10 As shown, where Figure 7 The persistent barcode image corresponding to the enrofloxacin water sample. Figure 8 This is the persistent barcode image corresponding to the norfloxacin water sample. Figure 9 This is the persistent barcode image corresponding to the ciprofloxacin water sample. Figure 10 The persistent barcode image corresponding to the moxifloxacin water sample;

[0140] The 80 samples were divided into a training set and a test set in a 6:4 ratio, with 48 samples in the training set and 32 samples in the test set. The recognition network was trained using the training set via forward propagation, following step 5. The batch size for training the recognition network was set to 8, and the total number of training epochs was set to 100. The Adam optimizer was used to update the network parameters, with an initial learning rate of 0.001 and a weight decay coefficient of 0.0001; every 20 training epochs, the learning rate was decayed to 0.5 times its original value.

[0141] In this embodiment, the test set is used to compare the proposed method with two existing methods (parallel factor method and principal component analysis) on three indicators: overall accuracy, average accuracy, and average recall, as shown in Table 2. The parallel factor method mainly decomposes the overall fluorescence response in the excitation-emission matrix, which has limited ability to express changes in the spectral surface structure, thus affecting the recognition effect. The principal component analysis method mainly relies on the overall variance direction of the data for dimensionality reduction and feature extraction, and is more inclined to retain information with large global changes. However, the differences between spectrally similar pollutants are often reflected in local structural changes. Such local discrimination information is easily weakened or submerged during the principal component dimensionality reduction process. The experimental samples were all prepared against a river water background. The river water contains natural organic matter such as humic substances and amino acids, and its fluorescence response will cause certain interference to the spectral characteristics of the target pollutants. The present invention combines spherical transformation and persistent homology analysis to extract key structures that are not easily affected by local perturbations while highlighting the subtle structural differences of the target pollutants. This effectively reduces the impact of background fluorescence and local noise on feature expression, and therefore still has the best comprehensive recognition performance against a river water background.

[0142] Table 2

[0143]

[0144] As shown in Table 2, our method outperforms existing methods in all three metrics: overall accuracy, average accuracy, and average recall. Therefore, our method has a better recognition effect.

[0145] This method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds maps the fluorescence intensity matrix to a three-dimensional spectral point cloud, then maps each three-dimensional spectral point to spherical coordinates in spherical space, and finally converts each spherical coordinate into a cloud in a three-dimensional rectangular coordinate system. During this process, the spherical transformation nonlinearly adjusts the spatial position of each point, amplifying the previously indistinct spectral structural differences between similar pollutants and improving the spatial separability of spectral point clouds of different categories. This method utilizes persistent homology analysis to determine the connectivity of the point cloud at different distance scales, and selects feature points from each connected branch at a screening scale. Based on the feature point set, it calculates the energy retention rate at the corresponding death scale, and uses the feature point set corresponding to the first time the energy retention rate falls below a preset value as the spectral feature point set of the current water sample. This method preserves the main spatial morphology of the point cloud while reducing redundant information in locally dense areas, thus obtaining the spectral feature point set. Furthermore, based on the spherical angular distance and radial distance difference between spectral feature points, this method progressively extracts the relative distribution characteristics between feature points within different angular distance ranges, enabling the subtle morphological differences enhanced by the spherical transformation to be effectively used for category discrimination, thereby improving the accuracy and stability of identifying spectrally similar pollutants.

[0146] It should be understood that, although Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0147] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0148] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

Claims

1. A method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds, characterized in that: Collect a dataset containing multiple water samples, and address each water sample as follows: Three-dimensional fluorescence spectroscopy was performed on the water sample to obtain the emission-excitation matrix, and the emission-excitation matrix was preprocessed to obtain the fluorescence intensity matrix; The fluorescence intensity matrix is ​​converted into a point cloud in a three-dimensional Cartesian coordinate system; Persistent cohomology is performed on the point cloud to obtain the death scale set. Feature points are filtered for the connected components of each death scale, and all the filtered feature points constitute the feature point set of the corresponding death scale. The energy retention rate of the corresponding death scale is calculated based on the feature point set. The feature point set corresponding to the first time the energy retention rate falls below the preset value is taken as the spectral feature point set of the current water sample. A recognition network is constructed, and the spectral feature point set is used as the input of the recognition network. The recognition network is trained using the spectral feature point set corresponding to all water samples in the dataset to obtain the trained recognition network. The recognition network includes a feature encoding module, a feature extraction module, a max pooling module, a classification head, and a Softmax function. The water sample to be identified is obtained, the corresponding spectral feature point set is generated, and it is used as the input of the trained recognition network to obtain the category probability of the water sample to be identified. The category corresponding to the highest category probability is taken as the category of pollutant in the water sample to be identified.

2. The method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds as described in claim 1, characterized in that: The preprocessing steps are as follows: calibrating the fluorescence intensity in the emission-excitation matrix, subtracting the water blank value, and removing the scattering peaks in the emission-excitation matrix using the Delaunay triangulation method to obtain the fluorescence intensity matrix.

3. The method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds as described in claim 1, characterized in that: The process of converting the fluorescence intensity matrix into a point cloud in a three-dimensional Cartesian coordinate system includes: The fluorescence intensity matrix of each water sample is mapped to a three-dimensional spectral point cloud, and each three-dimensional spectral point in the three-dimensional spectral point cloud contains the emission wavelength, excitation wavelength and corresponding fluorescence intensity; Each three-dimensional spectral point is mapped to spherical coordinates in spherical space, and the azimuth and polar angles of the spherical coordinates are determined by the excitation and emission wavelengths, while the radial distance of the spherical coordinates is determined by the fluorescence intensity. Each spherical coordinate is converted into a point in a three-dimensional rectangular coordinate system, and these points are called transformation points. All transformation points constitute a point cloud.

4. The method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds as described in claim 1, characterized in that: The process of obtaining the feature point set for each death scale includes: Calculate the Euclidean distance between any two transformation points in the point cloud, and arrange the Euclidean distances in ascending order, with each Euclidean distance serving as a distance scale; The distance scales are traversed sequentially according to the order of arrangement. A VR complex is constructed for each traversed distance scale. When the distance between two transformation points is less than the corresponding distance scale, a connecting edge is constructed between the two current transformation points. Transformation points connected by the connecting edge belong to the same connected component. When all transformation points in the point cloud belong to the same connected component, the traversal of the distance scales is stopped. All VR complexes constitute a VR complex sequence, and persistent cohomology calculation is performed on the VR complex sequence to obtain a set of finite persistent intervals. The death scale of each finite persistent interval in the set of finite persistent intervals is extracted to form a death scale set, and the death scales in the death scale set are sorted in ascending order. For each death scale in the death scale set, all connected components are extracted. For each connected component, if there is only one transition point, it is directly retained as a feature point. If there are two transition points, the transition point with the highest fluorescence intensity is selected as the feature point. If there are at least three transition points, for any transition point in the connected component, the sum of the Euclidean distances from the current transition point to the other transition points in the connected component is calculated, and the transition point with the smallest sum of distances is selected as the feature point. All feature points selected from all connected components at the current death scale are used as the feature point set at the current death scale.

5. The method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds as described in claim 1, characterized in that: The process of obtaining a set of spectral feature points includes: Calculate the first total energy of all spectra in the emission-excitation matrix, and for each death scale in the death scale set, calculate the second total energy of the corresponding feature point set. The ratio of the second total energy to the first total energy is taken as the energy retention rate of the current death scale. When the energy retention rate falls below the preset value for the first time, the set of feature points corresponding to the current energy retention rate is taken as the spectral feature point set of the current water sample.

6. The method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds as described in claim 1, characterized in that: In the recognition network, each feature point in the spectral feature point set is used as the input of the feature encoding module to obtain the initial point-level features corresponding to each feature point. The initial point-level features are then used as the input of the feature extraction module to obtain the final point-level features corresponding to each feature point, forming the final point-level feature set. The final point-level feature set is then processed by the max pooling module to obtain the global features. The global features are then processed by the classification head and the Softmax function to obtain the class probability of the corresponding water sample. In the feature encoding module, each feature point in the spectral feature point set is encoded into a feature vector based on the corresponding spherical coordinates, and the feature vector of each feature point is represented as follows: ,in, For the first spectral feature point in the set The spherical coordinates of a feature point , and The order is number 1 The azimuth, polar angle, and radial distance of each feature point; The feature vectors are then processed through a multilayer perceptron to obtain initial point-level features.

7. The method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds as described in claim 6, characterized in that: The feature extraction module includes three feature extraction units that are executed sequentially. In each feature extraction unit, for each feature point in the spectral feature point set, another A feature points are selected from the corresponding spectral feature point set as the relation points of the current feature point; Any selected relation point With current feature point The relevant features are input into the multilayer perceptron to obtain and The relative distribution characteristics between them, where the relative characteristics include those of the previous feature extraction unit. The output of the previous feature extraction unit is for Output and targeting The difference between the outputs and The spherical angular distance between them, and and The radial distance difference between them, where for the first feature extraction unit, the corresponding initial point-level feature is used as the feature of the previous feature extraction unit. or The output; Calculate the aggregate weights of all relative distribution features of the current feature point, and use the aggregate weights and the previous feature extraction unit's... The output of each feature extraction unit is calculated based on the output of the current feature point and the relative distribution features of all current feature points, and the formula is as follows: ; in, For the current number Each feature extraction unit targets The output, For the previous feature extraction unit against The output, In the first In each feature extraction unit and The relative distribution characteristics between them In the first In each feature extraction unit and Aggregate weights based on the relative distribution characteristics among them; The output of the last feature extraction unit is used as the output of the feature extraction module and is called the final point-level feature. For the spectral feature point set, the final point-level features corresponding to all feature points in the spectral feature point set are obtained, and they constitute the final point set feature set.

8. The method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds as described in claim 7, characterized in that: The process of selecting A additional feature points from the set of spectral feature points as relation points of the current feature point includes: Assign a central angle to each of the three feature extraction units; In each feature extraction unit, the deviation of the spherical angular distance between other feature points and the current feature point relative to the central angle of the current feature extraction unit is calculated, and the A other feature points with the smallest deviation are selected as the relation points of the current feature point.

9. The method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds as described in claim 7, characterized in that: In the max pooling module, all final point-level features in the final point-level feature set are subjected to dimension-wise max pooling to obtain global features; The classification head comprises a fully connected layer, a layer normalization layer, an activation function, a Dropout layer, a fully connected layer, a layer normalization layer, an activation function, and a Dropout layer connected in sequence.

10. The method for identifying similar pollutants based on spherical transformation of three-dimensional fluorescence spectral point clouds as described in claim 8, characterized in that: The loss function of the recognition network The calculation formula is as follows: ; in, ; ; in, For classifying losses, For the center angle spacing constraint loss, The weights for the center angle spacing constraint loss are... For the index of water samples in the dataset, This represents the total amount of water samples in the dataset. This represents the total number of pollutant categories in the water sample. An index for the categories of pollutants in water samples. For the first The water sample belongs to the first The true label of the class, To identify the network prediction of the first The water sample belongs to the first Class probability, The preset center angle interval between adjacent feature extraction units, and The first The central angle of the first feature extraction unit and the first The central angle of each feature extraction unit This indicates taking the maximum value.