Water supply network water quality abnormity tracing method and system based on data fusion

By aligning and weighting the water quality parameter data of distributed monitoring points in the water supply network, combining the hydraulic residence time, and constructing a fusion feature vector and node connection matrix, the problem of data deviation in tracing water quality anomalies in the water supply network is solved, and efficient pollution source positioning and water quality early warning are achieved.

CN120741805AActive Publication Date: 2025-10-03XIANGYUAN WATER TECH CO LTD

Patent Information

Application Number
CN202511192574.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-10-03
Estimated Expiration
2045-08-25

AI Technical Summary

Technical Problem

Existing technologies fail to effectively utilize the time differences and parameter accuracy differences in distributed monitoring point data in tracing water quality anomalies in water supply networks, resulting in deviations between data fusion results and the actual water quality conditions in the network, making it difficult to accurately track the anomaly propagation path and locate the pollution source.

Method used

By aligning the water quality parameter data of distributed monitoring points in the water supply network at all times, combining the parameter measurement accuracy and the hydraulic residence time correction weight coefficient, a fusion feature vector and a node connection relationship matrix are constructed to trace the anomalies and generate water quality warning signals.

Benefits of technology

It has achieved the accuracy of tracing the source of abnormal water quality in the water supply network and the timeliness of early warning response, and improved the accuracy of pollution source positioning and water quality safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120741805A_ABST
    Figure CN120741805A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of water quality detection, and discloses a water supply network water quality abnormity tracing method and system based on data fusion, and the method comprises the steps: carrying out the time alignment of water quality parameter data of distributed monitoring points in a water supply network, and obtaining a standardized water quality parameter sequence; according to the measurement precision of the parameters in the standardized water quality parameter sequence, distributing the weight coefficient of the parameters, and according to the hydraulic retention time in the water supply network, correcting the weight coefficient to obtain a correction coefficient of the water quality parameter data; performing weighted fusion on the standardized water quality parameter sequence based on the correction coefficient to obtain a fusion feature vector; constructing a node connection relation matrix according to the topological structure data of the fusion feature vector; performing anomaly tracing on the fusion feature vector according to the node connection relation matrix to obtain an anomaly result; a pollution source in the water supply network is positioned according to the abnormal result, and a water quality early warning signal is generated; the accuracy of water quality abnormity tracing can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of water quality detection, and in particular to a method and system for tracing abnormal water quality in a water supply network based on data fusion. Background Art

[0002] When it comes to tracing the source of water quality anomalies in water supply networks, existing technologies lack accurate processing of water quality parameter data collected from distributed monitoring points. These technologies often overlook temporal differences between data from different monitoring points, resulting in a lack of a unified time base for the data and impacting the accuracy of subsequent analysis. Furthermore, the weighting of various water quality parameters is relatively simplistic, failing to fully account for variations in parameter measurement accuracy and the impact of hydraulic retention time in the water supply network on parameter validity. This results in a discrepancy between the data fusion results and the actual water quality conditions in the network, making it difficult to accurately reflect anomaly characteristics.

[0003] Existing technologies fail to fully utilize topological structures when constructing network node relationships, failing to effectively correlate fused feature vectors with the actual network connectivity. This makes it difficult to accurately track the propagation path of anomalies during anomaly tracing. Furthermore, when locating the initial anomaly triggering node, there is a lack of effective reference to historical normal operating conditions, and analysis of anomaly deviations is incomplete, resulting in low accuracy in locating pollution sources. The generation of early warning signals also struggles to meet the requirements for rapid response and precise disposal in practical applications. Summary of the Invention

[0004] The present invention provides a method and system for tracing the source of water quality anomalies in a water supply network based on data fusion, so as to solve the problems raised in the above-mentioned background technology.

[0005] To achieve the above objectives, the present invention provides a method for tracing the source of water quality anomalies in a water supply network based on data fusion, comprising: S1. Time-aligning water quality parameter data of distributed monitoring points in a water supply network to obtain a standardized water quality parameter sequence of the water supply network; S2. Allocating weight coefficients of the parameters in the standardized water quality parameter sequence according to the measurement accuracy of the parameters, and correcting the weight coefficients according to the hydraulic retention time in the water supply network to obtain correction coefficients for the water quality parameter data; S3. Performing weighted fusion on the standardized water quality parameter sequence based on the correction coefficient to obtain a fusion feature vector of the water supply network; S4. Constructing a node connection relationship matrix of the water supply network according to the topological structure data of the fused feature vector; S5. Tracing the abnormality of the fused feature vector according to the node connection relationship matrix to obtain abnormal results of the water supply network; S6. Locate the pollution source in the water supply network according to the abnormal result and generate a water quality warning signal.

[0006] In a preferred embodiment, the time-aligning of water quality parameter data of distributed monitoring points in the water supply network to obtain a standardized water quality parameter sequence of the water supply network includes: Receive water quality parameter data packets uploaded by each distributed monitoring point and extract the timestamp information in the data packets; Calculate the offset between the timestamp information and the standard time reference to generate a time calibration parameter; Re-arrange the timing of the water quality parameter data packets according to the time calibration parameters to eliminate transmission delay differences; The water quality parameter data after time sequence rearrangement are spatially associated according to the locations of the pipe network nodes to generate the standardized water quality parameter sequence.

[0007] In a preferred embodiment, the calculation formula of the weight coefficient is as follows: ; Where, is the weight coefficient, is the difference between the measurement accuracy value of the parameter in the standardized water quality parameter sequence and the accuracy reference benchmark, It is the reference value of parameter accuracy in the standardized water quality parameter sequence.

[0008] In a preferred embodiment, the weight coefficient is corrected according to the hydraulic retention time in the water supply network to obtain the correction coefficient of the water quality parameter data, including: Acquire the topological structure data of the water supply network and extract the hydraulic residence time parameters corresponding to the distributed monitoring points; Converting the hydraulic retention time parameter into a time-dependent attenuation factor; The weight coefficient is dynamically compensated and adjusted based on the time-effectiveness attenuation factor to generate the correction coefficient.

[0009] In a preferred embodiment, the weighted fusion of the standardized water quality parameter sequence based on the correction coefficient to obtain the fusion feature vector of the water supply network includes: Splitting the standardized water quality parameter sequence into multidimensional data vector groups according to parameter type; The correction coefficient is used to construct a diagonal weight matrix, and feature fusion is performed on the multidimensional data vector group based on the diagonal weight matrix, wherein the calculation formula of the feature fusion is as follows: ; Where, is the result of the feature fusion, is the total number of types of the parameters, is the type ordinal of the parameter, For the The diagonal matrix of the correction coefficients corresponding to the class parameters, is the first Standardized data for class parameters; The result is subjected to feature dimension compression to obtain a fused feature vector of the water supply network.

[0010] In a preferred embodiment, the step of constructing a node connection relationship matrix of the water supply network based on the topological structure data of the fused feature vectors includes: Extracting topological connection feature parameters of the pipeline network node identifiers in the fused feature vector; Establishing a directed connection rule based on the fluid transmission direction of the nodes in the water supply network, and converting the topological connection characteristic parameters into connection strength values ​​based on the directed connection rule; A two-dimensional relationship grid is constructed according to a preset node sorting, the connection strength value is mapped to the corresponding grid position of the two-dimensional relationship grid, and the grid positions between nodes that are not directly connected in the two-dimensional relationship grid are filled with zero-value parameters to obtain the node connection relationship matrix of the water supply network.

