Machine learning based sewage sample illicit drug screening system and method

By constructing a machine learning knowledge model for wastewater monitoring and augmented reality technology, the problem of insufficient spatiotemporal coverage in existing wastewater monitoring technologies has been solved. This enables the dynamic migration of illegal drugs and the intuitive representation of emission sources, improving the efficiency and interactivity of pollution clue identification.

CN122436034APending Publication Date: 2026-07-21PUTIAN UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PUTIAN UNIV
Filing Date
2026-03-13
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing wastewater monitoring technologies mainly rely on manual offline detection, which results in limitations in the spatiotemporal coverage of monitoring results. They lack intuitive representation of the dynamic migration of illegal drugs in complex pipe networks and the spatial location of emission sources, affecting screening efficiency and accuracy.

Method used

A wastewater monitoring knowledge model based on machine learning is constructed. Combined with augmented reality technology, the layout of underground pipe networks, wastewater flow direction and drug concentration distribution are presented in a three-dimensional spatial overlay in the real scene. The model is dynamically adjusted by capturing the user's perspective and geographical orientation in real time, and responds to user interaction commands to perform multi-dimensional operations.

Benefits of technology

It has achieved standardized expression and intelligent correlation analysis of wastewater monitoring information, outputting the concentration load distribution of illegal drugs and suspected emission sources, improving the efficiency and interactivity of pollution clue locking, and providing intuitive and three-dimensional visualization content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122436034A_ABST
    Figure CN122436034A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of sewage monitoring, in particular to a sewage sample illegal drug screening method and system based on machine learning, which comprises the following steps: constructing a sewage monitoring knowledge model containing pipe network topology and drug physical and chemical properties; inputting real-time water quality characteristics into the model for matching, outputting illegal drug identification results, concentration load distribution and traceability positioning information; calling an augmented reality engine to three-dimensionally superimpose underground pipe networks, sewage flow directions and drug cloud maps on the ground real scene; dynamically adjusting virtual coordinates according to the user's visual angle to keep alignment; and responding to user instructions to carry out attribute query or diffusion simulation. The application can solve the problems that the existing monitoring means relies on manual operation and lacks dynamic migration and intuitive expression, realizes accurate identification and real-time spatial visual tracking of illegal drug discharge through deep integration of machine learning and augmented reality technology, and significantly improves the efficiency of traceability investigation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wastewater monitoring technology, and more specifically, to a wastewater sample illegal drug screening system and method based on machine learning. Background Technology

[0002] Wastewater monitoring, centered on drainage networks and treatment systems, relies on qualitative and quantitative analysis of drugs and their metabolites in water samples to comprehensively assess population drug consumption behavior and support social risk prevention and control. This analytical process primarily depends on manual sampling and offline laboratory testing. The selection of different sampling sites, fluctuations in environmental factors, and manual intervention in the testing process can easily lead to limitations in the spatiotemporal coverage and poor repeatability of monitoring results, thus affecting the stability and standardized promotion of illicit drug abuse early warning systems.

[0003] Currently, with the development of analytical chemistry and environmental monitoring technologies, some wastewater monitoring methods have incorporated high-resolution mass spectrometry, automated sample introduction, and basic statistical models to digitize data on target concentrations, flow rates, and water quality parameters in wastewater, assisting in drug load calculations and related consumption assessments. However, existing technologies mainly focus on static concentration analysis and single-indicator derivation, and their monitoring results are often presented as isolated detection values ​​or two-dimensional trend charts. This limits the ability to express the dynamic migration, spatiotemporal distribution characteristics, and spatial location of emission sources of illicit drugs in complex pipe networks. This hinders relevant departments from identifying pollution clues and risk sources, especially under complex conditions such as defective pipe networks and concealed illegal emissions, which may affect screening efficiency and accuracy. Furthermore, the human-computer interaction methods are relatively simple, lacking immersive and personalized displays, limiting the interpretability and application experience of wastewater monitoring results.

[0004] Therefore, there is an urgent need for a wastewater screening method and system that can integrate intelligent pipeline detection, automated sampling, and multi-dimensional water quality feature extraction, and further introduce intelligent identification technologies such as machine learning to present information on illegal drug concentration, spatiotemporal distribution patterns, load change characteristics, and pipeline structural defects in an intuitive and interactive manner. This would compensate for the shortcomings of traditional wastewater monitoring and existing analysis technologies in terms of automation, data fusion capabilities, identification accuracy, and spatiotemporal resolution. Summary of the Invention

[0005] In view of this, the present invention proposes a machine learning-based method and system for screening illegal drugs in wastewater samples. It aims to solve the problems that current wastewater monitoring methods mainly rely on manual offline detection, which leads to limitations in the spatiotemporal coverage of monitoring results. Furthermore, existing analytical techniques focus on static concentration analysis and lack intuitive representation of the dynamic migration of illegal drugs in complex pipe networks and the spatial location of emission sources, resulting in low efficiency in identifying pollution clues.

[0006] This invention proposes a machine learning-based method for screening illicit drugs in wastewater samples, comprising: Collect multi-source pipeline network monitoring data, and perform structured processing on the multi-source pipeline network monitoring data to construct a wastewater monitoring knowledge model that includes multi-dimensional correlations between pipeline network topology, hydraulic dynamic parameters, drug physicochemical properties, and emission source characteristics; The real-time water quality characteristics of the area to be monitored are obtained, and the real-time water quality characteristics are input into the wastewater monitoring knowledge model for matching analysis. The corresponding illegal drug type identification results, concentration load distribution and suspected emission source location information are output. Based on the identification results of the illegal drug types, concentration load distribution and suspected emission source location information, the augmented reality engine is invoked to project the underground pipe network layout, sewage flow direction, drug concentration cloud map and source tracing path onto the surface of the ground real scene image or regional digital twin model in a three-dimensional spatial overlay manner. Based on augmented reality devices, the system captures the user's perspective and geographical location in real time, and dynamically adjusts the spatial coordinates of the virtual content to keep the layout of underground pipe networks, sewage flow direction, drug concentration cloud map and traceability path aligned with the user's current observation angle and actual geographical location. Responding to user gestures or voice commands, the system can zoom in on overlaid pipeline nodes, abnormal outlets, or drug migration paths, perform attribute queries, compare historical trends, or play drug diffusion simulation animations.

[0007] Furthermore, when collecting monitoring data from multi-source pipeline networks, the following includes: Extract the drainage network vector data of the target area from the geographic information system, including pipeline direction, pipe diameter parameters, burial depth, manhole cover coordinates and pump station distribution locations; Obtain data on the molecular structure, degradation rate constant, adsorption coefficient, and existing forms of illicit drugs and their metabolites from chemical analysis databases; The cleaned sample data was extracted from historical monitoring records, including drug concentration detection values ​​at different time points, synchronous flow monitoring values, conductivity and total organic carbon content; The three types of data mentioned above are standardized and encoded, and then uniformly mapped to the preset underground space perception ontology system to form a structured original monitoring dataset.

