Pipeline Fault Detection Method and Device, Electronic Device, and Storage Medium
By measuring water quality information in real time upstream and downstream of the pipeline, using the path regular matrix and dynamic time regular distance analysis, the problems of low efficiency and high cost of rain and sewage mixing diagnosis in the pipeline network are solved, and fast and reliable fault identification and positioning are achieved.
Patent Information
- Application Number
- CN202110632224.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-07
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2041-06-07
AI Technical Summary
In the prior art, the diagnosis of rainwater and sewage mixing in pipeline networks mainly relies on manual inspection, which is low in efficiency and high in cost, making it difficult to effectively identify and deal with rainwater and sewage mixing phenomena, resulting in a decrease in river pollution and sewage transport capacity.
By measuring water quality information in real time upstream and downstream of the pipeline, determining the water quality index sequence, analyzing the correlation and differences of water quality indexes using the path regular matrix and dynamic time regular distance, determining whether there is rain and sewage mixing phenomenon in the pipeline, and generating warning information to indicate the location of the fault.
It realizes no manual on-site inspection, reduces inspection costs and time, improves detection efficiency and reliability, and can quickly identify and locate rainwater and sewage mixing faults, reducing manual maintenance needs.
Smart Images

Figure CN115507305B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of environmental protection technologies, and in particular, to a pipeline fault detection method and device, an electronic device, and a storage medium. Background Art
[0002] With the rapid development of the economy, the requirements for water environment treatment are continuously increasing, and it has become increasingly important to gradually establish and improve the diagnosis system of urban rain and sewage pipe networks (pipeline networks). Through this system, the operation status of the drainage pipe network can be overall grasped, silted pipe sections can be effectively identified, and network anomalies can be timely discovered, so as to quickly make flood control responses and ensure the safety of residents' travel.
[0003] The mixing of rain and sewage in pipelines is a common anomaly in the pipe network system. On the one hand, the mixing of rain and sewage is likely to cause river pollution. Sewage is discharged into the river through rainwater pipelines, causing the water body to turn black and stinky, polluting the river, endangering aquatic animals and plants, destroying the water ecological balance, and affecting the quality of the ecological environment. On the other hand, it affects the operation of sewage collection pipelines. A large amount of rainwater flows into sewage pipelines, and the mixed collection of rain and sewage directly affects the sewage transportation capacity in the sewage pipe network, resulting in sewage overflow, road waterlogging, manhole cover displacement and other phenomena, posing great potential safety hazards.
[0004] Therefore, the diagnosis of rain-sewage mixing in pipe networks is an important part of the pipe network diagnosis system. In related technologies, most pipe network diagnosis systems detect the rain-sewage mixing in pipe networks through manual inspections, which have high labor costs and low efficiency. Summary of the Invention
[0005] The present disclosure provides a pipeline fault detection method and device, an electronic device, and a storage medium.
[0006] According to one aspect of the present disclosure, a pipeline fault detection method is provided, including: determining a first water quality index sequence of the pipeline according to water quality information measured in real time at a first preset position upstream of the pipeline, and determining a second water quality index sequence of the pipeline according to water quality information measured in real time at a second preset position downstream of the pipeline, where the first water quality index sequence and the second water quality index sequence include water quality indexes of the same type obtained at multiple moments; determining whether there is a rain-sewage mixing phenomenon in the pipeline according to the first water quality index sequence, the second water quality index sequence, and the type of the pipeline; determining whether there is a fault in the pipeline according to pipeline information when there is a rain-sewage mixing phenomenon in the pipeline; and generating a first warning message when there is a fault in the pipeline.
[0007] In a possible implementation, determining whether there is a phenomenon of rain and sewage mixing in the pipeline according to the first water quality index sequence, the second water quality index sequence, and the type of the pipeline includes: determining whether there is a correlation between the first water quality index sequence and the second water quality index sequence; in the case where there is a correlation between the first water quality index sequence and the second water quality index sequence, determining whether the characteristic difference between the first water quality index sequence and the second water quality index sequence is greater than or equal to a preset threshold according to the type of the pipeline; in the case where the characteristic difference is greater than or equal to the preset threshold, determining that there is a phenomenon of rain and sewage mixing in the pipeline.
[0008] In a possible implementation, determining whether there is a correlation between the first water quality index sequence and the second water quality index sequence includes: determining a path alignment matrix of the first water quality index sequence and the second water quality index sequence according to multiple water quality indexes in the first water quality index sequence and multiple water quality indexes in the second water quality index sequence, where the element in the i-th row and the j-th column of the path alignment matrix is the vector distance between the i-th water quality index in the first water quality index sequence and the j-th water quality index in the second water quality index sequence, and i and j are positive integers; determining an alignment path according to the path alignment matrix, where the alignment path is the path with the smallest sum of the elements passed through among the paths from the first element to the second element in the path alignment matrix, where the first element includes the element in the n-th row and the first column of the path alignment matrix, and the second element includes the element in the first row and the m-th column of the path alignment matrix, where the path alignment matrix includes n rows and m columns, and n≥i, m≥j; determining the dynamic time warping distance between the first water quality index sequence and the second water quality index sequence according to the alignment path; in the case where the dynamic time warping distance is less than or equal to a distance threshold, determining that there is a correlation between the first water quality index sequence and the second water quality index sequence.
[0009] In a possible implementation, in the case where there is a correlation between the first water quality index sequence and the second water quality index sequence, determining whether the characteristic difference between the first water quality index sequence and the second water quality index sequence is greater than or equal to a preset threshold according to the type of the pipeline includes: determining a first target data characteristic of the first water quality index sequence and a second target data characteristic of the second water quality index sequence; determining the characteristic difference according to the type of the pipeline, the first target data characteristic, and the second target data characteristic; determining whether the characteristic difference is greater than or equal to the preset threshold.
[0010] In a possible implementation, according to the type of the pipeline, and the first target data feature and the second target data feature, determining the feature difference includes one of the following: when the type of the pipeline is a rainwater pipeline, determining the feature difference as the difference between the second target data feature and the first target data feature; when the type of the pipeline is a sewage pipeline, determining the feature difference as the difference between the first target data feature and the second target data feature.
[0011] In a possible implementation, the first target data feature and the second target data feature include any one of a water quality index peak value and a water quality index average value.
[0012] In a possible implementation, when there is a phenomenon of rain-sewage mixed connection in the pipeline, determining whether the pipeline has a fault according to the pipeline information includes: determining the connection method of the pipeline according to the pipeline information; when the connection method is rain-sewage pipeline diversion, determining that the pipeline has a fault, where the rain-sewage pipeline diversion connection method is a connection method in which rainwater and sewage cannot be mixed.
[0013] In a possible implementation, the method further includes: generating a second warning message when the pipeline has no fault.
[0014] According to one aspect of the present disclosure, there is provided a pipeline fault detection device, including: a sequence module 11, configured to determine a first water quality index sequence of the pipeline according to water quality information measured in real time at a first preset position upstream of the pipeline, and determine a second water quality index sequence of the pipeline according to water quality information measured in real time at a second preset position downstream of the pipeline, where the first water quality index sequence and the second water quality index sequence include water quality indexes of the same type obtained at multiple moments; a first judgment module 12, configured to determine whether there is a rain-sewage mixed connection phenomenon in the pipeline according to the first water quality index sequence, the second water quality index sequence, and the type of the pipeline; a second judgment module 13, configured to determine whether the pipeline has a fault according to the pipeline information when there is a rain-sewage mixed connection phenomenon in the pipeline; and a warning module 14, configured to generate a first warning message when the pipeline has a fault.
[0015] In a possible implementation, the first judgment module is further configured to: judge whether there is a correlation between the first water quality index sequence and the second water quality index sequence; when there is a correlation between the first water quality index sequence and the second water quality index sequence, determine whether the feature difference between the first water quality index sequence and the second water quality index sequence is greater than or equal to a preset threshold according to the type of the pipeline; and when the feature difference is greater than or equal to the preset threshold, determine that there is a rain-sewage mixed connection phenomenon in the pipeline.
[0016] In a possible implementation, the first determination module is further configured to: determine a path alignment matrix of the first water quality index sequence and the second water quality index sequence according to multiple water quality indexes in the first water quality index sequence and multiple water quality indexes in the second water quality index sequence, where an element in the i-th row and the j-th column of the path alignment matrix is a vector distance between the i-th water quality index in the first water quality index sequence and the j-th water quality index in the second water quality index sequence, and i and j are positive integers; determine an alignment path according to the path alignment matrix, where the alignment path is a path with the smallest sum of the elements passed through among the paths from the first element to the second element in the path alignment matrix, where the first element includes the element in the n-th row and the 1st column of the path alignment matrix, and the second element includes the element in the 1st row and the m-th column of the path alignment matrix, where the path alignment matrix includes n rows and m columns, n≥i, m≥j; determine a dynamic time warping distance between the first water quality index sequence and the second water quality index sequence according to the alignment path; and determine that there is a correlation between the first water quality index sequence and the second water quality index sequence when the dynamic time warping distance is less than or equal to a distance threshold.
[0017] In a possible implementation, the first determination module is further configured to: determine a first target data feature of the first water quality index sequence and a second target data feature of the second water quality index sequence; determine the feature difference according to the type of the pipeline and the first target data feature and the second target data feature; and determine whether the feature difference is greater than or equal to a preset threshold.
[0018] In a possible implementation, the first determination module is further configured to: when the type of the pipeline is a rainwater pipeline, determine the feature difference as the difference between the second target data feature and the first target data feature; or when the type of the pipeline is a sewage pipeline, determine the feature difference as the difference between the first target data feature and the second target data feature.
[0019] In a possible implementation, the first target data feature and the second target data feature include any one of a water quality index peak value and a water quality index average value.
[0020] In a possible implementation, the second determination module is further configured to: determine the connection mode of the pipeline according to the pipeline information; and determine that the pipeline has a fault when the connection mode is rain-sewage pipeline diversion, where the rain-sewage pipeline diversion connection mode is a connection mode in which rainwater and sewage cannot be mixed.
[0021] In a possible implementation, the device further includes a second warning module, configured to generate a second warning message when there is no fault in the pipeline.
[0022] According to one aspect of the present disclosure, there is provided an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to: execute the above pipeline fault detection method.
[0023] According to one aspect of the present disclosure, there is provided a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above pipeline fault detection method is implemented.
[0024] According to the pipeline fault detection method of the embodiments of the present disclosure, it is possible to determine whether there is a fault of rain-sewage mixed connection in the pipeline through water quality information, and it is possible to contact or not contact the water flow in the pipeline during the measurement process, reducing the manual maintenance cost. Moreover, during the process of detecting faults, there is no need for manual on-site detection, reducing the detection cost, improving the detection efficiency, and it is possible to determine whether there is a rain-sewage mixed connection fault based on the first water quality index sequence, the second water quality index sequence, the type of the pipeline and pipeline information, improving the reliability of detection.
[0025] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and do not limit the present disclosure.
[0026] According to the following detailed description of exemplary embodiments with reference to the accompanying drawings, other features and aspects of the present disclosure will become clear. Description of the Drawings
[0027] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to explain the technical solutions of the present disclosure.
[0028] Figure 1 A flowchart showing the pipeline fault detection method according to an embodiment of the present disclosure;
[0029] Figure 2 An application schematic diagram showing the pipeline fault detection method according to an embodiment of the present disclosure;
[0030] Figure 3 A block diagram showing the pipeline fault detection device according to an embodiment of the present disclosure;
[0031] Figure 4 A block diagram showing the electronic device according to an embodiment of the present disclosure;
[0032] Figure 5 A block diagram showing the electronic device according to an embodiment of the present disclosure. Detailed Embodiments
[0033] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. Like reference numerals in the drawings denote functionally identical or similar elements. Although various aspects of the embodiments are shown in the drawings, the drawings do not have to be drawn to scale unless otherwise specified.
[0034] As used herein, the term "exemplary" means "serving as an example, embodiment, or illustration". Any embodiment described herein as "exemplary" is not necessarily to be construed as superior to or better than other embodiments.
[0035] As used herein, the term "and / or" is merely a description of an associated relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" as used herein means any one of a plurality or any combination of at least two of a plurality. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set composed of A, B, and C.
[0036] In addition, for a better description of the present disclosure, numerous specific details are given in the following detailed implementation manners. Those skilled in the art should understand that the present disclosure can also be implemented without some specific details. In some instances, methods, means, elements, and circuits well-known to those skilled in the art are not described in detail so as to highlight the gist of the present disclosure.
[0037] Figure 1 A flowchart showing a pipeline fault detection method according to an embodiment of the present disclosure is as Figure 1 shown, and the method includes:
[0038] In step S11, according to the water quality information measured in real time at a first preset position upstream of the pipeline, a first water quality index sequence of the pipeline is determined, and according to the water quality information measured in real time at a second preset position 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 indexes of the same type obtained at multiple moments;
[0039] In step S12, according to the first water quality index sequence, the second water quality index sequence, and the type of the pipeline, it is determined whether there is a phenomenon of rain and sewage mixing in the pipeline;
[0040] In step S13, in the case where there is a phenomenon of rain and sewage mixing in the pipeline, it is determined whether the pipeline has a fault according to the pipeline information;
[0041] In step S14, in the case where the pipeline has a fault, a first warning message is generated.
[0042] According to the pipeline fault detection method of the embodiments of the present disclosure, it is determined whether there is a fault of rain-sewage mixed connection in the pipeline through water quality information. During the process of detecting the fault, there is no need for manual on-site detection, which reduces the detection cost, improves the detection efficiency, and can determine whether there is a rain-sewage mixed connection fault based on the first water quality index sequence, the second water quality index sequence, the type of the pipeline, and pipeline information, improving the reliability of the detection.
[0043] In an example, a micro-spectral sensor is used to measure the water quality information of a predetermined water area. For example, a quantum dot spectral sensor including a quantum dot spectral probe.
[0044] In an example, the quantum dot spectral sensor may include a quantum dot spectral probe. The quantum dot spectral probe may measure the incident light (for example, the light after passing through the water sample in a predetermined area and being transmitted or scattered) based on the physical and optical properties of the nanocrystals to obtain the spectral information of the incident light, and this spectral information may represent the water quality information of the water area. For example, the quantum dot spectral probe may include a nanocrystal chip made of multiple nanocrystals, and the nanocrystal chip contains a certain arrangement of multiple nanocrystals (for example, a nanocrystal array). Among them, each nanocrystal has different light absorption or emission characteristics, and different types of semiconductor nanocrystals, for example, can be of different materials, sizes, etc., so that the nanocrystal chip can modulate the response to wavelengths within a relatively wide wavelength range to obtain the spectrum of the incident light adjusted within a relatively wide wavelength range.
[0045] In a possible implementation, the light after being transmitted or scattered by water may be affected by substances in the water (such as suspended solids, pollutants, etc.), so as to obtain specific spectral information. The quantum dot spectral probe can obtain this spectral information in real time and determine the water quality indicators represented by this spectral information. For example, through the absorption strength of water samples for light of different wavelengths, the spectral information of light in different frequency bands can be obtained, and the water quality indicators can be calculated through this spectral information. In the 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, fecal coliform group content, sulfide content, etc. The water temperature can also be measured according to the infrared spectrum in the spectral information. Or, the quantum dot spectral probe can infer the water quality indicators through a neural network. For example, the spectral information can be input into the neural network, and the neural network can infer the concentrations of various substances (water quality indicators). The present disclosure does not limit the method for determining the water quality indicators. The present disclosure does not limit the working principle of the quantum dot spectral probe.
[0046] In the example, the quantum dot spectroscopy probe can determine water quality indicators based on the light absorption characteristics of various substances contained in water. For example, the light intensity of light at a specific wavelength can be analyzed through spectral information, and then the concentration (water quality indicator) of the substance corresponding to the light in the specific wavelength range can be obtained. Measuring the indicators with the quantum dot spectroscopy probe can achieve online, in-situ, high-frequency, and real-time measurement. When detecting water quality indicators, the spectral information of the light passing through a predetermined water area can be detected by the quantum dot spectroscopy probe, and then the water quality indicators can be quickly calculated based on the spectral information to obtain water quality indicators with strong real-time performance. Compared with the process of bringing the water quality back to the laboratory for testing, detecting with the quantum dot spectroscopy probe has better real-time performance (that is, the detected water quality indicators are the current water quality indicators, while the time required for laboratory testing is relatively long, and the water quality indicators of the predetermined water area may have changed during the period of waiting for the test results). By measuring multiple times within a certain period by the quantum dot spectroscopy probe set in the preset water area, a water quality indicator sequence of the above two water quality indicators in this water area can be obtained. The water quality indicators in the water quality indicator sequence are the water quality indicators obtained at multiple moments at the same location, so they have consistency and comparability, and can be used to observe the change law of water quality indicators over a period of time to judge water pollution. For example, the measurement frequency of the quantum dot spectroscopy probe can reach 3 - 60 minutes per time, preferably 5 - 30 minutes per time, particularly preferably 8 - 20 minutes per time, and most preferably 10 - 15 minutes per time. The measurement frequency is much higher than that of bringing the water body back to the laboratory for testing, and the quantum dot spectroscopy probe can be set at a fixed position in the predetermined water area to ensure the consistency of the water body sample. However, when bringing the water body back to the laboratory for testing, it is difficult to ensure that the sampling is exactly at the same location during the two measurements, and due to the low measurement frequency and the long interval time between the two measurements, even if it can be ensured that the sampling is exactly at the same location during the two measurements, due to the fluidity of water, the water quality at this location may have changed significantly during the long interval time, making it difficult to ensure the consistency of the measurement and the comparability of the measurement results.
[0047] In a possible implementation manner, in step S11, the pipeline network may include multiple pipelines or pipe wells. The first preset position and the second preset position are two positions on the same pipeline in the pipeline network, or two positions on directly or indirectly connected pipelines, that is, the first preset position and the second preset position are connected in the pipeline network. For example, the first preset position is upstream of the pipeline, and the second preset position is downstream of the pipeline. The water flow passing through the first preset position can flow to the second preset position.
[0048] In a possible implementation, the water quality indicators (e.g., COD) of the water flow can be continuously detected by the micro-spectral sensor at the first preset position to obtain the first water quality indicator sequence, and the water quality indicators of the water flow can be continuously detected by the micro-spectral sensor at the second preset position to obtain the second water quality indicator sequence. The first water quality indicator sequence and the second water quality indicator sequence include water quality indicators obtained at multiple moments, and the types of water quality indicators included in the first water quality indicator sequence are the same as those included in the second water quality indicator sequence.
[0049] In the example, the first water quality indicator sequence can be expressed 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 represents the c-th moment, and x 1,c represents the water quality indicator measured at the c-th moment. The second water quality indicator sequence can be expressed 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 represents the d-th moment, and x 2,d represents the water quality indicator measured at the d-th moment.
[0050] In a possible implementation, in step S12, it is possible to determine whether there is a phenomenon of rain and sewage mixing in the pipeline based on the first water quality indicator sequence, the second water quality indicator sequence, and the type of the pipeline. In the example, it is possible to judge whether parameters such as the total content and peak value of the water quality indicators in the first water quality indicator sequence and the second indicator sequence have changed significantly. For example, if in a sewage pipeline, the peak value of the water quality indicator measured at the second preset position downstream is much smaller than the peak value of the water quality indicator measured at the first preset position upstream, there may be rainwater mixing into the sewage pipeline, forming rain and sewage mixing and diluting the sewage.
[0051] In a possible implementation, step S12 may include: determining whether there is a correlation between the first water quality indicator sequence and the second water quality indicator sequence; in the case where there is a correlation between the first water quality indicator sequence and the second water quality indicator sequence, determining whether the characteristic difference between the first water quality indicator sequence and the second water quality indicator sequence is greater than or equal to a preset threshold according to the type of the pipeline; and in the case where the characteristic difference is greater than or equal to the preset threshold, determining that there is a phenomenon of rain and sewage mixing in the pipeline.
[0052] In a possible implementation, it is possible to determine 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 indices in the first water quality index sequence and the second water quality index sequence may each have their own data characteristics. It is possible to determine whether the same section of water flow is detected at the first preset position and the second preset position based on whether the data characteristics of the first water quality index sequence and the data characteristics of the second water quality index sequence are correlated. For example, if (t o , x 1,o ), (t p , x 1,p ), (t q , x 1,q ) are three wave peaks in the first water quality index sequence (o, p, q are any positive integers), and three wave 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 ) are three wave peaks in the second water quality index sequence (r, s, t are any positive integers), and the time differences between the three detected wave peaks are approximately the same as the time differences between the three wave peaks in the first water quality index sequence, then the data characteristics of the first water quality index sequence and the second water quality index sequence are correlated, and the three detected wave peaks come from the same section of water flow. Further, the time differences can be determined using the moments when the above three wave peaks are detected. Conversely, if three wave peaks are detected in the first water quality index and no three wave peaks are detected in the second index sequence due to factors such as the same section of water flow not yet reaching the second preset position, then there is no correlation between the first water quality index sequence and the second water quality index sequence, and the same section of water flow passing through the first preset position is not detected at the second preset position.
[0053] In a possible implementation, it is possible to determine whether there is a correlation between the first water quality index sequence and the second water quality index sequence. In the related art, multiple water quality indices in the first water quality index sequence can be formed into a vector, and multiple water quality indices in the second water quality index sequence can be formed into a vector. Then, similarity such as the cosine similarity of the above two vectors, or metrics such as the Euclidean distance between the above two vectors can be determined. The present disclosure does not limit the method for determining similarity. However, the water quality indices in the first water quality index sequence and the second water quality index sequence do not change simultaneously, and there is a time difference in the changes of the two index sequences. For example, the wave peaks of the first water quality index sequence appear earlier than the wave peaks of the second water quality index sequence. Using the similarity of vectors or the Euclidean distance to determine the similarity of the two sequences may result in a situation where the waveforms of the two sequences are similar, but the accuracy of determining the correlation is low due to the time difference in index changes.
[0054] In the example, the metrics of both sequences include peaks and valleys, and the time differences between the peaks and valleys of the two sequences are similar, that is, the waveforms of the two sequences are similar. However, due to the time difference in the changes of the metrics in the two sequences, for example, the metrics in the first water quality index sequence change earlier than those in the second water quality index sequence, it may cause the moments when the peaks in the first water quality index sequence and the valleys in the second water quality index sequence appear to be close, rather than being close to the moments when the peaks in the second water quality index sequence appear. As a result, the similarity of the vectors formed by the metrics in the two index sequences is relatively low, and the accuracy in determining the correlation is relatively low.
[0055] In a possible implementation, the dynamic time warping distance between the first water quality index sequence and the second water quality index sequence can be used to determine whether there is a correlation between the first water quality index sequence and the second water quality index sequence, so as to reduce the error in determining the correlation caused by the time difference. Among them, determining whether there is a correlation between the first water quality index sequence and the second water quality index sequence includes: determining the path warping matrix of the first water quality index sequence and the second water quality index sequence according to multiple water quality metrics in the first water quality index sequence and multiple water quality metrics in the second water quality index sequence, where the element in the i-th row and j-th column of the path warping matrix is the vector distance between the i-th water quality metric in the first water quality index sequence and the j-th water quality metric in the second water quality index sequence, and i and j are positive integers; determining the warping path according to the path warping matrix, where the warping path is the path with the smallest sum of the elements passed through among the paths from the first element to the second element in the path warping matrix, where the first element includes the element in the n-th row and 1st column of the path warping matrix, and the second element includes the element in the 1st row and m-th column of the path warping matrix, where the path warping matrix includes n rows and m columns, n≥i, m≥j; determining the dynamic time warping distance between the first water quality index sequence and the second water quality index sequence according to the warping path; and determining that there is a correlation between the first water quality index sequence and the second water quality index sequence when the dynamic time warping distance is less than or equal to the distance threshold.
[0056] In a possible implementation, a path regularization matrix may be determined based on multiple water quality indicators in the first water quality indicator sequence and the second water quality indicator sequence. The element in the i-th row and the j-th column of the path regularization matrix is 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 may be the absolute value of the difference between the corresponding indicators in the first water quality indicator sequence and the second water quality indicator sequence. If the first water quality indicator is 10 and the first water quality indicator is 15, the element value in the first row and the first column of the path regularization matrix is 5. If the first water quality indicator is 10 and the second water quality indicator is 18, the element value in the first row and the second column of the path regularization matrix is 8... The present disclosure does not limit the values of the elements in the path regularization matrix.
[0057] In a possible implementation, a regularization path from the first element to the second element (i.e., the path with the smallest sum of elements) may be determined in the path planning matrix. In the example, the first element includes the element in the n-th row and the first 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 first row and the m-th column of the path regularization matrix, i.e., the element in the upper right corner of the matrix, where the path regularization matrix includes n rows and m columns, and n≥i, m≥j.
[0058] In the example, the first element is the element in the n-th row and the first column of the path regularization matrix (i.e., the element in the lower left corner), and the second element is the element in the first row and the m-th column of the path regularization matrix (i.e., the element in the upper right corner). The path from the first element to the second element needs to traverse each row and each column in the path regularization matrix. That is, in the regularization path, each row in the path regularization matrix will have an element included in the regularization path, and each column in the path regularization matrix will also have an element included in the regularization path. That is, in the path from the element in the n-th row and the first column to the element in the first row and the m-th column, the path will pass through the n-th row, the n - 1-th row... the first row (the path is monotonically decreasing in the row direction and will not skip any row), and the path will also pass through the first column, the second column... the m-th column (the path is monotonically increasing in the column direction and will not skip any column). Since the element in the i-th row and the j-th column is 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 regularization path traverses each water quality indicator in the first water quality indicator sequence and each water quality indicator in the second water quality indicator sequence. And the regularization path is the path with the smallest sum of the elements passed through from the first element to the second element, that is, the path with the smallest sum of the 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.
[0059] In a possible implementation, the similarity between the first index sequence and the second index sequence can be determined according to this path. This alignment path is the path with the minimum sum of distances between n chemical oxygen demand indices and m turbidity indices. The distance when the sum of distances between n chemical oxygen demand indices and m turbidity indices is minimized can be determined as the dynamic time warping distance.
[0060] In the example, the dynamic time warping distance can be determined by the following formula (1):
[0061] D(e,f) = Dist(e,f) + min{D(e - 1,f), D(e,f - 1), D(e - 1,f - 1)} (1)
[0062] 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 alignment matrix. D(e,f) represents the dynamic time warping distance between the first e water quality indices in the first water quality index sequence and the first f water quality indices in the second water quality index sequence. In the example, e = n and f = m can be set, and iteration can be performed through the above formula (1) to obtain the dynamic time warping distance between the first water quality index sequence and the second water quality index sequence.
[0063] In a possible implementation, the similarity between the first water quality index sequence and the second water quality index sequence is determined by this dynamic time warping distance. For example, if this dynamic time warping distance is less than or equal to a preset distance threshold, it can be considered that there is a correlation between the first water quality index sequence and the second index water quality sequence. Otherwise, it can be considered that there is no correlation between the first water quality index sequence and the second water quality index sequence.
[0064] In this way, all indices in the first water quality index sequence and the second water quality index sequence can be traversed through the path alignment matrix and the alignment path to determine the dynamic time warping distance that minimizes the sum of distances between each index. The correlation between the first water quality index sequence and the second water quality index sequence is determined by the dynamic time warping distance. The distances between all indices in the first water quality index sequence and all indices in the second water quality index sequence can be referred to, reducing the problem of low calculation accuracy of correlation caused by waveform offset due to time difference.
[0065] In a possible implementation, if there is a correlation between the first water quality index sequence and the second water quality index sequence, it indicates that the water quality monitoring devices at the first preset position, such as spectral sensors, and the water quality monitoring devices at the second preset position, such as spectral sensors, detect the same section of water flow. It can be determined whether there is a significant change in the target data characteristics in this section of water flow to determine whether there is a phenomenon of rain - sewage mixing.
[0066] In a possible implementation, when there is a correlation between the first water quality index sequence and the second water quality index sequence, determining whether the characteristic difference between the first water quality index sequence and the second water quality index sequence is greater than or equal to a preset threshold according to the type of pipeline includes: determining the first target data characteristic of the first water quality index sequence and the second target data characteristic of the second water quality index sequence; determining the characteristic difference according to the type of pipeline and the first target data characteristic and the second target data characteristic; and determining whether the characteristic difference is greater than or equal to the preset threshold.
[0067] In an example, the first target data characteristic and the second target data characteristic are data characteristics of the same type, which can be used to compare whether there is a drastic change in the water quality index at the first preset position and the second preset position. For example, the first target data characteristic and the second target data characteristic include any one of the water quality index peak value and the water quality index average value. If there is a large difference between the first target data characteristic (for example, the water quality index peak value measured at the first preset position) and the second target data characteristic (for example, the water quality index peak value measured at the second preset position), it can be considered that there is a drastic change in the water quality index at the two preset positions. Then there may be a phenomenon of rain-sewage mixing.
[0068] In a possible implementation, the type of pipeline may include a rainwater pipeline and a sewage pipeline. If the type of pipeline is a rainwater pipeline, the water quality index of rainwater is measured at the first preset position upstream. When there is a rain-sewage mixing phenomenon between the upstream and the downstream, sewage mixes into the rainwater pipeline, and then the water quality index of the mixture of rainwater and sewage can be measured downstream, and the water quality index (for example, the index for measuring pollutant content, such as COD, etc.) may increase. If the type of pipeline is a sewage pipeline, the water quality index of sewage is measured at the first preset position upstream. When there is a rain-sewage mixing phenomenon between the upstream and the downstream, rainwater mixes into the sewage pipeline, and the sewage can be diluted, and then the water quality index of the mixture of rainwater and sewage can be measured downstream, and the water quality index (for example, the index for measuring pollutant content, such as COD, etc.) may decrease.
[0069] In a possible implementation, determining the characteristic difference according to the type of pipeline and the first target data characteristic and the second target data characteristic includes one of the following: when the type of pipeline is a rainwater pipeline, determining the characteristic difference as the difference between the second target data characteristic and the first target data characteristic; when the type of pipeline is a sewage pipeline, determining the characteristic difference as the difference between the first target data characteristic and the second target data characteristic. Further, it can be determined whether the characteristic difference is greater than or equal to the preset threshold. If the characteristic difference is greater than or equal to the preset threshold, there is a rain-sewage mixing phenomenon.
[0070] In the example, the target data feature is the peak value of the water quality index. If the type of the pipeline is a rainwater pipeline, it can be determined whether the peak value of the water quality index at the second preset position downstream is significantly greater than the peak value of the water quality index at the first preset position upstream. For example, it can be determined whether the difference between the peak value of the water quality index at the second preset position and the peak value of the water quality index at the first preset position is greater than a preset threshold. If it is greater than the preset threshold, it can be determined that sewage has been mixed into the rainwater pipeline, resulting in a significant increase in the water quality index. Another example is that if the type of the pipeline is a sewage pipeline, it can be determined whether the peak value of the water quality index at the first preset position upstream is significantly greater than the peak value of the water quality index at the second preset position downstream. For example, it can be determined whether the difference between the peak value of the water quality index at the first preset position and the peak value of the water quality index at the second preset position is greater than a preset threshold. If it is greater than the preset threshold, it can be determined that rainwater has been mixed into the sewage pipeline, resulting in the dilution of the sewage and a significant decrease in the water quality index. In the example, factors such as pipeline breakage and congestion may cause the phenomenon of rain-sewage connection. For example, due to pipeline breakage, sewage may be mixed into the rainwater pipeline, or due to congestion in the sewage pipeline, sewage may overflow and thus be mixed into the rainwater pipeline, etc. The present disclosure does not limit the cause of the failure.
[0071] In a possible implementation manner, in step S13, if there is a rain-sewage connection phenomenon in the pipeline, it can be determined whether the phenomenon is normal. This step includes: determining the connection mode of the pipeline according to the pipeline information; in the case where the connection mode is rain-sewage pipeline diversion, it is determined that the pipeline has a failure, where the connection mode of rain-sewage pipeline diversion is a connection mode in which rainwater and sewage cannot be mixed.
[0072] In the example, the pipeline information may include the design information of the pipeline, including information such as the connection mode of the pipeline. The present disclosure does not limit the type of pipeline information. If it can be known from the pipeline information that although there is a rain-sewage connection phenomenon in the pipeline, the connection mode of the pipeline is a mixed connection of a rainwater pipeline and a sewage pipeline, that is, the mixing of rainwater and sewage is a normal phenomenon, then the rain-sewage connection phenomenon is not a failure. In this case, parameters such as the water flow rate, flow velocity, and pollutant concentration in the pipeline can be continuously monitored to prevent failures such as pipeline blockage, siltation, and leakage.
[0073] In the example, if it can be known from the pipeline information that the connection mode of the pipeline is rain-sewage pipeline diversion, that is, rainwater and sewage should not be mixed together, then when a rain-sewage connection phenomenon occurs, it can be determined that the pipeline has a failure. For example, there are failures such as pipeline leakage, resulting in rainwater seeping into the sewage pipeline or sewage seeping into the rainwater pipeline.
[0074] In a possible implementation, in step S14, if there is a fault in the pipeline, a first warning message may be generated to prompt the staff to repair the pipeline between the first preset position and the second preset position. Further, water quality monitoring devices such as micro-spectral sensors may be set at multiple positions, and the distance between each position may be relatively short. When there is a fault in the pipeline between two of these positions, the position where the fault occurs can be quickly located for easy repair.
[0075] In a possible implementation, the method further includes: generating a second warning message when there is no fault in the pipeline. If the connection mode of the pipeline is a mixed connection of a rainwater pipeline and a sewage pipeline, that is, the mixing of rainwater and sewage is not due to a pipeline fault but due to a system design problem, continuous monitoring of the rain-sewage combined flow is still required. For example, the sewage contains more impurities and is more likely to corrode or block the mixed-connected pipeline. Therefore, although in this pipeline, the rain-sewage combined flow is not due to a pipeline fault, a second warning message can still be generated to prompt the pipeline maintenance personnel, such as prompting the maintenance personnel to perform regular inspections, etc., or providing reference information during the optimization and transformation of the pipe network.
[0076] According to the pipeline fault detection method of the embodiments of the present disclosure, it is possible to determine whether there is a fault of rain-sewage mixed connection in the pipeline through water quality information, and the water flow in the pipeline can be contacted or not contacted during the measurement process, reducing the manual maintenance cost. Moreover, during the process of detecting the fault, there is no need for manual on-site detection, reducing the detection cost, improving the detection efficiency, and determining whether there is a rain-sewage mixed connection fault based on the first water quality index sequence, the second water quality index sequence, the type of the pipeline, and the pipeline information, improving the reliability of the detection.
[0077] Figure 2 The application schematic diagram showing the pipeline fault detection method according to the embodiments of the present disclosure is as Figure 2 shown. A micro-spectral sensor 1 may be set at a first preset position upstream of the pipeline to detect the first water quality index sequence of the water flow in the pipeline, for example, the COD index sequence. A micro-spectral sensor 2 may be set at a second preset position downstream of the pipeline to detect the second water quality index sequence of the water flow in the pipeline. The types of water quality indicators included in the first water quality index sequence are the same as those included in the second water quality index sequence.
[0078] In a possible implementation, it is first possible to determine whether there is a correlation between the first water quality index sequence and the second water quality index sequence. The dynamic time warping distance between the first water quality index sequence and the second water quality index sequence can be used to determine whether there is a correlation between the first water quality index sequence and the second water quality index sequence. In the example, the dynamic time warping distance between the first water quality index sequence and the second water quality index sequence can be determined by formula (1), and when the dynamic time warping distance is less than or equal to the distance threshold, it can be determined whether there is a correlation between the first water quality index sequence and the second water quality index sequence.
[0079] In a possible implementation, if there is a correlation between the first water quality index sequence and the second water quality index sequence, it can be determined whether there is a drastic change between the first target data feature of the first water quality index sequence and the second target data feature of the second water quality index sequence. For example, whether there is a large difference between the water quality index peak value of the first water quality index sequence and the water quality index peak value of the second water quality index sequence.
[0080] In a possible implementation, if the type of the pipeline is a rainwater pipeline, it can be determined whether the difference between the water quality index peak value at the second preset position and the water quality index peak value at the first preset position is greater than the preset threshold. If it is greater than the preset threshold, it can be determined that sewage has mixed into the rainwater pipeline, resulting in a significant increase in the water quality index. If the type of the pipeline is a sewage pipeline, it can be determined whether the difference between the water quality index peak value at the first preset position and the water quality index peak value at the second preset position is greater than the preset threshold. If it is greater than the preset threshold, it can be determined that rainwater has mixed into the sewage pipeline, resulting in dilution of the sewage and a significant decrease in the water quality index.
[0081] In a possible implementation, if there is a phenomenon of rain and sewage being misconnected in the pipeline, it can be determined whether the connection method of the pipeline is a connection method of rain and sewage pipeline diversion. If the connection method of the pipeline is a connection method of rain and sewage pipeline diversion, rainwater and sewage should not be mixed together. When there is a phenomenon of rain and sewage being misconnected, it can be determined that the pipeline has failed. And a warning message can be generated to prompt the staff to carry out maintenance.
[0082] In a possible implementation, if the connection method of the pipeline is a connection method of rain and sewage pipeline confluence, the pipeline has not failed, and a second warning message can be generated to prompt the staff to pay attention to the pipeline connection method, perform regular maintenance, and provide reference information for later pipe network optimization and pipe network transformation.
[0083] In a possible implementation, the pipeline fault detection method can be used to detect whether there is a phenomenon of rain and sewage being misconnected in the pipeline, without the need for manual on-site detection, reducing the detection cost and providing a basis for pipeline maintenance and management.
[0084] Figure 3A block diagram showing a pipeline fault detection device according to an embodiment of the present disclosure is as follows Figure 3 As shown, the device includes: a sequence module 11 for determining a first water quality index sequence of the pipeline according to water quality information measured in real time at a first preset position upstream of the pipeline, and determining a second water quality index sequence of the pipeline according to water quality information measured in real time at a second preset position downstream of the pipeline, wherein the first water quality index sequence and the second water quality index sequence include water quality indexes of the same type obtained at multiple moments; a first judgment module 12 for determining whether there is a phenomenon of rain and sewage mixing in the pipeline according to the first water quality index sequence, the second water quality index sequence and the type of the pipeline; a second judgment module 13 for determining whether there is a fault in the pipeline according to pipeline information when there is a phenomenon of rain and sewage mixing in the pipeline; and a warning module 14 for generating a first warning information when there is a fault in the pipeline.
[0085] In a possible implementation manner, the first judgment module is further configured to: judge whether there is a correlation between the first water quality index sequence and the second water quality index sequence; when there is a correlation between the first water quality index sequence and the second water quality index sequence, determine whether the characteristic difference between the first water quality index sequence and the second water quality index sequence is greater than or equal to a preset threshold according to the type of the pipeline; and when the characteristic difference is greater than or equal to the preset threshold, determine that there is a phenomenon of rain and sewage mixing in the pipeline.
[0086] In a possible implementation manner, the first judgment module is further configured to: determine a path alignment matrix of the first water quality index sequence and the second water quality index sequence according to multiple water quality indexes in the first water quality index sequence and multiple water quality indexes in the second water quality index sequence, wherein the element in the i-th row and the j-th column of the path alignment matrix is the vector distance between the i-th water quality index in the first water quality index sequence and the j-th water quality index in the second water quality index sequence, and i and j are positive integers; determine an alignment path according to the path alignment matrix, wherein the alignment path is the path with the smallest sum of the elements passed through among the paths from the first element to the second element in the path alignment matrix, wherein the first element includes the element in the n-th row and the 1st column of the path alignment matrix, and the second element includes the element in the 1st row and the m-th column of the path alignment matrix, wherein the path alignment matrix includes n rows and m columns, and n≥i, m≥j; determine the dynamic time warping distance between the first water quality index sequence and the second water quality index sequence according to the alignment path; and when the dynamic time warping distance is less than or equal to a distance threshold, determine that there is a correlation between the first water quality index sequence and the second water quality index sequence.
[0087] In a possible implementation, the first determination module is further configured to: determine the first target data feature of the first water quality index sequence and the second target data feature of the second water quality index sequence; determine the feature difference according to the type of the pipeline, and the first target data feature and the second target data feature; and determine whether the feature difference is greater than or equal to a preset threshold.
[0088] In a possible implementation, the first determination module is further configured to: when the type of the pipeline is a rainwater pipeline, determine the feature difference as the difference between the second target data feature and the first target data feature; or when the type of the pipeline is a sewage pipeline, determine the feature difference as the difference between the first target data feature and the second target data feature.
[0089] In a possible implementation, the first target data feature and the second target data feature include any one of a water quality index peak value and a water quality index average value.
[0090] In a possible implementation, the second determination module is further configured to: determine the connection mode of the pipeline according to the pipeline information; and when the connection mode is rain-sewage pipeline diversion, determine that the pipeline has a fault, where the rain-sewage pipeline diversion connection mode is a connection mode in which rainwater and sewage cannot be mixed.
[0091] In a possible implementation, the device further includes a second warning module, configured to generate a second warning message when the pipeline has no fault.
[0092] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not elaborate further.
[0093] In addition, the present disclosure also provides a pipeline fault detection device, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any one of the pipeline fault detection methods provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method part and will not be elaborated further.
[0094] Those skilled in the art can understand that in the above methods of the specific implementation manner, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined according to its function and possible internal logic.
[0095] In some embodiments, the functions or modules included in the apparatus provided by the embodiments of the present disclosure may be used to execute the methods described in the above method embodiments. The specific implementation may refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0096] The embodiments of the present disclosure also propose a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above methods are implemented. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
[0097] The embodiments of the present disclosure also propose an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to execute the above methods.
[0098] The electronic device may be provided as a terminal, a server or other forms of devices.
[0099] Figure 4 FIG. is a block diagram of an electronic device 800 shown according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and other terminals.
[0100] Referring to Figure 4 , the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power 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.
[0101] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above methods. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0102] The memory 804 is configured to store various types of data to support the operation of the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, and the like. The 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 memory, flash memory, a magnetic disk, or an optical disk.
[0103] The power supply component 806 provides power to the various components of the electronic device 800. The 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 for the electronic device 800.
[0104] The 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 can be implemented as a touch screen 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 can not only sense the boundaries of the touch or swipe actions, but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
[0105] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.
[0106] The I / O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a start button, and a lock button.
[0107] The sensor assembly 814 includes one or more sensors for providing an assessment of various aspects of the status of the electronic device 800. For example, the sensor assembly 814 can detect the on / off state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 800. The sensor assembly 814 can also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0108] The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices in a wired or wireless manner. The electronic device 800 can access a wireless network based on communication standards, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0109] In an exemplary embodiment, the electronic device 800 can 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 for performing the above-described methods.
[0110] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions, which can be executed by a processor 820 of the electronic device 800 to complete the above-described methods.
[0111] Figure 5 is a block diagram of an electronic device 1900 shown in accordance with an exemplary embodiment. For example, the electronic device 1900 can be provided as a server. Referring to Figure 5, the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by a memory 1932 for storing instructions executable by the processing component 1922, such as application programs. The application programs stored in the memory 1932 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0112] The electronic device 1900 may further include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server TM , Mac OS XTM , Unix TM , Linux TM , FreeBSD TM or the like.
[0113] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as the memory 1932 including computer program instructions, and the above computer program instructions can be executed by the processing component 1922 of the electronic device 1900 to complete the above method.
[0114] The present disclosure may be a system, a method, and / or a computer program product. The computer program product may include a computer-readable storage medium having thereon computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0115] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. The computer-readable storage medium can be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punched card or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium as used herein is not construed as being a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.
[0116] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include a copper transmission cable, an optical fiber transmission, a wireless transmission, a router, a firewall, a switch, a gateway computer, and / or an edge server. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.
[0117] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine - related instructions, microcode, firmware instructions, state - 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 be executed entirely on the user's computer, partially on the user's computer, executed as a stand - alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through 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., through the Internet using an Internet service provider). In some embodiments, by using the state information of the computer - readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field - programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer - readable program instructions to implement various aspects of the present disclosure.
[0118] Aspects of the present 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 the 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.
[0119] 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 the instructions, when executed by the processor of the computer or other programmable data - processing apparatus, create a means for implementing the functions / acts 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, which causes a computer, a programmable data - processing apparatus, and / or other devices to operate in a particular manner, so that the computer - readable medium storing the instructions comprises a manufacture, which includes instructions for implementing various aspects of the functions / acts specified in one or more blocks of the flowchart and / or block diagram.
[0120] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other devices to produce a computer-implemented process such that the instructions executed on the computer, other programmable data processing apparatus, or other devices implement the functions / acts specified in one or more boxes of the flowchart and / or block diagram.
[0121] The flowcharts and block diagrams in the figures 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 the flowchart or block diagram may represent a module, a segment of a program, or a portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two consecutive blocks may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or acts, or by a combination of dedicated hardware and computer instructions.
[0122] The embodiments of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, the practical application, or the technical improvement of the technology in the market, or to enable other ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A pipeline fault detection method, characterized in that, The method includes: Determining a first water quality index sequence of the pipeline according to the water quality information measured in real time at a first preset position upstream of the pipeline, and determining a second water quality index sequence of the pipeline according to the water quality information measured in real time at a second preset position downstream of the pipeline, where the first water quality index sequence and the second water quality index sequence include water quality indexes of the same type obtained at multiple moments; Determining whether there is a phenomenon of rain and sewage mixing in the pipeline according to the first water quality index sequence, the second water quality index sequence, and the type of the pipeline; In the case that there is a phenomenon of rain and sewage mixing in the pipeline, determining whether there is a fault in the pipeline according to the pipeline information; Generating a first warning message in the case that there is a fault in the pipeline; The determining whether there is a phenomenon of rain and sewage mixing in the pipeline according to the first water quality index sequence, the second water quality index sequence, and the type of the pipeline includes: Judging whether there is a correlation between the first water quality index sequence and the second water quality index sequence; In the case that there is a correlation between the first water quality index sequence and the second water quality index sequence, determining whether the characteristic difference between the first water quality index sequence and the second water quality index sequence is greater than or equal to a preset threshold according to the type of the pipeline; In the case that the characteristic difference is greater than or equal to the preset threshold, determining that there is a phenomenon of rain and sewage mixing in the pipeline; Judging whether there is a correlation between the first water quality index sequence and the second water quality index sequence includes: Determining a path alignment matrix of the first water quality index sequence and the second water quality index sequence according to multiple water quality indexes in the first water quality index sequence and multiple water quality indexes in the second water quality index sequence, where the element in the i-th row and j-th column of the path alignment matrix is the vector distance between the i-th water quality index in the first water quality index sequence and the j-th water quality index in the second water quality index sequence, and i and j are positive integers; Determining an alignment path according to the path alignment matrix, where the alignment path is the path with the minimum sum of the elements passed through among the paths from the first element to the second element in the path alignment matrix, where the first element includes the element in the n-th row and 1st column of the path alignment matrix, the second element includes the element in the 1st row and m-th column of the path alignment matrix, where the path alignment matrix includes n rows and m columns, n≥i, m≥j; Determining the dynamic time warping distance between the first water quality index sequence and the second water quality index sequence according to the alignment path; In the case that the dynamic time warping distance is less than or equal to a distance threshold, determining that there is a correlation between the first water quality index sequence and the second water quality index sequence.
2. The method according to claim 1, characterized in that, In the case that there is a correlation between the first water quality index sequence and the second water quality index sequence, determining whether the characteristic difference between the first water quality index sequence and the second water quality index sequence is greater than or equal to a preset threshold according to the type of the pipeline includes: Determining a first target data characteristic of the first water quality index sequence and a second target data characteristic of the second water quality index sequence; Determine the feature difference according to the type of the pipeline, and the first target data feature and the second target data feature; Determine whether the feature difference is greater than or equal to a preset threshold.
3. The method according to claim 2, wherein Determining the feature difference according to the type of the pipeline, and the first target data feature and the second target data feature includes one of the following: When the type of the pipeline is a rainwater pipeline, determine the feature difference as the difference between the second target data feature and the first target data feature; When the type of the pipeline is a sewage pipeline, determine the feature difference as the difference between the first target data feature and the second target data feature.
4. The method according to claim 2, characterized in that, The first target data feature and the second target data feature include any one of a peak water quality index and an average water quality index.
5. The method according to claim 1, wherein When there is a phenomenon of rain-sewage mixed connection in the pipeline, determining whether the pipeline has a fault according to pipeline information includes: Determine the connection mode of the pipeline according to the pipeline information; When the connection mode is rain-sewage pipeline diversion, determine that the pipeline has a fault, where the rain-sewage pipeline diversion connection mode is a connection mode in which rainwater and sewage cannot be mixed.
6. The method according to claim 1, characterized in that, The method further includes: Generate a second warning message when the pipeline has no fault.
7. A pipeline fault detection device, characterized in that, The device includes: A sequence module, configured to determine a first water quality index sequence of the pipeline according to water quality information measured in real time at a first preset position upstream of the pipeline, and determine a second water quality index sequence of the pipeline according to water quality information measured in real time at a second preset position downstream of the pipeline, where the first water quality index sequence and the second water quality index sequence include water quality indexes of the same type obtained at multiple moments; A first judgment module, configured to determine whether there is a rain-sewage mixed connection phenomenon in the pipeline according to the first water quality index sequence, the second water quality index sequence, and the type of the pipeline; A second judgment module, configured to determine whether the pipeline has a fault according to pipeline information when there is a rain-sewage mixed connection phenomenon in the pipeline; A first warning module, configured to generate a first warning message when the pipeline has a fault; The first judgment module is further configured to: judge whether there is a correlation between the first water quality index sequence and the second water quality index sequence; when there is a correlation between the first water quality index sequence and the second water quality index sequence, determine whether the feature difference between the first water quality index sequence and the second water quality index sequence is greater than or equal to a preset threshold according to the type of the pipeline; when the feature difference is greater than or equal to the preset threshold, determine that there is a rain-sewage mixed connection phenomenon in the pipeline; The first determination module is further configured to: determine a path alignment matrix between the first water quality index sequence and the second water quality index sequence according to a plurality of water quality indexes in the first water quality index sequence and a plurality of water quality indexes in the second water quality index sequence, wherein the element in the i-th row and the j-th column of the path alignment matrix is the vector distance between the i-th water quality index in the first water quality index sequence and the j-th water quality index in the second water quality index sequence, and i and j are positive integers; determine an alignment path according to the path alignment matrix, wherein the alignment path is the path with the minimum sum of the elements passed through among the paths from the first element to the second element in the path alignment matrix, wherein the first element includes the element in the n-th row and the 1st column of the path alignment matrix, and the second element includes the element in the 1st row and the m-th column of the path alignment matrix, wherein the path alignment matrix includes n rows and m columns, n≥i, m≥j; determine the dynamic time warping distance between the first water quality index sequence and the second water quality index sequence according to the alignment path; and determine that there is a correlation between the first water quality index sequence and the second water quality index sequence when the dynamic time warping distance is less than or equal to a distance threshold.
8. An electronic device, characterized in that, Comprising: A processor; A memory for storing processor-executable instructions; Wherein the processor is configured to: execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Unknown water inflow location identification device
JP4980478B1