[0011] In a preferred embodiment, the abnormality tracing of the fused feature vector according to the node connection relationship matrix to obtain the abnormality result of the water supply network includes: Mapping the fused feature vector to the corresponding node position of the node connection relationship matrix to obtain a node abnormality feature distribution map of the water supply network; Traversing the node connection relationship matrix along the reverse path of the water flow of the water supply network to obtain an abnormal feature propagation chain of the water supply network; Locating the initial abnormality excitation node of the water supply network based on the gradient change of the abnormality characteristics of the nodes in the abnormality characteristic propagation chain; An abnormal result of the water supply network is generated according to the characteristic correlation strength between the initial abnormal excitation node and the downstream monitoring point in the water supply network.

[0012] In a preferred embodiment, the locating the initial abnormality excitation node of the water supply network based on the gradient change of the abnormality characteristics of the nodes in the abnormality characteristic propagation chain includes: Obtain the characteristic distribution benchmark pattern under historical normal operating conditions; generating an abnormal deviation heat map of the water supply network based on a difference between the abnormal characteristic distribution map and the characteristic distribution reference pattern; Identifying a maximum deviation region in the abnormal deviation heat map, and associating the maximum deviation region with an upstream node set in the node connection relationship matrix; The connection continuity of the upstream node set is verified according to the reverse path of the water flow in the water supply network to obtain the initial abnormal excitation node of the water supply network.

[0013] In a preferred embodiment, locating the pollution source in the water supply network according to the abnormal result and generating a water quality warning signal includes: Extract the spatial coordinates of the initial abnormal excitation node in the abnormal result; Tracing the pollution propagation path based on the node connection relationship matrix to determine candidate areas of the pollution source in the water supply network; Based on the historical pollution event feature library and the spatial coordinates, the risk level of the candidate area is marked to obtain the pollution source positioning instruction of the water supply network; According to the result of the risk level identification, a preset early warning response strategy is matched to activate the multi-level water quality early warning signal of the water supply network.

[0014] In order to solve the above problems, the present invention also provides a water quality anomaly tracing system for a water supply network based on data fusion, the system comprising: A water quality data extraction module is used to align the water quality parameter data of distributed monitoring points in the water supply network at all times to obtain a standardized water quality parameter sequence of the water supply network; a weight coefficient correction module, configured to assign weight coefficients to the parameters according to the measurement accuracy of the parameters in the standardized water quality parameter sequence, and to correct the weight coefficients according to the hydraulic retention time in the water supply network to obtain correction coefficients for the water quality parameter data; a feature fusion module, configured to perform weighted fusion on the standardized water quality parameter sequence based on the correction coefficient to obtain a fused feature vector of the water supply network; A topology connection module, configured to construct a node connection relationship matrix of the water supply network based on the topology data of the fused feature vector; An abnormality tracing module is used to perform abnormality tracing on the fused feature vector according to the node connection relationship matrix to obtain abnormal results of the water supply network; The pollution warning module is used to locate the pollution source in the water supply network according to the abnormal result and generate a water quality warning signal.

[0015] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention achieves precise weighted fusion of standardized water quality parameter sequences by aligning the water quality parameter data of distributed monitoring points in the water supply network, allocating weight coefficients based on the parameter measurement accuracy, and correcting the weight coefficients based on the hydraulic residence time. This effectively improves the ability of the fused feature vector to characterize the water quality status of the network, provides a high-quality data foundation for subsequent anomaly tracing, and thus improves the accuracy of water quality anomaly tracing.

[0016] 2. The present invention constructs a node connection relationship matrix by fusing the topological structure data of the characteristic vector, and uses this matrix to trace the abnormality of the fused characteristic vector. It can accurately locate the initial abnormal excitation node, clearly trace the pollution propagation path, and then accurately identify the pollution source in the water supply network and generate a water quality warning signal, which significantly enhances the accuracy of pollution source positioning and the timeliness of warning response, and provides strong support for water quality safety assurance of the water supply network. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flow chart of a method for tracing the source of abnormal water quality in a water supply network based on data fusion provided in one embodiment of the present invention; Figure 2 This is a functional module diagram of a water quality anomaly tracing system for a water supply network based on data fusion provided by one embodiment of the present invention; The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0018] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0019] The embodiment of the present application provides a method for tracing the source of abnormal water quality in a water supply network based on data fusion. The execution subject of the method for tracing the source of abnormal water quality in a water supply network based on data fusion includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for tracing the source of abnormal water quality in a water supply network based on data fusion can be executed by software or hardware installed on a terminal device or a server device. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0020] Reference Figure 1FIG2 is a flow chart of a method for tracing the source of abnormal water quality in a water supply network based on data fusion according to an embodiment of the present invention. In this embodiment, the method for tracing the source of abnormal water quality in a water supply network based on data fusion includes: S1. Time-aligning water quality parameter data of distributed monitoring points in a water supply network to obtain a standardized water quality parameter sequence of the water supply network; In an embodiment of the present invention, the step of aligning the water quality parameter data of distributed monitoring points in the water supply network to obtain a standardized water quality parameter sequence of the water supply network includes: Receive water quality parameter data packets uploaded by each distributed monitoring point and extract the timestamp information in the data packets; Calculate the offset between the timestamp information and the standard time reference to generate a time calibration parameter; Re-arrange the timing of the water quality parameter data packets according to the time calibration parameters to eliminate transmission delay differences; The water quality parameter data after time sequence rearrangement are spatially associated according to the locations of the pipe network nodes to generate the standardized water quality parameter sequence.

[0021] Specifically, when receiving the water quality parameter data packets uploaded by each distributed monitoring point, the source identification of each data packet is first determined through the source code contained in the data packet transmission protocol. The identification is composed of the monitoring point number and the unique serial number of the equipment to ensure a unique mapping with the corresponding distributed monitoring point. Then, the data packets are opened one by one using the parsing tool of the data receiving terminal. The parsing tool will automatically scan the metadata area of ​​the data packet. If no time record is found in the metadata, the information column labeled "acquisition time" in the data field will continue to be retrieved, and the time record accurate to milliseconds will be extracted as timestamp information. After the extraction is completed, the timestamp information and the source identification are bound and stored through the associated fields of the database. The storage is in a table format, with each row corresponding to a record, including the source identification, timestamp information and the data packet storage path, to ensure that each timestamp can be traced back to the monitoring point that uploaded the data through the source identification.

[0022] Furthermore, each extracted timestamp information is compared with the standard time reference. The standard time reference directly calls the UTC time signal output by the global positioning system receiver. The signal is updated once per second and is accurate to the nanosecond level. The current moment of the standard time is obtained in real time through the time reading module, and the timestamp information to be compared is called out at the same time. The two are converted into the same time format, that is, year-month-day-hour-minute-second-millisecond. Then, the current moment of the standard time is used as the reference, and the current moment of the standard time is subtracted from the moment corresponding to the timestamp information. The result is the offset. If the moment corresponding to the timestamp information is earlier than the current moment of the standard time, the offset is negative, otherwise it is positive. Time calibration parameters are generated based on the specific value of the offset and the corresponding monitoring point identifier. The time calibration parameters are saved in the form of a text file. Each parameter contains the monitoring point source identifier, offset value and parameter generation time, so that it can be accurately called in subsequent steps.

[0023] Furthermore, according to the generated time calibration parameters, the corresponding water quality parameter data packets are matched through the monitoring point source identifier in the parameters. For each successfully matched data packet, the time field storing the data record in the data packet is opened, and each record in the time field is adjusted according to the offset in the time calibration parameter corresponding to the data packet. If the offset is positive, the corresponding duration is added to the original time. If the offset is negative, the corresponding duration is reduced based on the original time. The adjusted time field is uniformly based on the UTC time provided by the global positioning system as the reference standard. After the adjustment is completed, all water quality parameter data packets are rearranged in ascending order according to the adjusted time field values, so as to eliminate the transmission delay differences caused by the length of the transmission path and the degree of network congestion at different monitoring points, so that all data are in a unified time dimension.