[0008] Furthermore, when performing structured processing on multi-source pipeline network monitoring data, the following steps are included: Based on graph theory algorithms, the topology of the drainage pipe network vector data is reconstructed to generate a directed acyclic graph model with pipe segments as edges and inspection wells as nodes, and hydraulic gradient and roughness attributes are configured for each edge. A drug degradation kinetic equation was established based on numerical simulation technology to calculate the residual rate of illicit drugs under specific flow rate and temperature conditions, and a drug attenuation characteristic matrix was formed. By combining flow and concentration data from historical monitoring records, an emission load projection model is trained, and a nonlinear mapping rule between concentration fluctuations at monitoring points and upstream emission intensity is established. By integrating the pipeline network topology, drug attenuation characteristic matrix, and emission load projection model, a wastewater monitoring knowledge model is constructed, which includes node connection relationships, fluid transport characteristics, solute transformation laws, and source term characteristic vectors.

[0009] Furthermore, when acquiring real-time water quality characteristics of the area to be monitored, this includes: Real-time water samples are obtained by automated sampling terminals deployed at key nodes of the pipeline network, and then filtered and enriched by an online preprocessing module. Ion fragment scanning was performed on the enriched sample based on an integrated mass spectrometry detection sensor to extract the mass-to-charge ratio, retention time and peak area characteristics of the target compound. Real-time flow velocity, liquid level, pH, oxidation-reduction potential, and temperature values ​​are collected using an ultrasonic flow meter and a multi-parameter water quality probe. Based on the edge computing gateway, feature fusion is performed on mass spectrometry features, hydraulic parameters and sensory indicators to generate real-time feature vectors for the area to be monitored.

[0010] Furthermore, when inputting real-time feature vectors into the wastewater monitoring knowledge model for matching analysis, this includes: Retrieve the anomalous pattern node in the knowledge model that is closest to each dimension of the real-time feature vector, where: If the rate of change of drug concentration in the real-time feature vector exceeds the preset threshold, the source tracing algorithm is activated, and a reverse tracing operation is performed based on the directed acyclic graph model of the pipeline network. Calculate the contribution weight of the real-time feature vector on different pipeline branches, and correct the original emission intensity of each node by combining the drug attenuation feature matrix. Based on the revised emission intensity, identify the suspected emission outlets with the highest matching degree among the pipeline network nodes, and output a source tracing analysis report that includes latitude and longitude coordinates, the nature of the unit to which the outlet belongs, and the recommended investigation priority.

[0011] Furthermore, when using the augmented reality engine for spatial overlay display, this includes: A high-precision 3D map of the loading area serves as the underlying reference. The map includes a layered mask structure of building outlines, road centerlines, and underground pipe networks. Based on the output concentration load distribution information, dynamic fluid effects are generated inside the three-dimensional pipe network model, and different color saturations represent the real-time concentration level of illegal drugs. Virtual warning signs are marked at suspected emission source locations, with each sign configured with geographic coordinates, emission frequency statistics, associated drug types, and risk level descriptions; For the identified tracing path, a semi-transparent guide arrow is superimposed above the corresponding pipe section to indicate the migration trajectory of the drug from the emission source to the monitoring point and the estimated flow time; The entire visualization scene is fused in real time based on the real-world images captured by the camera of the AR device.

[0012] Furthermore, when augmented reality devices capture the user's perspective and geolocation posture and dynamically adjust virtual content, this includes: The device uses its built-in GPS and inertial navigation unit to obtain the user's current absolute geographic coordinates and head yaw angle. Visual SLAM algorithms are used to identify road surface feature points or specific manhole cover markers, establish local spatial anchor points, and spatially register the three-dimensional model of the underground pipeline network with the real road surface environment. When the user moves or rotates the viewpoint within the monitoring area, the system recalculates the relative projection position of the virtual network and the real scene based on the posture change matrix, and updates the perspective coordinates of the virtual elements. When the user's gaze is focused on a specific pipeline node, a local perspective mode is automatically triggered to display the real-time sensor readings and historical concentration curves inside that node.

[0013] Furthermore, when responding to user interaction commands to perform content operations, this includes: The system recognizes the user's finger pointing at a virtual pipeline node, triggering the node's detailed attribute panel to display the pipe diameter, material, current flow rate, and illegal drug detection records within the most recent predetermined period. Upon receiving user voice commands, the overflow risk and drug diffusion prediction layers for the pipe section under different rainfall intensities are overlaid and displayed in the current field of view. It supports two-finger zoom operation to switch the hierarchy of the pipeline topology in the selected area, displaying the fine connection relationship from the main pipe to the branch pipe and then to the service pipe; Users can select a comparison command, which specifically involves overlaying and displaying a graph showing the difference in drug load changes between the current monitoring cycle and the previous predetermined monitoring cycle on the same pipeline path.

[0014] Furthermore, the augmented reality device is an industrial-grade AR headset or mobile handheld terminal that supports high-precision GNSS differential positioning. The augmented reality engine runs on a cross-platform graphics library and spatial computing plugin, and the wastewater monitoring knowledge model is stored on a cloud server and supports real-time streaming data updates.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: By collecting and structuring multi-source pipeline monitoring data, this invention constructs a wastewater monitoring knowledge model encompassing multi-dimensional relationships between pipeline topology, hydraulic parameters, drug properties, and emission source characteristics. This system integrates geographic information, environmental chemistry, and hydraulic data, achieving standardized expression and intelligent correlation analysis of wastewater monitoring information, and outputting drug identification results and source tracing information. Based on this, real-time collected water quality characteristic information is input into the knowledge model for matching, outputting the concentration load distribution of illicit drugs and suspected emission sources. Furthermore, augmented reality technology is introduced to present the complex underground pipeline network, wastewater flow direction, and drug concentration distribution in a three-dimensional spatial overlay within the real-world scene, generating intuitive and three-dimensional visualizations that reflect the dynamic migration characteristics of illicit drugs in physical space and the spatial location of emission sources. In addition, by capturing the user's perspective and geographical orientation in real time and dynamically adjusting the spatial coordinates of the virtual content, the projection parameters are updated to ensure high-precision alignment between the pipeline data and the real environment. Finally, responding to user gestures or voice commands, the system enables multi-dimensional interactive operations on pipeline nodes and source tracing paths, generating human-computer interactive content that includes real-time data queries and diffusion simulation animations.

