Water supply inspection method and system based on POI data and water consumption feature anomaly recognition
Through an anomaly recognition method based on POI data and water use characteristics, a water use type recognition model is constructed and geocoding matching is performed to form a three-level anomaly judgment mechanism, which solves the problem of difficult identification of water theft in the water supply industry and achieves efficient and accurate audit results.
Patent Information
- Application Number
- CN202510901644.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-10-17
AI Technical Summary
The existing water supply industry finds it difficult to effectively identify covert water theft by commercial users who register as residential users, resulting in revenue losses for water companies. Traditional manual inspection methods are inefficient and costly, and existing methods lack the ability to dynamically update and optimize water theft scenarios.
A water supply audit method based on POI data and water use characteristic anomaly identification constructs a water use characteristic vector by collecting water use data, establishes a water use type identification model, obtains water user coordinates and POI information, performs geocoding matching and cosine similarity calculation, forms a three-level anomaly judgment mechanism, and generates an audit work order.
It significantly improves the efficiency and accuracy of audits, can quickly identify three types of abnormal users, and provides efficient technical means to identify fraudulent use and water theft.
Smart Images

Figure CN120806986A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of water supply revenue management, and in particular to a water supply inspection method and system based on POI data and water feature anomaly identification. BACKGROUND
[0002] The current water supply industry is facing hidden water theft behaviors such as commercial users reporting installation with residential nature, resulting in loss of water department revenue. Traditional manual inspection methods are inefficient and costly. Existing technologies mainly manage water supply business through static user profiling, water usage pattern recognition based on clustering algorithms, and anomaly detection of pre-set user types, but these methods lack dynamic updating capability or are not optimized for water theft scenarios, making it difficult to effectively identify user nature fraud. SUMMARY
[0003] In view of the above problems, the present application provides a water supply inspection method and system based on POI data and water feature anomaly identification, which solves the problem of difficulty in effectively identifying user nature fraud.
[0004] To achieve the above purpose, in a first aspect, the present application provides a water supply inspection method based on POI data and water feature anomaly identification, comprising:
[0005] Collecting water usage data of multiple water users and constructing water feature vectors according to sampling frequency classification;
[0006] Obtaining water user registration type identification and standardizing coding, and establishing a water type database;
[0007] Constructing a water type identification model and training to obtain a trained water type identification model, using water feature vectors as input features and water type labels as supervision signals to generate water user type prediction results;
[0008] Obtaining water user coordinate information and its associated business information in a target area;
[0009] Obtaining POI information of the target area, including commercial entity coordinates, business subject name, industry classification label and business scope;
[0010] Geocoding matching water user coordinate information and commercial entity coordinates to establish a spatial mapping relationship between water meter location and commercial entity;
[0011] Calculating the cosine similarity value of POI information and business information;
[0012] When the water user type prediction result is inconsistent with the water user registration type identification, and the cosine similarity value is lower than the preset similarity threshold, a first determination result is generated, determining that the water type is abnormal;
[0013] When the plurality of water use feature vectors associated with the business entity coordinates are inconsistent with the water use type database, a second determination result is generated, determining that the water user association is abnormal;
[0014] When the water user type prediction result is consistent with the water user registration type identification, but the water use feature vector is abnormal, a third determination result is generated, determining that the water use behavior is abnormal;
[0015] According to the first determination result, the second determination result and the third determination result, an inspection work order containing an abnormal water use period distribution map, a water use feature comparison table and a spatial position association map is generated.
[0016] Further, a plurality of water user water use data is collected, and water use feature vectors are constructed according to sampling frequency classification, including:
[0017] For water users with monthly meter reading data:
[0018] Extracting the continuous monthly water consumption data of the current water user, generating a first feature group, the first feature group including monthly water consumption and adjacent month water consumption change rate;
[0019] For water users with hourly metering data:
[0020] According to the time attribute, the working water period and the rest water period are divided, and the water consumption statistical information of the working water period and the rest water period is calculated to form a second feature group, and the water consumption statistical information includes hourly mean, variance, coefficient of variation and quartile range;
[0021] For water users with minute-level metering data:
[0022] Identify the typical water use period and extract the dynamic features to form a third feature group, the dynamic features including peak period water consumption fluctuation amplitude, instantaneous flow mutation frequency and typical water use curve matching degree;
[0023] The first feature group, the second feature group and the third feature group are standardized according to the sampling frequency level respectively, and the water use feature vectors of uniform dimension are output.
[0024] Further, the second feature group is obtained by the following steps:
[0025] Divide each day into morning peak period, daytime period, evening peak period and night period;
[0026] Extract the period water information of the morning peak period, the daytime period, the evening peak period and the night period one by one, the period water information including water consumption mean, water consumption standard deviation, water consumption coefficient of variation, water consumption quartile range and period water consumption proportion;
[0027] The period water information is standardized to obtain a second feature group;
[0028] If there is missing period water information caused by meter abnormality, the median of water consumption of the same water user in the same period of the adjacent three days is used for interpolation;
[0029] The water consumption variation coefficient is represented by formula (1) as follows:
[0030] C = σ / μ;
[0031] In formula (1), C is the water consumption variation coefficient, σ is the water consumption standard deviation, and μ is the water consumption mean;
[0032] The water consumption quartile range is represented by formula (2) as follows:
[0033] I = P 75 -P 25 ;
[0034] In formula (2), I is the water consumption quartile range, P 75 is the 75th percentile of water consumption, and P 25 is the 25th percentile of water consumption.
[0035] Further, the third feature group is obtained by the following steps:
[0036] The typical water use behavior period includes the morning peak period and the evening peak period, and the water consumption information of the typical water use behavior period is collected minute by minute, which is recorded as the time-of-use water information;
[0037] The peak period water consumption fluctuation amplitude is extracted from the time-of-use water information, and the number of instantaneous flow mutations is counted;
[0038] The typical water consumption curve matching degree is calculated, including:
[0039] The historical standard water consumption mode curve of the current water user is obtained;
[0040] The real-time water consumption curve is generated according to the time-of-use water information, and the real-time water consumption curve is time-aligned with the historical standard water consumption curve;
[0041] The Euclidean distance of the time-aligned real-time water consumption curve and the historical standard water consumption curve at each sampling point is calculated;
[0042] The distance values of all sampling points are taken as inverses and averaged to obtain a matching degree score in the interval of 0-1, and the typical water consumption curve matching degree is obtained;
[0043] The peak period water consumption fluctuation amplitude, the number of instantaneous flow mutations, and the typical water consumption curve matching degree are combined to form the third feature group.
[0044] Further, the water user registration type identifier is obtained and standardized coding is performed to establish a water type database, including:
[0045] The original registration type information of the water user in the business system of the water supply enterprise is obtained, and the original registration type information includes text description type registration information and code type registration information;
[0046] The text description type registration information is standardized, including:
[0047] The keywords in the text description type registration information are extracted;
[0048] The keywords are matched with a preset water type keyword library;
[0049] The corresponding standard type code is assigned according to the matching result;
[0050] The code type registration information is standardized, including:
[0051] A mapping relationship table of the original code and the standard type code is established;
[0052] The original code is converted into the standard type code by table lookup;
[0053] The processed standard type code is associated with the unique identifier of the water user and stored to form a water type database, and the water type database at least includes three standard codes of commercial water, industrial water and residential water.
[0054] Further, a water type identification model is constructed and trained to obtain a trained water type identification model, including:
[0055] An XGBoost algorithm is used to construct the water type identification model, and the model parameters are initialized;
[0056] A sample water feature vector is obtained, including a first sample feature group, a second sample feature group and a third sample feature group, and the sample water feature vector is preprocessed, including:
[0057] The first sample feature group is logarithmically transformed;
[0058] The second sample feature group is standardized by Z-score;
[0059] The third sample feature group is normalized in the interval [0, 1];
[0060] The preprocessed sample water feature vector is used as an input feature, and a five-fold cross-validation method is used to train the water type identification model, including:
[0061] According to the sample water feature vector, a sample set is generated, and the sample set is randomly divided into 5 mutually exclusive subsets, and 4 subsets are selected as the training set each time, and the remaining 1 subset is used as the validation set;
[0062] The training is repeated until all subsets are used as the validation set, the model performance index is evaluated, and the classification accuracy of the validation set is calculated;
[0063] Misclassified samples in the confusion matrix are recorded;
[0064] The model with the best performance in the validation set is selected as the trained water type identification model.
[0065] Further, the water user coordinate information is matched with the commercial entity coordinates for geographic coding, and a spatial mapping relationship between the water meter location and the commercial entity is established, including:
[0066] The water meter location in the water user coordinate information is obtained, and the water user coordinate information is obtained from the positioning data of the water supply network GIS system;
[0067] The commercial entity coordinates in the POI information are extracted;
[0068] A adjustable buffer area with a radius of 50-200 meters is established with the water user coordinate as the center;
[0069] The spatial connection algorithm is used to establish a spatial association between the commercial entity coordinates falling within the adjustable buffer area and the water meter location:
[0070] The spatial topological relationship of the commercial entity coordinates in each adjustable buffer area is determined, and the mapping relationship between the commercial entity coordinates satisfying the distance threshold and the water meter is recorded, which is recorded as the spatial mapping relationship;
[0071] A multi-level spatial association rule is established, including:
[0072] First-level association: the straight-line distance between POI and water meter is less than or equal to 50 meters;
[0073] Second-level association: the distance between POI and water meter is 50-100 meters;
[0074] Third-level association: the distance between POI and water meter is 100-200 meters;
[0075] The spatial mapping relationship is detected for conflicts, including:
[0076] When a single water meter location is associated with multiple commercial entity coordinates with conflicting business properties, it is marked as an association to be checked;
[0077] When there is a commercial entity coordinate that is not associated with any water meter, a missing association warning is generated;
[0078] Output a space mapping relationship table according to the space mapping relationship after conflict detection, the space mapping relationship table including a corresponding relationship between a water meter number and a business entity number, a hierarchical space identifier, a space distance measured value, and an associated credibility score.
[0079] Further, a cosine similarity value is calculated for the POI information and the business information, including:
[0080] Obtain the business subject name, industry classification label, and business scope, denoted as POI text information;
[0081] Extract the business category text in the business information, including the registered business scope;
[0082] Perform text preprocessing on the POI text information and the business category text, including:
[0083] Remove stop words and special characters;
[0084] Use a Chinese word segmentation tool to segment words;
[0085] Replace synonyms with standard terms;
[0086] Obtain the preprocessed POI text information and the preprocessed business category text;
[0087] Perform first word frequency statistics on the preprocessed POI text information, calculate the weight values of multiple words in the first word frequency statistics using the TF-IDF algorithm, and generate a first text feature vector;
[0088] Perform second word frequency statistics on the preprocessed business category text, calculate the weight values of multiple words in the second word frequency statistics using the TF-IDF algorithm, and generate a second text feature vector;
[0089] Calculate the cosine similarity of the first text feature vector and the second text feature vector to obtain a cosine similarity value.
[0090] Further, according to the first determination result, the second determination result, and the third determination result, generate an inspection work order including an abnormal water use time period distribution chart, a water use feature comparison table, and a space position association chart, including:
[0091] Generate a water use feature comparison table according to the first determination result to display comparison data of the water use amount statistical indicators of each time period;
[0092] Draw a space position association chart according to the second determination result to mark the spatial distribution of the abnormal water meter position and the associated business entity coordinates;
[0093] Generate an abnormal water use time period distribution chart according to the third determination result to display the water use amount fluctuations of the abnormal time period in the form of a heat map;
[0094] The method further comprises:
[0095] associating the water feature comparison table with the spatial position association diagram;
[0096] superimposing the operating time information of the POI information in the abnormal water use period distribution diagram;
[0097] annotating the inspection priority score corresponding to each abnormal point, and outputting a structured inspection work order, the inspection work order comprising a basic information module, an abnormal evidence module, a processing suggestion module, and an additional information module.
[0098] In a second aspect, the application also provides a water supply inspection system based on POI data and water feature anomaly identification, which is suitable for the method of the first aspect, and the system comprises a water feature extraction module, a POI data processing module, and a logic processing module.
[0099] The water feature extraction module is used to collect water use data of a plurality of water users, and construct water feature vectors according to a sampling frequency classification; obtain water user registration type identifiers and perform standardized coding to establish a water type database; construct a water type identification model and train it to obtain a trained water type identification model, use the water feature vectors as input features, and use the water type labels as supervision signals to generate water user type prediction results;
[0100] The POI data processing module is used to obtain water user coordinate information and associated business information of a target area; obtain POI information of the target area, the POI information comprising commercial entity coordinates, business subject names, industry classification labels, and business scopes; perform geographic coding matching on the water user coordinate information and the commercial entity coordinates to establish a spatial mapping relationship between water meter positions and commercial entities; and calculate a cosine similarity value for the POI information and the business information.
[0101] The logic processing module is used to generate a first determination result when the water user type prediction result is inconsistent with the water user registration type identifier, and the cosine similarity value is lower than a preset similarity threshold, and determine that the water type is abnormal; generate a second determination result when a plurality of water feature vectors associated with the commercial entity coordinates are inconsistent with the water type database, and determine that the water user association is abnormal; generate a third determination result when the water user type prediction result is consistent with the water user registration type identifier, but the water feature vectors are abnormal, and determine that the water use behavior is abnormal; and generate an inspection work order comprising an abnormal water use period distribution diagram, a water feature comparison table, and a spatial position association diagram according to the first determination result, the second determination result, and the third determination result.
[0102] Distinguishing from the prior art, in the technical scheme, the water user data of the water user is collected to construct a water feature vector, and is matched with a standardized coded water type database; a water type identification model is established to generate a water user type prediction result; coordinate information of the water user and associated business information thereof are acquired, and are geocoded and matched with POI information of a target area to establish a spatial mapping relationship between a water meter position and a business entity coordinate; a cosine similarity of the POI information and the business information is calculated, and a three-level abnormality judgment mechanism is formed in combination with the water type prediction result: a first judgment result is generated when the prediction type is inconsistent with the registered type and the similarity is lower than a threshold; a second judgment result is generated when a plurality of abnormal water features are associated with a same business entity; a third judgment result is generated when the registered type is matched but the water feature is abnormal; and finally, an inspection work order including an abnormal period distribution graph, a feature comparison table and a spatial position association graph is automatically generated. The problem that the traditional method cannot effectively identify property fraud is solved; through the three-level judgment mechanism and the visualized work order output, the inspection efficiency and accuracy are significantly improved, and three types of abnormal users can be quickly locked, thereby providing an efficient technical means for water supply inspection.
[0103] The above summary of the invention is only a summary of the technical scheme of the present application. In order for those skilled in the art to more clearly understand the technical scheme of the present application, and then can be implemented according to the content of the description and the drawings, and in order to make the above-mentioned and other purposes, characteristics and advantages of the present application can be more easily understood, the following is described in combination with the specific embodiments of the present application and the drawings. BRIEF DESCRIPTION OF DRAWINGS
[0104] The drawings are only used to show the principles, implementation modes, applications, characteristics and effects of the specific embodiments of the present application and other related contents, and cannot be considered as a limitation of the present application.
[0105] In the drawings of the specification:
[0106] Figure 1 Step schematic diagram of steps S101 to S111 described in the specific embodiment;
[0107] Figure 2 Schematic diagram of the water supply inspection system described in the specific embodiment;
[0108] Figure 3 Step schematic diagram of steps S201 to S204 described in the specific embodiment;
[0109] Figure 4 Step schematic diagram of steps S301 to S307 described in the specific embodiment;
[0110] Figure 5 Flowchart described in the specific embodiment.
[0111] Reference signs:
[0112] 1. Water supply inspection system;
[0113] 11. Water usage feature extraction module;
[0114] 12. POI data processing module;
[0115] 13. Logic processing module. DETAILED DESCRIPTION
[0116] To explain possible application scenarios, technical principles, specific embodiments that can be implemented, purposes and effects that can be achieved, etc. of the present application in detail, the following will be described in detail in combination with specific embodiments listed and with the aid of the drawings. The embodiments described in this paper are only used to more clearly illustrate the technical solutions of the present application, and therefore only serve as examples, and cannot limit the protection scope of the present application.
[0117] In this paper, the term "embodiment" means that the specific features, structures or characteristics described in combination with the embodiment can be included in at least one embodiment of the present application. The term "embodiment" appearing at various places in the specification does not necessarily refer to the same embodiment, and does not particularly limit its independence or association with other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, each technical feature mentioned in each embodiment can be combined in any way to form a corresponding implementable technical solution.
[0118] Unless otherwise defined, the meanings of the technical terms used in this paper are the same as those commonly understood by those skilled in the art to which the present application belongs; the use of related terms in this paper is only for the purpose of describing specific embodiments, and is not intended to limit the present application.
[0119] In the description of the present application, the phrase "and / or" is a description of the logical relationship between objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this paper generally represents that the associated objects before and after are a kind of "or" logical relationship.
[0120] In the present application, such as "first" and "second", the terms are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual quantity, primary and secondary or order relationship between the entities or operations.
[0121] In the absence of more limitations, in this application, the "include", "contain", "have" or other similar open expressions used in the statements are intended to cover the non-exclusive inclusion, and these expressions do not exclude the presence of other elements in the process, method or product including the elements, so that the process, method or product including a series of elements can not only include those limited elements, but also include other elements not explicitly listed, or also include the elements inherent in such process, method or product.
[0122] As the same understanding in the "Guidelines for Examination", in this application, "greater than", "less than", "exceed" and other expressions are understood as not including the number; "above", "below", "within" and other expressions are understood as including the number. In addition, in the description of the embodiments of the application, the meaning of "multiple" is more than two (including two), and similar expressions related to "multiple" are also understood in this way, for example, "multiple groups", "multiple times" and the like, unless otherwise explicitly specified.
[0123] The processor described in the embodiments of the application can be implemented by hardware, firmware, software or a combination thereof, and can use at least one of circuit, single or multiple application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), central processing units (CPU), controllers, microcontrollers, microprocessors, and other physical, biological or chemical structures that can realize the same or equivalent functions as the above-mentioned processors, such as biological neurons, quantum computing units, DNA computing units, etc., so that the processor can execute part or all of the steps or any combination of the steps mentioned in the computer programs or methods of various embodiments of the application.
[0124] The computer program involved in the embodiments can be stored in a computer device readable storage medium, including but not limited to magnetic disk, magnetic tape, magnetic card, floppy disk, flash memory, optical disc, optical card, read-only memory (ROM), random access memory (RAM), erasable programmable ROM (EPROM) and electrically erasable programmable ROM (EEPROM), etc., and also includes other biological, physical or chemical structures that can realize similar or equivalent functions as the above-mentioned storage media, such as DNA, RNA, protein and other units with information storage ability, etc. In specific embodiments, the storage medium can be one of the above-mentioned medium types, or a combination of the above-mentioned medium types. In different embodiments, the computer program involved in the embodiments can be stored in a single medium in a centralized manner, or stored in multiple media in a distributed manner. The storage medium containing the computer device readable storage medium can be a non-volatile memory or a random access memory. These computer device readable storage media can be built-in in the device, or connected with the device as an external device or part of the external device. In some embodiments, the storage medium with the computer device readable storage medium is deployed locally; in other embodiments, the storage medium can also be deployed remotely from the processor, such as network attached storage accessed via RF circuit or external port and communication network, wherein the communication network can be Internet, one or more intranets, local area network (LAN), wide area network (WAN), storage area network (SAN) and the like, or appropriate combination thereof, as long as the computer device can access the storage medium. In addition, the computer program involved in the embodiments can be stored in plaintext / ciphertext, or designed as training data, and integrated and reorganized in the parameter state of deep neural network or other machine learning model through model training.
[0125] Please refer to Figure 1 In the first aspect, the embodiment provides a water supply inspection method based on POI data and water feature anomaly identification, comprising:
[0126] S101, collecting water consumption data of a plurality of water users, and constructing water consumption feature vectors according to sampling frequency classification;
[0127] S102, obtaining water user registration type identification and performing standardized coding to establish a water type database;
[0128] S103, constructing a water type identification model and training to obtain a trained water type identification model, taking the water consumption feature vector as the input feature, taking the water type label as the supervision signal, and generating a water user type prediction result;
[0129] S104, obtaining the water user coordinate information of the target area and its associated business information;
[0130] S105, acquire POI information of the target area, the POI information including business entity coordinates, operating subject name, industry classification label and business scope;
[0131] S106, match the water user coordinate information with the business entity coordinates for geographic coding, and establish a spatial mapping relationship between the water meter position and the business entity;
[0132] S107, calculate the cosine similarity value of the POI information and the business information;
[0133] S108, when the water user type prediction result is inconsistent with the water user registration type identifier, and the cosine similarity value is lower than the preset similarity threshold, a first determination result is generated, and it is determined that the water type is abnormal;
[0134] S109, when the multiple water feature vectors associated with the business entity coordinates are inconsistent with the water type database, a second determination result is generated, and it is determined that the water user association is abnormal;
[0135] S110, when the water user type prediction result is consistent with the water user registration type identifier, but the water feature vector is abnormal, a third determination result is generated, and it is determined that the water behavior is abnormal;
[0136] S111, according to the first determination result, the second determination result and the third determination result, a check work order containing an abnormal water period distribution graph, a water feature comparison table and a spatial position association graph is generated.
[0137] In step S101, by collecting water data of multiple water users, including high-frequency sampling data and monthly meter reading data, the water data is processed according to the sampling frequency classification, the mean, variance and other statistical characteristics of the water consumption in the feature time period are extracted, and the water feature vector is constructed. Through hierarchical processing, the metering data of different sampling frequencies is adapted, providing standardized feature input for subsequent model training, solving the analysis difficulty caused by the difference in data sampling frequency, ensuring that the feature data of various water users can be effectively utilized, and comprehensive feature collection.
[0138] In step S102, the registration type identifier such as residential, commercial or industrial water type is extracted from the file information of the water user, and standardized coding processing is performed to establish a structured water type database. By unifying the coding specification, the type description ambiguity in the original data is eliminated, accurate label data is provided for supervised learning, so that the subsequent model training can be based on the clear type division standard, and the classification deviation caused by the non-standard data is avoided.
[0139] In step S103, an XGBoost algorithm can be used to build a water type identification model, taking the water feature vector generated in step S101 as the input feature and the standardized type code in step S102 as the supervision signal for training, and finally outputting the water user type prediction result. Through machine learning algorithm, the mapping relationship between water behavior and type is automatically learned, which significantly improves the accuracy and efficiency of type identification compared with traditional artificial rule judgment, and provides reliable basis for anomaly detection.
[0140] In step S104, the GIS coordinate information of the water user and its associated business information in the revenue system are obtained, including the registered address, business category, water meter number, etc. Business information can be understood as the user type, industry and related water property information of the water user at the time of water registration. The source and nature of the POI information described later are independent of each other, so similarity calculation needs to be performed separately in the subsequent steps. This step establishes a data basis for the matching of POI information in the subsequent steps by associating spatial information with business data, enabling cross-validation of physical location and business attributes, and solving the problem of insufficient credibility of a single data source.
[0141] In step S105, POI information of the target area is obtained from a map service provider, including structured data such as commercial entity coordinates, business subject name, industry classification label and business scope. The public geographic information is used to supplement the business attributes of the water user, providing third-party data support for spatial correlation analysis and enhancing the objectivity of commercial user identification.
[0142] In step S106, the water user coordinate information is geocoded and matched with the commercial entity coordinates, and the mapping relationship between the water meter location and the surrounding commercial entities is established through spatial analysis algorithm. The precise correlation between water supply facilities and business premises is achieved, potential spatial position anomalies are discovered, and the problem of difficulty in positioning the actual water user in traditional inspection is solved.
[0143] In step S107, the industry classification label in the POI information and the business information of the water user are subjected to text vectorization processing, and the cosine similarity value of the two is calculated. By quantifying the matching degree of business attributes, the consistency of registered information and actual business is objectively evaluated.
[0144] In step S108, when the water user type prediction result is inconsistent with the water user registration type and the cosine similarity is lower than the preset similarity threshold, it is determined that the water type is abnormal and a first determination result is generated. Through the double verification mechanism, the property impersonation behavior is accurately identified, such as the case of commercial users pretending to be residential users, significantly reducing the misjudgment rate.
[0145] In step S109, when multiple water use feature vectors associated with the same business coordinate are generally inconsistent with the type database, it is determined that the water user association is abnormal and a second determination result is generated. Effective detection of water stealing through metering and other hidden means solves the problem of blind area detection of association abnormalities in traditional methods.
[0146] In step S110, when the water user registration type is consistent with the water user type prediction result but the water feature has statistical abnormalities, it is determined that the water use behavior is abnormal and a third determination result is generated. The non-standard water use behavior of legal users can be detected, and the inspection coverage is expanded.
[0147] In step S111, three types of determination results are automatically generated to generate a visual inspection work order, including a water use period distribution chart, a water feature comparison table, and a spatial position association chart. Through multi-dimensional data presentation, the inspection efficiency is improved, the on-site verification has a clear target direction and data support, and the efficiency of traditional manual inspection is significantly improved.
[0148] In this embodiment, water use data of water users is collected to construct water use feature vectors, which are matched with a standardized coded water use type database; a water use type identification model is established to generate a water user type prediction result; coordinate information of water users and associated business information are obtained, and are matched with geographic coding of POI information of a target area to establish a spatial mapping relationship between water meter positions and business entity coordinates; by calculating the cosine similarity of POI information and business information, combined with the water use type prediction result, a three-level abnormality determination mechanism is formed: when the predicted type is inconsistent with the registered type and the similarity is lower than a threshold, a first determination result is generated; when multiple abnormal water features are associated with the same business entity, a second determination result is generated; when the registered type matches but the water feature is abnormal, a third determination result is generated; finally, an inspection work order including an abnormal period distribution chart, a feature comparison table, and a spatial position association chart is automatically generated. The problem that traditional methods cannot effectively identify property fraud is solved; through the three-level determination mechanism and visual work order output, the inspection efficiency and accuracy are significantly improved, and three types of abnormal users can be quickly locked, providing an efficient technical means for water supply inspection.
[0149] Please refer to Figure 2 In a second aspect, the embodiment also provides a water supply inspection system 1 based on POI data and water feature abnormality identification, which is suitable for the method of the first aspect, and includes a water feature extraction module 11, a POI data processing module 12, and a logic processing module 13.
[0150] The water use feature extraction module 11 is used to collect water use data of a plurality of water users, and construct water use feature vectors according to sampling frequency classification; obtain water user registration type identification and perform standardized coding to establish a water use type database; construct a water use type identification model and train it to obtain a trained water use type identification model, use the water use feature vector as an input feature, and use the water use type label as a supervision signal to generate a water user type prediction result;
[0151] The POI data processing module 12 is used to obtain water user coordinate information and associated business information of a target area; obtain POI information of the target area, the POI information including commercial entity coordinates, business subject name, industry classification label and business scope; perform geographic coding matching on the water user coordinate information and the commercial entity coordinates to establish a spatial mapping relationship between the water meter position and the commercial entity; calculate a cosine similarity value for the POI information and the business information;
[0152] The logic processing module 13 is used to generate a first determination result when the water user type prediction result is inconsistent with the water user registration type identification and the cosine similarity value is lower than a preset similarity threshold, and determine that the water use type is abnormal; generate a second determination result when a plurality of water use feature vectors associated with the commercial entity coordinates are inconsistent with the water use type database, and determine that the water user association is abnormal; generate a third determination result when the water user type prediction result is consistent with the water user registration type identification, but the water use feature vector is abnormal, and determine that the water use behavior is abnormal; generate an inspection work order including an abnormal water use period distribution graph, a water use feature comparison table and a spatial position association graph according to the first determination result, the second determination result and the third determination result.
[0153] The operation logic of the modules involved in the above water supply inspection system corresponds to the method steps of the first aspect, and will not be described here.
[0154] Further, collecting water use data of a plurality of water users, and constructing water use feature vectors according to sampling frequency classification, includes:
[0155] For water users with monthly meter reading data:
[0156] Extracting continuous monthly water consumption data of the current water user to generate a first feature group, the first feature group including monthly water consumption and adjacent month water consumption change rate;
[0157] For water users with hourly metering data:
[0158] According to the time attribute, divide the working water period and the rest water period, calculate the water consumption statistical information of the working water period and the rest water period to form a second feature group, the water consumption statistical information including hourly mean, variance, coefficient of variation and quartile range;
[0159] For water users with minute-level metering data:
[0160] Identify typical water use behavior periods and extract dynamic features to form the third feature group. The dynamic features include the fluctuation amplitude of water consumption during peak hours, the number of instantaneous flow mutations, and the matching degree of typical water use curves.
[0161] The first feature group, the second feature group and the third feature group are standardized according to the sampling frequency level, and a water use feature vector of unified dimension is output.
[0162] In this example, for water users with monthly meter readings, monthly water consumption data for multiple consecutive months is extracted to generate a first feature group. This first feature group specifically includes the absolute water consumption data for each month and the percentage change in water consumption between two consecutive months. This approach captures seasonal patterns and abnormal fluctuations in water consumption, providing effective feature representation for users of low-frequency data.
[0163] In this example, for water users with hourly metered data, the time period is first divided into two modes: weekdays and weekends. This is further subdivided into the work period (6:00 AM to 6:00 PM) and the weekend period (6:00 PM to 6:00 AM the following day). A second feature group is calculated for each time period, including the arithmetic mean, standard deviation, coefficient of variation (ratio of the standard deviation to the mean), and interquartile range (the difference between the 75th and 25th percentiles) of hourly water consumption. This provides a more detailed reflection of water usage patterns during different time periods.
[0164] In this embodiment, for water users with minute-level metering data, a sliding window algorithm can be used to identify typical water usage periods, such as the morning peak (6:00-9:00) and evening peak (17:00-21:00). Based on these periods, a third feature group is constructed, specifically including: the range of water consumption per minute during the peak period (the difference between the maximum and minimum values), the number of sudden flow changes per unit time (the difference between adjacent minutes exceeds a threshold), and the correlation coefficient between the actual water consumption curve and the standard water consumption template.
[0165] It should be noted that the three divisions of water users with monthly meter reading data, water users with hourly metering data, and water users with minute-level metering data can be partially overlapping or completely overlapping. That is, when the metering data meets the requirements, monthly meter reading data analysis, hourly metering data analysis, and minute-level metering data analysis can be performed simultaneously for a group of water users, so that multi-dimensional water consumption data collection of the water user group can be further obtained.
[0166] The first feature group, the second feature group and the third feature group are respectively subjected to Z-score standardization processing to eliminate dimensional differences. Specifically, the monthly water consumption of the first feature group is subjected to logarithmic transformation and then standardization, the statistics of the second feature group are subjected to linear standardization, and the dynamic features of the third feature group are subjected to Robust standardization (based on quartile distance), so as to finally output water consumption feature vectors with unified dimensions and ensure the comparability of different frequency data in the model.
[0167] The embodiment realizes comprehensive characterization of features of various water consumers by processing water consumption data of different frequencies in stages: for monthly meter reading data users, the absolute water consumption and the adjacent month change rate of consecutive months are extracted to effectively capture seasonal rules and abnormal fluctuations; for hourly data users, work and rest periods of weekdays and weekends are divided, and statistical quantities such as mean and variance are calculated to finely reflect water consumption patterns at different times; for minute-level data users, peak periods are identified, and dynamic features such as fluctuation amplitude and mutation frequency are extracted to deeply characterize instantaneous water consumption behavior. In particular, the embodiment allows multi-frequency level data analysis of the same user group to be performed simultaneously, and by using differentiated standardization methods, finally generates feature vectors with unified dimensions and comparability, retaining the detailed features of high-frequency data and fully utilizing the trend information of low-frequency data.
[0168] Please refer to Figure 3 Further, the second feature group is obtained by the following steps:
[0169] S201, dividing each day into an early peak period, a daytime period, a late peak period and a night period;
[0170] S202, extracting the period water consumption information of the early peak period, the daytime period, the late peak period and the night period one by one, the period water consumption information including water consumption mean, water consumption standard deviation, water consumption coefficient of variation, water consumption quartile distance and period water consumption proportion;
[0171] S203, standardizing the period water consumption information to obtain the second feature group;
[0172] S204, and if there is missing period water consumption information caused by metering equipment abnormality, the median of water consumption of the same period of adjacent three days of the same water consumer is used for interpolation;
[0173] The water consumption coefficient of variation is represented by formula (1), and formula (1) is as follows:
[0174] C = σ / μ;
[0175] In formula (1), C is the water consumption coefficient of variation, σ is the water consumption standard deviation, and μ is the water consumption mean;
[0176] The water consumption quartile range is represented by formula (2), and formula (2) is as follows:
[0177] I = P 75 -P 25 ;
[0178] In formula (2), I is the water consumption quartile range, P 75 is the 75th percentile of water consumption, and P 25 is the 25th percentile of water consumption.
[0179] In step S201, 24 hours a day are divided into four fixed time periods, namely, an early peak period (6:00-9:00), a daytime period (9:00-17:00), a late peak period (17:00-21:00), and a night period (21:00-6:00 of the next day). This time period division method fully considers the actual water consumption rules of residents and industrial and commercial users, and ensures the comparability of data on different days through fixed time windows. This division method can accurately capture the water consumption characteristics of the early and late peak periods, and establishes a standardized analysis framework for subsequent period water information extraction.
[0180] In step S202, the period water information of the early peak period, the daytime period, the late peak period, and the night period is extracted one by one, including five core indicators, namely, water consumption mean, water consumption standard deviation, water consumption coefficient of variation, water consumption quartile range, and period water consumption proportion. The water consumption mean reflects the average water consumption level of the period, the water consumption standard deviation measures the dispersion degree, the water consumption coefficient of variation represents the stability, the water consumption quartile range shows the data distribution range, and the period water consumption proportion embodies the water consumption period preference. The water consumption characteristics of each period are comprehensively quantified, and compared with a single mean index, the user water consumption behavior mode can be revealed in multiple dimensions.
[0181] In step S203, the period water information of the early peak period, the daytime period, the late peak period, and the night period is subjected to Z-score standardization processing. In the standardization process, the water consumption mean, the water consumption standard deviation, the water consumption coefficient of variation, the water consumption quartile range, and the period water consumption proportion are respectively standardized and converted according to their numerical distribution characteristics, so as to eliminate the dimensional differences between different indicators, make the characteristics of each period comparable, and finally form a standardized second feature group. This standardization processing ensures the stability of subsequent model training, and makes the feature comparison between different users more scientific and reasonable.
[0182] In step S204, when there is missing period water information caused by metering device abnormality, the median of water consumption of the same user in the same period of the adjacent three days is used for interpolation. Specifically, for the missing morning peak period, daytime period, evening peak period or night period data, the water consumption data of the same period of the previous three days and the next three days of the user is taken respectively, and the median is calculated for filling. This method maintains the user's own water use regularity characteristics, avoids abnormal value interference, and can improve the data reconstruction accuracy compared with the simple mean interpolation method, and is especially suitable for intermittent data missing scenarios caused by device failure.
[0183] The embodiment realizes multi-level accurate description of user water use behavior through fine period division and multi-dimensional feature extraction. Each day is divided into early peak, daytime, late peak and night four feature periods, which effectively distinguishes different types of water use behavior; five indexes of water consumption mean, standard deviation, coefficient of variation, quartile range and period proportion are extracted for each period, which comprehensively covers the key dimensions of water consumption level, fluctuation characteristics and period preference; the comparability of different period features is ensured through standardization processing; the median interpolation mechanism of adjacent three days significantly improves the data integrity. The period division is more in line with the actual water use law, which improves the feature discrimination; the robust interpolation strategy improves the data reconstruction accuracy, which is especially suitable for complex scenarios that need to handle high-frequency data and abnormal data at the same time, and provides high-precision feature input for subsequent water anomaly detection and user classification.
[0184] Please refer to Figure 4 , further, the third feature group is obtained by the following steps:
[0185] S301, the typical water use behavior period includes the early peak period and the late peak period, and the water use information of the typical water use behavior period is collected minute by minute, which is recorded as the time-of-use water use information;
[0186] S302, the peak period water consumption fluctuation amplitude is extracted from the time-of-use water use information, and the instantaneous flow mutation frequency is counted;
[0187] and calculate the typical water curve matching degree, including:
[0188] S303, the historical standard water mode curve of the current water user is obtained;
[0189] S304, the real-time water curve is generated according to the time-of-use water use information, and the real-time water curve is time-aligned with the historical standard water curve;
[0190] S305, the Euclidean distance of the time-aligned real-time water curve and the historical standard water curve at each sampling point is calculated;
[0191] S306, the reciprocal of the distance value of all sampling points is averaged to obtain a matching degree score in the interval of 0-1, and a typical water consumption curve matching degree is obtained;
[0192] S307, the peak period water consumption fluctuation range, the number of instantaneous flow mutations, and the typical water consumption curve matching degree are combined to form a third feature group.
[0193] In step S301, the typical water consumption behavior period is specifically limited to the morning peak period and the evening peak period, which are the most characteristic time periods of user water consumption behavior. By collecting water consumption information of the typical water consumption behavior period minute by minute, time-sharing water consumption information is obtained, which records the accurate water consumption data of each minute in the peak period. High-frequency data acquisition can capture the micro water consumption characteristics that traditional hourly data cannot reflect, providing a data basis for subsequent detailed behavior analysis.
[0194] In step S302, the peak period water consumption fluctuation range and the number of instantaneous flow mutations are extracted from the time-sharing water consumption information. The peak period water consumption fluctuation range refers to the difference between the maximum and minimum water consumption per minute in the period, reflecting the intensity of user water consumption; the number of instantaneous flow mutations counts the number of times the water consumption per minute changes by more than a set threshold, representing the stability of water consumption behavior. The joint extraction of these two indicators can effectively identify abnormal water consumption patterns.
[0195] In step S303, the historical standard water consumption pattern curve of the current water user is obtained, which is a representative water consumption pattern obtained by analyzing the typical water consumption behavior period data in the user's historical data after cleaning and normalization.
[0196] In step S304, the real-time water consumption curve is generated according to the time-sharing water consumption information, and the real-time water consumption curve is time-aligned with the historical standard water consumption curve. The time alignment process uses the dynamic time warping algorithm to eliminate matching errors caused by water consumption time shift, ensuring the best correspondence between the two curves in the time dimension. Alignment processing significantly improves the accuracy of subsequent matching degree calculation, and improves the matching reliability under time shift conditions.
[0197] In step S305, the Euclidean distance between the time-aligned real-time water consumption curve and the historical standard water consumption curve at each sampling point is calculated. The Euclidean distance calculation is based on minutes as the basic unit, quantifying the water consumption difference between the two curves at each time point, resulting in a series of distance values. Point-to-point distance calculation can accurately capture the local differences between real-time water consumption behavior and historical patterns.
[0198] In step S306, the distance values of all sampling points are averaged after being inverted, obtaining a matching degree score in the interval of 0-1, i.e., the typical water consumption curve matching degree. The score algorithm converts the distance value into a similarity value, and obtains the overall matching degree through averaging processing. The closer the value is to 1, the higher the matching degree. The conversion method not only retains the local difference information, but also provides an intuitive overall evaluation index, so that the identification sensitivity of abnormal water consumption is improved.
[0199] In step S307, the three indexes of water consumption fluctuation amplitude in peak period, instantaneous flow mutation times and typical water consumption curve matching degree are combined to form a third feature group. The three indexes respectively depict the water consumption characteristics of the user from three dimensions of water consumption change range, instantaneous fluctuation frequency and overall mode similarity, forming a complementary feature system.
[0200] The embodiment realizes fine analysis of user water consumption behavior through high-frequency data acquisition and multi-dimensional feature extraction. Specifically, focusing on the two typical water consumption behavior periods of morning peak and evening peak, time-based water consumption information is obtained by minute-by-minute acquisition; the water consumption fluctuation amplitude and the instantaneous flow mutation times in the peak period are extracted to reflect the intensity and stability of water consumption; the dynamic time warping and Euclidean distance calculation are used to realize the accurate matching of real-time water consumption curve and historical standard water consumption curve; and finally, a third feature group containing three key indexes is constructed. Minute-level data acquisition enables instantaneous feature recognition; multi-index combination improves the detection rate of abnormal behavior; curve matching algorithm improves the matching reliability under time shift. It is especially suitable for scenarios that need to detect subtle water consumption anomalies, providing high-precision feature support for leakage identification and abnormal water consumption warning, and significantly improving the overall recognition accuracy.
[0201] Further, the water user registration type identifier is obtained and standardized coded, and a water type database is established, including:
[0202] The original registration type information of the water user in the business system of the water supply enterprise is obtained, and the original registration type information includes text description type registration information and code type registration information;
[0203] The text description type registration information is standardized processed, including:
[0204] The keywords in the text description type registration information are extracted;
[0205] The keywords are matched with the preset water type keyword library;
[0206] The corresponding standard type code is assigned according to the matching result;
[0207] The code type registration information is standardized processed, including:
[0208] A mapping relationship table of original code and standard type code is established;
[0209] convert the original code into a standard type code by table lookup;
[0210] store the processed standard type code in association with the unique identifier of the water user to form a water type database, the water type database at least including three types of standard codes for commercial water, industrial water, and residential water.
[0211] In addition, periodically check the water type database, including:
[0212] randomly extract part of the registration information of water users for manual review;
[0213] When an error in the code is found, trace back to the original registration information and correct the mapping table;
[0214] feedback the results of the check to the standardization process to optimize parameters.
[0215] In this embodiment, the original registration type information of the water user in the business system of the water supply enterprise is obtained, which includes two forms of text description type registration information and code type registration information. For the text description type registration information, the keywords therein are extracted and matched with a preset water type keyword library, and a corresponding standard type code is assigned to each text description according to the matching result. For the code type registration information, a mapping table of original code and standard type code is established, and the conversion of the original code to the standard type code is realized by table lookup. Finally, the processed standard type code is stored in association with the unique identifier of the water user to form a water type database including three types of standard codes for commercial water, industrial water, and residential water, ensuring that registration type information of different sources and different forms can be uniformly converted into standardized type codes.
[0216] This embodiment realizes the unified management of the registration type information of water users by establishing a standardized water type database. By using keyword matching and code mapping, the problem of non-uniform format of original registration type information is effectively solved, ensuring the accurate classification of different types of users such as commercial water, industrial water, and residential water, and making the comparison of water features of different types of users more scientific and reasonable.
[0217] Further, a water type recognition model is constructed and trained to obtain a trained water type recognition model, including:
[0218] An XGBoost algorithm is used to construct the water type recognition model and initialize the model parameters.
[0219] The sample water feature vector is obtained, and the sample water feature vector includes a first sample feature group, a second sample feature group, and a third sample feature group. The sample water feature vector is preprocessed, including:
[0220] The first sample feature group is subjected to logarithmic transformation processing;
[0221] The second sample feature group is subjected to Z-score standardization;
[0222] The third sample feature group is subjected to [0, 1] interval normalization;
[0223] The preprocessed sample water feature vector is used as an input feature, and a five-fold cross-validation method is used for model training of the water type identification model, including:
[0224] A sample set is generated according to the sample water feature vector, and the sample set is randomly divided into five mutually exclusive subsets. Four subsets are selected as a training set each time, and the remaining one subset is selected as a validation set;
[0225] The training is repeated until all subsets are used as the validation set. The model performance index is evaluated, and the classification accuracy of the validation set is calculated;
[0226] Misclassified samples in the confusion matrix are recorded;
[0227] The model with the best performance in the validation set is selected as the trained water type identification model.
[0228] In this embodiment, the XGBoost algorithm is used to construct the water type identification model, and the model performance is ensured through feature differentiation and cross-validation training. The three types of sample feature groups are subjected to logarithmic transformation, Z-score standardization, and [0, 1] normalization processing, respectively, in the feature preprocessing link, effectively solving the problem of different feature dimensions and distribution differences. The five-fold cross-validation method is used in the training and verification link, and through five iterations, each sample is ensured to participate in the verification. The classification accuracy and misclassified samples are recorded each time. In the model optimization link, the optimal model is selected based on the performance of the validation set, and the confusion matrix is analyzed to identify the easily confused water types. The entire training process strictly corresponds to the feature preprocessing method and the cross-validation strategy, ensuring the reliability of the model evaluation results.
[0229] The embodiment constructs a high-performance water type identification model through differential data preprocessing and strict cross-validation training. The preprocessing strategy combining logarithmic transformation, Z-score standardization and interval normalization effectively improves the expression effect of different feature groups; the five-fold cross-validation mechanism ensures the comprehensiveness and reliability of model evaluation, and the multi-round training optimization effectively avoids the problem of overfitting. The water type identification model obtained finally can accurately distinguish different water types, providing an intelligent decision support tool for fine management and differentiated services of water supply enterprises, and significantly improving the accuracy and stability of water type identification.
[0230] Further, the water user coordinate information and the commercial entity coordinate are geocoded and matched, and a spatial mapping relationship between the water meter position and the commercial entity is established, including:
[0231] Obtaining the water meter position in the water user coordinate information, the water user coordinate information being from the positioning data of the water supply network GIS system;
[0232] Extracting the commercial entity coordinate in the POI information;
[0233] Establishing a adjustable buffer area with a radius of 50-200 meters centered on the water user coordinate;
[0234] Using a spatial connection algorithm to establish a spatial association between the commercial entity coordinate falling into the adjustable buffer area and the water meter position:
[0235] Judging the spatial topological relationship of the commercial entity coordinate in each adjustable buffer area, recording the mapping relationship between the commercial entity coordinate meeting the distance threshold and the water meter, and recording the spatial mapping relationship;
[0236] Establishing a multi-level spatial association rule, including:
[0237] First-level association: the straight-line distance between POI and water meter is less than or equal to 50 meters;
[0238] Second-level association: the distance between POI and water meter is 50-100 meters;
[0239] Third-level association: the distance between POI and water meter is 100-200 meters;
[0240] Performing conflict detection on the spatial mapping relationship, including:
[0241] When a single water meter position is associated with multiple commercial entity coordinates with conflicting business properties, mark it as a to-be-checked association;
[0242] When there is a commercial entity coordinate not associated with any water meter, generate a missing association warning;
[0243] According to the spatial mapping relationship after the conflict detection, a spatial mapping relationship table is output, which includes the corresponding relationship between the water meter number and the business entity number, the hierarchical space identifier, the spatial distance measured value, and the associated confidence score.
[0244] The embodiment establishes the spatial mapping relationship between the water meter position and the business entity by using the geocoding technology. The water meter coordinate data is obtained from the water supply network GIS system, and the business entity coordinates in the POI information are extracted. A dynamic buffer area matching method is used to generate a search range with a radius of 50-200 meters centered on the water meter position, and a spatial connection algorithm is used to associate the qualified business entities with the water meter. The matching process is implemented in three levels of precision division: first-level association within 50 meters, second-level association between 50-100 meters, and third-level association between 100-200 meters. The system automatically detects and marks two types of abnormal situations: when a single water meter is associated with multiple business entities with conflicting operating properties, a to-be-checked mark is generated, and when a business entity is found without being associated with any water meter, a missing association warning is triggered. The final output spatial mapping relationship table contains core fields such as water meter number, business entity number, association level, measured distance, and confidence score.
[0245] The spatial mapping relationship constructed in this embodiment realizes the precise connection between water supply facilities and business activities. The dynamic buffer area design adapts to the matching needs of different density urban areas, and the three-level association system ensures the controllable precision of the matching results. The abnormal detection mechanism effectively identifies matching problems in complex scenarios and provides clear directions for manual review. The generated mapping relationship table not only supports water type identification, but also provides a reliable spatial data foundation for business water spatial distribution analysis, water supply service optimization, and other applications. This scheme is particularly suitable for water management in commercial concentrated areas, and effectively supplements the deficiencies of traditional water user information through geographic spatial relationship.
[0246] Further, the cosine similarity value is calculated between the POI information and the business information, including:
[0247] The name of the business subject, the industry classification label, and the business scope are obtained, denoted as POI text information;
[0248] The business category text in the business information is extracted, including the registered business scope;
[0249] Text preprocessing is performed on the POI text information and the business category text, including:
[0250] Removing stop words and special characters;
[0251] Using a Chinese word segmentation tool to segment words;
[0252] Replacing synonyms with standard terms;
[0253] obtain the preprocessed POI text information and the preprocessed business category text;
[0254] perform first word frequency statistics on the preprocessed POI text information, calculate weight values of a plurality of words in the first word frequency statistics by using a TF-IDF algorithm, and generate a first text feature vector;
[0255] perform second word frequency statistics on the preprocessed business category text, calculate weight values of a plurality of words in the second word frequency statistics by using a TF-IDF algorithm, and generate a second text feature vector;
[0256] perform cosine similarity calculation on the first text feature vector and the second text feature vector to obtain a cosine similarity value.
[0257] The embodiment realizes similarity calculation of POI information and business information through text feature matching. The calculation process includes two stages of text feature extraction and similarity measurement. In the text feature extraction stage, the POI text information such as the name of the business subject, the industry classification label, and the business scope, and the business category text such as the registered business scope are standardized, including stop word filtering, Chinese word segmentation, and synonym normalization. Then, the TF-IDF algorithm is used to construct text feature vectors, and the importance of feature words is highlighted through word frequency statistics and inverse document frequency weighting. In the similarity measurement stage, cosine similarity calculation is performed based on the generated two text feature vectors to quantify the matching degree of the POI information and the business information.
[0258] The embodiment realizes the unified conversion of structured industry labels and unstructured business scope texts into comparable features through multi-source text integration processing. Synonym standardization processing enhances semantic consistency and avoids matching deviations caused by differences in expression. The TF-IDF weighting mechanism effectively distinguishes between key feature words and ordinary words, improving the discrimination of similarity calculation. It provides text evidence support for the authenticity verification of water meter associated business entities and assists in judging the reliability of spatial mapping relationships, especially suitable for identifying special cases such as changes in business premises without updating registered information.
[0259] Further, according to the first determination result, the second determination result, and the third determination result, a check work order containing an abnormal water use period distribution chart, a water use feature comparison table, and a spatial position association chart is generated, including:
[0260] The water use feature comparison table is generated according to the first determination result to display comparison data of water use amount statistical indicators in each period;
[0261] The spatial position association chart is drawn according to the second determination result to mark the spatial distribution of the abnormal water meter position and the associated business entity coordinates;
[0262] According to the third determination result, an abnormal water consumption time period distribution diagram is generated to display the water consumption fluctuation of the abnormal time period in the form of a heat map;
[0263] The method further comprises:
[0264] The water consumption feature comparison table is associated with the spatial position association diagram and is labeled;
[0265] The operating time information of the POI information is superimposed in the abnormal water consumption time period distribution diagram;
[0266] The inspection priority score corresponding to each abnormal point is labeled, and a structured inspection work order is output, which includes a basic information module, an abnormal evidence module, a processing suggestion module, and an additional information module.
[0267] In this embodiment, the water consumption feature comparison table dynamic generation module extracts the key indicators in the first determination result to present the water consumption average, peak value, and fluctuation coefficient of the normal and abnormal time periods in the form of a table; the spatial position association diagram drawing engine processes the second determination result, labels the water meter points of different abnormal levels using a hierarchical coloring technique, and the abnormal time period distribution diagram generation component analyzes the third determination result, reflects the water consumption abnormality intensity using a heat map gradient color scale, and synchronously superimposes the business entity operating time period data layer in this region.
[0268] This embodiment analyzes the spatial-temporal correlation, embeds the operating time data in the heat map, and intuitively displays the correlation between the water consumption abnormality and the operating time; the intelligent labeling system automatically calculates the inspection priority of the abnormal point, generates a score by comprehensively considering the spatial aggregation degree, abnormal duration, and water consumption deviation degree; the structured output template integrates the scattered abnormal evidence into a logical chain, the basic information module records the water meter attributes, the abnormal evidence module integrates the visual charts, the processing suggestion module recommends the targeted inspection scheme, and the additional information module retains the manual checking field; the interactive operation interface supports the associated search of the work order elements, and clicking the spatial point can display the corresponding feature comparison data and time period distribution diagram. This scheme significantly improves the accuracy and inspection efficiency of commercial water consumption anomaly identification, and provides a decision support tool for water management departments.
[0269] Further use examples are given below for understanding:
[0270] Please refer to Figure 5 This example gives a water consumption inspection process in a specific application scenario:
[0271] The water consumption user feature anomaly detection work is carried out in the following way:
[0272] The water consumption feature value of each user is constructed, including:
[0273] Water consumption of each feature time period (the feature time period can be as long as several hours to several days, including water consumption during peak water consumption period, water consumption during off-peak water consumption period, water consumption during special holidays, etc.); mean, coefficient of variation, variance, interquartile range (IQR) of water consumption of each feature time period;
[0274] For each user, extract the user's water profile information, including water type, charging standard, etc., and classify the user using the user profile information;
[0275] Select more reliable data as training samples, use XGBoost algorithm, use the collected water feature values as model independent variables, and use the processed data as classification labels, train the classification model to output classification labels according to the input water feature values.
[0276] If the classification label output by the model does not match the actual situation, the related user is regarded as an abnormal user to be investigated, and the water supply inspection personnel are organized to conduct on-site inspection;
[0277] In combination with Figure 5 Specifically understand the above process:
[0278] Determine the selected user set:
[0279] Select users with complete data and reliable information to form a user set U = {user1, user2, …, user n} According to the user type, each user type is mapped to y = {1, 2, …, m} (assuming there are m types of users).
[0280] According to the basic data, process the sample classification:
[0281] Build a corresponding sample set {x1, x2, …, x n} for the user set U, for any sample x i , the sample feature value vector is Because the sampling conditions of water consumption of different users are obviously different (some users only have monthly manual meter reading water consumption, and some users have hourly or minute-level real-time metering water consumption), multiple models and sample sets corresponding to the models need to be constructed according to actual metering to adapt to various situations. The specific calculation method of the feature value vector is introduced as follows:
[0282] Case 1:
[0283] Use monthly water consumption to directly build a sample set:
[0284] Determine the time period for constructing the sample set (the time period should be more than 6 months), extract the monthly water consumption data of each user in the user set U for the corresponding time period, and construct a sample set, where the water consumption data for each month is a feature value of several samples;
[0285] Scope of application: Applicable to abnormal identification and troubleshooting of users who only have monthly meter reading data.
[0286] The specific construction method of the sample set is: Since the total number of monthly meter reading data is limited and the details are relatively few, the sample characteristic value directly uses the water consumption of each month in the selected time period and the water consumption change rate of each month, that is, and It represents the water consumption of sample i in the nth month.
[0287] Case 2:
[0288] The sample set is constructed using high-frequency water consumption sampling metering data:
[0289] Determine the time period of water consumption data used to construct the sample set (the length of the time period should ensure that the length of the original water consumption time series is greater than 100), and use the water consumption time series data of the corresponding time period to process the sample characteristic values. The characteristic values include:
[0290] The average water consumption during the characteristic time period;
[0291] Variance of water consumption during characteristic time periods;
[0292] Coefficient of variation of water consumption during characteristic time periods;
[0293] Interquartile range (IQR) of water use during the characteristic time period.
[0294] Methods for selecting characteristic time periods include:
[0295] For daily sampling water consumption data, the statutory holidays are selected as the characteristic time period to calculate the characteristic value;
[0296] For daily sampled water consumption data, the working day period is selected as the characteristic time period to calculate the characteristic value;
[0297] For the daily sampling water consumption data, the weekend period is selected as the characteristic time period to calculate the characteristic value;
[0298] For hourly and minute-level sampling water consumption data, 6:00-8:00 and 18:00-20:00 on statutory holidays are selected as characteristic time periods to calculate characteristic values;
[0299] For hourly and minute-level sampling water consumption data, 6:00-8:00, 18:00-20:00, and 21:00-24:00 on weekdays are selected as characteristic time periods to calculate characteristic values;
[0300] For hourly and minute-level sampling water consumption data, 6:00-8:00, 18:00-20:00, and 21:00-24:00 on holidays are selected as characteristic time periods to calculate characteristic values;
[0301] Create a labeled data set for the user set U:
[0302] For any user in the user set U, create a labeled data pair (x,y). i As an example, how to create (x i ,y i ):
[0303] x i Determination: Establish the sample eigenvalue vector according to the described process
[0304] y i Determination: According to the user's type information, determine y i The corresponding discrete integer value.
[0305] The labeled data pairs D corresponding to the user set U are D = {(x1,y1),(x2,y2),…,(x n ,y n )} is divided into two sets D1 and D2, which are used for training and verification respectively. The XGBoost model is trained based on the D1 dataset. According to the input sample eigenvalue vector Predict its user type y i , and verified using the D2 dataset.
[0306] During model training, for any high-frequency level of sampled water consumption data, the following methods can be used to automatically select characteristic time periods and their corresponding characteristic values:
[0307] Randomly select a time series interval with a length greater than 3, calculate its eigenvalue, add the new eigenvalue to the model, and calculate its gain G, which is expressed by formula (3). Formula (3) is as follows:
[0308]
[0309] In formula (3), T j are all nodes split by feature j, and ΔLoss(t) is the loss reduction after node t is split.
[0310] If the new eigenvalue j is greater than the average gain of all eigenvalues in the original model, then the eigenvalue is retained.
[0311] For all water users, the constructed model is used to predict their user type. When the predicted user type is different from the actual type, the user is regarded as a suspicious user and an on-site investigation is carried out.
[0312] On this basis, the process shown in the present example further comprises:
[0313] Obtain POI (Point of Interest) data of Gaode Map, Baidu Map or other map service providers to obtain real-time updated commercial, industrial user operation sites, operation nature (general commercial users, bath, catering, car washing) and coordinate information;
[0314] Carry out word segmentation fuzzy matching between the description information of the POI and the user information in the revenue system, and screen out POIs for which water use information cannot be found as suspicious POIs;
[0315] For the suspicious POI, use the GIS system to screen all users within a radius of 50-200 m with the POI coordinate as the center, confirm whether the classification calculated by the user utilization model corresponding to the surrounding meter of the POI is consistent with the actual classification, and investigate whether the actual water use user corresponding to the POI exists from other users;
[0316] Submit the suspicious user and the user with abnormal surrounding water features to manual on-site verification, update the revenue information, and at the same time, incorporate the verification result into the user set U.
[0317] Periodically update the data and compare them with the previous version of the data obtained, extract the operation site, operation nature (general commercial users, bath, catering, car washing) and coordinate information of the newly added user, and compare them with the revenue data change. If the POI data is updated but the data in the revenue system is not updated, the metering situation of the user is confirmed on site, the revenue information is updated, and at the same time, the verification result is incorporated into the training set of the model.
[0318] The use method can timely find out the water stealing situation of users that have a greater impact on the interests of water sales enterprises, and the investigation amount is small.
[0319] Alternatively, the process shown in the present example further comprises:
[0320] Use the data in the revenue database to periodically traverse the water use data of all users to determine whether the model classification is consistent with the actual classification, and hand over the user with abnormal water use classification to manual verification, and incorporate the verification result into the training set of the model.
[0321] Construct a user water use classification model for the application scenario of water supply inspection to investigate abnormal users;
[0322] The water feature analysis model can use the XGBoost algorithm to construct a classification model, and complete the abnormal detection work by comparing whether there is a difference between the classification model and the user archive registration information;
[0323] In order to construct the above model, when calculating the user feature value, the water consumption or water instantaneous flow of each characteristic time period can be used; the water consumption peak period distribution, water consumption trough period distribution; the coefficient of variation, variance, interquartile range (IQR), standard deviation of the water consumption or water instantaneous flow of each characteristic time period;
[0324] When applied, the POI data can be compared with the revenue database to narrow the range of manual search.
[0325] Compared with the existing technical solutions, the method process proposed in the present example can quickly lock in users who exist false positive user types to steal water:
[0326] The existing user portrait model or user feature recognition model often identifies the time period water consumption mode of each user to achieve the purpose of water leakage anomaly recognition, or extracts the water consumption mode to serve the scheduling business; in fact, different water consumption features reflect different water consumption types, which can be used to infer the water consumption type, and compare whether there is a difference between the inferred water consumption type and the actual water consumption type; or directly use the algorithm to judge whether the user water consumption feature reflects the water consumption type.
[0327] The data involved in the method process proposed in the present example is easy to obtain and easy to implement.
[0328] Unlike the prior art, in the above technical solution, water consumption data of water users is collected to construct a water consumption feature vector, and is matched with a standardized coded water consumption type database; a water consumption type recognition model is established to generate a water user type prediction result; coordinate information of the water user and its associated business information are obtained, and are geocoded matched with POI information of a target area to establish a spatial mapping relationship between the water meter position and the business entity coordinates; by calculating the cosine similarity of the POI information and the business information, combined with the water consumption type prediction result, a three-level anomaly judgment mechanism is formed: when the predicted type is inconsistent with the registered type and the similarity is lower than a threshold, a first judgment result is generated; when multiple abnormal water consumption features are associated with the same business entity, a second judgment result is generated; when the registered type matches but the water consumption feature is abnormal, a third judgment result is generated; finally, an inspection work order containing an abnormal period distribution graph, a feature comparison table and a spatial position association graph is automatically generated. The problem that the traditional method cannot effectively identify property fraud is solved; through the three-level judgment mechanism and the visual work order output, the inspection efficiency and accuracy are significantly improved, and three types of abnormal users can be quickly locked, providing an efficient technical means for water supply inspection.
[0329] Finally, it should be noted that the above embodiments have been described in the specification and drawings of the application, but this does not limit the patent protection scope of the application. Any equivalent structure or equivalent process replacement or modification based on the essential concept of the application, using the content described in the specification and drawings of the application, and directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, etc., are all included in the patent protection scope of the application.
Claims
1. A water supply audit method based on POI data and water use feature anomaly identification, characterized in that: include: Collect water consumption data from multiple water users and construct water consumption feature vectors according to sampling frequency; Obtain water user registration type identification and standardize coding to establish a water use type database; Build and train a water user type recognition model to obtain a trained water user type recognition model. Use the water user feature vector as input and the water user type label as a supervisory signal to generate a water user type prediction result. Obtaining coordinate information of water users in the target area and their associated business information; Obtain POI information for the target area, including business entity coordinates, business entity name, industry classification label, and business scope; Geocode and match water user coordinate information with commercial entity coordinates to establish a spatial mapping relationship between water meter locations and commercial entities; Calculate the cosine similarity value between POI information and business information; When the water user type prediction result is inconsistent with the water user registration type identifier, and the cosine similarity value is lower than the preset similarity threshold, a first judgment result is generated, and it is judged that the water use type is abnormal; When the multiple water use feature vectors associated with the business entity coordinates are inconsistent with the water use type database, a second determination result is generated, which is determined to be a water user association anomaly; When the water user type prediction result is consistent with the water user registration type identifier, but the water use feature vector is abnormal, a third judgment result is generated, which is determined to be abnormal water use behavior; Based on the first judgment result, the second judgment result and the third judgment result, an audit work order is generated, which includes a distribution diagram of abnormal water use time periods, a comparison table of water use characteristics and a spatial location association diagram.
2. The water supply audit method based on POI data and water use characteristic anomaly identification according to claim 1 is characterized in that: Collect water consumption data from multiple water users and construct water consumption feature vectors based on sampling frequency, including: For water users with monthly meter reading data: Extracting a number of consecutive monthly water consumption data of a current water user to generate a first feature group, wherein the first feature group includes monthly water consumption and a water consumption change rate between adjacent months; For water users with hourly metering data: Divide the working water use period and the rest water use period according to the time attribute, calculate the water consumption statistics of the working water use period and the rest water use period to form a second feature group, and the water consumption statistics include the hourly mean, variance, coefficient of variation and interquartile range; For water users with minute-level metering data: Identify typical water usage periods and extract dynamic features to form a third feature group. The dynamic features include the fluctuation amplitude of water consumption during peak hours, the number of instantaneous flow mutations, and the matching degree of typical water consumption curves. The first feature group, the second feature group, and the third feature group are standardized according to the sampling frequency level, and a water use feature vector of a unified dimension is output.
3. The water supply audit method based on POI data and water use characteristic anomaly identification according to claim 2 is characterized in that: The second feature set is obtained by the following steps: Divide each day into morning peak period, daytime period, evening peak period and nighttime period; Extracting the water consumption information for the morning peak period, daytime period, evening peak period, and nighttime period one by one, wherein the water consumption information for each period includes the mean water consumption, the standard deviation of water consumption, the coefficient of variation of water consumption, the interquartile range of water consumption, and the proportion of water consumption during each period; performing standardization processing on the water usage information of the time period to obtain the second feature group; Also, if there is a lack of water consumption information during a period due to an abnormality in the metering equipment, the median water consumption of the same water user during the same period over three consecutive days will be used for interpolation; The coefficient of variation of water consumption is expressed by formula (1), which is as follows: C = σ / μ; In formula (1), C is the coefficient of variation of water consumption, σ is the standard deviation of water consumption, and μ is the mean of water consumption; The water consumption interquartile range is expressed by formula (2), which is as follows: I=P 75 -P 25 ; In formula (2), I is the interquartile range of water consumption, P 75 is the 75th percentile of water consumption, P 25 The 25th percentile for water use.
4. The water supply audit method based on POI data and water use characteristic anomaly identification according to claim 2 or 3 is characterized in that: The third feature group is obtained by the following steps: The typical water use behavior period includes the morning peak period and the evening peak period, and water use information of the typical water use behavior period is collected minute by minute and recorded as time-sharing water use information; Extracting the fluctuation amplitude of water consumption during peak hours from the time-sharing water consumption information, and counting the number of instantaneous flow rate mutations; And calculate the matching degree of typical water use curve, including: Obtain the historical standard water consumption pattern curve of current water users; Generate a real-time water consumption curve based on the time-sharing water consumption information, and align the real-time water consumption curve with the historical standard water consumption curve in time series; Calculate the Euclidean distance between the real-time water consumption curve after time series alignment and the historical standard water consumption curve at each sampling point; The distance values of all sampling points are averaged and the matching degree score between 0 and 1 is obtained to obtain the matching degree of the typical water use curve; The third feature group is formed by combining the fluctuation amplitude of water consumption during peak hours, the number of instantaneous flow mutations, and the matching degree of the typical water consumption curve.
5. The water supply audit method based on POI data and water use characteristic anomaly identification according to claim 1 is characterized in that: Obtain water user registration type identification and standardize coding to establish a water use type database, including: Obtaining original registration type information of the water user in the water supply enterprise business system, wherein the original registration type information includes text description registration information and code type registration information; Standardize text-descriptive registration information, including: Extract keywords from text description registration information; Match the keywords with the preset water use type keyword library; Assign the corresponding standard type code according to the matching results; Standardize coded registration information, including: Establish a mapping relationship table between original codes and standard type codes; Convert the original code into standard type code by looking up the table; The processed standard type code is associated with the unique identifier of the water user and stored to form a water use type database, which contains at least three types of standard codes: commercial water, industrial water, and residential water.
6. The water supply audit method based on POI data and water use characteristic anomaly identification according to claim 1 is characterized in that: Construct and train a water use type recognition model to obtain a trained water use type recognition model, including: Use XGBoost algorithm to build water type identification model and initialize model parameters; Acquire a sample water feature vector, where the sample water feature vector includes a first sample feature group, a second sample feature group, and a third sample feature group, and preprocess the sample water feature vector, including: performing logarithmic transformation on the first sample feature group; Z-score standardization is applied to the second sample feature group; Performing [0, 1] interval normalization on the third sample feature group; The pre-processed sample water usage feature vector is used as an input feature, and a five-fold cross-validation method is used to train the water type recognition model, including: Generate a sample set based on the sample water feature vector, randomly divide the sample set into 5 mutually exclusive subsets, select 4 subsets as training sets each time, and the remaining 1 subset as a validation set; Repeat the training until all subsets are used as validation sets, evaluate the model performance indicators, and calculate the classification accuracy of the validation set; Record the misclassified samples in the confusion matrix; The model with the best performance in the validation set is selected as the trained water type recognition model.
7. The water supply audit method based on POI data and water use characteristic anomaly identification according to claim 1 is characterized in that: Geocode and match water user coordinate information with commercial entity coordinates to establish a spatial mapping relationship between water meter locations and commercial entities, including: Obtain the water meter location from the user's coordinate information, which comes from the positioning data of the water supply network GIS system; Extracting business entity coordinates from POI information; Establish an adjustable buffer zone with a radius of 50-200 meters centered on the water user's coordinates; A spatial join algorithm is used to spatially associate the coordinates of commercial entities that fall within the adjustable buffer area with the water meter locations: Determine the spatial topological relationship of the business entity coordinates within each adjustable buffer area, and record the mapping relationship between the business entity coordinates and the water meter that meets the distance threshold, which is recorded as the spatial mapping relationship; Establish multi-level spatial association rules, including: First-level association: The straight-line distance between the POI and the water meter is ≤ 50 meters; Secondary association: The distance between the POI and the water meter is 50-100 meters; Level 3 association: The distance between the POI and the water meter is 100-200 meters; Conflict detection of spatial mapping relationships, including: When a single water meter location is associated with multiple business entity coordinates with conflicting business natures, it is marked as pending verification. When there are commercial entity coordinates that are not associated with any water meter, a missing association warning is generated; A spatial mapping relationship table is outputted according to the spatial mapping relationship after conflict detection, wherein the spatial mapping relationship table includes a correspondence between water meter numbers and commercial entity numbers, hierarchical spatial identifiers, spatial distance measured values, and associated credibility scores.
8. The water supply audit method based on POI data and water use characteristic anomaly identification according to claim 1 is characterized in that: Calculate the cosine similarity value between POI information and business information, including: Obtain the name of the business entity, industry classification label, and business scope, and record them as POI text information; Extracting business category text from the business information, wherein the business category text includes the registered business scope; Performing text preprocessing on the POI text information and business category text, including: Remove stop words and special characters; Use Chinese word segmentation tools to segment words; Replace synonyms with standard terms; Obtaining pre-processed POI text information and pre-processed business category text; Performing a first word frequency statistic on the preprocessed POI text information, calculating weight values of multiple words in the first word frequency statistic using a TF-IDF algorithm, and generating a first text feature vector; Performing a second word frequency statistic on the pre-processed business category text, using the TF-IDF algorithm to calculate the weight values of multiple words in the second word frequency statistic, and generating a second text feature vector; A cosine similarity calculation is performed on the first text feature vector and the second text feature vector to obtain a cosine similarity value.
9. The water supply audit method based on POI data and water use characteristic anomaly identification according to claim 1 is characterized in that: Based on the first, second, and third determination results, an audit work order is generated that includes a distribution diagram of abnormal water usage periods, a comparison table of water usage characteristics, and a spatial location correlation diagram, including: Generate a water consumption feature comparison table based on the first determination result to display comparative data of water consumption statistical indicators in each time period; Draw a spatial position association map based on the second determination result, marking the spatial distribution of abnormal water meter locations and associated business entity coordinates; Generate an abnormal water consumption period distribution map based on the third determination result, and display the water consumption fluctuation during the abnormal period in the form of a heat map; The method further comprises: Associate and mark the water use characteristics comparison table with the spatial location association map; Overlay the operating hours of POI information on the abnormal water use period distribution map; The audit priority score corresponding to each abnormal point is marked, and a structured audit work order is output. The audit work order includes a basic information module, an abnormal evidence module, a processing suggestion module, and an additional information module.
10. A water supply audit system based on POI data and water use feature anomaly identification, characterized by: The method according to any one of claims 1 to 9, wherein the system comprises a water feature extraction module, a POI data processing module, and a logic processing module; The water use feature extraction module is used to collect water use data from multiple water users and construct water use feature vectors according to the sampling frequency; obtain the water user registration type identification and perform standardized coding to establish a water use type database; construct and train a water use type recognition model to obtain a trained water use type recognition model, use the water use feature vector as an input feature, and the water use type label as a supervision signal to generate a water user type prediction result; The POI data processing module is used to obtain the coordinate information of water users in the target area and their associated business information; obtain the POI information of the target area, which includes the coordinates of the business entity, the name of the business entity, the industry classification label and the business scope; geocode and match the water user coordinate information with the coordinates of the business entity to establish a spatial mapping relationship between the water meter location and the business entity; Calculate the cosine similarity value between POI information and business information; The logic processing module is used to generate a first determination result when the water user type prediction result is inconsistent with the water user registration type identifier and the cosine similarity value is lower than a preset similarity threshold, and determine that the water use type is abnormal; When the multiple water use feature vectors associated with the business entity coordinates are inconsistent with the water use type database, a second determination result is generated, which is determined to be a water user association anomaly; When the water user type prediction result is consistent with the water user registration type identifier, but the water use feature vector is abnormal, a third judgment result is generated, which is determined to be abnormal water use behavior; Based on the first judgment result, the second judgment result and the third judgment result, an audit work order is generated, which includes a distribution diagram of abnormal water use time periods, a comparison table of water use characteristics and a spatial location association diagram.
Citation Information
Cited By
Water affair management method, system and device
CN121542707A