[0024] Furthermore, the water quality parameter data after time sequence re-arrangement are classified according to the specific locations of their corresponding distributed monitoring points in the pipe network. Each pipe network node position has a preset geographic coordinate range. By comparing the installation coordinates of the monitoring point with the node coordinate range, the data is assigned to the corresponding node classification to ensure that the data set under each pipe network node position comes from the monitoring point within the position range. Then the pipe network topology structure diagram is called, which clearly marks the connecting pipes, distances and water flow directions between each node. According to the information in the diagram, the water quality parameter data of adjacent node positions are associated, for example, the upstream node and the downstream node are associated through the connecting pipe. At the same time, the water flow transmission time between the nodes is recorded during the association process, and the spatial transmission relationship between different node data is clarified. Finally, all the associated node data are integrated into a structured table. The table is indexed by the unique code of the pipe network node position. Each index contains the water quality parameter records of the node at different time points, forming a complete standardized water quality parameter sequence.

[0025] In general, in the complex operating environment of the water supply network, distributed monitoring points will collect a large amount of water quality parameter data. However, due to differences in the operating conditions, transmission paths and clock accuracy of the equipment at each monitoring point, these data often have inconsistent timestamps in the initial state. For example, some old equipment may have an aging clock module, which may cause the collection time to shift, so that the data obtained by different monitoring points at the same "nominal time" does not actually correspond to the water quality status at the same time in the network. Although some newly put into use equipment has a high-precision clock, it may also be affected by network fluctuations during data transmission, and data may arrive late, resulting in time misalignment of the data.

[0026] In general, time alignment of these water quality parameter data is of vital importance. On the one hand, it ensures that the data from each monitoring point is on the same time scale, providing a reliable time series foundation for subsequent data analysis. For example, when studying the changing trends of water quality parameters over time, accurate time alignment can avoid deviations in trend analysis caused by time misalignment, allowing the analysis results to more accurately reflect the actual changes in water quality in the pipe network. On the other hand, time alignment facilitates the coordinated analysis of multiple parameters. Complex interrelationships exist between different water quality parameters in the water supply network. For example, changes in pH value can affect the solubility of certain heavy metal ions.

[0027] In general, through time alignment, the data of these different parameters can be accurately matched in time, which facilitates in-depth exploration of the intrinsic correlation between parameters, provides more accurate data support for key applications such as tracing the source of water quality anomalies and warning of water quality mutations, and greatly improves the scientificity and effectiveness of water quality monitoring and management of water supply networks.

[0028] S2. Allocating weight coefficients of the parameters in the standardized water quality parameter sequence according to the measurement accuracy of the parameters, and correcting the weight coefficients according to the hydraulic retention time in the water supply network to obtain correction coefficients for the water quality parameter data; In the embodiment of the present invention, the calculation formula of the weight coefficient is as follows: ; Where, is the weight coefficient, is the difference between the measurement accuracy value of the parameter in the standardized water quality parameter sequence and the accuracy reference benchmark, It is the reference value of parameter accuracy in the standardized water quality parameter sequence.

[0029] The weight coefficient is corrected according to the hydraulic retention time in the water supply network to obtain the correction coefficient of the water quality parameter data, including: Acquire the topological structure data of the water supply network and extract the hydraulic residence time parameters corresponding to the distributed monitoring points; Converting the hydraulic retention time parameter into a time-dependent attenuation factor; The weight coefficient is dynamically compensated and adjusted based on the time-effectiveness attenuation factor to generate the correction coefficient.

[0030] Specifically, the source of the weight coefficient in the formula is obtained by processing the standardized water quality parameter sequence, where the measurement accuracy value of the parameter in the standardized water quality parameter sequence is the actual measurement accuracy data of each parameter in the sequence, and the accuracy reference benchmark value is the standard reference value set for evaluating the measurement accuracy. The difference between the two and the accuracy reference benchmark value are jointly used as the basic data for calculating the weight coefficient.

[0031] Furthermore, the significance of this formula is to calculate the weight coefficient, which determines the importance of the parameter in the relevant analysis or calculation by considering the difference between the measurement accuracy value of the parameter in the standardized water quality parameter sequence and the accuracy reference benchmark value. The smaller the difference, the larger the weight coefficient, indicating that the measurement accuracy of the parameter is closer to the reference benchmark, and the higher the proportion in subsequent processing.

[0032] Furthermore, from the trend of the formula, when the absolute value of the difference between the measurement accuracy value of the parameter in the standardized water quality parameter sequence and the accuracy reference benchmark value increases, the denominator will increase accordingly, and the value of the entire fraction, that is, the weight coefficient, will decrease; when the absolute value of the difference decreases, the denominator will decrease accordingly, and the weight coefficient will increase, that is, the weight coefficient and the absolute value of the difference between the parameter measurement accuracy value and the accuracy reference benchmark value show an inverse trend.

[0033] Specifically, when obtaining the topological structure data of the water supply network, first retrieve a vector graphics file containing the pipeline direction, pipe diameter, node position, valve distribution and connection relationship through the pipeline network management system. The file is stored in CAD format, where each node position is marked with the corresponding distributed monitoring point number. Then use a graphic parsing tool to open the file. The parsing tool will automatically identify the node coordinates, pipeline length, water flow direction and other information in the file to form a structured topological structure data table. Then, filter out the node records that match the distributed monitoring point number in the data table. According to the position of these nodes in the topological structure and combined with the pipeline flow rate data, calculate the time required for the water to flow from the node to the next associated node. This time is the hydraulic retention time parameter corresponding to the distributed monitoring point. After the calculation is completed, the hydraulic retention time parameter is bound to the monitoring point number and stored in a dedicated data table.

[0034] Furthermore, when converting the hydraulic residence time parameter into a time-effectiveness attenuation factor, the time-effectiveness attenuation benchmark value is first determined, which is the standard hydraulic residence time specified in the water supply network design specification. The hydraulic residence time parameter corresponding to each distributed monitoring point is then taken out and compared with the time-effectiveness attenuation benchmark value. If the hydraulic residence time parameter is greater than the time-effectiveness attenuation benchmark value, it indicates that the water flow stays at the node for too long and the time-effectiveness of the water quality is significantly reduced. At this time, a value less than 1 is generated as the time-effectiveness attenuation factor according to the proportion of the residence time excess. The greater the excess proportion, the smaller the value. If the hydraulic residence time parameter is less than or equal to the time-effectiveness attenuation benchmark value, it indicates that the water flow residence time is within a reasonable range and the time-effectiveness of the water quality is not significantly affected. At this time, the time-effectiveness attenuation factor is directly set to 1. After the conversion is completed, each hydraulic residence time parameter corresponds to a unique time-effectiveness attenuation factor.

[0035] Furthermore, when the weight coefficient is dynamically compensated and adjusted based on the timeliness attenuation factor, the weight coefficient to be processed is first called out from the data storage module. The weight coefficient is a value corresponding to each distributed monitoring point obtained through previous calculations. Then, the timeliness attenuation factor belonging to the same monitoring point as the weight coefficient is found, and the weight coefficient is multiplied by the timeliness attenuation factor. The result is the value after compensation adjustment. If the timeliness attenuation factor is less than 1, the weight coefficient will decrease accordingly after multiplication, indicating that the water quality parameter of the monitoring point has decreased due to timeliness and its importance in the overall analysis has decreased; if the timeliness attenuation factor is equal to 1, the weight coefficient remains unchanged after multiplication, indicating that the water quality parameter of the monitoring point has good timeliness and its importance has not been affected. After all weight coefficients are adjusted, these compensated and adjusted values ​​together constitute the correction coefficient.

[0036] In general, from the perspective of parameter measurement accuracy, the accuracy of measurement equipment for different water quality parameters varies, resulting in varying data reliability. Using a weight coefficient calculation formula, we can assign higher initial weights to parameters with higher measurement accuracy (i.e., smaller differences from the accuracy reference). This allows the fusion process to prioritize reliable data, reducing the impact of low-precision data on the results and ultimately improving data fusion quality. Introducing hydraulic retention time as a correction further optimizes the weight coefficients.