[0016] On the other hand, this application also provides a machine learning-based system for screening illegal drugs in wastewater samples, comprising: The data integration unit is configured to collect pipeline GIS data, drug fingerprint data, and historical monitoring data, and perform structured processing to build a wastewater monitoring knowledge model. The feature acquisition unit is communicatively connected to the data integration unit. The feature acquisition unit is configured to acquire real-time water quality parameters, mass spectrometry features, and flow data through an automated sampling and online analysis module, and fuse them to generate a real-time feature vector. The intelligent identification unit is connected to the feature acquisition unit and the data integration unit. The intelligent identification unit is configured to match the real-time feature vector with the wastewater monitoring knowledge model, execute the source tracing algorithm, and output the drug type, load distribution, and emission source location. A visualization rendering unit is electrically connected to the intelligent recognition unit. The visualization rendering unit is configured to call up a regional three-dimensional model, generate a drug concentration cloud map and a traceability path based on the recognition results, and spatially align and overlay the virtual content with the real geographical environment based on an AR device. An interactive control unit, integrated into the AR device, is configured to recognize user gestures, voice, or positional changes, and adjust the display level, attribute panel display, or playback of evolution simulation of the virtual network accordingly.

[0017] It is understood that the machine learning-based illegal drug screening method and system for wastewater samples in the above embodiments of the present invention have the same beneficial effects, and will not be described in detail here. Attached Figure Description

[0018] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating a machine learning-based method for screening illegal drugs in wastewater samples, provided as an embodiment of the present invention. Figure 2 A flowchart illustrating a machine learning-based method for screening illegal drugs in wastewater samples, provided as an embodiment of the present invention; Figure 3 This is a functional block diagram of a wastewater sample illegal drug screening system based on machine learning, provided for an embodiment of the present invention. Detailed Implementation

[0019] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, embodiments and features in the embodiments of the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0020] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, embodiments and features in the embodiments of the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0021] For example, it should be understood that disclosures relating to a described method may also apply to a corresponding device or system for performing the method, and vice versa. For example, if one or more specific method steps are described, the corresponding device may include one or more units, such as functional units, for performing the described one or more method steps, even if such units are not explicitly described or illustrated in the figures. On the other hand, for example, if a particular apparatus is described in terms of one or more units (e.g., functional units), the corresponding method may include a step to perform the function of one or more units (e.g., a step to perform the function of the one or more units, or multiple steps, each performing the function of one or more of the plurality of units), even if such steps are not explicitly described or illustrated in the figures. Furthermore, it should be understood that, unless otherwise specifically indicated, features of the various exemplary embodiments and / or aspects described herein may be combined with each other.

[0022] Multi-source Pipe Network Monitoring Data refers to a collection of data from geographic information systems, chemical analysis databases, historical water quality monitoring records, and real-time sensor feedback. It is used to comprehensively characterize the pipe network topology, fluid dynamics, physicochemical evolution of drugs, and emission source behavior, providing data support for the screening and source tracing analysis of illegal drugs in wastewater.

[0023] Illicit Drug Types refer to categories of information used to describe specific controlled substances or their metabolites detected in wastewater samples. These categories reflect the specific characteristics of drug abuse and provide a basis for risk assessment.

[0024] Concentration load distribution refers to the result of spatiotemporal quantification of drug discharge within a monitoring area based on hydraulic flow rate and the detected concentration of the target substance, which is used to guide the delineation of key risk areas.

[0025] Underground Pipe Network Layout refers to the physical structure system in an urban drainage system used to characterize the collection and transportation path of sewage, and to establish the correlation between monitoring points, discharge outlets, and drug transport trajectories.

[0026] Abnormal outfalls refer to specific physical locations on the pipeline network system that are suspected of illegal discharge activities, and are used as target points for manual verification and precise crackdown.

[0027] A source tracing analysis report is a comprehensive assessment conclusion generated based on pipeline topology analysis and load inference results, used to guide the investigation and verification of clues from wastewater monitoring.

[0028] Sewage flow direction refers to the vector path of sewage movement within the pipe network, used to visually represent the dynamic migration characteristics of pollutants in an augmented reality environment.

[0029] Pipe network node coordinates refer to the specific three-dimensional coordinates of inspection wells, pump stations, or sampling points in geographic space, used to achieve accurate positioning and overlay display in augmented reality environments.

[0030] Drug Migration Path refers to the simulated trajectory of illicit drugs moving through the pipe network along with wastewater flow, used to dynamically demonstrate the evolution of pollutants from the emission source to the monitoring point.

[0031] Geographic Position and Posture refers to the latitude, longitude, altitude, and equipment orientation of the user at the monitoring site or during inspection, which is used to assist the augmented reality system in spatial alignment and dynamic adjustment.

[0032] A chemical analysis database is a collection of data used to store and manage the molecular structure, mass spectrometry fingerprints, and degradation kinetic parameters of illicit drugs, providing a source of knowledge for drug identification and traceability.

[0033] Pipe network topological reconstruction refers to the process of performing graph-based modeling on the original pipeline vector data to standardize the logic determination process of water flow.

[0034] The degradation kinetic equation refers to the decay model determined for different drug components over time, temperature, and water quality conditions, which is used to guide the accurate reconstruction of discharge load.

[0035] Discharge load deduction refers to the calculation process of calculating the upstream emission intensity based on downstream monitoring data, which is used to achieve quantitative assessment of pollution source items.

[0036] An automated sampling terminal refers to a hardware device deployed at a pipeline node to perform timed, quantitative, or proportional sampling to obtain representative wastewater samples.

[0037] Mass spectrometry fingerprint refers to the distribution characteristics of ion fragments of a target compound obtained through detection equipment, which is used to analyze the drug composition and purity characteristics.

[0038] Real-time hydraulic parameters refer to flow velocity, liquid level, and flow rate data collected and quantified by sensing devices, which are used to objectively characterize the state of wastewater transport.

[0039] The Underground Space Perception Ontology System refers to the standardized definition of pipeline network, water quality, and geographical environment characteristics based on a unified semantic framework, used to support multi-source data fusion analysis.

[0040] The degradation rate constant is a physical quantity that describes the rate at which a drug reacts in a wastewater environment and is used to correct for concentration loss in the source tracing process.

[0041] The degradation residual rate refers to the proportion of a drug that retains its original chemical properties after a specific migration time, and is used to support emission intensity calculations.

[0042] The Drug Attenuation Characteristic Matrix is ​​a multidimensional set of values ​​composed of degradation parameters of various drugs under different operating conditions, used to enhance the scientific basis of traceability analysis.

[0043] The mass-to-charge ratio (MTR) refers to the ratio of the mass of a charged ion to its charge, and is used to reflect a core identification feature in mass spectrometry analysis.

[0044] Retention time refers to the length of time a compound resides in a chromatographic column, and is used to assist in the qualitative identification of the target analyte.

[0045] Peak area refers to the area covered under the mass spectrometry detection signal curve, and is used to calculate the quantitative concentration of the target analyte.

[0046] A Directed Acyclic Graph (DAG) model is a mathematical graph structure used to represent the unidirectional flow relationship of sewage in a pipe network, enabling efficient source tracing path search.

