Leakage detection method, device, computer readable storage medium and terminal equipment
By constructing a multi-dimensional feature data sample set and training an artificial intelligence model, the problem of low accuracy of leakage detection methods in the DMA management system in the existing technology is solved, and more efficient leakage detection is achieved.
Patent Information
- Application Number
- CN202410606974.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-05-16
AI Technical Summary
Existing leakage detection methods are difficult to fully utilize the rich data resources of the District Metered Area (DMA) management system, resulting in low leakage detection accuracy.
By obtaining the historical and current multi-dimensional feature data of each partition node, a multi-dimensional feature data sample set is constructed, the artificial intelligence model is trained for leakage detection, and the preset leakage detection model is used to perform leakage detection on each partition node to generate target detection results. and reminder messages.
The accuracy of leakage detection is improved, allowing the leakage detection method to better adapt to the complex environment of DMA management and making full use of the data resources of the DMA management system.
Smart Images

Figure CN118189074B
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of pipeline leakage detection, and in particular, relates to a leakage detection method, device, computer-readable storage medium and terminal equipment. Background Art
[0002] Accurate and timely leakage detection technology is crucial for water resource management and urban planning. In the field of smart water services, independent metering districts (DMA) can be used to divide large water supply networks into smaller, manageable districts to optimize water resource management pressure and reduce leakage rates. However, in DMA management, the water flow dynamics between multiple districts are more complex and the data volatility is higher. Existing leakage detection methods are difficult to fully utilize the rich data resources available in the DMA management system, resulting in low accuracy of leakage detection. Summary of the invention
[0003] In view of this, the embodiments of the present application provide a leakage detection method, apparatus, computer-readable storage medium and terminal device to solve the problem that the leakage detection method in the prior art is difficult to fully utilize the rich data resources available to the DMA management system, resulting in low accuracy of leakage detection.
[0004] A first aspect of an embodiment of the present application provides a leakage detection method, which may include:
[0005] Obtain the current multi-dimensional feature data of each partition node;
[0006] According to the current multi-dimensional feature data of each partition node, a preset leakage detection model is used to perform leakage detection on each partition node to obtain the target detection result;
[0007] Among them, the leakage detection model is an artificial intelligence model for leakage detection that is pre-trained according to a preset multi-dimensional feature data sample set.
[0008] In a specific implementation of the first aspect, the training process of the leakage detection model includes:
[0009] Acquire the multidimensional feature data sample set; wherein the multidimensional feature data sample set includes a multidimensional feature data table and each leakage label, the multidimensional feature data table includes a preset number of historical multidimensional feature data, and each historical multidimensional feature data corresponds to a leakage label;
[0010] The leakage detection model is obtained by training the initial artificial intelligence model with each historical multidimensional feature data in the multidimensional feature data table as input and the leakage label corresponding to each historical multidimensional feature data as expected output.
[0011] In a specific implementation of the first aspect, obtaining the multidimensional feature data sample set includes:
[0012] Obtain historical multi-dimensional basic data of each partition node;
[0013] According to the historical multi-dimensional basic data of each partition node, the historical multi-dimensional characteristic data of each partition node is calculated;
[0014] Determine each leakage label based on the historical multi-dimensional basic data of each partition node;
[0015] The multidimensional feature data sample set is constructed based on the historical multidimensional feature data of each partition node and each leakage label.
[0016] In a specific implementation of the first aspect, the historical multidimensional basic data includes at least one partition node's inlet flow, outlet flow, water volume introduced from the periphery of the water supply system, sewage discharge, pipeline pressure, and pipeline temperature, and the historical multidimensional feature data includes at least one partition node's inlet flow, outlet flow, total distribution difference, production and sales difference, minimum flow, pipeline pressure, and pipeline temperature;
[0017] The historical multi-dimensional feature data of each partition node is calculated based on the historical multi-dimensional basic data of each partition node, including:
[0018] Calculating the total difference according to the water inlet flow rate and the water outlet flow rate;
[0019] The production-sales difference is calculated based on the water inlet flow, the water volume introduced from the periphery of the water supply system, the water outlet flow and the sewage discharge volume;
[0020] The minimum flow rate is calculated based on the water inlet flow rate in the minimum flow period and the water outlet flow rate in the minimum flow period;
[0021] The historical multi-dimensional characteristic data is obtained according to the water inlet flow, the water outlet flow, the total distribution difference, the production and sales difference, the minimum flow, the pipeline pressure and the pipeline temperature.
[0022] In a specific implementation of the first aspect, constructing the multidimensional feature data sample set according to the historical multidimensional feature data of each partition node and each leakage label includes:
[0023] The multidimensional feature data table is constructed by using the historical multidimensional feature data of each partition node as row data in the multidimensional feature data table;
[0024] The multidimensional feature data sample set is constructed based on the multidimensional feature data table and each leakage label.
[0025] In a specific implementation of the first aspect, the initial artificial intelligence model is an artificial intelligence model for performing tabular data processing;
[0026] The method uses each historical multidimensional feature data in the multidimensional feature data table as input, uses the leakage label corresponding to each historical multidimensional feature data as expected output, trains the initial artificial intelligence model, and obtains the leakage detection model, including:
[0027] Taking each historical multidimensional feature data in the multidimensional feature data table as input, obtaining the actual initial output of the artificial intelligence model;
[0028] Using a preset activation function, converting the actual initial output into an actual probability output;
[0029] Calculating the training loss value of the artificial intelligence model according to the actual probability output, the expected output and the cross entropy loss function;
[0030] According to the training loss value, the preset back propagation algorithm and the preset hyperparameter adjustment algorithm, the parameters of the artificial intelligence model are optimized to obtain the leakage detection model.
[0031] In a specific implementation of the first aspect, the parameters of the artificial intelligence model are optimized according to the training loss value, the preset back propagation algorithm, and the preset hyperparameter adjustment algorithm to obtain the leakage detection model, including:
[0032] According to the training loss value and the back propagation algorithm, the artificial intelligence model is optimized in terms of model weights to obtain the artificial intelligence model after weight optimization;
[0033] According to the hyperparameter adjustment algorithm, the model hyperparameter optimization is performed on the artificial intelligence model after weight optimization to obtain the leakage detection model.
[0034] In a specific implementation of the first aspect, the obtaining of current multidimensional feature data of each partition node includes:
[0035] Get the current multi-dimensional basic data of each partition node;
[0036] The current multi-dimensional feature data of each partition node is calculated based on the current multi-dimensional basic data of each partition node.
[0037] In a specific implementation of the first aspect, after performing leakage detection on each partition node using a preset leakage detection model according to the current multi-dimensional feature data of each partition node to obtain a target detection result, the method further includes:
[0038] Generate target reminder information based on the target detection result; wherein the target reminder information is used to remind the user to process the target detection result.
[0039] In a specific implementation of the first aspect, after generating target reminder information according to the target detection result, the method further includes:
[0040] Obtaining a target processing result of the target detection result;
[0041] A target processing log is generated according to the target processing result.
[0042] A second aspect of an embodiment of the present application provides a leakage detection device, which may include:
[0043] A data acquisition module is used to obtain the current multi-dimensional feature data of each partition node;
[0044] The leakage detection module is used to perform leakage detection on each partition node according to the current multi-dimensional feature data of each partition node using a preset leakage detection model to obtain a target detection result; wherein the leakage detection model is an artificial intelligence model for leakage detection that is pre-trained based on a preset multi-dimensional feature data sample set.
[0045] In a specific implementation of the second aspect, the leakage detection device may further include:
[0046] A data sample set acquisition module, used to acquire the multidimensional feature data sample set; wherein the multidimensional feature data sample set includes a multidimensional feature data table and each leakage label, the multidimensional feature data table includes a preset number of historical multidimensional feature data, and each historical multidimensional feature data corresponds to a leakage label;
[0047] The model training module is used to train the initial artificial intelligence model with each historical multidimensional feature data in the multidimensional feature data table as input and the leakage label corresponding to each historical multidimensional feature data as expected output to obtain the leakage detection model.
[0048] In a specific implementation of the second aspect, the data sample set acquisition module may include:
[0049] The basic data acquisition submodule is used to obtain the historical multi-dimensional basic data of each partition node;
[0050] The feature data calculation submodule is used to calculate the historical multi-dimensional feature data of each partition node based on the historical multi-dimensional basic data of each partition node;
[0051] The leakage label determination submodule is used to determine each leakage label based on the historical multi-dimensional basic data of each partition node;
[0052] The sample set construction submodule is used to construct the multidimensional feature data sample set according to the historical multidimensional feature data of each partition node and each leakage label.
[0053] In a specific implementation of the second aspect, the historical multidimensional basic data includes at least one partition node's inlet flow, outlet flow, water volume introduced from the periphery of the water supply system, sewage discharge, pipeline pressure, and pipeline temperature, and the historical multidimensional feature data includes at least one partition node's inlet flow, outlet flow, total distribution difference, production and sales difference, minimum flow, pipeline pressure, and pipeline temperature;
[0054] The feature data calculation submodule may include:
[0055] A total difference calculation unit, used for calculating the total difference according to the water inlet flow rate and the water outlet flow rate;
[0056] A production-sales difference calculation unit, used to calculate the production-sales difference according to the water inlet flow, the amount of water introduced from the periphery of the water supply system, the water outlet flow and the sewage discharge;
[0057] A minimum flow calculation unit, used for calculating the minimum flow according to the water inlet flow in the minimum flow period and the water outlet flow in the minimum flow period;
[0058] The characteristic data calculation unit is used to obtain the historical multi-dimensional characteristic data according to the water inlet flow, the water outlet flow, the total distribution difference, the production and sales difference, the minimum flow, the pipeline pressure and the pipeline temperature.
[0059] In a specific implementation of the second aspect, the sample set construction submodule may include:
[0060] A data table construction unit, used to use the historical multidimensional feature data of each partition node as row data in the multidimensional feature data table to construct the multidimensional feature data table;
[0061] The sample set construction unit is used to construct the multi-dimensional feature data sample set according to the multi-dimensional feature data table and each leakage label.
[0062] In a specific implementation of the second aspect, the initial artificial intelligence model is an artificial intelligence model for performing tabular data processing;
[0063] The model training module may include:
[0064] An initial output acquisition submodule, used to obtain the actual initial output of the artificial intelligence model by taking each historical multidimensional feature data in the multidimensional feature data table as input;
[0065] A probability conversion submodule, used to convert the actual initial output into an actual probability output using a preset activation function;
[0066] A training loss value calculation submodule, used to calculate the training loss value of the artificial intelligence model according to the actual probability output, the expected output and the cross entropy loss function;
[0067] The parameter optimization submodule is used to optimize the parameters of the artificial intelligence model according to the training loss value, the preset back propagation algorithm and the preset hyperparameter adjustment algorithm to obtain the leakage detection model.
[0068] In a specific implementation of the second aspect, the parameter optimization submodule may include:
[0069] A weight optimization unit, used to optimize the model weight of the artificial intelligence model according to the training loss value and the back propagation algorithm to obtain the artificial intelligence model after weight optimization;
[0070] A hyperparameter optimization unit is used to optimize the model hyperparameters of the artificial intelligence model after weight optimization according to the hyperparameter adjustment algorithm to obtain the leakage detection model.
[0071] In a specific implementation of the second aspect, the data acquisition module may include:
[0072] The current basic data acquisition submodule is used to obtain the current multi-dimensional basic data of each partition node;
[0073] The current feature data calculation submodule is used to calculate the current multi-dimensional feature data of each partition node according to the current multi-dimensional basic data of each partition node.
[0074] In a specific implementation of the second aspect, the leakage detection device may further include:
[0075] The reminder information generation module is used to generate target reminder information according to the target detection result; wherein the target reminder information is used to remind the user to process the target detection result.
[0076] In a specific implementation of the second aspect, the leakage detection device may further include:
[0077] A processing result acquisition module, used to obtain a target processing result of the target detection result;
[0078] The processing log generating module is used to generate a target processing log according to the target processing result.
[0079] A third aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above leakage detection methods are implemented.
[0080] The fourth aspect of an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above-mentioned leakage detection methods when executing the computer program.
[0081] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device executes the steps of any one of the above leakage detection methods.
[0082] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application obtain the current multi-dimensional feature data of each partition node; according to the current multi-dimensional feature data of each partition node, a preset leakage detection model is used to perform leakage detection on each partition node to obtain a target detection result; wherein the leakage detection model is an artificial intelligence model for leakage detection obtained by pre-training according to a preset multi-dimensional feature data sample set. In the embodiments of the present application, the leakage detection model can perform leakage detection according to the current multi-dimensional feature data of each partition node, making full use of the rich data resources in the DMA management system, so that the leakage detection method can better adapt to the complex environment of DMA management and improve the accuracy of leakage detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0084] Figure 1 A schematic flow chart for leak detection training;
[0085] Figure 2 This is the network framework diagram of the TabTransformer model;
[0086] Figure 3It is a curve chart showing the changes of training loss value and test loss value with the number of iterations;
[0087] Figure 4 This is a flow chart of an embodiment of a leakage detection method in an embodiment of the present application;
[0088] Figure 5 This is a structural diagram of an embodiment of a leakage detection device in an embodiment of the present application;
[0089] Figure 6 This is a schematic block diagram of a terminal device in an embodiment of the present application. DETAILED DESCRIPTION
[0090] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0091] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0092] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0093] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0094] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0095] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0096] Accurate and timely leakage detection technology is crucial for water resource management and urban planning. In the field of smart water services, large water supply networks can be divided into smaller, manageable districts through independent metering district (DMA) management to optimize water resource management pressure and reduce leakage rates. However, in DMA management, the water flow dynamics between multiple districts are more complex and the data volatility is higher. Existing leakage detection methods are difficult to fully utilize the rich data resources available in the DMA management system, resulting in low accuracy of leakage detection.
[0097] In view of this, the embodiments of the present application provide a leakage detection method, apparatus, computer-readable storage medium and terminal device to solve the problem that the leakage detection method in the prior art is difficult to fully utilize the rich data resources available to the DMA management system, resulting in low accuracy of leakage detection.
[0098] It should be noted that the execution subject of the method of the present application is a terminal device, specifically, it can be a common computing device such as a desktop computer, a notebook, a PDA, a tablet, a smart phone, etc., or it can be other computing devices.
[0099] In an embodiment of the present application, a leakage detection model can be trained based on a preset multi-dimensional feature data sample set, and the leakage detection model can be used to perform leakage detection on each partition node.
[0100] For ease of understanding, the training process of the leakage detection model will be first introduced below.
[0101] See also Figure 1 ,The training process of the leakage detection model can include the following steps:
[0102] Step S101: Obtain a multi-dimensional feature data sample set.
[0103] In an embodiment of the present application, in order to reduce the impact of high-volatility data on the accuracy of leakage detection, a multidimensional feature data sample set can be constructed based on various types of pipeline detection data, and the initial artificial intelligence model can be trained based on the multidimensional feature data sample set to obtain a leakage detection model.
[0104] Among them, the multidimensional feature data sample set may include a multidimensional feature data table and various leakage labels. The multidimensional feature data table may include a preset number of historical multidimensional feature data. Each historical multidimensional feature data corresponds to a leakage label. The specific value of the preset number can be set according to actual needs, and this application does not limit this.
[0105] Specifically, the historical multidimensional basic data of each partition node can be obtained; wherein, each DMA partition can include multiple monitoring points, each monitoring point can be called a partition node, and each partition node can correspond to a unique identifier for distinguishing different partition nodes; the historical multidimensional basic data may include but is not limited to the inlet flow, outlet flow, water volume introduced into the periphery of the water supply system, sewage discharge, pipeline pressure and pipeline temperature of each partition node at the historical sampling time; the specific historical sampling time can be set according to actual needs.
[0106] In a specific implementation of an embodiment of the present application, the historical leakage period in which the leakage event occurred in the historical record can be used as the historical sampling period, and a specific number of historical sampling moments can be randomly selected in the historical sampling period; the preset length and the specific number of values can be specifically set according to actual needs, and the present application does not limit this. For example, if the historical leakage period in which a leakage event occurred in the historical record is 10:00-12:00 on January 1, 2023, then the historical leakage period can be used as a historical sampling period, and a specific number of historical sampling moments can be randomly selected in the historical sampling period to obtain a specific number of historical multi-dimensional basic data within the period.
[0107] In another specific implementation of the embodiment of the present application, a historical period under specific weather conditions can be used as a historical sampling period, and a specific number of historical sampling moments can be randomly selected in the historical sampling period. For example, considering that pipelines are more likely to leak under weather conditions with heavy rainfall or high temperature, historical periods with heavy rainfall and high temperature can be used as historical sampling periods, and a specific number of historical sampling moments can be randomly selected in the historical sampling period.
[0108] Since the pipeline is in a non-leaking state in most cases, if the pipeline data collected at historical moments are used indiscriminately, a large amount of repeated or highly similar data may appear, thereby reducing the training efficiency and model effect; therefore, the embodiment of the present application determines the appropriate historical sampling moment through the above method to obtain more valuable and reference pipeline data, which can reduce a large amount of similar data and reduce the data redundancy of the multi-dimensional feature data sample set, so as to train the leakage detection model more specifically, thereby helping to improve the training efficiency of the leakage detection model.
[0109] In an embodiment of the present application, various sensors such as flow meters, pressure sensors, and temperature sensors may be installed at each partition node, so that multi-dimensional basic data may be collected to perform leakage detection on each partition node.
[0110] In addition, the number and distribution of partition nodes can also be specific and situationalized according to actual needs, and this application does not limit this. For example, the partition nodes in each partition can be set according to the population or the number of buildings in each partition. If the population or the number of buildings in a partition is large, more partition nodes can be set in the partition; if the population or the number of buildings in the partition is small, fewer partition nodes can be set in the partition. For another example, the partition nodes in each partition can be set according to the frequency of leakage events in the partition. If the frequency of leakage events in a partition is high, more partition nodes can be set in the partition; if the frequency of leakage events in a partition is low, fewer partition nodes can be set in the partition. Based on this, monitoring resources can be allocated more reasonably and the efficiency of DMA management can be improved.
[0111] After obtaining the historical multidimensional basic data of each partition node, the historical multidimensional feature data of each partition node can be calculated based on the historical multidimensional basic data of each partition node. The historical multidimensional feature data may include but is not limited to the inlet flow, outlet flow, total difference, production and sales difference, minimum flow, pipeline pressure and pipeline temperature of each partition node at the historical sampling time.
[0112] According to the inlet flow rate and the outlet flow rate, the total difference can be calculated; specifically, the total difference is the sum of the water volume differences of each partition node in the water supply system. The total difference of the partition nodes is the water volume difference. The water inflow rate of each partition node is recorded as , and its outflow rate is recorded as , we can calculate the The difference in water output between partition nodes ; then the total difference of water volume difference in this partition .
[0113] Based on the inflow flow, the amount of water introduced from the periphery of the water supply system, the outflow flow and the sewage discharge, the production and sales difference can be calculated; the production and sales difference is the difference between the production and sales in the water supply system. The water volume introduced from the periphery of the water supply system is recorded as , and its sewage discharge is recorded as , then the partition node Water supply output for: , water supply sales for: , the difference between production and sales can be calculated for: .
[0114] The minimum flow rate can be calculated based on the water inflow rate during the minimum flow period and the water outflow rate during the minimum flow period; specifically, the minimum flow rate is the water volume difference of the water supply system during the minimum flow period. The water inflow rate of the partition node during the lowest flow period is , the outflow rate during the lowest flow period is , then the partition node The minimum flow rate is ; Among them, the minimum flow period can be specific and situational according to actual needs, and this application does not limit this; preferably, the minimum flow period can be set to 00:00 to 03:00.
[0115] Afterwards, a multidimensional feature data table can be constructed based on the unique identifier of each partition node, water inflow, water outflow, total difference, production and sales difference, minimum flow, pipeline pressure, and pipeline temperature. Specifically, the water inflow, water outflow, total difference, production and sales difference, minimum flow, pipeline pressure, and pipeline temperature of a partition node at a certain historical sampling moment can be used as a historical multidimensional feature data; based on this, various historical multidimensional feature data can be obtained; afterward, various historical multidimensional feature data can be used as row data of the multidimensional feature data table, and a row in the multidimensional feature data table corresponds to one historical multidimensional feature data.
[0116] For a historical multidimensional feature data of a partition node, the historical multidimensional feature data can be classified for leakage, and a corresponding leakage label can be generated according to the leakage classification category; here, the leakage classification category may include no leakage, slight leakage and severe leakage, and correspondingly, the leakage label may include a no leakage label (green label), a slight leakage label (yellow label) and a severe leakage label (red label).
[0117] In addition, the number of historical multidimensional feature data corresponding to different leakage labels in the multidimensional feature data table can be roughly the same, so that the leakage detection model can more comprehensively learn the data features under different leakage conditions, which helps to improve the robustness and accuracy of the leakage detection model.
[0118] According to the multidimensional feature data table and the leakage label corresponding to each multidimensional feature data in the multidimensional feature data table, a multidimensional feature data sample set can be constructed. Optionally, the multidimensional feature data sample set can also be stored in a preset database in a preset file format (such as CSV format).
[0119] In a specific implementation of the embodiment of the present application, the historical multidimensional basic data can also be preprocessed to obtain the historical multidimensional basic data after data preprocessing, and then the historical multidimensional feature data can be calculated according to the historical multidimensional basic data after data preprocessing with reference to the above method; wherein the data preprocessing method can be set according to actual needs, and this application does not limit this. For example, the historical multidimensional basic data can be preprocessed to remove null values and abnormal values.
[0120] Based on this, we can make full use of various types of pipeline inspection data obtained by the DMA management system to conduct more accurate and comprehensive leakage detection, which will help reduce leakage and improve the management efficiency of the water supply system.
[0121] Step S102: Taking each historical multidimensional feature data in the multidimensional feature data table as input and taking the leakage label corresponding to each historical multidimensional feature data as expected output, the initial artificial intelligence model is trained to obtain a leakage detection model.
[0122] The initial artificial intelligence model in the embodiment of the present application may be a TabTransformer model specifically used for processing tabular data. The TabTransformer model can process non-serialized data. Its core idea is to treat each column in the tabular data as a sequence and extract features by learning the relationship between columns. The detailed network framework of the TabTransformer model can be shown in Figure 2 As shown, specifically, the category features can be input into the column embedding layer, and then passed through a preset number of layers (denoted as N) of Transformer layers; thereafter, feature connection can be performed with the numerical features that have passed the normalization layer, and then input into the Multi-Layer Perceptron (MLP), and the preset loss function can be used to calculate the training loss value, and the model parameters of the TabTransformer model are continuously adjusted. When the training loss value of the TabTransformer model is less than the preset loss value threshold or the number of iterations is greater than the preset number of iterations threshold, the model training can be considered to be completed, thereby obtaining the leakage detection model in the present application.
[0123] In an embodiment of the present application, the multidimensional feature data sample set can be divided into a multidimensional feature data training set, a multidimensional feature data test set, and a multidimensional feature data verification set according to a preset division ratio, and the multidimensional feature data training set, the multidimensional feature data test set, and the multidimensional feature data verification set can be used to perform model training, model testing, and model verification, respectively. During model training, each leakage label in the multidimensional feature data training set can be input as a category feature into the column embedding layer to convert the leakage label into a dense vector of a fixed length. The specific conversion formula is:
[0124] ,
[0125] in, For the The embedded vector of the missing labels, For the The original input of the missing labels. After that, each embedded vector can be processed by N layers of stacked Transformer layers. Each Transformer layer can be composed of a multi-head attention sublayer, a residual connection and normalization (Add&Norm) sublayer, and a feed-forward network (Feed Forward) sublayer. The multi-head attention sublayer is the core of the Transformer layer, allowing the model to capture the complex relationship between different features. When processing a category feature, the multi-head attention layer can also take into account the information of other category features. The output of the multi-head attention layer The expression formula is:
[0126] ,
[0127] in, , and Represent the matrices corresponding to query, key and value respectively, is the weight of the linear change of the output, which is used for the linear transformation after the results of multi-head attention are merged. Indicates a connection operation. is the number of heads in the multi-head attention. The results of attention for , , and Respectively represent The linear transformation weight matrix of the query, key, and value corresponding to each head.
[0128] The feedforward network sublayer is a simple neural network that can be used to perform further nonlinear transformations on the output of the multi-head attention. The formula is:
[0129] ,
[0130] in, is the input of the feedforward network, is the output of the feedforward network, and are the weights of the first network layer and the second network layer of the feedforward network, and are the first bias parameter and the second bias parameter of the feedforward network respectively.
[0131] After each multi-head attention sublayer and each feedforward network sublayer, a residual connection and a normalization sublayer can be set. Through the residual connection, the input can be directly added to the output, and then normalization can be performed. Based on this, the problem of gradient disappearance or gradient explosion during training can be effectively avoided. The specific formulas of the residual connection and normalization sublayer are:
[0132] ,
[0133] in, is the output of the residual connection and normalization sublayer, represents the normalization operation, is the output of the multi-head attention sublayer or the feedforward network sublayer, Represents the processing of the residual layer.
[0134] In the embodiment of the present application, the output of each Transformer layer will serve as the input of the next Transformer layer, thereby forming a deep network structure.
[0135] At the same time, each historical multidimensional feature data in the multidimensional feature data training set can be input into the TabTransformer model as a numerical feature, and each historical multidimensional feature data can be normalized through the normalization layer; here, taking the dimension of water inflow as an example, it can be normalized according to the following formula:
[0136] ,
[0137] in, Can be the The characteristic vector corresponding to the inflow flow of each partition node is: is the feature vector The normalized feature vector, is the mean of the water inlet flow rate of each partition node, is the variance of the inlet flow rate of each partition node, and They are respectively learnable scaling and offset parameters, and their initial values can be set according to actual needs, and this application does not limit this. The data of water flow, total distribution difference, production and sales difference, minimum flow, pressure and temperature dimensions can also be normalized with reference to the above method. Afterwards, the normalized feature vector can be connected with the output of the Transformer layer through a splicing operation; then, the feature-connected vector can be input into a multi-layer perceptron, which is a series of fully connected layers. Through the multi-layer perceptron, the features can be further processed and the final classification results can be output; since the leakage detection task is a multi-classification task, the Softmax activation function can be used to convert the actual initial output of the last fully connected layer in the multi-layer perceptron into a probability to obtain the actual probability output. The specific formula is:
[0138] ,
[0139] in, is the last fully connected layer in the multilayer perceptron The actual initial output, for The actual probability output obtained by converting the Softmax activation function, is the last fully connected layer in the multilayer perceptron Through the Softmax activation function, the output value can be controlled between 0 and 1, so that the output value can be interpreted as a probability.
[0140] Afterwards, the training loss value of the model can be calculated according to the actual probability output, the expected output and the preset loss function. The loss function can be specific and situationalized according to actual needs, and this application does not limit this. In the embodiment of this application, the loss function can be preferably set to a cross entropy loss function, and its specific formula is:
[0141] ,
[0142] in, is the training loss value, for One-hot representation of .
[0143] According to the training loss value, the preset back propagation algorithm and the preset hyperparameter adjustment algorithm, the parameters of the artificial intelligence model can be optimized to obtain the leakage detection model of the embodiment of the present application.
[0144] Specifically, during the training process, through the preset back propagation algorithm, the weight parameters of the model will be continuously updated according to the gradient of the loss function to minimize the training loss. Among them, the back propagation algorithm can be specific and situationalized according to actual needs, and this application does not limit this; in the embodiment of this application, the back propagation algorithm can be preferably set to the AdamW back propagation algorithm, and its specific formula is:
[0145] ,
[0146] in, is the time step Parameters, is the time step Parameters, is the learning rate, It is a preset smaller number, used to avoid the denominator in the formula being 0. is the weight decay coefficient; and The time steps The first and second moment estimates of . and All of them can be specific and situational settings according to actual needs, and this application does not limit this. Through the AdamW back-propagation algorithm, the artificial intelligence model can be optimized for model weights to obtain an artificial intelligence model with optimized weights.
[0147] Afterwards, the model parameters of the artificial intelligence model after weight optimization can be optimized according to the hyperparameter adjustment algorithm to obtain a leakage detection model; here, the hyperparameter adjustment algorithm can be preferably a network search algorithm, and the grid search algorithm can be used to systematically and automatically tune hyperparameters such as learning rate, batch size, number of Transformer layers, and number of multi-head attention heads; specifically, a set of candidate values can be defined for each hyperparameter, and each set of model hyperparameter configurations can be generated according to the candidate values of each hyperparameter; thereafter, the model hyperparameter configuration that performs best on the multi-dimensional feature data verification set can be used as the hyperparameter configuration of the leakage detection model in the embodiment of the present application, and the model hyperparameter configuration with the best performance can be saved for subsequent calls.
[0148] In a specific implementation of the embodiment of the present application, a multi-dimensional feature data test set can also be used to test the model. The curve diagram of the training loss value during the training process and the test loss value during the test process as the number of iterations changes can be referred to Figure 3 , through multiple iterations, the training loss value during training and the test loss value during testing will gradually decrease until they remain at a relatively stable and small level.
[0149] When the training loss value of the model training no longer changes after a specific number of iterations, or the number of iterations of the model training is greater than a preset iteration threshold, the model can be considered to meet the conditions for stopping training, and the obtained model can be used as the leakage detection model in the embodiment of the present application, and the leakage detection model can be applied to actual leakage detection. Among them, the specific number of iterations, the iteration threshold and the accuracy threshold can all be specific and situationally set according to actual needs, and this application does not limit this.
[0150] See also Figure 4 , an embodiment of a leakage detection method in the embodiment of the present application may include:
[0151] Step S401: Obtain current multi-dimensional feature data of each partition node.
[0152] In the embodiment of the present application, a leakage detection model can be used to perform real-time leakage detection or periodic leakage detection on each partition node according to actual needs.
[0153] Specifically, when leakage detection is required, the multidimensional basic data (referred to as current multidimensional basic data) of each partition node at the current moment can be obtained; wherein, the data types contained in the current multidimensional basic data and the historical multidimensional basic data are consistent, including inlet flow, outlet flow, water volume introduced from the periphery of the water supply system, sewage discharge, pipeline pressure and pipeline temperature. Afterwards, the current multidimensional feature data of each partition node can be calculated based on the current multidimensional basic data of each partition node with reference to the calculation method in step S101, which will not be repeated here; wherein, the data types of the current multidimensional feature data and the historical multidimensional feature data are consistent, including inlet flow, outlet flow, total difference, production and sales difference, minimum flow, pipeline pressure, and pipeline temperature.
[0154] Step S402: Based on the current multi-dimensional feature data of each partition node, a preset leakage detection model is used to perform leakage detection on each partition node to obtain a target detection result.
[0155] Specifically, the current multi-dimensional feature data of each partition node can be used as the input of the leakage detection model to obtain the output of the leakage detection model, and the target detection result of each partition node can be determined according to the output of the leakage detection model. Among them, the target detection result may include but is not limited to the unique identification of the partition node, the leakage detection result and the time of the leakage detection. For a certain partition node, if the output of the leakage detection model is no leakage, it can be considered that the leakage detection result of the partition node is no leakage; if the output of the leakage detection model is slight leakage, it can be considered that the leakage detection result of the partition node is slight leakage; if the output of the leakage detection model is severe leakage, it can be considered that the leakage detection result of the partition node is severe leakage.
[0156] In a specific implementation of the embodiment of the present application, target reminder information can also be generated according to the target detection result to remind the user to process the target detection result; wherein, the specific form of the target reminder information can be set according to actual needs, and the present application does not specifically limit this. For example, if the leakage detection result in the target detection result is that there is a slight leakage or a serious leakage, a preset alarm prompt sound can be played, and a preset prompt text can be displayed on the display interface of the terminal device to better remind the user to handle the leakage event in a timely manner. For another example, considering that the processing departments responsible for different leakage events may be different, the corresponding processing department can be set in advance according to the type of leakage detection result, and the corresponding processing department can be notified according to the type of leakage detection result in the target detection result. If the leakage detection result in the target detection result is that there is a slight leakage, the processing department for handling the slight leakage can be notified; if the leakage detection result in the target detection result is that there is a serious leakage, the processing department for handling the serious leakage can be notified. Accordingly, the user can be notified in time to handle the leakage event, which helps to improve the efficiency of leakage event processing and reduce water resources and financial losses.
[0157] In another specific implementation of the embodiment of the present application, the target processing result of the target detection result can also be followed up. Specifically, the target processing result of the target detection result can be obtained, and a target processing log can be generated according to the target processing result; wherein the target processing log can at least include the target detection result, the processing flow of the leakage event, the processing department, the target processing result and the feedback suggestion. Accordingly, data support can be provided for the subsequent analysis of changes in the operation of the water supply system.
[0158] In another specific implementation of the embodiment of the present application, the leakage detection model can also be updated to obtain an updated leakage detection model, and the updated leakage detection model can be applied to subsequent leakage detection to improve the accuracy of the leakage detection model. Specifically, the detection data in the leakage detection process can be saved, and when the detection data is greater than a preset data threshold, an updated training sample set can be constructed based on the detection data, and the leakage detection model can be updated using the updated training sample set to obtain an updated leakage detection model; or, an updated training sample set can be constructed using the saved detection data at a preset time interval, and the leakage detection model can be updated based on the updated training set to obtain an updated leakage detection model.
[0159] In summary, the embodiment of the present application obtains the current multi-dimensional feature data of each partition node; based on the current multi-dimensional feature data of each partition node, a preset leakage detection model is used to perform leakage detection on each partition node to obtain a target detection result; wherein, the leakage detection model is an artificial intelligence model for leakage detection that is pre-trained according to a preset multi-dimensional feature data sample set. In the embodiment of the present application, the leakage detection model can perform leakage detection based on the current multi-dimensional feature data of each partition node, making full use of the rich data resources in the DMA management system, so that the leakage detection method can better adapt to the complex environment of DMA management and improve the accuracy of leakage detection.
[0160] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0161] Corresponding to a leakage detection method described in the above embodiment, Figure 5 A structural diagram of an embodiment of a leakage detection device provided in an embodiment of the present application is shown.
[0162] In an embodiment of the present application, a leakage detection device may include:
[0163] The data acquisition module 501 is used to acquire the current multi-dimensional feature data of each partition node;
[0164] The leakage detection module 502 is used to perform leakage detection on each partition node according to the current multi-dimensional feature data of each partition node using a preset leakage detection model to obtain a target detection result; wherein the leakage detection model is an artificial intelligence model for leakage detection that is pre-trained based on a preset multi-dimensional feature data sample set.
[0165] In a specific implementation of the embodiment of the present application, the leakage detection device may further include:
[0166] A data sample set acquisition module, used to acquire the multidimensional feature data sample set; wherein the multidimensional feature data sample set includes a multidimensional feature data table and each leakage label, the multidimensional feature data table includes a preset number of historical multidimensional feature data, and each historical multidimensional feature data corresponds to a leakage label;
[0167] The model training module is used to train the initial artificial intelligence model with each historical multidimensional feature data in the multidimensional feature data table as input and the leakage label corresponding to each historical multidimensional feature data as expected output to obtain the leakage detection model.
[0168] In a specific implementation of the embodiment of the present application, the data sample set acquisition module may include:
[0169] The basic data acquisition submodule is used to obtain the historical multi-dimensional basic data of each partition node;
[0170] The feature data calculation submodule is used to calculate the historical multi-dimensional feature data of each partition node based on the historical multi-dimensional basic data of each partition node;
[0171] The leakage label determination submodule is used to determine each leakage label based on the historical multi-dimensional basic data of each partition node;
[0172] The sample set construction submodule is used to construct the multidimensional feature data sample set according to the historical multidimensional feature data of each partition node and each leakage label.
[0173] In a specific implementation of the embodiment of the present application, the historical multi-dimensional basic data includes at least one partition node's inlet flow, outlet flow, water volume introduced from the periphery of the water supply system, sewage discharge, pipeline pressure, and pipeline temperature, and the historical multi-dimensional feature data includes at least one partition node's inlet flow, outlet flow, total distribution difference, production and sales difference, minimum flow, pipeline pressure, and pipeline temperature;
[0174] The feature data calculation submodule may include:
[0175] A total difference calculation unit, used for calculating the total difference according to the water inlet flow rate and the water outlet flow rate;
[0176] A production-sales difference calculation unit, used to calculate the production-sales difference according to the water inlet flow, the amount of water introduced from the periphery of the water supply system, the water outlet flow and the sewage discharge;
[0177] A minimum flow calculation unit, used for calculating the minimum flow according to the water inlet flow in the minimum flow period and the water outlet flow in the minimum flow period;
[0178] The characteristic data calculation unit is used to obtain the historical multi-dimensional characteristic data according to the water inlet flow, the water outlet flow, the total distribution difference, the production and sales difference, the minimum flow, the pipeline pressure and the pipeline temperature.
[0179] In a specific implementation of the embodiment of the present application, the sample set construction submodule may include:
[0180] A data table construction unit, used to use the historical multidimensional feature data of each partition node as row data in the multidimensional feature data table to construct the multidimensional feature data table;
[0181] The sample set construction unit is used to construct the multi-dimensional feature data sample set according to the multi-dimensional feature data table and each leakage label.
[0182] In a specific implementation of the embodiment of the present application, the initial artificial intelligence model is an artificial intelligence model for processing table data;
[0183] The model training module may include:
[0184] An initial output acquisition submodule, used to obtain the actual initial output of the artificial intelligence model by taking each historical multidimensional feature data in the multidimensional feature data table as input;
[0185] A probability conversion submodule, used to convert the actual initial output into an actual probability output using a preset activation function;
[0186] A training loss value calculation submodule, used to calculate the training loss value of the artificial intelligence model according to the actual probability output, the expected output and the cross entropy loss function;
[0187] The parameter optimization submodule is used to optimize the parameters of the artificial intelligence model according to the training loss value, the preset back propagation algorithm and the preset hyperparameter adjustment algorithm to obtain the leakage detection model.
[0188] In a specific implementation of the embodiment of the present application, the parameter optimization submodule may include:
[0189] A weight optimization unit, used to optimize the model weight of the artificial intelligence model according to the training loss value and the back propagation algorithm to obtain the artificial intelligence model after weight optimization;
[0190] A hyperparameter optimization unit is used to optimize the model hyperparameters of the artificial intelligence model after weight optimization according to the hyperparameter adjustment algorithm to obtain the leakage detection model.
[0191] In a specific implementation of the embodiment of the present application, the data acquisition module may include:
[0192] The current basic data acquisition submodule is used to obtain the current multi-dimensional basic data of each partition node;
[0193] The current feature data calculation submodule is used to calculate the current multi-dimensional feature data of each partition node according to the current multi-dimensional basic data of each partition node.
[0194] In a specific implementation of the embodiment of the present application, the leakage detection device may further include:
[0195] The reminder information generation module is used to generate target reminder information according to the target detection result; wherein the target reminder information is used to remind the user to process the target detection result.
[0196] In a specific implementation of the embodiment of the present application, the leakage detection device may further include:
[0197] A processing result acquisition module, used to obtain a target processing result of the target detection result;
[0198] The processing log generating module is used to generate a target processing log according to the target processing result.
[0199] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0200] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0201] Figure 6 A schematic block diagram of a terminal device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0202] like Figure 6 As shown, the terminal device 6 of this embodiment includes: a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60. When the processor 60 executes the computer program 62, the steps in the above-mentioned leakage detection method embodiments are implemented, for example Figure 4 Alternatively, when the processor 60 executes the computer program 62, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 5 The functions of the data acquisition module 501 to the leakage detection module 502 are shown.
[0203] Exemplarily, the computer program 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 62 in the terminal device 6.
[0204] Those skilled in the art will understand that Figure 6It is only an example of the terminal device 6 and does not constitute a limitation of the terminal device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device 6 may also include input and output devices, network access devices, buses, etc.
[0205] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0206] The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 6. Further, the memory 61 may also include both an internal storage unit of the terminal device 6 and an external storage device. The memory 61 is used to store the computer program and other programs and data required by the terminal device 6. The memory 61 may also be used to temporarily store data that has been output or is to be output.
[0207] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0208] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0209] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0210] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0211] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0212] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0213] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0214] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A leakage detection method, characterized in that: include: Obtain the current multi-dimensional feature data of each partition node; According to the current multi-dimensional feature data of each partition node, a preset leakage detection model is used to perform leakage detection on each partition node to obtain the target detection result; Wherein, the leakage detection model is an artificial intelligence model for leakage detection obtained by pre-training according to a preset multi-dimensional feature data sample set; The training process of the leakage detection model includes: Acquire the multidimensional feature data sample set; wherein the multidimensional feature data sample set includes a multidimensional feature data table and each leakage label, the multidimensional feature data table includes a preset number of historical multidimensional feature data, and each historical multidimensional feature data corresponds to a leakage label; Taking each historical multidimensional feature data in the multidimensional feature data table as input and the leakage label corresponding to each historical multidimensional feature data as expected output, the initial artificial intelligence model is trained to obtain the leakage detection model; The obtaining of the multi-dimensional feature data sample set comprises: Obtaining historical multidimensional basic data of each partition node; wherein the historical multidimensional basic data at least includes the inlet flow rate, outlet flow rate, water volume introduced from the periphery of the water supply system, sewage discharge volume, pipeline pressure and pipeline temperature of a partition node; According to the historical multidimensional basic data of each partition node, the historical multidimensional characteristic data of each partition node is calculated; wherein the historical multidimensional characteristic data at least includes the inlet flow, outlet flow, total distribution difference, production and sales difference, minimum flow, pipeline pressure and pipeline temperature of a partition node; Determine each leakage label based on the historical multi-dimensional basic data of each partition node; The multidimensional feature data sample set is constructed based on the historical multidimensional feature data of each partition node and each leakage label.
2. The leakage detection method according to claim 1, characterized in that: The historical multi-dimensional feature data of each partition node is calculated based on the historical multi-dimensional basic data of each partition node, including: Calculating the total difference according to the water inlet flow rate and the water outlet flow rate; The production-sales difference is calculated based on the water inlet flow, the water volume introduced from the periphery of the water supply system, the water outlet flow and the sewage discharge volume; The minimum flow rate is calculated based on the water inlet flow rate in the minimum flow period and the water outlet flow rate in the minimum flow period; The historical multi-dimensional characteristic data is obtained according to the water inlet flow, the water outlet flow, the total distribution difference, the production and sales difference, the minimum flow, the pipeline pressure and the pipeline temperature.
3. The leakage detection method according to claim 1, characterized in that: The multidimensional feature data sample set is constructed based on the historical multidimensional feature data of each partition node and each leakage label, including: The multidimensional feature data table is constructed by using the historical multidimensional feature data of each partition node as row data in the multidimensional feature data table; The multidimensional feature data sample set is constructed based on the multidimensional feature data table and each leakage label.
4. The leakage detection method according to claim 1, characterized in that: The initial artificial intelligence model is an artificial intelligence model for processing table data; The method uses each historical multidimensional feature data in the multidimensional feature data table as input, uses the leakage label corresponding to each historical multidimensional feature data as expected output, trains the initial artificial intelligence model, and obtains the leakage detection model, including: Taking each historical multidimensional feature data in the multidimensional feature data table as input, obtaining the actual initial output of the artificial intelligence model; Using a preset activation function, converting the actual initial output into an actual probability output; Calculating the training loss value of the artificial intelligence model according to the actual probability output, the expected output and the cross entropy loss function; According to the training loss value, the preset back propagation algorithm and the preset hyperparameter adjustment algorithm, the parameters of the artificial intelligence model are optimized to obtain the leakage detection model.
5. The leakage detection method according to claim 4, characterized in that: The step of optimizing the parameters of the artificial intelligence model according to the training loss value, the preset back propagation algorithm and the preset hyperparameter adjustment algorithm to obtain the leakage detection model includes: According to the training loss value and the back propagation algorithm, the artificial intelligence model is optimized in terms of model weights to obtain the artificial intelligence model after weight optimization; According to the hyperparameter adjustment algorithm, the model hyperparameter optimization is performed on the artificial intelligence model after weight optimization to obtain the leakage detection model.
6. The leakage detection method according to claim 1, characterized in that: The obtaining of the current multi-dimensional feature data of each partition node includes: Get the current multi-dimensional basic data of each partition node; The current multi-dimensional feature data of each partition node is calculated based on the current multi-dimensional basic data of each partition node.
7. The leakage detection method according to any one of claims 1 to 6, characterized in that: After performing leakage detection on each partition node according to the current multi-dimensional feature data of each partition node using a preset leakage detection model to obtain a target detection result, the method further includes: Generate target reminder information based on the target detection result; wherein the target reminder information is used to remind the user to process the target detection result.
8. The leakage detection method according to claim 7, characterized in that: After generating target reminder information according to the target detection result, the method further includes: Obtaining a target processing result of the target detection result; A target processing log is generated according to the target processing result.
9. A leakage detection device, characterized in that: include: A data acquisition module is used to obtain the current multi-dimensional feature data of each partition node; A leakage detection module is used to perform leakage detection on each partition node according to the current multi-dimensional feature data of each partition node using a preset leakage detection model to obtain a target detection result; wherein the leakage detection model is an artificial intelligence model for leakage detection obtained by pre-training according to a preset multi-dimensional feature data sample set; A data sample set acquisition module, used to acquire the multidimensional feature data sample set; wherein the multidimensional feature data sample set includes a multidimensional feature data table and each leakage label, the multidimensional feature data table includes a preset number of historical multidimensional feature data, and each historical multidimensional feature data corresponds to a leakage label; A model training module is used to train the initial artificial intelligence model using each historical multidimensional feature data in the multidimensional feature data table as input and the leakage label corresponding to each historical multidimensional feature data as expected output to obtain the leakage detection model; The data sample set acquisition module also includes: The basic data acquisition submodule is used to acquire the historical multi-dimensional basic data of each partition node; wherein the historical multi-dimensional basic data at least includes the inlet flow, outlet flow, water volume introduced from the periphery of the water supply system, sewage discharge, pipeline pressure and pipeline temperature of a partition node; The characteristic data calculation submodule is used to calculate the historical multidimensional characteristic data of each partition node according to the historical multidimensional basic data of each partition node; wherein the historical multidimensional characteristic data at least includes the inlet flow, outlet flow, total distribution difference, production and sales difference, minimum flow, pipeline pressure and pipeline temperature of a partition node; The leakage label determination submodule is used to determine each leakage label based on the historical multi-dimensional basic data of each partition node; The sample set construction submodule is used to construct the multidimensional feature data sample set according to the historical multidimensional feature data of each partition node and each leakage label.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the leakage detection method according to any one of claims 1 to 8 are implemented.
11. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the leakage detection method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Leakage management method, leakage management device and terminal equipment
CN112381382A
Abnormal area identification method based on artificial intelligence and electronic equipment
CN114757108A