[0037] In general, hydraulic retention time (HRT) directly impacts the timeliness of water quality parameters in water supply networks—the longer the retention time, the less effective the parameters may be in reflecting current water quality conditions. By converting HRT into a timeliness attenuation factor and dynamically compensating for the initial weight coefficients, the revised coefficients can better reflect the actual variations in water quality parameters within the network. For example, the weights of parameters corresponding to water bodies with extended retention times in the network are appropriately reduced to avoid distortion in the fusion results due to the excessive influence of outdated data.

[0038] In general, the final correction coefficient not only reflects the differences in measurement reliability of different parameters, but also takes into account the impact of the hydraulic characteristics of the pipeline network on the timeliness of the parameters. It provides an accurate and practical weight basis for the subsequent weighted fusion of standardized water quality parameter sequences, so that the fused characteristic vector can more realistically and comprehensively reflect the water quality status of the water supply network, laying a high-quality data foundation for subsequent anomaly tracing and pollution source location.

[0039] S3. Performing weighted fusion on the standardized water quality parameter sequence based on the correction coefficient to obtain a fusion feature vector of the water supply network; In an embodiment of the present invention, the weighted fusion of the standardized water quality parameter sequence based on the correction coefficient to obtain the fusion feature vector of the water supply network includes: Splitting the standardized water quality parameter sequence into multidimensional data vector groups according to parameter type; The correction coefficient is used to construct a diagonal weight matrix, and feature fusion is performed on the multidimensional data vector group based on the diagonal weight matrix, wherein the calculation formula of the feature fusion is as follows: ; Where, is the result of the feature fusion, is the total number of types of the parameters, is the type ordinal of the parameter, For the The diagonal matrix of the correction coefficients corresponding to the class parameters, is the first Standardized data for class parameters; The result is subjected to feature dimension compression to obtain a fused feature vector of the water supply network.

[0040] Specifically, when splitting the standardized water quality parameter sequence into a multidimensional data vector group according to parameter type, first clarify the parameter types contained in the standardized water quality parameter sequence, such as pH value, turbidity, residual chlorine content, etc., and each parameter type is used as an independent dimension. Then, all the data in the standardized water quality parameter sequence are traversed, and the data sets of the same parameter type are extracted according to the parameter type labels corresponding to the data. They are arranged in the time sequence of data collection to form a vector. For example, all pH value data form a pH value vector in time sequence, and all turbidity data form a turbidity vector in time sequence. And so on. Finally, a multidimensional data vector group composed of vectors of different parameter types is obtained. Each vector corresponds to a parameter type, and the data in the vector maintains the original time correlation.

[0041] Furthermore, when the correction coefficient is used to construct a diagonal weight matrix, and the multidimensional data vector group is subjected to feature fusion based on the diagonal weight matrix, the number of vectors contained in the multidimensional data vector group is first determined, which is the dimension of the diagonal weight matrix. The correction coefficients are then filled in the main diagonal of the matrix in the order of the vectors in the multidimensional data vector group, and positions outside the main diagonal of the matrix are filled with 0 to form a diagonal weight matrix. Then, each vector in the multidimensional data vector group is taken out, and each data in the vector is multiplied by the correction coefficient at the corresponding position in the diagonal weight matrix to obtain the weight-adjusted data of each vector. All weight-adjusted vectors are then superimposed at the corresponding time points, that is, data of different parameter types at the same time point are added to form a new vector. This new vector is the result of feature fusion.

[0042] Furthermore, when the result is subjected to feature dimension compression to obtain the fused feature vector of the water supply network, the vector length of the result after feature fusion is first analyzed, which is equal to the total number of data collection times. Then, the number of key feature points that need to be retained is determined. These key feature points include the maximum value point, minimum value point, starting point, end point, and point with the largest data change rate in the data sequence. The values ​​corresponding to these key feature points are accurately extracted from the fused result and arranged in chronological order to form a new vector. If the number of key feature points is less than the length of the original vector, the dimension compression is completed. This new vector composed of the key feature point values ​​is the fused feature vector of the water supply network.

[0043] Specifically, the parameter sources of the feature fusion results are clear and definite. The total number of parameter types is determined by the number of vectors contained in the multidimensional data vector group split from the standardized water quality parameter sequence. Each vector corresponds to a parameter type, and the specific number is obtained from this statistics. The parameter type ordinal number is a number assigned in sequence to distinguish different parameter types, starting from 1 and increasing in sequence, corresponding to the arrangement order of the vectors in the multidimensional data vector group. The diagonal matrix composed of the correction coefficients corresponding to the class parameters is derived from the correction coefficients generated after the dynamic compensation adjustment of the weight coefficients based on the time-effectiveness attenuation factor in the early stage, and is filled in the rank diagonal of the diagonal matrix according to the order of the parameter types in the multidimensional data vector group; The standardized data vector of the class parameter comes from the corresponding multidimensional data vector group obtained by splitting the standardized water quality parameter sequence according to the parameter type. A vector of class parameters, which consists of data of the same parameter type arranged in chronological order.

[0044] Furthermore, the significance of this formula is to realize the feature fusion of the multidimensional data vector group. By multiplying the standardized data vector of each type of parameter in the multidimensional data vector group with the diagonal matrix composed of the corresponding correction coefficient, the vector of each type of parameter after weight adjustment is obtained, and then all the weight-adjusted vectors are added together to form a new vector. This new vector is the result of feature fusion, which integrates the information of various parameters and reflects the differences in the importance of different parameters through correction coefficients, so that the fused result can better reflect the overall water quality characteristics of the water supply network.

[0045] Furthermore, from the trend of the formula, when the correction coefficient in the diagonal matrix composed of the correction coefficients corresponding to a certain type of parameter increases, the vector value obtained by multiplying the standardized data vector of this type of parameter with the diagonal matrix will increase accordingly. In the process of adding all vectors, the influence of this type of parameter on the feature fusion result will increase; conversely, when the correction coefficient corresponding to a certain type of parameter decreases, the vector value obtained after multiplying its standardized data vector will decrease, and the influence on the feature fusion result will also weaken. If all the correction coefficients increase or decrease at the same proportion at the same time, the overall value of the feature fusion result will increase or decrease at the same proportion, and the proportion of the influence of different parameter types on the result remains unchanged.

[0046] In general, from a data integration perspective, the standardized water quality parameter sequence encompasses multidimensional water quality parameters (such as pH, turbidity, and residual chlorine) from multiple distributed monitoring points within the water supply network. These parameters each have their own specific emphasis when reflecting water quality. By constructing a diagonal weight matrix using correction coefficients and performing weighted fusion on the multidimensional data vector set, the value of different parameters can be integrated based on their actual contribution. Parameters with high measurement accuracy and strong timeliness (after correction for hydraulic retention time) receive higher weight in the fusion results, highlighting the impact of key information while reducing interference from low-value data, allowing the fusion results to better focus on the core characteristics of the network's water quality.

[0047] In general, from the perspective of feature optimization, the weighted fused data undergoes feature dimension compression, and the resulting fused feature vector effectively reduces data redundancy. Water quality parameter data from water supply networks is often high-dimensional and strongly coupled. Direct analysis can increase computational complexity and susceptibility to noise. However, by retaining key information and eliminating invalid redundancy, the fused feature vector transforms the dispersed parameter data into a structured feature set. This simplifies subsequent analysis and enhances the correlation between the features and the actual water quality status of the network.