[0047] An Inertial Navigation Unit (INU) is a sensing component used to detect the motion attitude of a device and output acceleration and angular velocity data to achieve viewpoint tracking.

[0048] A depth camera is an imaging device used to collect three-dimensional depth information of ground and manhole cover features, which is then used to build local spatial models.

[0049] Visual SLAM refers to a computational method used to simultaneously achieve device localization and environmental feature mapping, and is used to construct an augmented reality spatial coordinate system.

[0050] A spatial anchor is a reference point used in augmented reality scenarios to fix the position of a virtual network and ensure stable alignment between virtual information and the real road surface.

[0051] ARCore refers to the augmented reality development platform provided by Google, which is used to achieve device positioning, environmental awareness, and virtual content overlay.

[0052] ARKit refers to the augmented reality development framework provided by Apple, which is used to achieve high-precision spatial tracking and augmented reality interaction.

[0053] The Unity3D engine (Unity 3DEngine) refers to the development platform used to build and render 3D pipeline scenes, enabling the generation and display of augmented reality content.

[0054] Vuforia Image Recognition is a recognition technology used to identify features of real-world landmarks such as manhole covers and trigger the overlay of virtual content.

[0055] like Figures 1-2 As shown in some embodiments of this application, this embodiment provides a machine learning-based method for screening illegal drugs in wastewater samples, including: Step S100: Collect multi-source pipeline network monitoring data, and perform structured processing on the multi-source pipeline network monitoring data to construct a wastewater monitoring knowledge model that includes multi-dimensional correlations between pipeline network topology, hydraulic dynamic parameters, drug physicochemical properties, and emission source characteristics.

[0056] Specifically, the collection of multi-source pipeline network monitoring data includes: extracting drainage pipeline network vector data of the target area from the geographic information system to obtain pipeline direction, pipe diameter parameters, burial depth values, manhole cover coordinates, and pump station distribution locations; obtaining molecular structure, degradation rate constant, adsorption coefficient, and existence form data of illegal drugs and their metabolites from the chemical analysis database; exporting cleaned sample data from historical monitoring records, including drug concentration detection values, synchronous flow monitoring values, conductivity, and total organic carbon content at different time points; and standardizing and encoding the above three types of data respectively, and uniformly mapping them to the preset underground space perception ontology system to form a structured original monitoring dataset.

[0057] Specifically, the structured processing of multi-source pipeline network monitoring data includes: topological reconstruction of drainage pipeline network vector data based on graph theory algorithms to generate a directed acyclic graph model with pipe segments as edges and manholes as nodes, and configuring hydraulic gradient and roughness attributes for each edge; establishing drug degradation kinetic equations based on numerical simulation technology to calculate the residual rate of illicit drugs under specific flow rate and temperature conditions, forming a drug attenuation feature matrix; training an emission load projection model by combining flow and concentration data from historical monitoring records, and establishing a nonlinear mapping rule between concentration fluctuations at monitoring points and upstream emission intensity; and integrating the pipeline network topology, drug attenuation feature matrix, and emission load projection model to construct a wastewater monitoring knowledge model that includes node connection relationships, fluid transport characteristics, solute conversion laws, and source term feature vectors.

[0058] It is understandable that by uniformly collecting, standardizing coding, and structurally modeling multi-source pipeline monitoring data with heterogeneous sources and significantly different expression forms, the information in traditional sewage monitoring, which is mainly based on manual sampling, offline testing, and static reports, can be transformed into a computable and inferable knowledge expression form. Specifically, by introducing an underground space perception ontology system as a unified semantic framework, this approach unifies the mapping of pipeline routes, diameters, burial depths, and manhole cover coordinates from geographic information systems; molecular structures, degradation rates, adsorption coefficients, and pH response data from chemical analysis databases; and concentration detection values, synchronous flow rates, and multi-parameter water quality indicators from historical monitoring records. This resolves inconsistencies in coordinate systems, data frequencies, and semantic orientations among different data sources. Building upon this foundation, graph theory algorithms, numerical simulation techniques, and nonlinear modeling methods are employed to perform topological reconstruction, dynamic simulation, and feature modeling on spatial, physicochemical, and sequential data. This constructs multi-level semantic association structures such as node-pipe segment-flow regime, drug-attenuation-residue, and concentration-load-source term, further incorporating hydraulic gradient and roughness attributes into a unified relational chain. Finally, a graph database stores and organizes various entities and their semantic relationships in the form of nodes and edges, enabling the wastewater monitoring knowledge model to simultaneously express pipeline transport logic, solute conversion laws, and emission source distribution characteristics. This provides a structured and scalable knowledge foundation for subsequent type identification analysis and source tracing reasoning.

[0059] For example, when the system needs to construct a wastewater monitoring knowledge model for a specific drainage area, it first retrieves the pipeline vector map layer of that area from the geographic information system, extracting the coordinates of the start and end points of each pipeline segment, its burial depth, and the numbers of the connected manholes. Simultaneously, it retrieves physicochemical parameters related to common illicit drugs from a chemical analysis database, obtaining their degradation rate constant k at different wastewater temperatures and their adsorption coefficient on suspended particulate matter, and recording the proportion of their metabolites generated. The system further derives drug detection sequences, daily average flow data, and conductivity fluctuation curves from historical monitoring records for multiple monitoring points in the area over the past year. Subsequently, it uses graph theory algorithms to analyze the pipeline... The network vector data is processed to generate a directed acyclic graph structure, determining the flow priority of each pipe segment. A drug degradation kinetic equation is established through a numerical simulation module to calculate the drug residue matrix from upstream to downstream. The concentration fluctuation is feature-vectorized through an emission load extrapolation model, and the upstream source term intensity is labeled. After the above processing, the system imports various topological nodes, attenuation matrices, and mapping rules into a graph database to build a complete wastewater monitoring knowledge model in graph structure. This enables the system to quickly identify drug types and locate emission sources based on real-time sensor input data, thereby achieving knowledge-based and intelligent support for the wastewater screening process.

[0060] Step S200: Obtain real-time water quality characteristic information of the area to be monitored, input the real-time water quality characteristic information into the wastewater monitoring knowledge model for matching analysis, and output the corresponding illegal drug type identification results, concentration load distribution and suspected emission source location information.

[0061] Specifically, acquiring real-time water quality characteristics of the area to be monitored includes: acquiring real-time water samples based on automated sampling terminals deployed at key nodes of the pipeline network, followed by filtering and enrichment operations through an online preprocessing module; performing ion fragment scanning on the enriched samples based on an integrated mass spectrometry detection sensor to extract the mass-to-charge ratio, retention time, and peak area characteristics of the target compounds; acquiring real-time flow velocity, liquid level, pH, redox potential, and temperature values ​​based on an ultrasonic flow meter and a multi-parameter water quality probe; and performing feature fusion of mass spectrometry characteristics, hydraulic parameters, and sensory indicators based on an edge computing gateway to generate a real-time feature vector for the area to be monitored.

