Leakage classification warning method, system, equipment and medium based on data field clustering
By constructing a potential field and performing data clustering in the water supply network, and using the potential value of the cluster center point to determine the warning level, the problem of determining the priority of leakage treatment in the water supply network is solved, and the maintenance efficiency of the leakage area is improved.
Patent Information
- Application Number
- CN202510592345.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-05-09
AI Technical Summary
How to efficiently prioritize leakage treatment across multiple, independently metered areas in a water distribution network to minimize leakage losses and maximize maintenance efficiency.
By obtaining data such as abnormal leakage rate, abnormal leakage amount, and the ratio of minimum nighttime flow to daily flow in areas where the leakage rate in the water supply network is greater than the preset threshold, a potential field is constructed and data clustering is performed. The potential value of the cluster center point is used to determine the warning level.
It realizes the automatic determination of the priority of the leakage area, reduces the leakage loss, and improves the maintenance efficiency of the leakage area.
Smart Images

Figure CN120124814B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and more specifically, relates to a leakage classification warning method, system, equipment, and medium based on data field clustering. Background Art
[0002] As a vital component of urban infrastructure, the safe and efficient operation of urban water supply networks is directly linked to water resource utilization efficiency and residents' quality of life. However, due to factors such as aging, geological subsidence, and pressure fluctuations, pipeline leakage has become a common problem facing the global water supply industry.
[0003] In the process of handling pipe network leakage, how to efficiently determine the treatment priority of the water supply network for leakage in multiple independent metering areas (DMAs) to minimize leakage losses and improve maintenance efficiency is an urgent problem to be solved in this application. Summary of the Invention
[0004] The purpose of this application is to provide a leakage classification warning method and system, equipment, and medium based on data field clustering to improve the efficiency of determining the processing priority of the leakage pipeline network.
[0005] A first aspect of an embodiment of the present application provides a leakage classification warning method based on data field clustering, comprising:
[0006] Acquire first data for a first area; wherein the first area is used to represent at least one area in the detection area where a leakage rate is greater than a preset threshold, and the first data includes at least one of an abnormal leakage rate, an abnormal leakage amount, a minimum nighttime flow rate, and a ratio of the minimum nighttime flow rate to the daily flow rate in the first area;
[0007] constructing a potential field of the first region based on the first data, and determining a cluster corresponding to the first data based on the potential field;
[0008] The warning level of the area where the cluster is located is determined according to the potential value of the center point of the cluster.
[0009] A second aspect of the embodiments of the present application provides a leakage classification warning system based on data field clustering, including:
[0010] an acquisition module, configured to acquire first data of a first area; wherein the first area is used to represent at least one area in the detection area having a leakage rate greater than a preset threshold, and the first data includes at least one of an abnormal leakage rate, an abnormal leakage amount, a minimum nighttime flow rate, and a ratio of the minimum nighttime flow rate to the daily flow rate of the first area;
[0011] a clustering module, configured to construct a potential field of the first region based on the first data, and determine a cluster corresponding to the first data based on the potential field;
[0012] The determination module is used to determine the warning level of the area where the cluster is located according to the potential value of the center point of the cluster.
[0013] In a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the steps of the above-mentioned leakage grading warning method based on data field clustering are implemented.
[0014] In a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned leakage classification warning method based on data field clustering are implemented.
[0015] The beneficial effect of the leakage classification warning method and system, equipment, and medium based on data field clustering provided in the embodiments of the present application is that by automatically determining the leakage priority of the leakage area in the urban water supply network, the leakage loss can be reduced to a certain extent and the maintenance efficiency of the leakage area can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. 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 any creative work.
[0017] Figure 1 A flow chart of a leakage classification warning method based on data field clustering provided in one embodiment of the present application;
[0018] Figure 2 The clustering process provided in one embodiment of the present application;
[0019] Figure 3 A flowchart of the early warning mechanism provided in one embodiment of the present application;
[0020] Figure 4 A structural block diagram of a leakage classification warning system based on data field clustering provided in one embodiment of the present application;
[0021] Figure 5 A schematic block diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0022] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0023] In order to make the purpose, technical solutions and advantages of this application clearer, specific embodiments will be described below with reference to the accompanying drawings.
[0024] Please refer to Figure 1 , Figure 1 A schematic flow chart of a leakage classification warning method based on data field clustering provided in an embodiment of the present application, the method comprising:
[0025] S101: Obtain first data of a first area; wherein the first area is used to characterize at least one area in the detection area where the leakage rate is greater than a preset threshold, and the first data includes at least one of the abnormal leakage rate, abnormal leakage amount, minimum nighttime flow, and the ratio between the minimum nighttime flow and the daily flow in the first area.
[0026] In this embodiment, the leakage rate of each independent metering area in the urban water supply network can be detected, at least one area with a leakage rate greater than a preset threshold is identified as a first area, and first data for each first area is obtained. The first data includes at least one of the following: an abnormal leakage rate, an abnormal leakage amount, a minimum nighttime flow rate, and a ratio of the minimum nighttime flow rate to the daily flow rate for the first area.
[0027] After the first data is obtained, the first data may be standardized. For example, the first data may be standardized based on the Z-score, as shown in formulas (1) and (2).
[0028] (1)
[0029] (2)
[0030] In the above formula (1), represents the value of the i-th data in the first data corresponding to the first region, and μ represents the mean value of the first data corresponding to the first region.
[0031] In the above formula (2), σ represents the standard deviation of the first data corresponding to the first region, and m represents the number of first data corresponding to the first region. Through standardization, each data in the first data corresponding to any first region is converted to data with a mean of 0 and a standard deviation of 1, thereby reducing the impact of outliers on the leakage outlier classification results.
[0032] S102: Constructing a potential field of the first region based on the first data, and determining a cluster corresponding to the first data based on the potential field.
[0033] In this embodiment, feature extraction may be performed on the first data after the normalization process.
[0034] As an example, a matrix corresponding to the first data after normalization can be constructed, as shown in formula (3).
[0035] (3)
[0036] In formula (3), the row vector, such as [ ] represents a region in the first region, a column vector, such as [ ] represents a type of indicator data in the first data.
[0037] If the number of the first regions is 30 and the number of indicator types of the first data is N, the first variance matrix corresponding to the first data after standardization can be shown as formula (4).
[0038] (4)
[0039] In this embodiment, the eigenvalues and eigenvectors corresponding to the first variance matrix can be determined. As an example, the eigenvalues and eigenvectors corresponding to the first variance matrix can be calculated using the Jacobian determinant method shown in formula (5).
[0040] =0(5)
[0041] In formula (5), R represents the covariance matrix corresponding to the first variance matrix, Represents the eigenvalue of the covariance matrix, and P represents the eigenvector corresponding to the covariance matrix. Through the iterative processing of formula (5), until the condition |R is satisfied ’ -I|=0, where R ’ represents the rotation matrix and I represents the identity matrix.
[0042] In this embodiment, after obtaining the eigenvalues, the eigenvalues are sorted from large to small, the proportion of each eigenvalue in the total of all eigenvalues is calculated, and the proportion is determined as the contribution rate of the eigenvalue. After obtaining the proportion of each eigenvalue in the total of all eigenvalues, that is, the contribution rate, the proportion can be sorted in order from large to small to obtain a first sequence; or after obtaining the eigenvalues, the eigenvalues can be directly sorted in order from large to small to obtain a first sequence; or the eigenvalues are arranged in order from large to small, the proportion of each eigenvalue in the total of the eigenvalues after sorting is calculated, and the contribution rate corresponding to each eigenvalue is obtained in turn, and the contribution rate is determined as the value in the first sequence in turn. The calculation formula of the contribution rate can be shown as formula (6):
[0043] (6)
[0044] In formula (6), represents the contribution of the i-th eigenvalue, represents the i-th eigenvalue, and M represents the number of eigenvalues.
[0045] In this embodiment, the characteristic components corresponding to the N eigenvalues with the largest contribution rates can be determined as principal components. The principal components can be used to represent the top N characteristic components with the largest contributions among the abnormal leakage rate, abnormal leakage amount, minimum nighttime flow rate, and the ratio of the minimum nighttime flow rate to the daily flow rate in the first region, where N is a positive integer, such as 2. The characteristic components represent the projection length of the first data in each principal component direction.
[0046] The principal component can be determined as a clustering attribute, and dimensionality reduction processing can be performed on the first data based on the clustering attribute to obtain the reduced-dimensional first data ultimately used for clustering. As an example, the characteristic components corresponding to the two eigenvalues with the largest contribution rates can be obtained as the principal components. Dimensionality reduction processing can reduce redundant information, and by determining the principal component, the most important information among the different indicators corresponding to the first data can be obtained, retaining the main features of the first data while eliminating any linear relationships between different indicators, thereby ensuring the accuracy of the subsequent clustering algorithm while improving processing efficiency.
[0047] S103: Determine the warning level of the area where the cluster is located according to the potential value of the center point of the cluster.
[0048] In this embodiment, the grid size of the first area may be determined, and the first area may be divided into grids based on the grid size.
[0049] In this embodiment, a field strength function can be determined. The field strength function can be used to characterize the strength of the effect of a data point in the measured grid on other data points in the surrounding grid space. The field strength function uses a nuclear force field function, and the mass of each data point can be defaulted to 1. The field strength function is shown in Formula (7).
[0050] (7)
[0051] In formula (7), Represents a data object 、 The Euclidean distance between represents the radiation factor, Represents the weight variable. If all data points have the same ability, Can be set to 1.
[0052] Formula (7) shows that the data point 、 The closer the distance, The smaller the value of the field strength function The larger the value, the more the source Around data objects When two data points coincide in space, the distance is 0. =0, the field strength function value reaches its maximum value. When the two data points are far away, As the distance increases, the field strength function value gradually decreases and approaches 0, indicating that the influence of the source point weakens with the increase of distance. Quantify the influence of data points on surrounding data objects, field strength function value and radiation factor Inversely proportional, The smaller it is, the stronger the radiation ability of the data point.
[0053] In this embodiment, a potential function can be determined. The potential function can be used to represent the cumulative result of the field strength values generated by the interaction of all data objects at a feature y in space. The mathematical expression of the potential function is:
[0054] (8)
[0055] In formula 8, Represents a data object 、 The Euclidean distance between represents the radiation factor, represents the weight variable, and n represents the number of data points in the grid except the data point y.
[0056] In formula (8), the potential function is a Gaussian kernel function that converts all data objects, i.e., data points on the grid, at the point The potential function is defined in this way, where each data point independently influences the space around it, without being affected by the outside world, and is independent. The potential value of each data point is the sum of the field strength values generated by all data points at that point, and is additive. The potential value decreases sharply with increasing distance, with areas close to the data point having higher potential values and areas far from the data point having lower potential values, and is attenuated. The potential function provides a method to quantify the intensity of the influence of each data point on each point in the data field, providing a useful tool for analyzing the relationships between data points and the overall structure of the data field.
[0057] In this embodiment, the radiation factor The distribution characteristics of the potential value are directly affected in the potential function. Among them, the larger the radiation factor, the smaller the decay rate. When the distance reaches a certain value, such as 2.12 When , the potential value is almost 0.
[0058] When the radiation factor is small, it means that the energy radiated by the data point is concentrated in a smaller spatial range, resulting in a higher potential value in the near-field area and a rapid decrease in the potential value in the area far away from the data point.
[0059] On the contrary, when the radiation factor is large, the energy radiated by the data point is dispersed over a larger spatial range, making the potential value decay more slowly with distance, that is, a higher potential value can still be observed at a farther distance.
[0060] Potential entropy can be used to describe the impact of different radiation factors on the data field. If the potential value of each data object in space is roughly the same, it means that the data distribution has the greatest uncertainty, that is, the entropy reaches its maximum value. The larger the entropy value, the higher the uncertainty of the system. On the contrary, if the potential values of the data objects are significantly different or unevenly distributed, the uncertainty is low and the entropy value is small. Given a set of data points The potential values are , then the potential entropy is defined as:
[0061] (9)
[0062] In formula (9), is the normalization factor, is the normalized potential value of the data point, indicating that the data point The proportion of total potential energy, probability The sum is 1. Therefore, the value of potential entropy Always between 0 and Between, that is ,and , at this time each are equal to , the potential entropy reaches its maximum value.
[0063] The relationship between potential entropy and radiation factor is that as the radiation factor increases, potential entropy first decreases and then increases. This phenomenon indicates that there exists an optimal target radiation factor that minimizes potential entropy. Therefore, to determine the optimal target radiation factor, the radiation factor selection problem is essentially the problem of minimizing potential entropy. Genetic algorithms can be used to search for the optimal solution by simulating natural selection and genetic mechanisms, ultimately selecting the most effective target radiation factor value.
[0064] In this embodiment, the potential entropy value corresponding to the radiation factor to be selected can be obtained using the potential entropy function based on the first data and the radiation factor to be selected; the radiation factor can be continuously optimized according to the genetic algorithm to obtain the radiation factor corresponding to the minimum potential entropy value; then, from the radiation factors to be selected, the radiation factor corresponding to the minimum potential entropy value among the potential entropy values is determined as the target radiation factor. The final potential function is determined based on the target radiation factor, and the potential field of the first area is determined based on the potential function. Among them, the radiation factor to be selected can be determined based on experience, such as a preset number of values or values in a specific range can be determined as the radiation factor to be selected, or the radiation factor to be selected can be determined by mathematical deduction based on a relevant theoretical model, and this application does not limit this.
[0065] As an example, the genetic algorithm parameters can be set, such as the population size to 500, the binary string length to 50, the crossover probability to 0.8, the mutation probability to 0.05, the maximum number of iterations to 50, and the interval range of the selected radiation factors to [0, 1]. The genetic algorithm can then be used to determine the potential entropy value corresponding to each candidate radiation factor, and the radiation factor corresponding to the minimum potential entropy value is determined as the sub-target radiation factor.
[0066] In this embodiment, in the potential field, points with the same potential value may be connected by smooth curves to generate equipotential lines or equipotential surfaces.
[0067] Among them, equipotential lines refer to smooth curves connecting points with the same potential value in the data field, while equipotential surfaces are surfaces in three-dimensional space composed of points with the same potential value, and these points are orthogonal to the radiation direction. In the data field, the area with higher radiation energy is close to the data source node, that is, the starting point of the data flow, resulting in a denser distribution of equipotential surfaces or equipotential lines; in areas with lower radiation energy, the distribution of equipotential lines or surfaces is relatively sparse. Suppose there is a two-dimensional potential field, which contains a source point of forward radiation, such as a positive charge. In this potential field, a series of equipotential lines can be drawn, and each equipotential line represents a specific potential value. For example, if the potential value is set to a constant , then all the distances from the source point satisfy = Points (where is the distance from the source, is the vacuum permittivity) will be connected into an equipotential line. In three-dimensional space, these equipotential lines will form an equipotential surface, such as a sphere. By changing The closer they are to the source point, the denser the distribution is, indicating that the rate of change of potential energy is higher.
[0068] A potential field is an external manifestation of the superposition of potential functions. Based on the definition of the field strength function, the magnitude of the potential in a potential field can represent the strength of the data's abstraction and reflect the overall radiant energy characteristics of the data object. For example, in a social network data field where each user is a data source, an equipotential surface might encompass all users within a specific range of activity. Within this potential field, regions with larger potential values represent community centers with high user activity, while regions with smaller potential values represent peripheral areas with lower user activity.
[0069] In a potential field, the centroid is the center point of the distribution of equipotential surfaces or equipotential lines. For a data field generated by a single data object, the centroid is located at the location of the data object itself. For example, a high-pressure system can be considered a data source point, with its radiated energy proportional to the air pressure. In this case, the centroid would be located at the center of the high-pressure system, the point of highest pressure. For a data field composed of two or more data objects, these objects can be classified into a cluster, with the centroid close to the location of the data object with greater radiated energy, and the centroid coinciding with the center of gravity.
[0070] In this embodiment, in the potential field, the data point with the largest potential value in the data to be clustered corresponding to the first data point can be determined as the cluster center, and the data points to be clustered are clustered based on the cluster center to obtain clusters. The specific clustering process can be as follows: Figure 2As shown. First, the first data to be clustered can be obtained, and the target radiation factor can be determined. Among them, the method for determining the target radiation factor can be implemented based on the method in the above embodiment. Then the first area is gridded, the potential value of each data point to be clustered in the grid is calculated, and the points with equal potential values in the grid space are connected to form equipotential lines; the data point with the largest potential value among the data points to be clustered corresponding to the first data is determined as the cluster center; then the distance of the first threshold is diffused outward with the cluster center as the center point to obtain the second area, and from the equipotential lines of the second area, all data points in the equipotential line with the smallest potential value are determined as the same cluster; then the data points to be clustered in the first data are updated, and the data points in the potential field other than the cluster are determined as the cluster data points, and the clustering process as above is performed again based on the data points to be clustered, until the data points to be clustered are clustered, and all clusters are output. This method can use the distribution characteristics of potential values in the potential field to realize clustering processing. It is suitable for processing complex data structures, effectively improving the efficiency of data processing, and can efficiently determine the priority of handling DMA cells with abnormal leakage rates in the water supply network management process.
[0071] In this embodiment, a correspondence between the potential value of the cluster center and a preset warning level can be obtained, and the warning level corresponding to the potential value of the cluster center is determined based on the correspondence. In this correspondence, the potential value of the cluster center is negatively correlated with the corresponding warning level.
[0072] As an example, the potential value of each grid point in the first area can be calculated based on the final target radiation factor, and a three-dimensional space potential value map and a potential distribution contour map, i.e., an equipotential line map, can be obtained based on the potential value. In the equipotential line map, since most of the DMA cells in the first area belong to the same category, most of the DMA cells with abnormal leakage values have slight leakage, and severe leakage is a rare case. Therefore, the potential value in the space corresponding to the first area has a particularly large peak, as well as several smaller peaks. Different clusters represent different leakage graded warning results. The warning level can be divided according to the potential value of the center point of different clusters. The smaller the potential value of the cluster center, the greater the warning level.
[0073] In this embodiment, based on data field clustering, the duration of the highest level can be used as the actual level of the early warning mechanism. Figure 3 The following is a flow chart of the early warning mechanism. Figure 3As shown, the latest leakage rate of the DMA area can be determined at preset intervals, and a preset threshold, i.e., the leakage rate threshold, can be obtained based on historical data. If the latest leakage rate is greater than the preset threshold, it is determined whether the DMA area exists in the first area. If it exists in the first area, clustering and grading are performed on the first area. If it does not exist in the first area, the DMA area is added to the first area, and clustering and grading are performed on the first area. Update the first duration during which the maximum warning level corresponding to all warning levels of each cluster is at this maximum warning level within a continuous first time period, and determine the range of this first duration. If this first duration is greater than the third time threshold, the warning mechanism for this target area is determined as a high warning. If this first duration is within the range of the first time threshold, the warning mechanism for this target area is determined as a low warning. If this first duration is within the range of the second time threshold, the warning mechanism for this target area is determined as a medium warning. Among them, the preset time, the first time period, the range of the first time threshold, the range of the second time threshold, and the third time threshold can be determined according to the actual situation.
[0074] As an example, in order to be closer to the actual needs of on-site operation and maintenance work and reduce the error caused by the predicted value of the user meter, the preset time can be set to half an hour, the first time period can be set to 8 consecutive hours, the range of the first time threshold can be set to 2 < h <= 4, the range of the second time threshold can be set to 4 < h <= 6, and the third time threshold can be set to h > 6, where h represents the first duration. It is possible to continuously monitor the warning levels of all clusters after clustering in the first area, and select the duration within 8 hours that the target area corresponding to the maximum warning level is at this maximum warning level among these warning levels. If the duration of the target area at the maximum warning level is greater than 2 hours and less than 4 hours, it is a mild warning. If the duration is greater than 4 hours and less than 6 hours, it is a medium warning. If the duration is greater than 6 hours, it is a high warning. After the duty officer receives the feedback from the on-site operation and maintenance personnel on the completion of the detection of the DMA community with abnormal leakage, the warning duration of this DMA community can be manually reset to zero. By introducing the duration mechanism, dynamic warning is realized, improving the digital management level and standardization level during the leakage monitoring and leakage handling processes, and improving the leakage maintenance efficiency.
[0075] Corresponding to the leakage classification and warning method based on data field clustering in the above embodiment, Figure 4 The following is a structural block diagram of a leakage classification and warning system based on data field clustering provided by an embodiment of the present application. For the convenience of description, only parts related to the embodiment of the present application are shown. Refer to Figure 4 The leakage classification and warning system 110 based on data field clustering includes: an acquisition module 111, a clustering module 112, and a determination module 113.
[0076] Among them, the acquisition module 111 is used to obtain first data of the first area; wherein, the first area is used to characterize at least one area in the detection area where the leakage rate is greater than a preset threshold, and the first data includes at least one of the abnormal leakage rate, abnormal leakage amount, minimum nighttime flow and the ratio between the minimum nighttime flow and the daily flow in the first area.
[0077] The clustering module 112 is configured to construct a potential field of the first region based on the first data, and determine a cluster corresponding to the first data based on the potential field.
[0078] The determination module 113 is configured to determine the warning level of the area where the cluster is located according to the potential value of the center point of the cluster.
[0079] Among them, the clustering module 112 is also used to: extract features from the first data to obtain eigenvalues corresponding to the first data; sort the eigenvalues in descending order to obtain a first sequence; or, calculate the proportion of each eigenvalue in the total of the eigenvalues, sort the proportions in descending order to obtain a first sequence; or, sort the eigenvalues in descending order, calculate the proportion of each sorted eigenvalue in the total of the eigenvalues in turn, and determine the proportions as the first sequence; determine the eigenvectors corresponding to the first N eigenvalues in the first sequence as principal components; perform dimensionality reduction processing on the first data based on the principal components to obtain the first data after dimensionality reduction processing; and construct the potential field of the first region based on the first data after dimensionality reduction processing.
[0080] The clustering module 112 is further configured to: determine the grid size of the first region; and construct a potential function, wherein the formula of the potential function is: ; Among them, d Represents any data point in the grid With data points The Euclidean distance between represents the radiation factor, Represents the weight variable, n represents the number of data points in the grid except data point y; based on the first data, the potential entropy value corresponding to the radiation factor to be selected is determined, and the minimum potential entropy value among the potential entropy values is obtained; the target radiation factor corresponding to the minimum potential entropy value is determined from the radiation factors to be selected; the potential function is determined based on the target radiation factor, and the potential field of the first area is determined based on the potential function.
[0081] The clustering module 112 is further configured to: determine, in the potential field, a data point with the largest potential value among the data points to be clustered corresponding to the first data as a cluster center; and perform clustering processing on the data points to be clustered based on the cluster center to obtain clusters.
[0082] The clustering module 112 is also used to: diffuse outward a distance of a first threshold from the cluster center to obtain a second area; from the equipotential lines in the second area, determine all data points in the equipotential line with the smallest potential value as a cluster; and determine data points in the potential field other than the cluster as data points to be clustered.
[0083] The determination module 113 is also used to: obtain the correspondence between the potential value of the center point of the cluster and the preset warning level; determine the warning level corresponding to the potential value of the center point of the cluster according to the correspondence; wherein, in the correspondence, the potential value of the center point of the cluster is negatively correlated with the corresponding warning level.
[0084] The determination module 113 is also used to: obtain the first duration that the target area corresponding to the maximum warning level is at the maximum warning level within the first time period; if the first duration is greater than the third time threshold, the warning mechanism of the target area is determined to be a high warning.
[0085] See also Figure 5 , Figure 5 This is a schematic block diagram of an electronic device provided in one embodiment of the present application. Figure 5 The electronic device 1400 in the embodiment shown may include: one or more processors 1401, one or more input devices 1402, one or more output devices 1403, and one or more memories 1404. The processors 1401, input devices 1402, output devices 1403, and memories 1404 communicate with each other via a communication bus 1405. The memory 1404 is used to store computer programs, which include program instructions. The processor 1401 is used to execute the program instructions stored in the memory 1404. The processor 301 is configured to call the program instructions to execute the functions of the modules / units in the above-mentioned system embodiments, such as Figure 4 The functions of the acquisition module 111, clustering module 112 and determination module 113 are shown.
[0086] It should be understood that in the embodiments of the present application, the processor 1401 may be a central processing unit (CPU), and may also be 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 any conventional processor, etc.
[0087] The input device 1402 may include a touchpad, a fingerprint collection sensor (for collecting user fingerprint information and fingerprint direction information), a microphone, etc. The output device 1403 may include a display (LCD, etc.), a speaker, etc.
[0088] The memory 1404 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1401. A portion of the memory 1404 may also include a non-volatile random access memory. For example, the memory 1404 may also store device type information.
[0089] In a specific implementation, the processor 1401, input device 1402, and output device 1403 described in the embodiments of the present application can execute the implementation methods described in the first and second embodiments of the leakage grading warning method based on data field clustering provided in the embodiments of the present application, and can also execute the implementation methods of the electronic device described in the embodiments of the present application, which will not be repeated here.
[0090] In another embodiment of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, all or part of the process of the method in the above embodiment is implemented. The computer program can also be used to instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above method embodiments are implemented. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium.
[0091] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Furthermore, the computer-readable storage medium can include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or is about to be output.
[0092] Those skilled 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, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. 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.
[0093] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0094] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or can be an electrical, mechanical or other form of connection.
[0095] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0096] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0097] The above are only specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A leakage classification warning method based on data field clustering, characterized in that: include: Acquire first data for a first area; wherein the first area is used to represent at least one area in the detection area where a leakage rate is greater than a preset threshold, and the first data includes at least one of an abnormal leakage rate, an abnormal leakage amount, a minimum nighttime flow rate, and a ratio of the minimum nighttime flow rate to the daily flow rate in the first area; determining a grid size of the first area, and dividing the first area into grids based on the grid size; The field strength function is used to characterize the effect of the data points in the grid to be measured on other data points in the surrounding grid space. The field strength function is: , in, Represents the Euclidean distance between data objects x and y, represents the radiation factor, represents the weight variable; Construct a potential function, the formula of the potential function is: ; Among them, d(x i ,y) represents any data point x in the grid i The Euclidean distance between data point y and data point y, where n represents the number of data points in the grid other than data point y. The field strength function value is inversely proportional to the distance between data objects x and y. The closer the Euclidean distance between data objects x and y, the larger the field strength function value, and the stronger the influence of data point y on the surrounding data object x. The farther the distance between data objects x and y, the smaller the field strength function value, and the weaker the influence of data point y on the surrounding data object x. The potential function is used to represent the cumulative result of the field strength values generated by the interaction of all data objects at a feature y in space; Determine potential entropy values corresponding to radiation factors to be selected based on the first data, and obtain the minimum potential entropy value among the potential entropy values; determine a target radiation factor corresponding to the minimum potential entropy value from the radiation factors to be selected; determining the potential function based on the target radiation factor, and determining the potential field of the first region based on the potential function; In the potential field, a first region is divided into a grid, a potential value of each data point to be clustered in the grid is determined, data points with equal potential values in the grid are connected to form equipotential lines, and a data point with the largest potential value among the data points to be clustered corresponding to the first data is determined as a cluster center; Diffusion is performed outward from the cluster center to a distance of a first threshold to obtain a second area; From the equipotential lines in the second region, all data points on the equipotential line with the smallest potential value are determined as a cluster; Determining the data points other than the cluster in the potential field as the data points to be clustered, performing clustering processing again based on the data points to be clustered until the data points to be clustered are clustered, and outputting all clusters; The warning level of the area where the cluster is located is determined according to the potential value of the center point of the cluster, and the potential value of the center point of the cluster is negatively correlated with the corresponding warning level.
2. The leakage classification warning method based on data field clustering according to claim 1 is characterized in that: The constructing the potential field of the first region based on the first data includes: Performing feature extraction on the first data after the normalization process to obtain feature values corresponding to the first data; Sorting the eigenvalues in descending order to obtain a first sequence; or calculating the proportion of each eigenvalue to the total of the eigenvalues, and sorting the proportions in descending order to obtain the first sequence; or sorting the eigenvalues in descending order, calculating the proportion of each sorted eigenvalue to the total of the eigenvalues in turn, and determining the proportions as the first sequence; Determine the characteristic components corresponding to the first N eigenvalues in the first sequence as principal components, where N is a positive integer; Performing dimensionality reduction processing on the first data based on the principal component to obtain first data after dimensionality reduction processing; A potential field of the first region is constructed based on the first data after the dimensionality reduction processing.
3. The leakage classification warning method based on data field clustering according to claim 1 is characterized in that: The step of determining the warning level of the area where the cluster is located according to the potential value of the center point of the cluster includes: Obtaining a corresponding relationship between the potential value of the center point of the cluster and a preset warning level; The warning level corresponding to the potential value of the center point of the cluster is determined according to the corresponding relationship.
4. The leakage classification warning method based on data field clustering according to claim 1 is characterized in that: The method further comprises: Obtaining a target area corresponding to a maximum warning level among the warning levels within a first time period; Determining a first duration of time during which the target area is at the maximum warning level; If the first time duration is greater than a third time threshold, the warning mechanism of the target area is determined to be a high warning.
5. A leakage classification warning system based on data field clustering, characterized in that: include: an acquisition module, configured to acquire first data of a first area; wherein the first area is used to represent at least one area in the detection area having a leakage rate greater than a preset threshold, and the first data includes at least one of an abnormal leakage rate, an abnormal leakage amount, a minimum nighttime flow rate, and a ratio of the minimum nighttime flow rate to the daily flow rate of the first area; a clustering module, configured to determine a grid size of the first area, and divide the first area into grids based on the grid size; The field strength function is used to characterize the effect of the data points in the grid to be measured on other data points in the surrounding grid space. The field strength function is: , in, Represents the Euclidean distance between data objects x and y, represents the radiation factor, represents the weight variable; Construct a potential function, the formula of the potential function is: ; Among them, d(x i ,y) represents any data point x in the grid i The Euclidean distance between data point y and data point y, where n represents the number of data points in the grid other than data point y. The field strength function value is inversely proportional to the distance between data objects x and y. The closer the Euclidean distance between data objects x and y, the larger the field strength function value, and the stronger the influence of data point y on the surrounding data object x. The farther the distance between data objects x and y, the smaller the field strength function value, and the weaker the influence of data point y on the surrounding data object x. The potential function is used to represent the cumulative result of the field strength values generated by the interaction of all data objects at a feature y in space; Determine potential entropy values corresponding to radiation factors to be selected based on the first data, and obtain the minimum potential entropy value among the potential entropy values; determine a target radiation factor corresponding to the minimum potential entropy value from the radiation factors to be selected; determining the potential function based on the target radiation factor, and determining the potential field of the first region based on the potential function; In the potential field, a first region is divided into a grid, a potential value of each data point to be clustered in the grid is determined, data points with equal potential values in the grid are connected to form equipotential lines, and a data point with the largest potential value among the data points to be clustered corresponding to the first data is determined as a cluster center; Diffusion is performed outward from the cluster center to a distance of a first threshold to obtain a second area; From the equipotential lines in the second region, all data points on the equipotential line with the smallest potential value are determined as a cluster; Determining the data points other than the cluster in the potential field as the data points to be clustered, performing clustering processing again based on the data points to be clustered until the data points to be clustered are clustered, and outputting all clusters; The determination module is used to determine the warning level of the area where the cluster is located according to the potential value of the center point of the cluster, and the potential value of the center point of the cluster is negatively correlated with the corresponding warning level.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. 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 method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Regional flow data analysis method and device
CN113902356A
DMA cell leakage evaluation method based on k-means mean value clustering
CN115759785A