[0048] In general, the fused feature vector comprehensively reflects the correlation between time and space: First, based on a standardized sequence aligned with time, it ensures data consistency in the temporal dimension; second, by incorporating the influence of network spatial characteristics such as hydraulic retention time through weight correction, the feature vector more accurately reflects the distribution and variation of water quality parameters within the network. This highly integrated feature vector provides a unified and high-quality analytical framework for subsequent node connection matrix construction and anomaly tracing, significantly improving the accuracy and efficiency of water quality anomaly feature identification.

[0049] S4. Constructing a node connection relationship matrix of the water supply network according to the topological structure data of the fused feature vector; In an embodiment of the present invention, the step of constructing a node connection relationship matrix of the water supply network based on the topological structure data of the fused feature vectors includes: Extracting topological connection feature parameters of the pipeline network node identifiers in the fused feature vector; Establishing a directed connection rule based on the fluid transmission direction of the nodes in the water supply network, and converting the topological connection characteristic parameters into connection strength values ​​based on the directed connection rule; A two-dimensional relationship grid is constructed according to a preset node sorting, the connection strength value is mapped to the corresponding grid position of the two-dimensional relationship grid, and the grid positions between nodes that are not directly connected in the two-dimensional relationship grid are filled with zero-value parameters to obtain the node connection relationship matrix of the water supply network.

[0050] Specifically, when extracting the topological connection feature parameters of the pipeline node identifier in the fused feature vector, first find the field storing the pipeline node identifier from the data structure of the fused feature vector, which contains the unique code of each node, and then determine the adjacent nodes corresponding to each node identifier through the pipeline topology diagram, count the number of connections between each node and the adjacent nodes, measure the length and diameter of the connecting pipes between the nodes, and record the position coordinates of the nodes in the pipeline network. This information is summarized and organized to form topological connection feature parameters including the node identifier, the adjacent node list, the number of connections, the pipe length, the pipe diameter and the position coordinates, and each parameter is bound to the corresponding pipeline node identifier and stored.

[0051] Furthermore, when establishing a directed connection rule based on the fluid transmission direction of the nodes in the water supply network, and converting the topological connection characteristic parameters into connection strength values ​​based on the directed connection rule, the fluid transmission direction between each node is first determined through the hydraulic calculation report of the water supply network, that is, from which node to which node the water flows, and a directed connection rule is established accordingly: if node A transmits fluid to node B, then the connection from A to B is a valid directed connection, and the connection from B to A is an invalid connection. The strength of the valid directed connection is proportional to the pipe diameter and inversely proportional to the pipe length. The strength of the invalid connection is zero. Subsequently, each valid directed connection is calculated by comparing the adjacent node list, pipe length and pipe diameter in the topological connection characteristic parameters. First, the basic strength value is determined according to the pipe diameter. The larger the diameter, the higher the basic strength value. Then, the basic strength value is divided by the pipe length. The result is the connection strength value of the valid directed connection. The invalid connection is directly marked with a connection strength value of zero.

[0052] Furthermore, a two-dimensional relationship grid is constructed according to a preset node sorting, the connection strength value is mapped to the corresponding grid position of the two-dimensional relationship grid, and zero-value parameters are filled in the grid positions between nodes that are not directly connected in the two-dimensional relationship grid. When obtaining the node connection relationship matrix of the water supply network, the network nodes are first sorted according to the numerical size of the network node identifiers to form a preset order from the first node to the last node. The number of rows and columns of the two-dimensional relationship grid is determined according to the total number of nodes. The number of rows and columns are both equal to the total number of nodes. The rows and columns of the grid correspond to the nodes arranged in the preset order respectively. Then, the connection strength value of each node is traversed to find the row position of the node in the preset order and the column position of its adjacent node in the preset order. The corresponding connection strength value is filled in the grid position where the row and column intersect in the two-dimensional relationship grid. After completing the mapping of all connection strength values, all unfilled grid positions in the two-dimensional relationship grid are checked. There is no direct connection between the nodes corresponding to these positions. Zero-value parameters are filled in these positions. The final two-dimensional relationship grid containing connection strength values ​​and zero-value parameters is the node connection relationship matrix of the water supply network.

[0053] In general, from the perspective of topological feature conversion, although the fused feature vector has integrated multi-dimensional water quality information, it needs to be combined with the actual physical structure of the pipe network to accurately locate the source of the anomaly. By extracting the topological connection feature parameters of the pipe network node identifiers in the fused feature vector, it is possible to correspond the water quality characteristics with the physical properties of the nodes, such as the spatial position and connection method. Based on the direction of fluid transmission at the nodes in the water supply network, a directed connection rule is established, and the topological connection feature parameters are converted into connection strength values. The water flow propagation relationship between different nodes can be quantified - for example, the influence strength of upstream nodes on downstream nodes, the connectivity between nodes, etc., so that the originally fuzzy pipe network connection relationship is converted into a computable numerical matrix.

[0054] In general, from the perspective of the structural value of matrix construction, a two-dimensional relationship grid is constructed according to a preset node order, and connection strength values ​​are mapped to corresponding grid positions. Nodes that are not directly connected are filled with zero values. The resulting node connection relationship matrix has a clear mathematical structure and physical meaning. This matrix not only fully preserves the topological structure of the pipeline network (such as upstream and downstream relationships and connection paths of nodes), but also reflects the degree of mutual influence between nodes through numerical connection strength, providing a standardized input carrier for subsequent matrix-based anomaly tracing.

[0055] In general, this structured matrix allows the water quality anomaly information in the fused feature vector to be directly linked to the physical propagation path of the pipe network. Subsequent analysis can quickly locate the propagation chain of the anomaly characteristics through matrix traversal, clarifying the path and intensity of the anomaly's spread from the initial node to other nodes. Furthermore, the matrix format facilitates efficient computer processing, improving the computational efficiency of anomaly tracing and ensuring accurate capture of the spatial propagation patterns of anomalies even in complex pipe network structures, providing a key spatial correlation basis for ultimately locating the pollution source.

[0056] S5. Tracing the abnormality of the fused feature vector according to the node connection relationship matrix to obtain abnormal results of the water supply network; In an embodiment of the present invention, the abnormality tracing of the fused feature vector according to the node connection relationship matrix to obtain the abnormality result of the water supply network includes: Mapping the fused feature vector to the corresponding node position of the node connection relationship matrix to obtain a node abnormality feature distribution map of the water supply network; Traversing the node connection relationship matrix along the reverse path of the water flow of the water supply network to obtain an abnormal feature propagation chain of the water supply network; Locating the initial abnormality excitation node of the water supply network based on the gradient change of the abnormality characteristics of the nodes in the abnormality characteristic propagation chain; An abnormal result of the water supply network is generated according to the characteristic correlation strength between the initial abnormal excitation node and the downstream monitoring point in the water supply network.

[0057] The locating of the initial abnormality excitation node of the water supply network based on the gradient change of the abnormality feature of the node in the abnormality feature propagation chain includes: Obtain the characteristic distribution benchmark pattern under historical normal operating conditions; generating an abnormal deviation heat map of the water supply network based on a difference between the abnormal characteristic distribution map and the characteristic distribution reference pattern; Identifying a maximum deviation region in the abnormal deviation heat map, and associating the maximum deviation region with an upstream node set in the node connection relationship matrix; The connection continuity of the upstream node set is verified according to the reverse path of the water flow in the water supply network to obtain the initial abnormal excitation node of the water supply network.

[0058] Specifically, when mapping the fused feature vector to the corresponding node position of the node connection relationship matrix to obtain the node abnormality feature distribution map of the water supply network, first extract the eigenvalue corresponding to each node from the fused feature vector. These eigenvalues ​​reflect the water quality abnormality related information of the node. Then check the position index of each node in the node connection relationship matrix. The index corresponds one-to-one with the node identifier. Then, the eigenvalue of each node is accurately filled in the node position where the row and column corresponding to the node in the node connection relationship matrix intersect. After completing the mapping of all node eigenvalues, the matrix is ​​visualized, and different colors are used to identify the size of the eigenvalue. The larger the eigenvalue, the darker the color. In this way, the abnormal feature distribution of each node is intuitively presented to form the node abnormality feature distribution map of the water supply network.