[0062] Specifically, when inputting real-time feature vectors into the wastewater monitoring knowledge model for matching analysis, the process includes: retrieving the abnormal pattern nodes in the knowledge model that are closest to each dimension of the real-time feature vectors; if the rate of change of drug concentration in the real-time feature vectors exceeds a preset threshold, activating the source tracing algorithm and performing a reverse tracing operation based on the directed acyclic graph model of the pipeline network; calculating the contribution weight of the real-time feature vectors on different pipeline branches and correcting the original emission intensity of each node in combination with the drug attenuation feature matrix; based on the corrected emission intensity, identifying the suspected emission outlet with the highest matching degree among the pipeline network nodes and outputting a source tracing analysis report containing latitude and longitude coordinates, the nature of the unit to which it belongs, and the suggested investigation priority.

[0063] Understandably, the system acquires physical indicators of wastewater, such as ion fragment mass-to-charge ratio, retention time, peak area characteristics, real-time flow rate, liquid level, pH, and temperature, from multiple sensing channels, including online sampling, mass spectrometry scanning, flow monitoring, and multi-parameter detection. Through online preprocessing, signal scanning, and feature extraction, the raw sensory data is transformed into standardized, computable feature vectors. Based on this, the fused real-time feature vectors are input into a wastewater monitoring knowledge model. By calculating the similarity and matching degree between each dimension of the feature vector and the feature rules associated with abnormal pattern nodes in the knowledge model, a quantitative expression of illegal drug identification is achieved. When the concentration change rate reaches a preset trigger threshold, the system automatically initiates reverse tracing logic. Combining the directed graph structure of the pipe network and the drug attenuation matrix, iteratively corrects the discharge intensity of each upstream branch, thereby achieving objective judgment and tracing information generation for suspected discharge outlets while maintaining the hydraulic logic of the pipe network.

[0064] For example, when an automated monitoring device deployed at a trunk pipe node detects an abnormal signal, the sampling terminal first acquires a wastewater sample and completes filtration. The mass spectrometry sensor identifies ion fragments with a specific mass-to-charge ratio and locks them into a certain type of illegal drug component based on the retention time. Simultaneously, the ultrasonic flow meter measures the current flow velocity in the pipe as 0.8 m / s, the liquid level is at its peak, and the multi-parameter probe indicates a slightly alkaline pH. The edge computing gateway integrates the above-mentioned mass spectrometry peak area, flow rate, and water quality parameters into a unified real-time feature vector, and inputs it into the wastewater monitoring knowledge model for matching analysis. The results show that the drug concentration change rate exceeds a preset threshold of 50%. Based on this, the system activates the source tracing algorithm, performs a reverse search in the directed acyclic graph of the pipe network, calculates the contribution weights of the three upstream branch outlets based on the drug's attenuation feature matrix, identifies the outlet located in the industrial park direction as having the highest matching degree, and automatically generates a source tracing analysis report containing the outlet's latitude and longitude coordinates and a suggested investigation level.

[0065] Step S300: Based on the identification results of the illegal drug types, concentration load distribution and suspected emission source location information, call the augmented reality engine to project the underground pipe network layout, sewage flow direction, drug concentration cloud map and source tracing path onto the surface of the ground real scene image or regional digital twin model in a three-dimensional spatial overlay manner.

[0066] Specifically, when using the augmented reality engine for spatial overlay display, the process includes: loading a high-precision 3D map of the area as the underlying reference, the map containing a layered mask structure of building outlines, road centerlines, and underground pipe networks; generating dynamic fluid effects within the 3D pipe network model based on the output concentration load distribution information, using different color saturations to represent the real-time concentration level of illegal drugs; marking virtual early warning signs at suspected emission source locations, each sign configured with geographic coordinates, emission frequency statistics, associated drug types, and risk level descriptions; overlaying semi-transparent guide arrows above the corresponding pipe sections for identified tracing paths, indicating the migration trajectory of drugs from the emission source to the monitoring point and the estimated flow time; and overlaying the entire visualization scene onto the real-world scene in real time using an AR device camera.

[0067] Understandably, by using an augmented reality engine to load a 3D map of the area containing the layered structure of buildings, roads, and pipe networks as a spatial reference, the identified drug types, load distribution, and source tracing elements are mapped onto the map's 3D coordinate system. Based on the concentration load information, the system generates dynamic fluid effects within the pipe network and distinguishes the concentration levels of illegal drugs through variations in color saturation. Simultaneously, it associates spatial coordinates, emission statistics, and risk descriptions at suspected discharge points, giving the abstract wastewater monitoring information a clear spatial orientation. Furthermore, combined with the migration trajectory generated by the source tracing algorithm, the migration path and flow time are overlaid and displayed as dynamic visual elements. With the help of the real-time imaging capabilities of augmented reality devices, the above 3D visualization content is spatially aligned with the real ground environment, thereby realizing the transformation of wastewater monitoring results from the data analysis layer to the intuitive spatial presentation layer.

[0068] For example, after the system completes the screening and analysis of a certain area and locates the emission source, the augmented reality engine first loads a high-precision 3D model of the area and locates the affected underground pipe network segments in the model. Inside the pipe segments, the system displays the concentration distribution of illegal drugs with different shades of red effects, and marks the suspected discharge outlets with yellow warning icons, showing the emission frequency and associated drug names at that point. For the source tracing path, the system overlays semi-transparent dynamic arrows above the corresponding pipelines on the ground to indicate the specific path of sewage flowing from the discharge outlet to the monitoring point, and marks the estimated arrival time. Subsequently, with the help of an industrial-grade AR headset, the above 3D visualization content is overlaid in real time onto the real road surface seen by the inspection personnel, so that when observing the street, personnel can intuitively see the underground pipe network layout, sewage flow direction, and abnormal discharge outlet locations, thereby improving their understanding of sewage monitoring results and source tracing clues.

[0069] Step S400: Based on the augmented reality device, capture the user's perspective and geographical location in real time, and dynamically adjust the spatial coordinates of the virtual content to keep the underground pipe network layout, sewage flow direction, drug concentration cloud map and traceability path aligned with the user's current observation angle and actual geographical location.

[0070] Specifically, when augmented reality devices capture user perspective and geographic location posture and dynamically adjust virtual content, the following steps are taken: The device's built-in GPS and inertial navigation unit are used to obtain the user's current absolute geographic coordinates and head yaw angle; visual SLAM algorithms are used to identify road feature points or specific manhole cover markers, establish local spatial anchor points, and spatially register the 3D model of the underground pipeline network with the real road environment; when the user moves or rotates their viewpoint within the monitoring area, the system recalculates the relative projection position of the virtual pipeline network and the real-world scene, updating the perspective coordinates of the virtual elements; when the user's gaze is focused on a specific pipeline node, a local perspective mode is automatically triggered, displaying real-time sensor readings and historical concentration curves inside that node.

