Pipeline fault detection method and system, electronic device and storage medium
By measuring water quality information upstream and downstream of the pipeline and using miniature spectral sensors to monitor water quality index sequences in real time, based on flow rate and correlation analysis, the high cost and low efficiency of pipeline fault detection in existing technologies are solved, achieving efficient and reliable fault identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CORE VISION (BEIJING) TECH CO LTD
- Filing Date
- 2021-06-07
- Publication Date
- 2026-07-21
AI Technical Summary
Current pipeline fault detection technologies rely on manual screening, which is costly and cannot detect potential problems in advance, thus failing to achieve efficient and reliable fault identification.
By measuring water quality information upstream and downstream of the pipeline, a water quality index sequence is determined, and based on the correlation analysis between flow rate and water quality index sequence, the type of pipeline fault is determined. Miniature spectral sensors, such as quantum dot spectral sensors, are used to monitor water quality indicators in real time.
It enables on-site inspection without manual intervention, reducing costs, improving inspection efficiency and reliability, and allowing for early detection of potential faults and extending the lifespan of the inspection equipment.
Smart Images

Figure CN115510568B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a pipeline fault detection method and system, electronic equipment, and storage medium. Background Technology
[0002] With rapid economic development, the requirements for water environment management are constantly increasing, making it increasingly important to gradually establish and improve urban stormwater and sewage pipe network (i.e., pipe network) monitoring systems. This system allows for a comprehensive understanding of the drainage pipe network's operational status, effective identification of silted-up pipe sections, and timely detection of network anomalies, enabling rapid flood control responses and ensuring residents' travel safety.
[0003] In related technologies, pipeline fault detection is carried out manually by water supply and drainage dredging personnel. Tools such as pipe periscopes, pipe robots, and sonar monitoring instruments are used to investigate the internal structure of the drainage network and identify potential safety hazards, locating blockages and leaks affecting system operation. Different maintenance and dredging plans are then tailored to the specific circumstances. This method is labor-intensive and cannot detect potential problems in advance. Summary of the Invention
[0004] This disclosure presents a pipeline fault detection method and system, electronic equipment, and storage medium.
[0005] According to one aspect of this disclosure, a pipeline fault detection method is provided, comprising: determining a first water quality index sequence of the pipeline based on water quality information measured at a first preset location upstream of the pipeline, and determining a second water quality index sequence of the pipeline based on water quality information measured at a second preset location downstream of the pipeline, wherein the first water quality index sequence and the second water quality index sequence include water quality indicators acquired at multiple times; determining a first flow rate at the first preset location and a second flow rate at the second preset location based on the first water quality index sequence and the second water quality index sequence; determining whether there is a correlation between the first water quality index sequence and the second water quality index sequence; and determining the pipeline fault type based on the first flow rate and the second flow rate, and the correlation between the first water quality index sequence and the second water quality index sequence.
[0006] In one possible implementation, determining the first flow rate at a first preset location and the second flow rate at a second preset location based on the first water quality index sequence and the second water quality index sequence includes: determining the first flow velocity at the first preset location and the second flow velocity at the second preset location based on the first water quality index sequence and the second water quality index sequence; determining the first flow rate at the first preset location based on the pipe information at the first preset location and the first flow velocity; and determining the second flow rate at the second preset location based on the pipe information at the second preset location and the second flow velocity.
[0007] In one possible implementation, determining the first flow velocity at the first preset position and the second flow velocity at the second preset position includes: determining a first time difference between the water flow passing through the first preset position and the third preset position based on the first water quality index sequence and a third water quality index sequence obtained at a third preset position upstream of the pipeline; determining a second time difference between the water flow passing through the second preset position and the fourth preset position based on the second water quality index sequence and a fourth water quality index sequence obtained at a fourth preset position downstream of the pipeline; determining the first flow velocity based on the distance between the first preset position and the third preset position and the first time difference; and determining the second flow velocity based on the distance between the second preset position and the fourth preset position and the second time difference.
[0008] In one possible implementation, determining a first flow rate at the first preset location based on the pipe information and the first flow velocity, and determining a second flow rate at the second preset location based on the pipe information and the second flow velocity, includes: determining the cross-sectional area of the water passage at the first preset location based on the pipe information at the first preset location, and determining the cross-sectional area of the water passage at the second preset location based on the pipe information at the second preset location; determining the first flow rate based on the cross-sectional area of the water passage at the first preset location and the first flow velocity, and determining the second flow rate at the second preset location based on the cross-sectional area of the water passage at the second preset location and the second flow velocity.
[0009] In one possible implementation, determining whether there is a correlation between the first water quality indicator sequence and the second water quality indicator sequence includes: determining a path normalization matrix between the first and second water quality indicator sequences based on multiple water quality indicators in the first and second water quality indicator sequences, wherein the element in the i-th row and j-th column of the path normalization matrix is the vector distance between the i-th water quality indicator in the first water quality indicator sequence and the j-th water quality indicator in the second water quality indicator sequence, where i and j are positive integers; determining a normalized path based on the path normalization matrix, wherein the normalized path... The normalized path is the path with the smallest sum of elements among the paths from the first element to the second element in the path normalization matrix. The first element includes the element in the nth row and 1st column of the path normalization matrix, and the second element includes the element in the 1st row and mth column of the path normalization matrix. The path normalization matrix has n rows and m columns, where n ≥ i and m ≥ j. Based on the normalized path, the dynamic time normalized distance between the first water quality index sequence and the second water quality index sequence is determined. If the dynamic time normalized distance is less than or equal to a distance threshold, it is determined that the first water quality index sequence and the second water quality index sequence are correlated.
[0010] In one possible implementation, when there is a correlation between the first water quality indicator and the second water quality indicator, the pipeline fault type is determined based on the first flow rate and the second flow rate, as well as the correlation between the first water quality indicator sequence and the second water quality indicator sequence. This includes one of the following: if the second flow rate is less than the first flow rate, the pipeline fault type is determined to be a pipeline leak; if the first flow rate is less than the second flow rate, and the first moment when the target data feature is detected in the first water quality indicator sequence is later than the second moment when the target data feature is detected in the first water quality indicator sequence, the pipeline fault type is determined to be a pipeline congestion. The target data feature is a data feature used to indicate changes in water quality indicators measured at a first preset location and a second preset location caused by the same water pollution event. The target data feature includes at least one of water quality indicator peaks, water quality indicator troughs, and water quality indicator change rates.
[0011] In one possible implementation, determining the pipeline fault type based on the first flow rate and the second flow rate, as well as the correlation between the first water quality index sequence and the second water quality index sequence, includes: determining the pipeline fault type as a pipeline connection error when there is no correlation between the first water quality index and the second water quality index.
[0012] In one possible implementation, the water quality indicators include at least one of the following: chemical oxygen demand (COD), turbidity, total phosphorus content, ammonia nitrogen content, permanganate index, total suspended solids, biological oxygen demand (BOD), total organic carbon (COC), sulfate content, chloride content, dissolved iron content, dissolved manganese content, dissolved copper content, dissolved zinc content, nitrate content, nitrite content, total nitrogen content, fluoride content, selenium content, total arsenic content, total mercury content, total cadmium content, chromium content, total lead content, total cyanide, volatile phenol content, coliform bacteria content, and sulfide content.
[0013] According to one aspect of this disclosure, a pipeline fault detection system is provided, comprising: a sequence module, configured to determine a first water quality index sequence of the pipeline based on water quality information measured in real time at a first preset location upstream of the pipeline, and to determine a second water quality index sequence of the pipeline based on water quality information measured at a second preset location downstream of the pipeline, wherein the first water quality index sequence and the second water quality index sequence include water quality indicators acquired at multiple times; a flow module, configured to determine a first flow rate at the first preset location upstream of the pipeline and a second flow rate at the second preset location downstream of the pipeline based on the first water quality index sequence and the second water quality index sequence; a judgment module, configured to determine whether there is a correlation between the first water quality index sequence and the second water quality index sequence; and a determination module, configured to determine the pipeline fault type based on the first flow rate and the second flow rate, and the correlation between the first water quality index sequence and the second water quality index sequence.
[0014] In one possible implementation, the flow module is further configured to: determine a first flow velocity at the first preset location and a second flow velocity at the second preset location based on the first water quality index sequence and the second water quality index sequence; determine a first flow rate at the first preset location based on the pipe information at the first preset location and the first flow velocity; and determine a second flow rate at the second preset location based on the pipe information at the second preset location and the second flow velocity.
[0015] In one possible implementation, the flow module is further configured to: determine a first time difference between the water flow passing through the first preset position and the third preset position based on the first water quality index sequence and the third water quality index sequence obtained at the third preset position upstream of the pipeline; and determine a second time difference between the water flow passing through the second preset position and the fourth preset position based on the second water quality index sequence and the fourth water quality index sequence obtained at the fourth preset position downstream of the pipeline; determine a first flow velocity based on the distance between the first preset position and the third preset position and the first time difference; and determine a second flow velocity based on the distance between the second preset position and the fourth preset position and the second time difference.
[0016] In one possible implementation, the flow module is further configured to: determine the cross-sectional area of the water passage at the first preset location based on the pipe information at the first preset location, and determine the cross-sectional area of the water passage at the second preset location based on the pipe information at the second preset location; determine the first flow rate based on the cross-sectional area of the water passage at the first preset location and the first flow velocity, and determine the second flow rate at the second preset location based on the cross-sectional area of the water passage at the second preset location and the second flow velocity.
[0017] In one possible implementation, the judgment module is further configured to: determine a path normalization matrix between the first water quality index sequence and the second water quality index sequence based on multiple water quality indicators in the first water quality index sequence and multiple water quality indicators in the second water quality index sequence, wherein the element in the i-th row and j-th column of the path normalization matrix is the vector distance between the i-th water quality indicator in the first water quality index sequence and the j-th water quality indicator in the second water quality index sequence, and i and j are positive integers; and determine a normalized path based on the path normalization matrix, wherein the normalized path is defined in the path normalization matrix. The path from the first element to the second element is the path with the smallest sum of elements, where the first element includes the element in the nth row and 1st column of the path normalization matrix, and the second element includes the element in the 1st row and mth column of the path normalization matrix, where the path normalization matrix has n rows and m columns, n≥i, m≥j; based on the normalized path, the dynamic time normalized distance between the first water quality index sequence and the second water quality index sequence is determined; if the dynamic time normalized distance is less than or equal to a distance threshold, it is determined that the first water quality index sequence and the second water quality index sequence are correlated.
[0018] In one possible implementation, when there is a correlation between the first water quality index and the second water quality index, the determining module is further configured to: determine the pipeline fault type as pipeline leakage when the second flow rate is less than the first flow rate; and determine the pipeline fault type as pipeline congestion when the first flow rate is less than the second flow rate and the first moment when the target data feature is detected in the first water quality index sequence is later than the second moment when the target data feature is detected in the first water quality index sequence, wherein the target data feature is a data feature used to indicate changes in water quality indicators measured at a first preset location and a second preset location caused by the same water pollution event, and the target data feature includes at least one of water quality index peaks, water quality index troughs, and water quality index change rates.
[0019] In one possible implementation, the determining module is further configured to: determine the pipeline fault type as a pipeline connection error when there is no correlation between the first water quality index and the second water quality index.
[0020] In one possible implementation, the water quality indicators include at least one of the following: chemical oxygen demand (COD), turbidity, total phosphorus content, ammonia nitrogen content, permanganate index, total suspended solids, biological oxygen demand (BOD), total organic carbon (COC), sulfate content, chloride content, dissolved iron content, dissolved manganese content, dissolved copper content, dissolved zinc content, nitrate content, nitrite content, total nitrogen content, fluoride content, selenium content, total arsenic content, total mercury content, total cadmium content, chromium content, total lead content, total cyanide, volatile phenol content, coliform bacteria content, and sulfide content.
[0021] According to one aspect of this disclosure, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the above-described pipeline fault detection method.
[0022] According to one aspect of this disclosure, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the above-described pipeline fault detection method.
[0023] The pipeline fault detection method according to embodiments of this disclosure determines the pipeline flow rate through water quality information. This allows for measurement without contact with the water flow in the pipeline, extending the detection lifespan and reliability, and reducing manual maintenance costs. Furthermore, during fault detection, no on-site inspection is required, reducing detection costs and improving detection efficiency. Potential faults can be identified based on both first and second flow rates, enhancing the reliability of fault detection.
[0024] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.
[0025] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0026] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the specification, serve to illustrate the technical solutions of this disclosure.
[0027] Figure 1 A flowchart illustrating a pipeline fault detection method according to an embodiment of the present disclosure is shown;
[0028] Figure 2This diagram illustrates an application of the pipeline fault detection method according to an embodiment of the present disclosure.
[0029] Figure 3 A block diagram of a pipeline fault detection system according to an embodiment of the present disclosure is shown;
[0030] Figure 4 A block diagram of an electronic device according to an embodiment of the present disclosure is shown;
[0031] Figure 5 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0032] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0033] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0034] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0035] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0036] Figure 1 A flowchart of a pipeline fault detection method according to an embodiment of the present disclosure is shown, such as... Figure 1 As shown, the method includes:
[0037] In step S11, a first water quality index sequence of the pipeline is determined based on water quality information measured at a first preset location upstream of the pipeline, and a second water quality index sequence of the pipeline is determined based on water quality information measured at a second preset location downstream of the pipeline. The first water quality index sequence and the second water quality index sequence include water quality indicators acquired at multiple times.
[0038] In step S12, the first flow rate at the first preset location and the second flow rate at the second preset location are determined based on the first water quality index sequence and the second water quality index sequence.
[0039] In step S13, it is determined whether there is a correlation between the first water quality index sequence and the second water quality index sequence;
[0040] In step S14, the pipeline fault type is determined based on the first flow rate and the second flow rate, as well as the correlation between the first water quality index sequence and the second water quality index sequence.
[0041] According to the pipeline fault detection method of the present disclosure, the pipeline flow rate is determined by information obtained by a micro-spectral sensor, such as a quantum dot spectral sensor. While monitoring water quality, potential faults are detected and identified based on a first flow rate and a second flow rate, thereby improving the guidance of water quality monitoring for fault detection.
[0042] In the example, miniature spectral sensors are used to measure water quality information in a pipe, such as quantum dot spectral probes that include quantum dot spectral sensors.
[0043] In the example, the quantum dot spectral sensor may include a quantum dot spectral probe. This probe measures incident light (e.g., light transmitted or scattered after passing through a predetermined area of water sample) based on the physical and optical properties of nanocrystals to obtain spectral information representing the water quality of the water body. For instance, the quantum dot spectral probe may include a nanocrystal chip made of various nanocrystals, comprising a specific arrangement (e.g., a nanocrystal array) of these nanocrystals. Each nanocrystal has different light absorption or emission characteristics. Different types of semiconductor nanocrystals can be made of different materials and sizes, allowing the nanocrystal chip to modulate its response across a wide wavelength range to obtain a spectrum adjusted for incident light over that range.
[0044] In one possible implementation, light transmitted or scattered through water can be affected by substances in the water (e.g., suspended solids, pollutants, etc.), thereby obtaining specific spectral information. A quantum dot spectral probe can acquire this spectral information in real time and determine the water quality indicators represented by it. For example, by observing the absorption intensity of different wavelengths of light by a water sample, spectral information of different frequency bands can be obtained, and water quality indicators can be calculated from this spectral information. In this example, the water quality indicators include Chemical Oxygen Demand (COD), turbidity, permanganate index, total suspended solids, biological oxygen demand, total organic carbon, sulfate content, chloride content, dissolved iron content, dissolved manganese content, dissolved copper content, dissolved zinc content, nitrate content, nitrite content, total nitrogen content, fluoride content, selenium content, total arsenic content, total mercury content, total cadmium content, chromium content, total lead content, total cyanide, volatile phenol content, coliform bacteria content, and sulfide content. Water temperature can also be determined based on infrared spectra from spectral information. Alternatively, quantum dot spectral probes can infer water quality indicators through neural networks; for example, spectral information can be input into a neural network, which can then infer the concentrations of various substances (water quality indicators). This disclosure does not limit the method of determining water quality indicators. This disclosure does not limit the working principle of quantum dot spectral probes.
[0045] In this example, a spectral sensor can determine water quality indicators by analyzing the light absorption characteristics of various substances in the water. For instance, it can analyze the light intensity of light at a specific wavelength to obtain the concentration of substances corresponding to that specific wavelength range (water quality indicators). Measuring indicators using a miniature spectral sensor enables online, in-situ, high-frequency, and real-time measurement. When detecting water quality indicators, the spectral sensor can detect the spectral information of light passing through a predetermined water area, and then quickly calculate the water quality indicators based on this information, resulting in highly real-time water quality indicators. Compared to the process of bringing water samples back to the laboratory for testing, detection using a spectral sensor offers better real-time performance (i.e., the detected water quality indicators are the current water quality indicators, while laboratory testing takes a long time, and the water quality indicators of the predetermined water area may have changed during the waiting period for test results). By using a quantum dot spectrometer sensor positioned in a predetermined water area to perform multiple measurements over a specific time period, a sequence of water quality indicators for the aforementioned two water quality parameters can be obtained. Since the water quality indicators in this sequence are obtained from multiple times at the same location, they possess consistency and comparability, allowing for the observation of changes in water quality indicators over a period of time to determine water pollution levels. For example, the measurement frequency of the quantum dot spectrometer probe can reach 3-60 minutes / time, preferably 5-30 minutes / time, particularly preferably 8-20 minutes / time, and most preferably 10-15 minutes / time. This measurement frequency is significantly higher than the frequency of bringing water samples back to the laboratory for analysis. Furthermore, the miniature spectrometer sensor can be positioned at a fixed location within the predetermined water area, ensuring the consistency of the water samples. In contrast, bringing water samples back to the laboratory for analysis makes it difficult to guarantee that samples are taken from the exact same location for both measurements. Due to the lower measurement frequency and longer intervals between measurements, even if samples are taken from the exact same location, the water quality at that location may have undergone significant changes over the extended interval due to water mobility, making it difficult to guarantee measurement consistency and comparability of results.
[0046] In one possible implementation, in step S11, the pipeline network may include multiple pipelines or manholes. The first preset position and the second preset position are two positions on the same pipeline in the pipeline network, or two positions on pipelines that are directly or indirectly connected. That is, the first preset position and the second preset position are connected in the pipeline network. For example, if the first preset position is upstream of the pipeline and the second preset position is downstream of the pipeline, then water flowing through the first preset position can flow to the second preset position.
[0047] In one possible implementation, water quality indicators (e.g., COD) of the water flow can be continuously detected by a spectral sensor at a first preset location to obtain a first water quality indicator sequence, and water quality indicators of the water flow can be continuously detected by a spectral sensor at a second preset location to obtain a second water quality indicator sequence. The first and second water quality indicator sequences include water quality indicators acquired at multiple times, and the types of water quality indicators included in the second water quality indicator sequence are the same as those included in the first water quality indicator sequence.
[0048] In the example, the first water quality index sequence can be represented as {(t1, x...} 1,1 ),(t2,x 1,2 ),(t3,x 1,3 ),…,(t c ,x 1,c ),…}, where c is any positive integer, t c Let x represent the time c. 1,c Let $c$ represent the water quality index measured at time c. The second water quality index sequence can be represented as {(t1, x...}}. 2,1 ),(t2,x 2,2 ),(t3,x 2,3 ),…,(t d ,x 2,d ),…}, where d is any positive integer, t d Let x represent the time at time d. 2,d This represents the water quality index measured at time d.
[0049] In one possible implementation, in step S12, the first flow rate at the first preset upstream position and the second flow rate at the second preset downstream position can be determined using the first water quality index sequence and the second water quality index sequence, respectively. For example, the first flow velocity at the first preset position and the second flow velocity at the second preset position can be determined, and then the first flow rate at the first preset upstream position and the second flow rate at the second preset downstream position can be determined based on the first flow velocity and the second flow velocity, respectively.
[0050] In one possible implementation, step S12 may include: determining a first flow velocity at the first preset location and a second flow velocity at the second preset location based on the first water quality index sequence and the second water quality index sequence; determining a first flow rate at the first preset location based on the pipe information at the first preset location and the first flow velocity; and determining a second flow rate at the second preset location based on the pipe information at the second preset location and the second flow velocity.
[0051] In one possible implementation, a spectral sensor can be placed at a third preset position near the first preset position, for example, a third preset position upstream of the first preset position, and a spectral sensor can be placed at a fourth preset position near the second preset position, for example, a fourth preset position downstream of the second preset position. All spectral sensors detect the same water quality index. In the example, the spectral sensor at the third preset position can obtain a third water quality index sequence, and the spectral sensor at the fourth preset position can obtain a fourth water quality index sequence.
[0052] In one possible implementation, determining the first flow velocity at the first preset position and the second flow velocity at the second preset position includes: determining a first time difference between the water flow passing through the first preset position and the third preset position based on the first water quality index sequence and a third water quality index sequence obtained at a third preset position upstream of the pipeline; determining a second time difference between the water flow passing through the second preset position and the fourth preset position based on the second water quality index sequence and a fourth water quality index sequence obtained at a fourth preset position downstream of the pipeline; determining the first flow velocity based on the distance between the first preset position and the third preset position and the first time difference; and determining the second flow velocity based on the distance between the second preset position and the fourth preset position and the second time difference.
[0053] In one possible implementation, a first time difference is determined between the water flow passing through the first preset position and the third preset position based on the first water quality index sequence and the third water quality index sequence obtained at the third preset position upstream of the pipeline. In the example, the same segment of water flows through the first preset position and the third preset position at different times, but because the distance between the first preset position and the third preset position is relatively short, the values of the water quality indicators caused by the same pollution event are similar. For example, if both spectral sensors detect peak values greater than a certain threshold, the time difference between the two spectral sensors detecting this peak value can be determined as the first time difference. Similarly, a second time difference can be obtained.
[0054] In one possible implementation, the ratio of the distance between the first preset position and the third preset position to the first time difference can be determined. This ratio is the average velocity of the water flow between the first preset position and the third preset position. However, since the distance between the first preset position and the third preset position is relatively short, this average velocity can be determined as the first flow velocity at the first preset position. Similarly, a second flow velocity can be obtained.
[0055] In one possible implementation, after obtaining the average flow velocity, a first flow rate at the first preset location can be determined based on the first flow velocity and pipe information at the first preset location upstream, and a second flow rate at the second preset location can be determined based on the second flow velocity and pipe information at the second preset location downstream. This step may include: determining the cross-sectional area of the water passage at the first preset location based on the pipe information at the first preset location, and determining the cross-sectional area of the water passage at the second preset location based on the pipe information at the second preset location; determining the first flow rate based on the cross-sectional area of the water passage at the first preset location and the first flow velocity, and determining the second flow rate at the second preset location based on the cross-sectional area of the water passage at the second preset location and the second flow velocity.
[0056] In the example, the cross-sectional area of the pipe at the first preset position can be determined. For example, if the pipe is filled with water, the cross-sectional area of the pipe is the cross-sectional area. If the pipe is not filled, the filling angle of the cross-section can be determined based on the pipe information, and the cross-sectional area can be determined based on the filling angle and the inner diameter of the pipe. In the example, if the pipe is a cylindrical pipe, the cross-sectional area of the pipe at the first preset position can be determined by the following formula (1):
[0057]
[0058] Where A is the cross-sectional area of the water passage at the first preset position, θ is the angle of fullness of the cross-section (which can be measured and calculated by measuring instruments), and D is the inner diameter of the pipe at the first preset position.
[0059] In the example, the first flow rate can be determined by the first flow velocity and the cross-sectional area of the water passage at the first preset position. For example, the first flow rate can be determined by the following formula (2):
[0060] Q = A * v (2)
[0061] Where Q represents the first flow rate.
[0062] Based on a similar method, the second flow rate at the second preset location can be obtained, which will not be elaborated here.
[0063] In one possible implementation, after obtaining the first and second flow rates, it can be determined whether a pipeline malfunction has occurred and the type of malfunction. In step S13, it can be determined whether there is a correlation between the first and second water quality index sequences, and in step S14, the malfunction type can be analyzed based on the correlation between the first and second water quality index sequences, as well as the first and second flow rates.
[0064] In one possible implementation, in step S13, it can be determined whether there is a correlation between the first water quality index sequence and the second water quality index sequence. In the example, the water quality indicators in the first and second water quality index sequences may have their own data characteristics. It can be determined whether the data characteristics of the first and second water quality index sequences are correlated to determine whether the same water flow segment is detected at the first and second preset positions. For example, if the first water quality index (t... o ,x 1,o ), (t p ,x 1,p ), (t q ,x 1,q The three peaks (o, p, q are any positive integers) in the first water quality index sequence are also detected, and three peaks are also detected in the second water quality index sequence, for example, (t) r ,x 2,r ), (t s ,x 2,s ), (t t ,x 2,t If the three peaks (r, s, t are any positive integers) in the second water quality index sequence are detected, and the time difference between the three peaks is approximately the same as the time difference between the three peaks in the first water quality index sequence, then the data characteristics of the first water quality index sequence are correlated with the second water quality index sequence, and the three peaks detected originate from the same water flow segment. Furthermore, the time difference can be determined using the time at which the three peaks are detected. Conversely, if three peaks are detected in the first water quality index sequence, but no three peaks are detected in the second index sequence due to factors such as the same water flow segment not yet reaching the second preset position, then there is no correlation between the first and second water quality index sequences, and the same water flow segment passing through the first preset position is not detected at the second preset position.
[0065] In one possible implementation, it can be determined whether there is a correlation between a first water quality indicator sequence and a second water quality indicator sequence. In related technologies, multiple water quality indicators from the first and second water quality indicator sequences can be combined into a vector, and then the similarity, such as the cosine similarity, or the Euclidean distance between the two vectors can be determined. This disclosure does not limit the method of determining similarity. However, the water quality indicators in the first and second water quality indicator sequences do not change simultaneously; there is a time difference in the changes between the two indicator sequences. For example, the peak of the first water quality indicator sequence appears earlier than the peak of the second water quality indicator sequence. Determining the similarity between two sequences through vector similarity or Euclidean distance may result in situations where the waveforms of the two sequences are similar, but the accuracy of determining the correlation is low due to the time difference in indicator changes.
[0066] In the example, both sequences include peaks and troughs, and the time differences between the peaks and troughs in the two sequences are similar, meaning that the waveforms of the two sequences are similar. However, because there is a time difference in the changes of the indicators in the two sequences, for example, the indicators in the first water quality indicator sequence change earlier than the indicators in the second water quality indicator sequence, the peaks in the first water quality indicator sequence and the troughs in the second water quality indicator sequence may appear at similar times, rather than the peaks in the second water quality indicator sequence. This leads to a lower similarity between the vectors formed by the indicators in the two indicator sequences, resulting in lower accuracy when determining the correlation.
[0067] In one possible implementation, the correlation between the first and second water quality indicator sequences can be determined by the dynamic time-normalized distance between them, thereby reducing the error in determining the correlation caused by time differences. Determining whether there is a correlation between the first and second water quality indicator sequences includes: determining a path normalization matrix between the first and second water quality indicator sequences based on multiple water quality indicators in the first and second sequences, wherein the element in the i-th row and j-th column of the path normalization matrix is the vector distance between the i-th water quality indicator in the first sequence and the j-th water quality indicator in the second sequence, where i and j are positive integers; and determining a normalized path based on the path normalization matrix, wherein the normalized path is... In the path normalization matrix, the path from the first element to the second element is the path with the smallest sum of its elements. The first element comprises the element in the nth row and 1st column of the path normalization matrix, and the second element comprises the element in the 1st row and mth column of the path normalization matrix. The path normalization matrix comprises n rows and m columns, where n ≥ i and m ≥ j. Based on the normalized path, the dynamic time normalized distance between the first water quality index sequence and the second water quality index sequence is determined. If the dynamic time normalized distance is less than or equal to a distance threshold, a correlation is determined between the first water quality index sequence and the second water quality index sequence.
[0068] In one possible implementation, the path normalization matrix can be determined based on multiple water quality indicators in the first and second water quality indicator sequences. The element in the i-th row and j-th column of the path normalization matrix represents the distance between the i-th water quality indicator in the first water quality indicator sequence and the j-th water quality indicator in the second water quality indicator sequence, where i and j are positive integers. In the example, the distance can be the absolute value of the difference between corresponding indicators in the first and second water quality indicator sequences. If the first water quality indicator is 10 and the second water quality indicator is 15, then the element in the first row and first column of the path normalization matrix is 5; if the first water quality indicator is 10 and the second water quality indicator is 18, then the element in the first row and second column of the path normalization matrix is 8, and so on. This disclosure does not limit the values of the elements in the path normalization matrix.
[0069] In one possible implementation, a regularized path (i.e., the path with the smallest sum of elements) from the first element to the second element can be determined in the path planning matrix. In the example, the first element includes the element in the nth row and 1st column of the path regularization matrix, i.e., the element in the lower left corner of the matrix, and the second element includes the element in the 1st row and mth column of the path regularization matrix, i.e., the element in the upper right corner of the matrix, where the path regularization matrix has n rows and m columns, n≥i, m≥j.
[0070] In the example, the first element is the element in the nth row and 1st column of the path normalization matrix (i.e., the bottom left element), and the second element is the element in the 1st row and mth column of the path normalization matrix (i.e., the top right element). The path from the first element to the second element requires traversing every row and every column of the path normalization matrix. That is, in the normalized path, each row of the path normalization matrix will have one element included in the normalized path, and each column of the path normalization matrix will also have one element included in the normalized path. In other words, the path from the element in the nth row and 1st column to the element in the 1st row and mth column will pass through the nth row, the (n-1)th row, ..., the 1st row (this path is monotonically decreasing in the row direction and will not skip any rows), and it will also pass through the 1st column, the 2nd column, ..., the mth column (this path is monotonically increasing in the column direction and will not skip any columns). Since the element in the i-th row and j-th column represents the distance between the i-th water quality indicator in the first water quality indicator sequence and the j-th water quality indicator in the second water quality indicator sequence, the normalized path traverses every water quality indicator in both the first and second water quality indicator sequences. Furthermore, the normalized path is the path with the smallest sum of elements from the first element to the second element; that is, the path with the smallest sum of distances between the n water quality indicators in the first water quality indicator sequence and the m water quality indicators in the second water quality indicator sequence.
[0071] In one possible implementation, the similarity between the first index sequence and the second index sequence can be determined based on the path. The normalized path is the path with the smallest sum of distances between the n chemical oxygen demand indicators and the m turbidity indicator. The distance with the smallest sum of distances between the n chemical oxygen demand indicators and the m turbidity indicator can be determined as the dynamic time normalized distance.
[0072] In the example, the dynamic time warp distance can be determined using the following formula (3):
[0073] D(e,f)=Dist(e,f)+min{D(e-1,f), D(e,f-1), D(e-1,f-1)} (3)
[0074] Where Dist(e,f) represents the distance between the e-th (e is a positive integer) water quality index in the first water quality index sequence and the f-th (f is a positive integer) water quality index in the second water quality index sequence, that is, the (e,f) element of the path normalization matrix. D(e,f) represents the dynamic time normalization distance between the first e water quality indexes in the first water quality index sequence and the first f water quality indexes in the second water quality index sequence. In the example, e = n and f = m can be made, and the dynamic time normalization distance between the first water quality index sequence and the second water quality index sequence can be obtained by iterating through the above formula (1).
[0075] In one possible implementation, the similarity between the first water quality index sequence and the second water quality index sequence is determined by the dynamic time-warped distance. For example, if the dynamic time-warped distance is less than or equal to a preset distance threshold, the first water quality index sequence and the second water quality index sequence can be considered to be correlated; otherwise, the first water quality index sequence and the second water quality index sequence can be considered not to be correlated.
[0076] In this way, by traversing all indicators in the first and second water quality indicator sequences using the path normalization matrix and normalization path, the dynamic time normalization distance that minimizes the sum of distances between all indicators can be determined. The correlation between the first and second water quality indicator sequences can be determined by using the dynamic time normalization distance. The distances between all indicators in the first and second water quality indicator sequences can be referenced, which reduces the problem of low accuracy in correlation calculation caused by waveform shift due to time differences.
[0077] In one possible implementation, in step S14, the pipeline fault type can be determined by the relationship between the first flow rate and the second flow rate. In an example, if there is a correlation between the first water quality index and the second water quality index, step S14 may include one of the following: if the second flow rate is less than the first flow rate, the pipeline fault type is determined to be a pipeline leak; if the first flow rate is less than the second flow rate, and the first moment when the target data feature is detected in the first water quality index sequence is later than the second moment when the target data feature is detected in the first water quality index sequence, the pipeline fault type is determined to be a pipeline congestion. The target data feature is a data feature indicating changes in water quality indicators at a first preset location and a second preset location caused by the same water pollution event. The target data feature includes at least one of water quality index peaks, water quality index troughs, and water quality index change rates.
[0078] In the example, the flow rate of water at a certain location in the pipe is the amount of water flowing through that location (e.g., volume or mass). If the flow rates upstream and downstream of the same pipe are not equal, and the first flow rate at the first preset location upstream is greater than the second flow rate at the second preset location downstream, then a portion of the water flow has not flowed from the first preset location upstream to the second preset location downstream. If the pipe has no branches, then a portion of the water flow can be considered to have leaked out of the pipe; that is, the pipe fault type is pipe leakage. Specifically, if there is a correlation between the first and second water quality index sequences—that is, the same segment of water flow is detected at both the first and second preset locations, but the flow rate at the second preset location is less than the flow rate at the first preset location—then it can be determined that a portion of that water flow has leaked out of the pipe.
[0079] In the example, if the first flow rate at the first preset upstream position is less than the second flow rate at the second preset downstream position, it indicates that the water flow is not from upstream to downstream, but may be due to pipe congestion causing backflow. This can be further determined by detecting the target data characteristics at the first and second moments. The first and second moments are the times when the spectral sensors at the first and second preset positions detect water quality indicators with specific characteristics of the same segment of water flow, respectively. For example, if the first and second water quality indicator sequences are correlated, the changes in the indicators in the two sequences caused by the water quality indicators of the same segment of water flow are similar. For example, if both water quality indicator sequences detect a waveform of a certain shape, the moment when representative data features of that waveform are detected can be determined as the first and second moments, such as the moment when a peak is detected, the moment when a trough is detected, or the moment when a drastic change in water quality indicators is detected. If the first moment when the target data characteristics are detected upstream is later than the second moment when the target data characteristics are detected downstream, backflow can be determined, and the pipe fault type can be considered as pipe congestion.
[0080] In one possible implementation, if the first water quality indicator and the second water quality indicator are not correlated, then almost all the water flowing through the first preset location will flow out of the pipe and will not flow to the second preset location. Step S14 may include: if the first water quality indicator and the second water quality indicator are not correlated, determining the pipe fault type as a pipe connection error.
[0081] In the example, the first water quality index and the second water quality index are not correlated. Therefore, almost all the water flowing through the first preset position will flow out of the pipe. For example, a leak may occur or the pipe that should flow to the second preset position may become blocked, causing the water to flow to other pipes, or it may flow to other pipes due to connection errors. The pipe can then be repaired.
[0082] In one possible implementation, the types of pipeline failures are not limited to the three mentioned above. For example, pipeline failure types may also include combined sewer overflows caused by rainwater backflow. This disclosure does not limit the types of failures.
[0083] The pipeline fault detection method according to embodiments of this disclosure determines pipeline flow rate through spectral information. This allows for measurement without direct contact with the water flow in the pipeline, extending detection lifespan and reliability, reducing manual maintenance costs, and determining the correlation between a first and second water quality index sequence based on state-time warping distance. This reduces the problem of low correlation calculation accuracy caused by waveform shifts due to time differences, improving the accuracy of flow velocity and flow rate detection. Furthermore, during fault detection, no on-site inspection is required, reducing detection costs and improving detection efficiency. Potential faults can be detected based on both first and second flow rates, enhancing the reliability of fault detection.
[0084] Figure 2 This diagram illustrates the application of a pipeline fault detection method according to an embodiment of the present disclosure, such as... Figure 2 As shown, a miniature spectral sensor 1 can be installed at a first preset position in the pipeline to detect a first water quality index sequence, such as a COD index sequence, of the water flowing in the pipeline. A miniature spectral sensor 2 can be installed at a second preset position in the pipeline to detect a second water quality index sequence of the water flowing in the pipeline. The water quality indicators included in the first water quality index sequence are of the same type as those included in the second water quality index sequence.
[0085] In one possible implementation, a miniature spectral sensor 3 can be placed at a third preset position near the first preset position. Based on the first water quality index detected by the miniature spectral sensor 1 and the third water quality index detected by the miniature spectral sensor 3, the time difference between the water flow passing through the first preset position and the third preset position can be determined. Then, based on the distance between the first preset position and the third preset position and the time difference, the first flow velocity of the water flow at the first preset position can be determined. Similarly, a second flow velocity can be determined.
[0086] In one possible implementation, if the pipe is cylindrical and the water flow does not fill the pipe, the cross-sectional area of the water passage at the first preset position upstream and the second preset position downstream can be determined using formula (1), and the first flow rate at the first preset position and the second flow rate at the second preset position can be determined using formula (2).
[0087] In one possible implementation, it can be first determined whether there is a correlation between the first water quality index sequence and the second water quality index sequence. This correlation can be determined by the dynamic time-warped distance between the two sequences. In the example, the dynamic time-warped distance between the two sequences can be determined using formula (3), and if the dynamic time-warped distance is less than or equal to a distance threshold, it can be determined whether there is a correlation between the two sequences.
[0088] In one possible implementation, the pipeline fault type can be determined based on the correlation, as well as the first and second flow rates. For example, if there is a correlation between the first and second water quality index sequences, and the first flow rate at the upstream first preset location is greater than the second flow rate at the downstream second preset location, it indicates pipeline congestion. If the first flow rate at the upstream first preset location is less than the second flow rate at the downstream second preset location, and the first moment when the target data feature is detected upstream is later than the second moment when the target data feature is detected downstream, it indicates that pipeline congestion has caused water backflow.
[0089] In one possible implementation, if the first water quality index sequence is not correlated with the second water quality index sequence, it may be due to a pipeline connection error.
[0090] In one possible implementation, the pipeline fault detection method can be used for flow detection in pipeline networks, which can promptly detect pipeline leaks and blockages, providing a basis for pipeline cleaning and daily management, as well as for the health status of pipelines.
[0091] Figure 3 A block diagram of a pipeline fault detection system according to an embodiment of the present disclosure is shown, such as Figure 3As shown, the system includes: a sequence module 11, used to determine a first water quality index sequence of the pipeline based on water quality information measured in real time at a first preset location upstream of the pipeline, and to determine a second water quality index sequence of the pipeline based on water quality information measured at a second preset location downstream of the pipeline, wherein the first water quality index sequence and the second water quality index sequence include water quality indicators acquired at multiple times; a flow module 12, used to determine a first flow rate at the first preset location upstream of the pipeline and a second flow rate at the second preset location downstream of the pipeline based on the first water quality index sequence and the second water quality index sequence; a judgment module 13, used to determine whether there is a correlation between the first water quality index sequence and the second water quality index sequence; and a determination module 14, used to determine the pipeline fault type based on the first flow rate and the second flow rate, and the correlation between the first water quality index sequence and the second water quality index sequence.
[0092] In one possible implementation, the flow module is further configured to: determine a first flow velocity at the first preset location and a second flow velocity at the second preset location based on the first water quality index sequence and the second water quality index sequence; determine a first flow rate at the first preset location based on the pipe information at the first preset location and the first flow velocity; and determine a second flow rate at the second preset location based on the pipe information at the second preset location and the second flow velocity.
[0093] In one possible implementation, the flow module is further configured to: determine a first time difference between the water flow passing through the first preset position and the third preset position based on the first water quality index sequence and the third water quality index sequence obtained at the third preset position upstream of the pipeline; and determine a second time difference between the water flow passing through the second preset position and the fourth preset position based on the second water quality index sequence and the fourth water quality index sequence obtained at the fourth preset position downstream of the pipeline; determine a first flow velocity based on the distance between the first preset position and the third preset position and the first time difference; and determine a second flow velocity based on the distance between the second preset position and the fourth preset position and the second time difference.
[0094] In one possible implementation, the flow module is further configured to: determine the cross-sectional area of the water passage at the first preset location based on the pipe information at the first preset location, and determine the cross-sectional area of the water passage at the second preset location based on the pipe information at the second preset location; determine the first flow rate based on the cross-sectional area of the water passage at the first preset location and the first flow velocity, and determine the second flow rate at the second preset location based on the cross-sectional area of the water passage at the second preset location and the second flow velocity.
[0095] In one possible implementation, the judgment module is further configured to: determine a path normalization matrix between the first water quality index sequence and the second water quality index sequence based on multiple water quality indicators in the first water quality index sequence and multiple water quality indicators in the second water quality index sequence, wherein the element in the i-th row and j-th column of the path normalization matrix is the vector distance between the i-th water quality indicator in the first water quality index sequence and the j-th water quality indicator in the second water quality index sequence, and i and j are positive integers; and determine a normalized path based on the path normalization matrix, wherein the normalized path is defined in the path normalization matrix. The path from the first element to the second element is the path with the smallest sum of elements, where the first element includes the element in the nth row and 1st column of the path normalization matrix, and the second element includes the element in the 1st row and mth column of the path normalization matrix, where the path normalization matrix has n rows and m columns, n≥i, m≥j; based on the normalized path, the dynamic time normalized distance between the first water quality index sequence and the second water quality index sequence is determined; if the dynamic time normalized distance is less than or equal to a distance threshold, it is determined that the first water quality index sequence and the second water quality index sequence are correlated.
[0096] In one possible implementation, when there is a correlation between the first water quality index and the second water quality index, the determining module is further configured to: determine the pipeline fault type as pipeline leakage when the second flow rate is less than the first flow rate; and determine the pipeline fault type as pipeline congestion when the first flow rate is less than the second flow rate and the first moment when the target data feature is detected in the first water quality index sequence is later than the second moment when the target data feature is detected in the first water quality index sequence, wherein the target data feature is a data feature used to indicate changes in water quality indicators measured at a first preset location and a second preset location caused by the same water pollution event, and the target data feature includes at least one of water quality index peaks, water quality index troughs, and water quality index change rates.
[0097] In one possible implementation, the determining module is further configured to: determine the pipeline fault type as a pipeline connection error when there is no correlation between the first water quality index and the second water quality index.
[0098] In one possible implementation, the water quality indicators include at least one of the following: chemical oxygen demand (COD), turbidity, total phosphorus content, ammonia nitrogen content, permanganate index, total suspended solids, biological oxygen demand (BOD), total organic carbon (COC), sulfate content, chloride content, dissolved iron content, dissolved manganese content, dissolved copper content, dissolved zinc content, nitrate content, nitrite content, total nitrogen content, fluoride content, selenium content, total arsenic content, total mercury content, total cadmium content, chromium content, total lead content, total cyanide, volatile phenol content, coliform bacteria content, and sulfide content.
[0099] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further.
[0100] In addition, this disclosure also provides a pipeline fault detection system, electronic equipment, computer-readable storage medium, and program, all of which can be used to implement any of the pipeline fault detection methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the relevant section of the method and will not be repeated here.
[0101] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0102] In some embodiments, the system provided in this disclosure may have functions or include modules that can be used to execute the methods described in the above method embodiments. Specific implementations can be referred to the descriptions in the above method embodiments, and for brevity, will not be repeated here.
[0103] This disclosure also proposes a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the above-described method. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
[0104] This disclosure also proposes an electronic device, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured as described above.
[0105] Electronic devices can be provided as terminals, servers, or other forms of devices.
[0106] Figure 4 This is a block diagram illustrating an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, or other terminal.
[0107] Reference Figure 4 The electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.
[0108] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0109] Memory 804 is configured to store various types of data to support the operation of electronic device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0110] Power supply component 806 provides power to various components of electronic device 800. Power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.
[0111] Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0112] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0113] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0114] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 can detect the on / off state of electronic device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0115] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0116] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0117] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions that can be executed by a processor 820 of an electronic device 800 to perform the above-described method.
[0118] Figure 5 This is a block diagram illustrating an electronic device 1900 according to an exemplary embodiment. For example, the electronic device 1900 may be provided as a server. (Refer to...) Figure 5 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.
[0119] Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input / output (I / O) interface 1958. Electronic device 1900 can operate on an operating system stored in memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.
[0120] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of an electronic device 1900 to perform the above-described method.
[0121] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.
[0122] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0123] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0124] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0125] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0126] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0127] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0128] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0129] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A pipeline fault detection method, characterized in that, The method includes: Based on water quality information measured at a first preset location upstream of the pipeline, a first water quality index sequence of the pipeline is determined, and based on water quality information measured at a second preset location downstream of the pipeline, a second water quality index sequence of the pipeline is determined, wherein the first water quality index sequence and the second water quality index sequence include water quality indicators acquired at multiple times. Based on the first water quality index sequence and the second water quality index sequence, determine the first flow rate at the first preset location and the second flow rate at the second preset location; Determine whether there is a correlation between the first water quality index sequence and the second water quality index sequence; Based on the first flow rate and the second flow rate, and the correlation between the first water quality index sequence and the second water quality index sequence, the pipeline fault type is determined; The determination of whether there is a correlation between the first water quality indicator sequence and the second water quality indicator sequence includes: Based on multiple water quality indicators in the first water quality indicator sequence and multiple water quality indicators in the second water quality indicator sequence, a path normalization matrix for the first water quality indicator sequence and the second water quality indicator sequence is determined. The element in the i-th row and j-th column of the path normalization matrix is the vector distance between the i-th water quality indicator in the first water quality indicator sequence and the j-th water quality indicator in the second water quality indicator sequence, where i and j are positive integers. Based on the path regularization matrix, a regularized path is determined, wherein the regularized path is the path with the smallest sum of elements among the paths from the first element to the second element in the path regularization matrix, wherein the first element includes the element in the nth row and the 1st column of the path regularization matrix, and the second element includes the element in the 1st row and the mth column of the path regularization matrix, wherein the path regularization matrix has n rows and m columns, n≥i, m≥j; Based on the regularization path, determine the dynamic time regularization distance between the first water quality index sequence and the second water quality index sequence; If the dynamic time-normalized distance is less than or equal to the distance threshold, it is determined that the first water quality index sequence and the second water quality index sequence are correlated.
2. The method according to claim 1, characterized in that, Based on the first water quality index sequence and the second water quality index sequence, the first flow rate at the first preset location and the second flow rate at the second preset location are determined, including: Based on the first water quality index sequence and the second water quality index sequence, determine the first flow velocity at the first preset position and the second flow velocity at the second preset position; Based on the pipe information at the first preset location and the first flow rate, a first flow rate at the first preset location is determined, and based on the pipe information at the second preset location and the second flow rate, a second flow rate at the second preset location is determined.
3. The method according to claim 2, characterized in that, Determining the first flow velocity at the first preset position and the second flow velocity at the second preset position includes: Based on the first water quality index sequence and the third water quality index sequence obtained at the third preset position near the first preset position, a first time difference is determined between the water flow passing through the first preset position and the third preset position. Based on the second water quality index sequence and the fourth water quality index sequence obtained at the fourth preset position near the second preset position, a second time difference is determined between the water flow passing through the second preset position and the fourth preset position. The first flow velocity is determined based on the distance between the first preset position and the third preset position and the first time difference; and the second flow velocity is determined based on the distance between the second preset position and the fourth preset position and the second time difference.
4. The method according to claim 2, characterized in that, Based on the pipe information at the first preset location and the first flow velocity, a first flow rate at the first preset location is determined, and based on the pipe information at the second preset location and the second flow velocity, a second flow rate at the second preset location is determined, including: Based on the pipe information at the first preset location, determine the cross-sectional area of the water passage at the first preset location, and based on the pipe information at the second preset location, determine the cross-sectional area of the water passage at the second preset location. The first flow rate is determined based on the cross-sectional area of the water passage at the first preset position and the first flow velocity, and the second flow rate at the second preset position is determined based on the cross-sectional area of the water passage at the second preset position and the second flow velocity.
5. The method according to claim 1, characterized in that, When there is a correlation between the first water quality indicator and the second water quality indicator Based on the first flow rate and the second flow rate, and the correlation between the first water quality index sequence and the second water quality index sequence, the pipeline fault type is determined, including one of the following: If the second flow rate is less than the first flow rate, the pipeline fault type is determined to be pipeline leakage; If the first flow rate is less than the second flow rate, and the first moment when the target data feature is detected in the first water quality index sequence is later than the second moment when the target data feature is detected in the first water quality index sequence, the pipeline fault type is determined to be pipeline congestion. The target data feature is a data feature used to indicate changes in water quality indicators at a first preset location and a second preset location caused by the same water pollution event. The target data feature includes at least one of water quality index peaks, water quality index troughs, and water quality index change rates.
6. The method according to claim 1, characterized in that, Based on the first flow rate and the second flow rate, and the correlation between the first water quality index sequence and the second water quality index sequence, the pipeline fault type is determined, including: If there is no correlation between the first water quality indicator and the second water quality indicator, the pipeline fault type is determined to be a pipeline connection error.
7. The method according to claim 1, characterized in that, The water quality indicators include at least one of the following: chemical oxygen demand (COD), turbidity, total phosphorus content, ammonia nitrogen content, permanganate index, total suspended solids, biological oxygen demand (BOD), total organic carbon, sulfate content, chloride content, dissolved iron content, dissolved manganese content, dissolved copper content, dissolved zinc content, nitrate content, nitrite content, total nitrogen content, fluoride content, selenium content, total arsenic content, total mercury content, total cadmium content, chromium content, total lead content, total cyanide, volatile phenol content, coliform bacteria content, and sulfide content.
8. A pipeline fault detection system, characterized in that, The system includes: The sequence module is used to determine a first water quality index sequence of the pipeline based on water quality information measured in real time at a first preset location upstream of the pipeline, and to determine a second water quality index sequence of the pipeline based on water quality information measured at a second preset location downstream of the pipeline, wherein the first water quality index sequence and the second water quality index sequence include water quality indicators acquired at multiple times. The flow module is used to determine the first flow rate at a first preset position upstream of the pipeline and the second flow rate at a second preset position downstream of the pipeline based on the first water quality index sequence and the second water quality index sequence. The judgment module determines whether there is a correlation between the first water quality index sequence and the second water quality index sequence; The determination module is used to determine the pipeline fault type based on the first flow rate and the second flow rate, as well as the correlation between the first water quality index sequence and the second water quality index sequence; The judgment module is further configured to: determine a path normalization matrix between the first water quality index sequence and the second water quality index sequence based on multiple water quality indicators in the first water quality index sequence and multiple water quality indicators in the second water quality index sequence, wherein the element in the i-th row and j-th column of the path normalization matrix is the vector distance between the i-th water quality indicator in the first water quality index sequence and the j-th water quality indicator in the second water quality index sequence, and i and j are positive integers; and determine a normalized path based on the path normalization matrix, wherein the normalized path is obtained by starting from the first element in the path normalization matrix. The path to the second element is the path with the smallest sum of elements, where the first element includes the element in the nth row and 1st column of the path normalization matrix, and the second element includes the element in the 1st row and mth column of the path normalization matrix, where the path normalization matrix has n rows and m columns, n≥i, m≥j; based on the normalized path, the dynamic time normalized distance between the first water quality index sequence and the second water quality index sequence is determined; if the dynamic time normalized distance is less than or equal to a distance threshold, it is determined that the first water quality index sequence and the second water quality index sequence are correlated.
9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute the method according to any one of claims 1 to 6.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 6.