[0059] Furthermore, when traversing the node connection relationship matrix along the reverse path of the water flow in the water supply network to obtain the abnormal feature propagation chain of the water supply network, the forward transmission path of the water flow is first determined through the topological structure diagram of the water supply network, that is, the direction from the water source node to the terminal node, and the reverse path of the water flow is the opposite direction from the terminal node to the water source node. Then, the abnormal node whose characteristic value exceeds the preset threshold is found from the node abnormal feature distribution diagram, and the abnormal node is used as the starting point. The upstream node directly connected to it is searched in the node connection relationship matrix according to the reverse path of the water flow, and the upstream node is recorded. Then, the upstream node found is used as a new starting point, and the corresponding upstream node is continued to be searched along the reverse path of the water flow. This process is repeated until the water source node is traced back. All nodes involved in the search process are arranged in the traversal order. The sequence formed is the abnormal feature propagation chain of the water supply network.

[0060] Furthermore, based on the gradient change of the abnormal characteristics of the nodes in the abnormal characteristic propagation chain, when locating the initial abnormal excitation node of the water supply network, the characteristic value of each node in the abnormal characteristic propagation chain in the node abnormal characteristic distribution map is first extracted, and these characteristic values ​​are recorded in sequence according to the arrangement order of the nodes in the propagation chain. Then, the difference between the characteristic values ​​of two adjacent nodes is calculated. If the characteristic value of the latter node (the node close to the water source) is smaller than the characteristic value of the previous node, and this decreasing trend continues until the characteristic value of a certain node no longer decreases but starts to increase, then the node whose characteristic value no longer decreases is the source of the abnormal characteristic, that is, the initial abnormal excitation node. If the characteristic value in the propagation chain continues to increase from the starting point, then the starting point of the propagation chain is the initial abnormal excitation node.

[0061] Furthermore, when generating the abnormal result of the water supply network based on the characteristic correlation strength between the initial abnormal excitation node and the midstream and downstream monitoring points of the water supply network, all the monitoring points downstream of the initial abnormal excitation node are first determined. These monitoring points constitute the midstream and downstream monitoring point set. Then, the degree of overlap between the characteristic value of the initial abnormal excitation node and the characteristic value of each midstream and downstream monitoring point is calculated. The higher the overlap, the greater the characteristic correlation strength between the two. Subsequently, the number of midstream and downstream monitoring points whose characteristic correlation strength exceeds the set standard and the distribution range of these monitoring points in the network are counted. Combined with the position of the initial abnormal excitation node, the size of the characteristic value, and the situation of the associated midstream and downstream monitoring points, a report is formed containing the abnormal starting position, the impact range, and the abnormal characteristic performance. This report is the abnormal result of the water supply network.

[0062] Specifically, when obtaining the characteristic distribution benchmark pattern under historical normal operating conditions, first retrieve all operation records of the water supply network marked as normal operating conditions in the past year from the database. These records contain the characteristic values ​​of each node and the corresponding timestamps. Then, filter out the record segments without any abnormal alarms for three consecutive months, take the average value of the characteristic values ​​of each node during this period in chronological order, and obtain the typical characteristic value of each node under normal operating conditions. Then, fill these typical characteristic values ​​into the corresponding node positions according to the node arrangement order of the node connection relationship matrix to form a fixed characteristic distribution template. This template is the characteristic distribution benchmark pattern under historical normal operating conditions, and the selected time range and data volume are recorded when stored.

[0063] Furthermore, when generating the abnormal deviation heat map of the water supply network based on the difference between the abnormal characteristic distribution map and the characteristic distribution benchmark pattern, the characteristic value of each node in the abnormal characteristic distribution map is first compared with the typical characteristic value of the corresponding node in the characteristic distribution benchmark pattern, and the typical characteristic value in the characteristic distribution benchmark pattern is subtracted from the characteristic value in the abnormal characteristic distribution map. The result is the difference of the node. A positive difference indicates that the characteristic value is higher than the normal benchmark, and a negative difference indicates that it is lower than the normal benchmark. Subsequently, the levels are divided according to the absolute value of the difference. The larger the absolute value, the higher the level. Each level is then assigned a corresponding color. The highest level is represented by dark red, the lowest level is represented by light red, and a difference of zero is represented by white. Finally, the color corresponding to each node is filled into the same grid position as the node connection relationship matrix to form an abnormal deviation heat map of the water supply network that intuitively displays the degree to which each node deviates from the normal state.

[0064] Furthermore, when identifying the maximum deviation area in the abnormal deviation heat map and associating the maximum deviation area with the upstream node set in the node connection relationship matrix, first observe the darkest area in the abnormal deviation heat map, which is the maximum deviation area, determine all node identifiers contained in the area through grid coordinates, and then check the node connection relationship matrix, find the rows corresponding to these nodes in the matrix, and the nodes corresponding to the columns with non-zero values ​​in each row are the upstream nodes of the node, collect the identifiers of all these upstream nodes, remove duplicate identifiers and form a set, which is the upstream node set in the node connection relationship matrix associated with the maximum deviation area, and record the connection relationship between each upstream node and the node in the maximum deviation area.

[0065] Furthermore, when verifying the connection continuity of the upstream node set according to the reverse path of the water flow in the water supply network to obtain the initial abnormal excitation node of the water supply network, the specific direction of the reverse path of the water flow is first obtained from the topological structure diagram of the water supply network, that is, the sequential connection order from the terminal node to the water source node, and then a node is randomly selected from the upstream node set as the starting point, and the upstream node directly connected to it is searched along the reverse path of the water flow to check whether the upstream node is also in the node set. If so, continue to trace forward; if not, mark the starting point node as a breakpoint, repeat this process to check all nodes in the upstream node set, and finally screen out a node subsequence that can be continuously traced along the reverse path of the water flow and always belongs to the upstream node set. The node at the front end of the subsequence that cannot be traced forward is the initial abnormal excitation node of the water supply network. If there are multiple such nodes, the node most directly associated with the maximum deviation regional difference component is selected as the final result.

[0066] In general, from the perspective of spatial mapping of anomaly characteristics, mapping the fused feature vector to the corresponding node position in the node connectivity matrix can generate a node anomaly characteristic distribution map, directly linking the abstract water quality anomaly characteristics to the specific locations of the pipe network nodes. This mapping transforms the water quality anomaly information contained in the fused feature vector into a visual spatial distribution, intuitively showing which nodes have anomalies and the degree of anomaly, providing a clear spatial reference for source tracing analysis.

[0067] In general, tracing the anomaly's propagation path back through the node connectivity matrix along the reverse path of water flow in the water supply network can construct an anomaly feature propagation chain. The quantified connection strength values ​​in the node connectivity matrix clearly reflect the direction and impact of fluid transmission between nodes. This reverse tracing accurately reconstructs the propagation of anomalies from downstream monitoring points to upstream sources, clearly defining the anomaly's diffusion path within the network and the associated impact of each node, thus avoiding tracing errors caused by ignoring network topology.

[0068] In general, from the perspective of accurately locating the initial anomaly node, based on the gradient changes in the node anomaly characteristics within the anomaly feature propagation chain, combined with the characteristic distribution benchmark pattern under historical normal operating conditions, an anomaly deviation heat map is generated. This allows for rapid identification of the area of ​​maximum deviation and its association with the upstream node set. The connection continuity of the node set is then verified by reverse flow, ultimately determining the initial anomaly triggering node. This process fully leverages the topological logic of node connections in the matrix and the gradient changes in anomaly characteristics, eliminating interference from non-initial nodes and making the location of the initial anomaly node more accurate and reliable.