[0071] Specifically, augmented reality devices are industrial-grade AR headsets or mobile handheld terminals that support high-precision GNSS differential positioning; the augmented reality engine runs on a cross-platform graphics library and spatial computing plugin.

[0072] Understandably, augmented reality devices acquire the user's absolute geographical location information in real time through a built-in GPS system and combine it with head yaw angle data collected by an inertial navigation unit to continuously track the user's perspective and key geographical attitude. Based on this, a visual SLAM algorithm is introduced to identify on-site road features and manhole cover markers, establishing a stable spatial anchor point coordinate system. The underground pipe network model is then spatially bound to the real road environment through registration. When the user moves, turns, or changes their viewing angle, the system recalculates the projection coordinates of the virtual pipe network layout, drug concentration cloud map, and tracing path in three-dimensional space based on a real-time updated attitude matrix, thus maintaining spatial consistency between the virtual content and the real geographical environment. Furthermore, when the user's gaze is focused on a specific manhole or pipe section, the system automatically switches to a partial perspective mode, enhancing the local display depth while ensuring overall stability. This allows sensor readings and concentration change trends within the pipe to be clearly presented, thereby enhancing the continuity and accuracy of augmented reality wastewater screening and display.

[0073] For example, after inspection personnel wearing industrial-grade AR headsets enter the monitoring area, the device's GNSS differential positioning module continuously collects their latitude and longitude coordinates, the inertial navigation unit synchronously acquires changes in their line of sight angle, and the camera uses a visual SLAM algorithm to lock onto a specific manhole cover on the road surface as a spatial anchor point. The system initially aligns the 3D model of the underground pipe network with the real road surface, ensuring that the virtual pipeline is accurately "buried" beneath the road surface. When personnel walk along the street and observe different pipe sections, the system updates the relative position of the virtual pipe network and the real scene in real time, ensuring that the displayed traceability path always accurately covers the corresponding real pipeline. When personnel stop in front of a suspected discharge manhole cover and look at the area, the system automatically triggers a local perspective interface, displaying the real-time flow reading of that node and the drug concentration fluctuation curve over the past 24 hours above the manhole cover. Throughout the process, the augmented reality engine runs based on a spatial computing plugin and dynamically corrects the displayed content in conjunction with high-precision positioning data, thereby achieving stable overlay and accurate presentation of sewage monitoring information as the user moves and observes naturally.

[0074] Step S500: Respond to user gestures or voice commands, zoom in on the overlaid pipeline nodes, abnormal outlets, or drug migration paths, perform attribute queries, compare historical trends, or play drug diffusion simulation animations to achieve multi-dimensional interactive presentation.

[0075] Specifically, when responding to user interaction commands to perform content operations, the system includes: recognizing the user's finger pointing at a virtual pipeline node, triggering the node's detailed attribute panel to display the pipe diameter, material, current flow rate, and illegal drug detection records within the most recent predetermined period; receiving user voice commands and overlaying the overflow risk and drug diffusion prediction layers of the pipeline segment under different rainfall intensities in the current field of view; supporting two-finger zoom operation to switch the pipeline topology of the selected area, displaying a refined connection relationship from the main pipe to the branch pipe and then to the service pipe; and allowing the user to select a comparison command, which specifically involves overlaying and displaying a map of the difference in drug load changes between the current monitoring period and the previous predetermined monitoring period on the same pipeline path.

[0076] Understandably, augmented reality devices use cameras and microphones to collect users' hand gestures and voice commands in real time. Gesture recognition and voice recognition algorithms are then used to analyze the interaction intent, mapping recognized pointing, zooming, switching, and voice commands into corresponding content operation instructions. Upon triggering an instruction, the system dynamically calls upon associated structured monitoring information and simulation resources for overlaid network nodes, abnormal outlets, and migration paths. This allows for magnification of local areas, attribute display, or layer overlay, and the simulation of drug diffusion processes under different operating conditions through animation. Simultaneously, by supporting comparison commands, load changes across different monitoring cycles are presented as difference maps, transforming wastewater monitoring information from a static display into an interactive and comparable three-dimensional representation. This enhances the interpretability and application depth of analysis results and source tracing solutions.

[0077] For example, when an inspector spots an unusual red pipe segment in the AR view, they can point to the manhole node where the segment is located. The system recognizes the action and displays a detailed attribute panel showing that the pipe segment has a diameter of 800mm, is made of reinforced concrete, and lists the three most recent drug detection concentration records. The inspector can then issue a voice command to request to view the diffusion simulation. The system overlays a semi-transparent animation on the current pipe network layer, demonstrating the overflow path of the sewage in that segment and the predicted range of downstream drug diffusion under simulated heavy rain conditions. When the inspector uses a two-finger zoom gesture to operate on a specific area, the system switches the pipe network display level from the city's main pipes to a fine-grained household pipe topology, helping the inspector pinpoint the specific sewage discharge unit. Furthermore, after the inspector selects the comparison command, the system displays the load difference between this week and last week in the form of a heat map above the pipeline, visually showing the increase or decrease trend of illegal discharge activities through color changes, thereby improving the awareness of sewage monitoring clues and the interactive experience.

[0078] In the above embodiments, by collecting and structuring multi-source pipeline monitoring data, a wastewater monitoring knowledge model is constructed that covers the multi-dimensional correlations of pipeline topology, hydraulic parameters, drug properties, and emission source characteristics. This invention can systematically integrate geographic information, environmental chemistry, and fluid mechanics knowledge to achieve standardized expression and intelligent analysis of wastewater monitoring information, thereby improving the scientific and logical nature of drug identification and source tracing, reducing the reliance on manual offline detection in the screening process, and enhancing the spatiotemporal analysis capability of monitoring results. Based on this, by inputting real-time collected water quality characteristic information into the knowledge model for matching analysis, this invention can output information on the types of illegal drugs and suspected emission sources based on the real-time status of different pipeline nodes, effectively improving the accuracy of clue locking and investigation efficiency, and providing data support for environmental law enforcement. Furthermore, this invention introduces augmented reality technology, projecting the underground pipeline layout, wastewater flow direction, and drug concentration distribution onto the surface of real-world images or digital twin models in a three-dimensional spatial overlay, transforming the originally abstract monitoring data into intuitive and three-dimensional visualization content, truly reflecting the dynamic migration characteristics of illegal drugs in urban pipelines, thereby significantly improving the interpretability and intuitiveness of the analysis conclusions. Furthermore, by capturing the user's perspective and geographical location in real time and dynamically adjusting the spatial coordinates of the virtual content, this invention ensures that the augmented reality display content remains highly aligned with the user's current viewing angle and actual geographical location, avoiding display deviations caused by perspective movement and improving the accuracy and immersiveness of the monitoring information display. Finally, by responding to user gestures or voice commands, the invention enables interactive operations such as zooming in, querying, and simulating diffusion of pipeline nodes and tracing paths. This multi-dimensional human-computer interaction not only enhances the user's understanding of monitoring data and evolution processes but also improves the ability to analyze complex sewage discharge behaviors, significantly improving the overall application experience of wastewater monitoring and illegal drug screening.