[0069] In general, the abnormal results obtained through the above steps not only clarify the spatial distribution and propagation path of the abnormality in the pipeline network, but also accurately lock the initial abnormal excitation node, providing a direct and reliable basis for subsequent pollution source positioning and early warning signal generation, and significantly improving the accuracy and efficiency of water quality abnormality tracing.

[0070] S6. Locate the pollution source in the water supply network according to the abnormal result and generate a water quality warning signal.

[0071] In an embodiment of the present invention, locating the pollution source in the water supply network according to the abnormal result and generating a water quality warning signal includes: Extract the spatial coordinates of the initial abnormal excitation node in the abnormal result; Tracing the pollution propagation path based on the node connection relationship matrix to determine candidate areas of the pollution source in the water supply network; Based on the historical pollution event feature library and the spatial coordinates, the risk level of the candidate area is marked to obtain the pollution source positioning instruction of the water supply network; According to the result of the risk level identification, a preset early warning response strategy is matched to activate the multi-level water quality early warning signal of the water supply network.

[0072] Specifically, when extracting the spatial coordinates of the initial abnormal excitation node in the abnormal result, first find the unique identifier marked as the initial abnormal excitation node from the abnormal result, and then open the node attribute database of the water supply network. Each record in the database contains node identifier, longitude and latitude coordinates, installation height and other information. Accurately match the node identifier in the database. After finding the corresponding record, extract the longitude and latitude coordinate data from it. These data are the spatial coordinates of the initial abnormal excitation node. After the extraction is completed, the spatial coordinates and the node identifier are recorded together in a dedicated positioning file.

[0073] Furthermore, when tracing the pollution propagation path based on the node connection relationship matrix and determining the candidate area of ​​the pollution source in the water supply network, first find the row corresponding to the initial abnormal excitation node from the node connection relationship matrix, and the nodes corresponding to the columns where all non-zero values ​​in the row are located are the downstream nodes directly connected to the initial abnormal excitation node. These downstream nodes are regarded as the first-level nodes of pollution propagation, and then check the corresponding rows of each first-level node in the matrix in turn to find their downstream nodes as second-level nodes. In this way, trace back step by step until all nodes that may be affected by pollution propagation are covered, and then, according to the positions of these nodes in the geographical distribution map of the water supply network, a geographical range containing all nodes is delineated. This range is the candidate area of ​​the pollution source in the water supply network, and the area is framed with a dotted line on the geographical distribution map.

[0074] Furthermore, based on the historical pollution event feature library and the spatial coordinates, the risk level of the candidate area is identified. When the pollution source positioning instruction of the water supply network is obtained, the historical pollution event feature library is first opened. The library stores information such as the coordinates of the occurrence location of pollution events that occurred in the past, the pollution type, and the impact range. The distance between the spatial coordinates of the initial abnormal excitation node and the coordinates of the occurrence location of each pollution event in the library is calculated, and historical events within a distance of 500 meters are screened out. The number and severity of pollution in the area in these events are counted. The more times and the more severe the pollution, the higher the risk level. Subsequently, the risk level of the candidate area is divided into three levels: high, medium, and low according to the statistical results, and the corresponding level is marked next to the geographic mark of the candidate area. Finally, the information including the candidate area range, risk level and the spatial coordinates of the initial abnormal excitation node is integrated into an instruction, which is the pollution source positioning instruction of the water supply network.

[0075] Furthermore, according to the result of the risk level identification, the preset early warning response strategy is matched. When the multi-level water quality early warning signal of the water supply network is activated, the preset early warning response strategy file is first consulted. The file clearly stipulates the early warning signal types and response measures corresponding to different risk levels. If the risk level of the candidate area is high, the red early warning signal is matched, and the strategy includes immediately closing the relevant valves in the area and starting the emergency water supply plan; if it is medium, the yellow early warning signal is matched, and the strategy includes strengthening the frequency of water quality monitoring in the area and notifying surrounding users to pay attention to water safety; if it is low, the blue early warning signal is matched, and the strategy includes increasing the number of daily inspections and paying close attention to changes in water quality. After determining the corresponding early warning signal, the control system of the water supply network sends an activation instruction to the early warning devices at all levels. The red early warning activates the sound and light alarm devices in all areas, the yellow early warning activates the alarm devices in the area and adjacent areas, and the blue early warning only activates the display alarm of the control center, thereby activating the multi-level water quality early warning signal of the water supply network.

[0076] In general, from the perspective of pollution source location accuracy, by extracting the spatial coordinates of the initial anomaly triggering node in the anomaly results, the core area of ​​the anomaly source can be directly identified. Tracing the pollution propagation path based on the node connection relationship matrix can further clarify the scope and direction of pollution spread, thereby narrowing down the candidate areas of the pollution source. By combining the risk level of candidate areas with the historical pollution event feature library, the pollution patterns and diffusion patterns in historical data can be used to quantitatively assess the pollution potential of candidate areas. The resulting pollution source location instructions have clear spatial directionality and risk level classification, significantly reducing the cost of blind investigation and improving the efficiency and accuracy of pollution source location.

[0077] In general, from the perspective of the timeliness and pertinence of early warning responses, matching the pre-set early warning response strategy with the risk level identification results can activate multi-level water quality early warning signals. Different risk levels correspond to different warning intensities and disposal plans. For example, high-risk levels can trigger emergency water outages and comprehensive inspections, while low-risk levels can initiate plans such as enhanced monitoring and local disinfection. This hierarchical early warning mechanism avoids the limitations of a single early warning model, ensuring that the early warning signal matches the actual degree of harm caused by the pollution. This allows relevant departments to quickly take targeted measures to promptly control the spread of pollution, minimize the impact of abnormal water quality on residents' water safety, and provide dynamic and efficient protection for the water quality safety of the water supply network.

[0078] like Figure 2 , which is a functional module diagram of a water quality anomaly tracing system for a water supply network based on data fusion provided by one embodiment of the present invention.

[0079] The water quality anomaly tracing system 100 for a water supply network based on data fusion described in the present invention can be installed in an electronic device. According to the functions implemented, the water quality anomaly tracing system 100 for a water supply network based on data fusion can include a water quality data extraction module 101, a weight coefficient correction module 102, a feature fusion module 103, a topology connection module 104, an anomaly tracing module 105 and a pollution warning module 106. The module described in the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0080] In this embodiment, the functions of each module / unit are as follows: The water quality data extraction module 101 is used to align the water quality parameter data of distributed monitoring points in the water supply network to obtain a standardized water quality parameter sequence of the water supply network; The weight coefficient correction module 102 is used to assign weight coefficients to the parameters according to the measurement accuracy of the parameters in the standardized water quality parameter sequence, and to correct the weight coefficients according to the hydraulic retention time in the water supply network to obtain correction coefficients for the water quality parameter data; The feature fusion module 103 is configured to perform weighted fusion on the standardized water quality parameter sequence based on the correction coefficient to obtain a fused feature vector of the water supply network; The topology connection module 104 is used to construct a node connection relationship matrix of the water supply network according to the topology structure data of the fused feature vector; The abnormality tracing module 105 is used to perform abnormality tracing on the fused feature vector according to the node connection relationship matrix to obtain abnormal results of the water supply network; The pollution warning module 106 is used to locate the pollution source in the water supply network based on the abnormal results and generate a water quality warning signal. In the several embodiments provided by the present invention, it should be understood that the disclosed method and system can be implemented in other ways. For example, the system embodiment described above is merely illustrative. For example, the division of the modules is only a logical functional division, and other division methods may be used in actual implementation.

[0081] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of the solution of this embodiment according to actual needs.

[0082] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional modules.

[0083] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0084] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.

[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for tracing the source of abnormal water quality in a water supply network based on data fusion, characterized in that: The method comprises: S1. Time-aligning water quality parameter data of distributed monitoring points in a water supply network to obtain a standardized water quality parameter sequence of the water supply network; S2. Allocating weight coefficients of the parameters in the standardized water quality parameter sequence according to the measurement accuracy of the parameters, and correcting the weight coefficients according to the hydraulic retention time in the water supply network to obtain correction coefficients for the water quality parameter data; S3. Performing weighted fusion on the standardized water quality parameter sequence based on the correction coefficient to obtain a fusion feature vector of the water supply network; S4. Constructing a node connection relationship matrix of the water supply network according to the topological structure data of the fused feature vector; S5. Tracing the abnormality of the fused feature vector according to the node connection relationship matrix to obtain abnormal results of the water supply network; S6. Locate the pollution source in the water supply network according to the abnormal result and generate a water quality warning signal.

2. The method for tracing the source of abnormal water quality in a water supply network based on data fusion according to claim 1, characterized in that: The step of aligning the water quality parameter data of the distributed monitoring points in the water supply network to obtain a standardized water quality parameter sequence of the water supply network includes: Receive water quality parameter data packets uploaded by each distributed monitoring point and extract the timestamp information in the data packets; Calculate the offset between the timestamp information and the standard time reference to generate a time calibration parameter; Re-arrange the timing of the water quality parameter data packets according to the time calibration parameters to eliminate transmission delay differences; The water quality parameter data after time sequence rearrangement are spatially associated according to the locations of the pipe network nodes to generate the standardized water quality parameter sequence.

3. The method for tracing the source of abnormal water quality in a water supply network based on data fusion according to claim 1, characterized in that: The calculation formula of the weight coefficient is as follows: ; Where, is the weight coefficient, is the difference between the measurement accuracy value of the parameter in the standardized water quality parameter sequence and the accuracy reference benchmark, It is the reference value of parameter accuracy in the standardized water quality parameter sequence.

4. The method for tracing the source of abnormal water quality in a water supply network based on data fusion according to claim 3, characterized in that: The weight coefficient is corrected according to the hydraulic retention time in the water supply network to obtain the correction coefficient of the water quality parameter data, including: Acquire the topological structure data of the water supply network and extract the hydraulic residence time parameters corresponding to the distributed monitoring points; Converting the hydraulic retention time parameter into a time-dependent attenuation factor; The weight coefficient is dynamically compensated and adjusted based on the time-effectiveness attenuation factor to generate the correction coefficient.

5. The method for tracing the source of abnormal water quality in a water supply network based on data fusion according to claim 1, characterized in that: The weighted fusion of the standardized water quality parameter sequence based on the correction coefficient to obtain the fusion feature vector of the water supply network includes: Splitting the standardized water quality parameter sequence into multidimensional data vector groups according to parameter type; The correction coefficient is used to construct a diagonal weight matrix, and feature fusion is performed on the multidimensional data vector group based on the diagonal weight matrix, wherein the calculation formula of the feature fusion is as follows: ; Where, is the result of the feature fusion, is the total number of types of the parameters, is the type ordinal of the parameter, For the The diagonal matrix of the correction coefficients corresponding to the class parameters, is the first Standardized data for class parameters; The result is subjected to feature dimension compression to obtain a fused feature vector of the water supply network.

6. The method for tracing the source of abnormal water quality in a water supply network based on data fusion according to claim 1, characterized in that: The step of constructing a node connection relationship matrix of the water supply network based on the topological structure data of the fused feature vectors includes: Extracting topological connection feature parameters of the pipeline network node identifiers in the fused feature vector; Establishing a directed connection rule based on the fluid transmission direction of the nodes in the water supply network, and converting the topological connection characteristic parameters into connection strength values ​​based on the directed connection rule; A two-dimensional relationship grid is constructed according to a preset node sorting, the connection strength value is mapped to the corresponding grid position of the two-dimensional relationship grid, and the grid positions between nodes that are not directly connected in the two-dimensional relationship grid are filled with zero-value parameters to obtain the node connection relationship matrix of the water supply network.

7. The method for tracing the source of abnormal water quality in a water supply network based on data fusion according to claim 1, characterized in that: The abnormality tracing of the fused feature vector according to the node connection relationship matrix to obtain the abnormality result of the water supply network includes: Mapping the fused feature vector to the corresponding node position of the node connection relationship matrix to obtain a node abnormality feature distribution map of the water supply network; Traversing the node connection relationship matrix along the reverse path of the water flow of the water supply network to obtain an abnormal feature propagation chain of the water supply network; Locating the initial abnormality excitation node of the water supply network based on the gradient change of the abnormality characteristics of the nodes in the abnormality characteristic propagation chain; An abnormal result of the water supply network is generated according to the characteristic correlation strength between the initial abnormal excitation node and the downstream monitoring point in the water supply network.

8. The method for tracing the source of abnormal water quality in a water supply network based on data fusion according to claim 7, characterized in that: The locating of the initial abnormality excitation node of the water supply network based on the gradient change of the abnormality feature of the node in the abnormality feature propagation chain includes: Obtain the characteristic distribution benchmark pattern under historical normal operating conditions; generating an abnormal deviation heat map of the water supply network based on a difference between the abnormal characteristic distribution map and the characteristic distribution reference pattern; Identifying a maximum deviation region in the abnormal deviation heat map, and associating the maximum deviation region with an upstream node set in the node connection relationship matrix; The connection continuity of the upstream node set is verified according to the reverse path of the water flow in the water supply network to obtain the initial abnormal excitation node of the water supply network.

9. The method for tracing the source of abnormal water quality in a water supply network based on data fusion according to claim 8, characterized in that: The method of locating the pollution source in the water supply network according to the abnormal result and generating a water quality warning signal includes: Extract the spatial coordinates of the initial abnormal excitation node in the abnormal result; Tracing the pollution propagation path based on the node connection relationship matrix to determine candidate areas of the pollution source in the water supply network; Based on the historical pollution event feature library and the spatial coordinates, the risk level of the candidate area is marked to obtain the pollution source positioning instruction of the water supply network; According to the result of the risk level identification, a preset early warning response strategy is matched to activate the multi-level water quality early warning signal of the water supply network.

10. A water quality anomaly tracing system for water supply network based on data fusion, characterized in that: The system comprises: A water quality data extraction module is used to align the water quality parameter data of distributed monitoring points in the water supply network at all times to obtain a standardized water quality parameter sequence of the water supply network; a weight coefficient correction module, configured to assign weight coefficients to the parameters according to the measurement accuracy of the parameters in the standardized water quality parameter sequence, and to correct the weight coefficients according to the hydraulic retention time in the water supply network to obtain correction coefficients for the water quality parameter data; a feature fusion module, configured to perform weighted fusion on the standardized water quality parameter sequence based on the correction coefficient to obtain a fused feature vector of the water supply network; A topology connection module, configured to construct a node connection relationship matrix of the water supply network based on the topology data of the fused feature vector; An abnormality tracing module is used to perform abnormality tracing on the fused feature vector according to the node connection relationship matrix to obtain abnormal results of the water supply network; The pollution warning module is used to locate the pollution source in the water supply network according to the abnormal result and generate a water quality warning signal.

Citation Information

Patent Citations

  • Sludge backflow control optimization control method and system

    CN117003381A

  • Pollution traceability system and method based on water quality and water quantity monitoring and analysis of drainage system

    CN119959494A

  • Mining area groundwater environment monitoring system and method

    CN119985883A

  • Industrial time series data learning fusion and anomaly detection method

    CN120179654A

  • Water surface fluctuation compensation method for laser sounding

    CN120351900A

Cited By

  • System and method for collecting and processing data of multiple types of water supply equipment

    CN121434292A

  • Method for detecting water quality and quantity coupled resilience state of water network node

    CN122432791A