[0079] In another preferred embodiment based on the above embodiments, such as Figure 3 As shown, this embodiment provides a wastewater sample illegal drug screening system based on machine learning, including: a data integration unit, a feature acquisition unit, an intelligent recognition unit, a visualization rendering unit, and an interactive control unit.

[0080] Specifically, the data integration unit is configured to collect GIS data of the pipeline network, drug fingerprint data, and historical monitoring data, and perform structured processing to construct a wastewater monitoring knowledge model; the feature acquisition unit is communicatively connected to the data integration unit, and is configured to acquire real-time water quality parameters, mass spectrometry features, and flow data through an automated sampling and online analysis module, and fuse them to generate a real-time feature vector; the intelligent identification unit is connected to the feature acquisition unit and the data integration unit, and is configured to match the real-time feature vector with the wastewater monitoring knowledge model, execute a source tracing algorithm, and output the drug type, load distribution, and emission source location; the visualization rendering unit is electrically connected to the intelligent identification unit, and is configured to call the regional 3D model, generate a drug concentration cloud map and source tracing path based on the identification results, and spatially align and overlay the virtual content with the real geographical environment based on an AR device; the interactive control unit is integrated into the AR device, and is configured to recognize user gestures, voice, or location changes, and adjust the display level of the virtual pipeline network, the attribute panel display, or play the evolution simulation accordingly.

[0081] To enable those skilled in the art to fully understand and implement this invention, the following explanation further elaborates on the operating principle and technical implementation path of this invention in conjunction with a specific application scenario.

[0082] After the monitoring system is started, the feature acquisition unit operates first, and automated sampling terminals deployed at key nodes acquire wastewater samples. An online pretreatment module filters the samples. An integrated mass spectrometry sensor performs ion fragmentation scanning on the enriched samples, acquiring the mass-to-charge ratio characteristics and retention time data of the target compounds, and calculating preliminary concentration values ​​based on peak area. Simultaneously, an ultrasonic flow meter collects real-time data on the liquid level and flow rate within the pipe, and a multi-parameter water quality probe measures the wastewater's temperature, pH, and conductivity. This data is then fused via an edge computing gateway to generate a 128-dimensional real-time feature vector, which is transmitted to the intelligent identification unit via the MQTT protocol.

[0083] After receiving the real-time feature vector, the intelligent identification unit traverses the abnormal pattern nodes in the wastewater monitoring knowledge model constructed by the data integration unit, calculating their matching scores in three dimensions: mass spectrometry features, hydraulic parameters, and environmental indicators. The weights for mass spectrometry features are set to 0.5, hydraulic parameters to 0.3, and environmental indicators to 0.2. If the comprehensive matching score S for a certain drug type (such as "methamphetamine") is... score If the value exceeds 0.9, the drug is detected. Subsequently, the system activates the source tracing algorithm, performing back-calculation based on the directed acyclic graph model of the pipeline network, and substituting the drug degradation kinetics equation:

[0084] Among them, C source For the extrapolated emission source concentration, C monitor Let be the concentration at the monitoring point, k be the degradation rate constant, L be the transport distance, and v be the real-time flow velocity. The system calculates the emission contribution weight W for each upstream branch. i :

[0085] Among them, Q i Let W be the branch flow. i If the emission level is significantly higher than other branches, it will be marked as a suspected emission source, and a source tracing analysis report containing latitude and longitude coordinates will be generated.

[0086] After receiving the recognition results, the visualization rendering unit loads a 3D digital twin model of the region, which includes the hierarchical topology and spatial mask of the underground pipelines. Based on the detected drug concentration load, the system renders fluid effects within the virtual pipeline network, using red saturation to represent concentration levels, and generates yellow warning signs at suspected emission source locations, with emission frequency statistics displayed within the signs. The AR device obtains the current geographic coordinates of the inspection personnel through its built-in GNSS differential positioning module, and uses a visual SLAM algorithm to lock onto the feature points of manhole covers on the road surface, calculating the pose transformation matrix of the human body and the underground pipeline network. This allows for the precise overlay of the virtual pipeline network, concentration cloud map, and source tracing path onto the real road surface image.

[0087] The interactive control unit operates continuously. When an inspector's finger points to a specific inspection well node, the LeapMotion module detects the fingertip's pose and triggers the attribute panel, displaying the node's real-time flow rate and drug detection records for the past week. When the inspector issues the voice command "Simulate diffusion," the system executes a particle system simulation in the Unity3D engine, demonstrating the dynamic envelope of drug diffusion downstream at the current flow rate. As the inspector moves, the system updates the head yaw angle in real time via IMU sensors and recalculates the projected coordinates to ensure the virtual pipeline network remains stably aligned with the actual geographical location. All source tracing analysis data and AR rendering commands are streamed synchronously between the cloud server and edge terminals, ensuring the real-time nature and accuracy of the monitoring information.

[0088] It is understood that the machine learning-based illegal drug screening method and system for wastewater samples in the above embodiments of the present invention have the same beneficial effects, and will not be described in detail here.

[0089] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program goods. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program goods embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0090] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program goods according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0091] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0092] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A machine learning-based method for screening illicit drugs in wastewater samples, characterized in that, include: Collect monitoring data from multi-source pipe networks, reconstruct the pipe network topology using graph theory algorithms, and combine it with drug degradation kinetic equations to construct a wastewater monitoring knowledge model that includes multidimensional correlations between pipe network topology, hydraulic parameters, drug physicochemical properties, and emission source characteristics. The real-time water quality characteristics of the area to be monitored are obtained and input into the wastewater monitoring knowledge model for matching analysis. The results of illegal drug identification, concentration load distribution and suspected emission source location information are output. Based on the identification results, concentration load distribution and location information, the augmented reality engine is invoked to project the underground pipe network layout, sewage flow direction, drug concentration cloud map and source tracing path onto the surface of the ground scene or regional digital twin model in a three-dimensional spatial overlay manner. Augmented reality devices are used to capture the user's perspective and position in real time. Local spatial anchor points are established through visual SLAM algorithms, and the coordinates of virtual content are dynamically adjusted to ensure that the projected content is aligned with the user's viewing angle and actual geographical location with high precision. In response to user interaction commands, the system can zoom in on the overlaid pipeline nodes, abnormal outlets, or drug migration paths, perform attribute queries, compare historical trends, or play drug diffusion simulation animations.

2. The method for screening illegal drugs in wastewater samples based on machine learning as described in claim 1, characterized in that, The collection of multi-source pipeline network monitoring data includes: Extract drainage network vector data of the target area from the geographic information system. The drainage network vector data includes pipeline direction, pipe diameter parameters, burial depth values, manhole cover coordinates, and pump station distribution locations. Obtain molecular structure, degradation rate constant k, adsorption coefficient, and speciation data of illicit drugs and their metabolites from chemical analysis databases; Sample data is extracted from historical monitoring records, including drug concentration detection values, synchronous flow monitoring values, conductivity, and total organic carbon content at different time points; The drainage network vector data, illegal drug and metabolite data, and sample data are standardized and encoded, and uniformly mapped to the preset underground space perception ontology system to form a structured original monitoring dataset.

3. The method for screening illegal drugs in wastewater samples based on machine learning as described in claim 2, characterized in that, The construction of the wastewater monitoring knowledge model, which includes multidimensional correlations among pipe network topology, hydraulic dynamic parameters, chemical properties of chemicals, and emission source characteristics, includes: The topology of the drainage network vector data is reconstructed based on graph theory algorithms to generate a directed acyclic graph model with pipe segments as edges and inspection wells as nodes, and hydraulic gradient and roughness attributes are configured for each edge. A drug degradation kinetic equation was established based on numerical simulation technology to calculate the degradation residue rate of illicit drugs under specific flow rate and temperature conditions, and a drug attenuation characteristic matrix was formed. By combining flow and concentration data from historical monitoring records, an emission load projection model is trained, and a nonlinear mapping rule between concentration fluctuations at monitoring points and upstream emission intensity is established. The wastewater monitoring knowledge model is constructed by integrating the directed acyclic graph model, the drug attenuation feature matrix, and the emission load extrapolation model.

4. The method for screening illegal drugs in wastewater samples based on machine learning as described in claim 1, characterized in that, The acquisition of real-time water quality characteristic information of the area to be monitored includes: Real-time water samples are obtained by deploying automated sampling terminals at key nodes of the pipeline network, and then filtered and enriched. An integrated mass spectrometry sensor was used to perform ion fragment scanning on the enriched water sample to extract the mass-to-charge ratio, retention time, and peak area characteristics of the target compound. Real-time flow rate, liquid level, pH, oxidation-reduction potential, and temperature were collected using an ultrasonic flow meter and a multi-parameter water quality probe. Based on the edge computing gateway, feature fusion is performed on mass spectrometry features, hydraulic parameters and sensory indicators to generate real-time feature vectors for the area to be monitored.

5. The method for screening illicit drugs in wastewater samples based on machine learning as described in claim 4, characterized in that, The matching analysis includes: Retrieve abnormal pattern nodes that match the real-time feature vector in the wastewater monitoring knowledge model; If the rate of change of drug concentration in the real-time feature vector exceeds a preset threshold, a reverse tracking operation is performed according to the directed acyclic graph model, and the inferred emission source concentration C is obtained according to Formula 1. source Official 1 Among them, C monitor Where k is the concentration at the monitoring point, L is the degradation rate constant, L is the transport distance, and v is the real-time flow rate. The contribution weights Wi of the real-time feature vector on different pipeline branches are obtained, and the original emission intensity of each node is corrected by combining the drug attenuation feature matrix to identify suspected emission outlets.

6. The method for screening illicit drugs in wastewater samples based on machine learning as described in claim 1, characterized in that, The invocation of the augmented reality engine for spatial overlay display includes: A high-precision 3D map of the loading area serves as the underlying reference. The 3D map includes a layered mask structure of building outlines, road centerlines, and underground pipe networks. Based on the concentration load distribution information, dynamic fluid effects are generated within the three-dimensional pipeline model, with different color saturations representing the real-time concentration levels of illicit drugs. A virtual warning sign is marked at the location of a suspected emission source. The virtual warning sign is configured with geographical coordinates, emission frequency statistics, related drug types, and risk level descriptions.

7. The method for screening illicit drugs in wastewater samples based on machine learning as described in claim 6, characterized in that, The dynamic adjustment of the spatial coordinates of the virtual content includes: The user's absolute geographic coordinates and head yaw angle are obtained based on the GPS and inertial navigation unit built into the augmented reality device. Visual SLAM algorithm is used to identify road feature points or manhole cover markers, establish local spatial anchor points, and spatially register the three-dimensional model of underground pipeline network with the real road environment; The relative projection positions of the virtual network and the real scene are recalculated in real time based on the user's posture change matrix, and the perspective coordinates of the virtual elements are updated. When the user focuses their gaze on a specific pipeline node, a local perspective mode is triggered, displaying real-time sensor readings and historical concentration curves inside that node.

8. The method for screening illicit drugs in wastewater samples based on machine learning as described in claim 1, characterized in that, The response to user interaction commands includes: The system recognizes a user's gesture pointing to a virtual pipeline node, triggering the node's property panel to display the pipe diameter, material, current flow rate, and illegal drug detection records within a predetermined period. Upon receiving user voice commands, the overflow risk and drug diffusion prediction layers for the pipe section under different rainfall intensities are overlaid and displayed in the current field of view. Responding to the two-finger zoom operation, the network topology of the selected area can be switched hierarchically, displaying a fine-grained connection relationship from the main pipe to the branch pipe and then to the service pipe.

9. The method for screening illicit drugs in wastewater samples based on machine learning as described in claim 1, characterized in that, The augmented reality device is an industrial-grade AR headset or mobile handheld terminal that supports high-precision GNSS differential positioning; the wastewater monitoring knowledge model is stored on a cloud server and supports real-time streaming data updates.

10. A machine learning-based wastewater sample illegal drug screening system, employing the machine learning-based wastewater sample illegal drug screening method as described in any one of claims 1-9, characterized in that, include: The data integration unit is configured to collect pipeline GIS data, drug fingerprint data, and historical monitoring data, and perform structured processing to build a wastewater monitoring knowledge model. The feature acquisition unit is communicatively connected to the data integration unit. The feature acquisition unit is configured to acquire real-time water quality parameters, mass spectrometry features, and flow data through an automated sampling and online analysis module, and fuse them to generate a real-time feature vector. The intelligent identification unit is connected to the feature acquisition unit and the data integration unit. The intelligent identification unit is configured to match the real-time feature vector with the wastewater monitoring knowledge model, execute the source tracing algorithm, and output the drug type, load distribution, and emission source location. A visualization rendering unit is electrically connected to the intelligent recognition unit. The visualization rendering unit is configured to call up a regional three-dimensional model, generate a drug concentration cloud map and a traceability path based on the recognition results, and spatially align and overlay the virtual content with the real geographical environment based on an augmented reality device. An interactive control unit, integrated into the augmented reality device, is configured to recognize user gestures, voice, or positional changes, and adjust the display level, attribute panel display, or playback of evolution simulation of the virtual network accordingly.