Water supply and drainage system model construction method and system, storage medium and electronic equipment
By constructing a node-pipe time motion diagram in the water supply and drainage system and analyzing high-dimensional vectors, the problem of inaccurate determination of leakage point positions in the existing technology is solved, and efficient monitoring and rapid repair of the hydraulic pipeline network is achieved.
Patent Information
- Application Number
- CN202411649783.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2024-12-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When monitoring the health of water pipes, it is difficult for the existing water supply and drainage systems to accurately determine the leakage point location, and the impact of the peak water use section and external environment on water pressure is not fully considered, resulting in blurred monitoring information and affecting emergency repair efficiency.
By designing the hydraulic pipeline structure diagram and embedding optical fiber sensors, the node-pipe time motion diagram is constructed, the node position and pressure information are mapped into high-dimensional vectors, abnormal nodes are monitored in real time, correlation and pressure residual values are analyzed, and water peaks and external factors are excluded. Environmental impact, determine the leakage point.
It realizes more accurate monitoring of the hydraulic pipeline network, quickly discovers and repairs abnormal leakage points, and improves emergency repair efficiency and accuracy.
Smart Images

Figure CN119167566A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water supply and drainage engineering, and in particular to a water supply and drainage system model building method, system, storage medium and electronic equipment. Background Art
[0002] The water supply and drainage model is usually designed using BIM software, and then sensors are arranged at intervals on the water supply and drainage pipes to monitor the water pressure at different pipes. This is to monitor potential areas of water seepage, facilitate timely repairs, and avoid damage to water pipes without warning, which would affect people's lives due to untimely repairs.
[0003] In the existing technology, the health status of water pipes is usually inferred based on changes in water pressure. However, the location of the leakage point is not accurately determined. It can only determine which water pipe has a hidden danger because the information reflected between two adjacent sensors is limited. At the same time, the current monitoring of water pipe health rarely considers the impact of peak water usage and external environment on the water pressure in the pipeline, resulting in a lot of ambiguous information during the monitoring process, which affects the maintenance personnel's judgment on the actual situation of the water pipe. Summary of the invention
[0004] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a method for constructing a water supply and drainage system model, aiming to solve the technical problems mentioned in the background technology.
[0005] In order to achieve the above object, the present invention is implemented by the following technical solutions: A method for constructing a water supply and drainage system model comprises the following steps: S10, designing a hydraulic pipe network according to actual water usage in the area, constructing a hydraulic pipe network structure diagram, and setting a plurality of optical fiber sensors in the hydraulic pipe network; S20, embedding the position of the optical fiber sensor into the hydraulic pipe network structure diagram, constructing a node-pipeline time motion diagram, and constructing a plurality of node-condition lines in different time periods according to the node-pipeline time motion diagram; S30, mapping the node position information and the node pressure information in the node-status line in each time period into a high-dimensional vector, and monitoring the node position information and the node pressure information having correlation in different time periods in real time; S40, traversing the node-status line with abnormal node position information and node pressure information, finding adjacent nodes closely connected with the abnormal node, and analyzing the correlation between the position of the abnormal node and the position of the adjacent nodes; S50, finding a leakage point with the highest possibility of leakage near the node position where the abnormality occurs, calculating the pressure residual value of the leakage point, and when the pressure residual value is higher than a preset residual threshold, determining the leakage point as an abnormal leakage point.
[0006] According to one aspect of the above technical solution, the specific steps of step S10 include: Collect historical data on water use in the area to design the hydraulic network; Use hydraulic network design software to construct hydraulic network structure diagram; The optical fiber sensor is arranged along the pipeline on the outside of the pipeline.
[0007] According to one aspect of the above technical solution, the specific steps of step S20 include: The position of the optical fiber sensor is regarded as a node m and embedded into the hydraulic pipe network structure diagram; Consider the pipeline as edge k, and map the node m and the edge k to node category θ and edge category η respectively; Combining the node m, the edge k, the node category θ and the edge category η, a node-pipeline time motion graph is constructed according to time T; Based on the node-pipeline time motion graph, two status types, normal and abnormal, are assigned to the nodes, and all the nodes are sequentially connected according to the status types within a time period to obtain node-status lines for all time periods.
[0008] According to one aspect of the above technical solution, the specific steps of step S30 include: According to the self-attention mechanism, the position and pressure value of the node in the node-status line are vectorized to obtain a position vector Q and a pressure vector W respectively, and the position vector Q and the pressure vector W are fused to obtain a vector A of the same dimension; The same-dimensional vector A is represented as A according to the time period of the node-status line t , t is the time period; The same-dimensional vector A t With the weight matrix O Z , O x , O c Multiply them together to get the query vector Z t , key vector X t and the value vector C t ; Monitor the node position information and node pressure information of the node-condition line in each period, and mark the same-dimensional vector A corresponding to the node where the abnormality occurs t ; The same dimension vector A of the abnormal periodt and the same dimension vector A in other time periods t To perform a relevance query, the formula is as follows: ; In the formula, d is the vector dimension, Sf is the normalization function, U t is the correlation, T is the total duration of all time periods; When the same-dimensional vector A t and the same dimension vector A in other time periods t Relevance Index U t When it is greater than the preset index, the same dimension vector A of other time periods is t The corresponding node is marked as a node to be verified, and it is queried whether the time period of the node to be verified is close to that of the node where the abnormality occurs. If not, the node where the abnormality occurs is marked as a priori node.
[0009] According to one aspect of the above technical solution, the specific steps of step S40 include: In the node-state line where the priori node is located, all nodes are collected to obtain L i , i is the number of the node in the current period; The same-dimensional vector A is represented as A according to the order of the nodes in the node-state line i ; The same-dimensional vector A i With the weight matrix O Z , O x , O c Multiply them together to get the query vector Z i , key vector X i and the value vector C i ; Traversing the node position information and node pressure information in the node-condition line in the same time period; Monitor all node position information and node pressure information in the node-status line where the a priori node is located, and mark the same-dimensional vector A corresponding to the a priori node i ; The vector A of the same dimension corresponding to the prior node i The same dimension vector A corresponding to other nodes in this period i To perform a relevance query, the formula is as follows: ; In the formula, d is the vector dimension, Sf is the normalization function, U i is the correlation, L is the total length of all pipe sections added together; The same-dimensional vector A whose correlation is greater than a preset threshold i The corresponding nodes are taken as adjacent nodes; When the adjacent node and the priori node are located in different pipelines, the priori node is used as a re-affirmative node.
[0010] According to one aspect of the above technical solution, the specific steps of step S50 include: A language model is introduced, and according to the result of traversing the node-condition line in the same time period, information of the re-verification node and information of points around the re-verification node are input into the language model for calculation, so as to find the leakage point with the highest probability of water seepage near the re-verification node;
[0011] Among them, argmax is the maximum value solving function, represents the set of all hidden leakage points γ around the node m, R is the occurrence probability of the hidden leakage point γ, is the logarithm of the probability of the hidden leakage point γ around the node m appearing, and μ is the model parameter of the language model; Calculating the actual pressure residual of the hidden leakage point according to the node-condition line, and inferring the predicted pressure residual at the hidden leakage point according to historical data; Subtracting the actual pressure residual from the predicted pressure residual to obtain a residual value of the hidden leakage point; K=XX s ; Wherein, X is the actual pressure residual, X s is the predicted pressure residual; The residual values of the hidden leakage points are subdivided according to time periods to obtain the residual matrix K nq ; The residual matrix K nq Where n represents the number of days and q represents the sampling interval; A residual threshold is preset in each time period of the residual matrix; When the residual threshold is higher than a preset residual standard threshold, the re-verification node is determined as an abnormal node, and the hidden leakage point is determined as an abnormal leakage point.
[0012] The present invention also provides a water supply and drainage system model building system, comprising: Design module: used to design a hydraulic pipe network according to the actual water usage in the area, and to construct a hydraulic pipe network structure diagram, in which a plurality of optical fiber sensors are arranged; The design module is specifically used to: collect historical data on water usage in the area to design a hydraulic pipe network; Use hydraulic network design software to construct hydraulic network structure diagram; Arranging the optical fiber sensor along the pipeline on the outside of the pipeline; Construction module: used for embedding the position of the optical fiber sensor into the hydraulic pipe network structure diagram, constructing a node-pipeline time motion diagram, and constructing a plurality of node-condition lines in different time periods according to the node-pipeline time motion diagram; The construction module is specifically used to: regard the position of the optical fiber sensor as a node m, and embed it into the hydraulic pipe network structure diagram; Consider the pipeline as edge k, and map the node m and the edge k to node category θ and edge category η respectively; Combining the node m, the edge k, the node category θ and the edge category η, a node-pipeline time motion graph is constructed according to time T; Based on the node-pipeline time motion graph, two status types, normal and abnormal, are assigned to the nodes, and all the nodes are sequentially connected according to the status types within a time period to obtain node-status lines for all time periods; Mapping module: used for mapping the node position information and the node pressure information in the node-condition line in each time period into a high-dimensional vector, and real-time monitoring the node position information and the node pressure information with correlation in different time periods; The mapping module is specifically used to: vectorize the position and pressure value of the node in the node-condition line according to the self-attention mechanism to obtain a position vector Q and a pressure vector W, and fuse the position vector Q and the pressure vector W to obtain a vector A of the same dimension; The same-dimensional vector A is represented as A according to the time period of the node-status line t , t is the time period; The same-dimensional vector A t With the weight matrix O Z , O x , O c Multiply them together to get the query vector Z t , key vector X t and the value vector C t ; Monitor the node position information and node pressure information of the node-condition line in each time period, and mark the same-dimensional vector A corresponding to the node where the abnormality occurs according to the status of each node in the node-condition line t ; The same dimension vector A of the abnormal period t and the same dimension vector A in other time periods t To perform a relevance query, the formula is as follows: ; In the formula, d is the vector dimension, Sf is the normalization function, U t is the correlation, T is the total duration of all time periods; When the same-dimensional vector A t and the same dimension vector A in other time periods t Relevance Index U t When it is greater than the preset index, the same dimension vector A of other time periods is t The corresponding node is marked as a node to be verified, and it is queried whether the time period of the node to be verified is close to that of the node where the abnormality occurs. If not, the node where the abnormality occurs is marked as a priori node; Search module: used for traversing the node-status line with abnormal node position information and node pressure information, finding out the adjacent nodes closely connected with the abnormal node, and analyzing the correlation between the position of the abnormal node and the position of the adjacent nodes; The search module is specifically used to: in the node-state line where the priori node is located, all node sets are obtained L i , i is the number of the node in the current period; The same-dimensional vector A is represented as A according to the order of the nodes in the node-state line i ; The same-dimensional vector A i With the weight matrix O Z , O x , O c Multiply them together to get the query vector Z i , key vector X i and the value vector C i ; Traversing the node position information and node pressure information in the node-condition line in the same time period; Monitor all node position information and node pressure information in the node-status line where the a priori node is located, and mark the same-dimensional vector A corresponding to the a priori node i ; The vector A of the same dimension corresponding to the prior node i The same dimension vector A corresponding to other nodes in this period i To perform a relevance query, the formula is as follows: ; In the formula, d is the vector dimension, Sf is the normalization function, U i is the correlation, L is the total length of all pipe sections added together; The same-dimensional vector A whose correlation is greater than a preset threshold i The corresponding nodes are taken as adjacent nodes; When the adjacent node and the priori node are located in different pipelines, the priori node is used as a re-affirmative node.
[0013] Determination module: find the leakage point with the highest possibility of leakage near the node position where the abnormality occurs, calculate the pressure residual value of the leakage point, and when the pressure residual value is higher than a preset residual threshold, determine the leakage point as an abnormal leakage point; The determination module is specifically used to: introduce a language model, and according to the result of traversing the node-condition line in the same time period, input the information of the re-verification node and the information of the surrounding points of the re-verification node into the language model for calculation, and then find the leakage point with the highest probability of water seepage near the re-verification node;
[0014] Among them, argmax is the maximum value solving function, represents the set of all hidden leakage points γ around the node m, R is the occurrence probability of the hidden leakage point γ, is the logarithm of the probability of the hidden leakage point γ around the node m appearing, and μ is the model parameter of the language model; Calculating the actual pressure residual of the hidden leakage point according to the node-condition line, and inferring the predicted pressure residual at the hidden leakage point according to historical data; Subtracting the actual pressure residual from the predicted pressure residual to obtain a residual value of the hidden leakage point; K=XX s ; Wherein, X is the actual pressure residual, X s is the predicted pressure residual; The residual values of the hidden leakage points are subdivided according to time periods to obtain the residual matrix K nq ; The residual matrix K nq Where n represents the number of days and q represents the sampling interval; A residual threshold is preset in each time period of the residual matrix; When the residual threshold is higher than a preset residual standard threshold, the re-verification node is determined as an abnormal node, and the hidden leakage point is determined as an abnormal leakage point.
[0015] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the water supply and drainage system model building method as described above is implemented.
[0016] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the water supply and drainage system model building method as described above when executing the computer program.
[0017] Compared with the prior art, the present invention has the following beneficial effects: By establishing a hydraulic network structure diagram based on the hydraulic network, and then embedding optical fiber sensors as nodes in the hydraulic network structure diagram, a node-pipeline time motion diagram is established according to time to reflect the relationship between nodes and pipelines, and a node-status line is established in each time period based on the node-pipeline time motion diagram to reflect the status of the node (optical fiber sensor), and then the node position information and node pressure information in the node-status line are mapped into high-dimensional vectors to analyze nodes in different time periods, and find nodes with abnormal status in one time period and similar nodes in different time periods. If two nodes are similar and appear in the same time period, it is considered that they may be peak time. Abnormal water pressure caused by water use. If these two nodes appear in different time periods, the node is likely to be abnormal. It is necessary to analyze the correlation between the node and other nodes in the same time period. If the node and other similar nodes are located in the same pipeline, considering that the abnormality may be affected by the environment (such as temperature, external force), if the node and other similar nodes are located in different pipelines, it can be determined that the node is an abnormal node; find the leakage point with the highest possibility of leakage nearby through the node, and calculate the pressure residual value of the leakage point. If the pressure residual value is higher than the preset residual threshold, the leakage point is determined as an abnormal leakage point so that the staff can quickly carry out repair work; The present invention eliminates the impact of water consumption peak on the nodes by comparing the abnormal nodes in different time periods, and then eliminates the impact of the external environment on the nodes by comparing the abnormal nodes in the same time period. Finally, the abnormal leakage points are determined by finding the leakage points near the abnormal nodes, so that the hydraulic pipeline network can be monitored more comprehensively. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which: Figure 1 It is a flow chart of the method for constructing a water supply and drainage system model in the first embodiment of the present invention; Figure 2 It is a structural block diagram of a water supply and drainage system model building system in the second embodiment of the present invention; Figure 3 is a structural block diagram of an electronic device in a third embodiment of the present invention; The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0019] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0020] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0022] Embodiment 1 See also Figure 1 , which is a water supply and drainage system model building method in the first embodiment of the present invention, comprising the following steps S10-S50: S10, designing a hydraulic pipe network according to actual water usage in the area, constructing a hydraulic pipe network structure diagram, and setting a plurality of optical fiber sensors in the hydraulic pipe network; S20, embedding the position of the optical fiber sensor into the hydraulic pipe network structure diagram, constructing a node-pipeline time motion diagram, and constructing a plurality of node-condition lines in different time periods according to the node-pipeline time motion diagram; S30, mapping the node position information and the node pressure information in the node-status line in each time period into a high-dimensional vector, and monitoring the node position information and the node pressure information having correlation in different time periods in real time; S40, traversing the node-status line with abnormal node position information and node pressure information, finding adjacent nodes closely connected with the abnormal node, and analyzing the correlation between the position of the abnormal node and the position of the adjacent nodes; S50, finding a leakage point with the highest possibility of leakage near the node position where the abnormality occurs, calculating the pressure residual value of the leakage point, and when the pressure residual value is higher than a preset residual threshold, determining the leakage point as an abnormal leakage point.
[0023] It can be understood that the present invention establishes a hydraulic network structure diagram according to the hydraulic network, then embeds optical fiber sensors as nodes in the hydraulic network structure diagram, and establishes a node-pipeline time motion diagram according to time to reflect the relationship between the node and the pipeline, and establishes a node-status line in each time period based on the node-pipeline time motion diagram to reflect the status of the node (optical fiber sensor), and then maps the node position information and node pressure information in the node-status line into a high-dimensional vector to analyze the nodes in different time periods, and find the nodes with abnormal status in one time period and similar nodes in different time periods. If two nodes are similar and appear in the same time period, it is considered that they may be Water pressure anomalies caused by water use during peak hours. If these two nodes appear in different time periods, the node is likely to be abnormal. It is necessary to analyze the correlation between the node and other nodes in the same time period. If the node and other similar nodes are located in the same pipeline, considering that the anomaly may be affected by the environment (such as temperature, external force), if the node and other similar nodes are located in different pipelines, it can be determined that the node is an abnormal node; find the leakage point with the highest possibility of leakage nearby through the node, and calculate the pressure residual value of the leakage point. If the pressure residual value is higher than the preset residual threshold, the leakage point is determined as an abnormal leakage point so that the staff can quickly carry out repair work; The present invention eliminates the impact of water consumption peak on the nodes by comparing the abnormal nodes in different time periods, and then eliminates the impact of the external environment on the nodes by comparing the abnormal nodes in the same time period. Finally, the abnormal leakage points are determined by finding the leakage points near the abnormal nodes, so that the hydraulic pipeline network can be monitored more comprehensively.
[0024] Specifically, the specific steps of step S10 include: Collect historical data on water use in the area to design the hydraulic network; The population of each region is different. Depending on the structure of the house, the water pressure and the thickness of the water pipes are all different. Therefore, you can refer to the hydraulic network of other houses in the area.
[0025] Use hydraulic network design software to construct hydraulic network structure diagram; Modeling software similar to BIM can be used here; The optical fiber sensor is arranged along the pipeline on the outside of the pipeline.
[0026] Furthermore, the specific steps of step S20 include: The position of the optical fiber sensor is regarded as a node m and embedded into the hydraulic pipe network structure diagram; Consider the pipeline as edge k, and map the node m and the edge k to node category θ and edge category η respectively; Combining the node m, the edge k, the node category θ and the edge category η, a node-pipeline time motion graph is constructed according to time T; Based on the node-pipeline time motion graph, two status types, normal and abnormal, are assigned to the nodes, and all the nodes are sequentially connected according to the status types within a time period to obtain node-status lines for all time periods.
[0027] It can be understood that the node-pipeline time motion diagram is represented as P = (m, k, T, θ, η), which can clearly reflect which edge the node is on, what category the node belongs to (pressure sensor, vibration sensor, strain sensor), what category the edge belongs to (main pipe, branch pipe), and the state of the node in different time periods. According to the node-pipeline time motion diagram, the node-status line of each time period is constructed, and then the status of different nodes in the same time period is more clearly reflected. For example, the node-status line in the first time period is represented as .
[0028] Further, according to the self-attention mechanism, the position and pressure value of the node in the node-condition line are vectorized to obtain a position vector Q and a pressure vector W respectively, and the position vector Q and the pressure vector W are fused to obtain a vector A of the same dimension; The same-dimensional vector A is represented as A according to the time period of the node-status line t , t is the time period; The same-dimensional vector A t With the weight matrix O Z , O x , O c Multiply them together to get the query vector Z t , key vector X t and the value vector C t ; Monitor the node position information and node pressure information of the node-condition line in each time period, and mark the same-dimensional vector A corresponding to the node where the abnormality occurs according to the status of each node in the node-condition line t ; The same dimension vector A of the abnormal period t and the same dimension vector A in other time periods t To perform a relevance query, the formula is as follows: ; (1-1) In the formula, d is the vector dimension, Sf is the normalization function, U t is the correlation, T is the total duration of all time periods; When the same-dimensional vector A t and the same dimension vector A in other time periods t Relevance Index U t When it is greater than the preset index, the same dimension vector A of other time periods is t The corresponding node is marked as a node to be verified, and it is queried whether the time period of the node to be verified is close to that of the node where the abnormality occurs. If not, the node where the abnormality occurs is marked as a priori node.
[0029] It can be understood that the role of the self-attention mechanism is to find key data in the face of massive data. The present invention finds nodes with abnormal conditions through the node-condition line, and quantizes the position and pressure value of the abnormal node through the self-attention mechanism and then merges them into a vector A of the same dimension. t , in order to find the key data, we get three weight matrices O Z , O x , O c , O Z , O x , O c Represent the query matrix, key matrix and value matrix respectively, and then obtain the query vector Z of different time periods t , key vector X t and the value vector C t , Z t A vector of the same dimension representing the abnormal node t The correlation of the vector, X t A vector of the same dimension representing the abnormal node t The vector correlation feature, C t A vector of the same dimension representing the abnormal node t The characteristics of the node, and then use formula (1-1) to find the vector A of the same dimension as the abnormal node t Similar vectors of the same dimension A in other time periods t , and select the nodes in other time periods with the highest correlation as the nodes to be verified, and query whether the time period of the nodes to be verified is close to that of the node where the abnormality occurs. If not, mark the node where the abnormality occurs as a priori node.
[0030] Furthermore, the specific steps of step S40 include: In the node-state line where the priori node is located, all nodes are collected to obtain L i, i is the number of the node in the current period; The same-dimensional vector A is represented as A according to the order of the nodes in the node-state line i ; The same-dimensional vector A i With the weight matrix O Z , O x , O c Multiply them together to get the query vector Z i , key vector X i and the value vector C i ; Traversing the node position information and node pressure information in the node-condition line in the same time period; Monitor all node position information and node pressure information in the node-status line where the a priori node is located, and mark the same-dimensional vector A corresponding to the a priori node i ; The vector A of the same dimension corresponding to the prior node i The same dimension vector A corresponding to other nodes in this period i To perform a relevance query, the formula is as follows: ; In the formula, d is the vector dimension, Sf is the normalization function, U i is the correlation, L is the total length of all pipe sections added together; The same-dimensional vector A whose correlation is greater than a preset threshold i The corresponding nodes are taken as adjacent nodes; When the adjacent node and the priori node are located in different pipelines, the priori node is used as a re-affirmative node.
[0031] It can be understood that after eliminating the influence of the water use time period on the node, a step similar to step S30 is performed to find the same-dimensional vector A of the prior node from the same time period. i Same dimension vector A as other nodes i In the case of correlation, the node with the highest correlation is taken as the adjacent node, and it is queried whether the adjacent node and the prior node are located in the same pipeline. If not, it means that the node abnormality is not caused by the influence of the environment (temperature, external force), and the prior node is marked as a re-verified node.
[0032] Furthermore, the specific steps of step S50 include: A language model is introduced, and according to the result of traversing the node-condition line in the same time period, information of the re-verification node and information of points around the re-verification node are input into the language model for calculation, so as to find the leakage point with the highest probability of water seepage near the re-verification node;
[0033] Among them, argmax is the maximum value solving function, represents the set of all hidden leakage points γ around the node m, R is the occurrence probability of the hidden leakage point γ, is the logarithm of the probability of the hidden leakage point γ around the node m appearing, and μ is the model parameter of the language model; Calculating the actual pressure residual of the hidden leakage point according to the node-condition line, and inferring the predicted pressure residual at the hidden leakage point according to historical data; Subtracting the actual pressure residual from the predicted pressure residual to obtain a residual value of the hidden leakage point; K=XX s ; Wherein, X is the actual pressure residual, X s is the predicted pressure residual; The residual values of the hidden leakage points are subdivided according to time periods to obtain the residual matrix K nq ; The residual matrix K nq Where n represents the number of days and q represents the sampling interval; A residual threshold is preset in each time period of the residual matrix; When the residual threshold is higher than a preset residual standard threshold, the re-verification node is determined as an abnormal node, and the hidden leakage point is determined as an abnormal leakage point.
[0034] It is understandable that after the re-verification node is determined, the possibility of a hidden leakage point near the node is very high, so the language model is introduced. When traversing the node-condition line before, the collected information has been recorded to the background processing end. The information of the re-verification node and the information of the surrounding points are input into the language model for processing, and the vector representation of the re-verification node and the surrounding points can be obtained. The language model can try to predict the points around the re-verification node, so as to calculate the similarity between the surrounding points and the re-verification node, and take the surrounding points with high similarity as hidden leakage points, and determine whether the hidden leakage point is a real abnormal leakage point by calculating the pressure residual. The language model can use a continuous skip word model.
[0035] In summary, the water supply and drainage system model construction method in the above embodiment of the present invention eliminates the impact of water consumption peak on the nodes by comparing the abnormal nodes in different time periods, and then eliminates the impact of the external environment on the nodes by comparing the abnormal nodes in the same time period. Finally, the abnormal leakage points are determined by finding the leakage points near the abnormal nodes, so that the hydraulic pipeline network can be monitored more comprehensively. Embodiment 2 Please refer to Figure 2 , which is a water supply and drainage system model building system in a second embodiment of the present invention, comprising: Design module: used to design a hydraulic pipe network according to the actual water usage in the area, and to construct a hydraulic pipe network structure diagram, in which a plurality of optical fiber sensors are arranged; The design module is specifically used to: collect historical data on water usage in the area to design a hydraulic pipe network; Use hydraulic network design software to construct hydraulic network structure diagram; Arranging the optical fiber sensor along the pipeline on the outside of the pipeline; Construction module: used for embedding the position of the optical fiber sensor into the hydraulic pipe network structure diagram, constructing a node-pipeline time motion diagram, and constructing a plurality of node-condition lines in different time periods according to the node-pipeline time motion diagram; The construction module is specifically used to: regard the position of the optical fiber sensor as a node m, and embed it into the hydraulic pipe network structure diagram; Consider the pipeline as edge k, and map the node m and the edge k to node category θ and edge category η respectively; Combining the node m, the edge k, the node category θ and the edge category η, a node-pipeline time motion graph is constructed according to time T; Based on the node-pipeline time motion graph, two status types, normal and abnormal, are assigned to the nodes, and all the nodes are sequentially connected according to the status types within a time period to obtain node-status lines for all time periods; Mapping module: used for mapping the node position information and the node pressure information in the node-condition line in each time period into a high-dimensional vector, and real-time monitoring the node position information and the node pressure information with correlation in different time periods; The mapping module is specifically used to: vectorize the position and pressure value of the node in the node-condition line according to the self-attention mechanism to obtain a position vector Q and a pressure vector W, and fuse the position vector Q and the pressure vector W to obtain a vector A of the same dimension; The same-dimensional vector A is represented as A according to the time period of the node-status line t , t is the time period; The same-dimensional vector A t With the weight matrix O Z , O x , O c Multiply them together to get the query vector Z t , key vector X t and the value vector C t ; Monitor the node position information and node pressure information of the node-condition line in each time period, and mark the same-dimensional vector A corresponding to the node where the abnormality occurs according to the status of each node in the node-condition line t ; The same dimension vector A of the abnormal period t and the same dimension vector A in other time periods t To perform a relevance query, the formula is as follows: ; In the formula, d is the vector dimension, Sf is the normalization function, U t is the correlation, T is the total duration of all time periods; When the same-dimensional vector A t and the same dimension vector A in other time periods t Relevance Index U t When it is greater than the preset index, the same dimension vector A of other time periods is t The corresponding node is marked as a node to be verified, and it is queried whether the time period of the node to be verified is close to that of the node where the abnormality occurs. If not, the node where the abnormality occurs is marked as a priori node; Search module: used for traversing the node-status line with abnormal node position information and node pressure information, finding out the adjacent nodes closely connected with the abnormal node, and analyzing the correlation between the position of the abnormal node and the position of the adjacent nodes; The search module is specifically used to: in the node-state line where the priori node is located, all node sets are obtained L i , i is the number of the node in the current period; The same-dimensional vector A is represented as A according to the order of the nodes in the node-state line i ; The same-dimensional vector A i With the weight matrix O Z , O x , O c Multiply them together to get the query vector Z i , key vector X i and the value vector Ci ; Traversing the node position information and node pressure information in the node-condition line in the same time period; Monitor all node position information and node pressure information in the node-status line where the a priori node is located, and mark the same-dimensional vector A corresponding to the a priori node i ; The vector A of the same dimension corresponding to the prior node i The same dimension vector A corresponding to other nodes in this period i To perform a relevance query, the formula is as follows: ; In the formula, d is the vector dimension, Sf is the normalization function, U i is the correlation, L is the total length of all pipe sections added together; The same-dimensional vector A whose correlation is greater than a preset threshold i The corresponding nodes are taken as adjacent nodes; When the adjacent node and the priori node are located in different pipelines, the priori node is used as a re-affirmative node.
[0036] Determination module: used to find the leakage point with the highest possibility of leakage near the node position where the abnormality occurs, calculate the pressure residual value of the leakage point, and when the pressure residual value is higher than the preset residual threshold, determine the leakage point as an abnormal leakage point The determination module is specifically used to: introduce a language model, and according to the result of traversing the node-condition line in the same time period, input the information of the re-verification node and the information of the surrounding points of the re-verification node into the language model for calculation, and then find the leakage point with the highest probability of water seepage near the re-verification node;
[0037] Among them, argmax is the maximum value solving function, represents the set of all hidden leakage points γ around the node m, R is the occurrence probability of the hidden leakage point γ, is the logarithm of the probability of the hidden leakage point γ around the node m appearing, and μ is the model parameter of the language model; Calculating the actual pressure residual of the hidden leakage point according to the node-condition line, and inferring the predicted pressure residual at the hidden leakage point according to historical data; Subtracting the actual pressure residual from the predicted pressure residual to obtain a residual value of the hidden leakage point; K=XX s ; Wherein, X is the actual pressure residual, X s is the predicted pressure residual; The residual values of the hidden leakage points are subdivided according to time periods to obtain the residual matrix K nq ; The residual matrix K nq Where n represents the number of days and q represents the sampling interval; A residual threshold is preset in each time period of the residual matrix; When the residual threshold is higher than a preset residual standard threshold, the re-verification node is determined as an abnormal node, and the hidden leakage point is determined as an abnormal leakage point.
[0038] Embodiment 3 The present invention also provides an electronic device, see Figure 3 , shown is an electronic device in the third embodiment of the present invention, including a memory 10, a processor 20, and a computer program 30 stored in the memory 10 and executable on the processor 20, and when the processor 20 executes the computer program 30, the above-mentioned water supply and drainage system model building method is implemented.
[0039] Among them, the memory 10 includes at least one type of storage medium, and the storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10 can be an internal storage unit of an electronic device, such as a hard disk of the electronic device. In other embodiments, the memory 10 can also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 10 can also include both an internal storage unit of the electronic device and an external storage device. The memory 10 can not only be used to store application software and various types of data installed in the electronic device, but also can be used to temporarily store data that has been output or is to be output.
[0040] Among them, in some embodiments, the processor 20 can be an electronic control unit (Electronic Control Unit, abbreviated as ECU, also known as a vehicle computer), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor or other data processing chip, used to run the program code stored in the memory 10 or process data, such as executing access restriction programs, etc.
[0041] It should be pointed out that Figure 3The structure shown does not constitute a limitation on the electronic device. In other embodiments, the electronic device may include fewer or more components than those shown in the figure, or combine certain components, or arrange the components differently.
[0042] The embodiment of the present invention further provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the water supply and drainage system model building method as described above is implemented.
[0043] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0044] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0045] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0046] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0047] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for constructing a water supply and drainage system model. It is characterized in that The steps include: S10, designing a hydraulic pipe network according to actual water usage in the area, constructing a hydraulic pipe network structure diagram, and setting a plurality of optical fiber sensors in the hydraulic pipe network; S20, embedding the position of the optical fiber sensor into the hydraulic pipe network structure diagram, constructing a node-pipeline time motion diagram, and constructing a plurality of node-condition lines in different time periods according to the node-pipeline time motion diagram; S30, mapping the node position information and the node pressure information in the node-status line in each time period into a high-dimensional vector, and monitoring the node position information and the node pressure information having correlation in different time periods in real time; S40, traversing the node-status line with abnormal node position information and node pressure information, finding out adjacent nodes closely connected with the abnormal node, and analyzing the correlation between the position of the abnormal node and the position of the adjacent nodes; S50, finding a leakage point with the highest possibility of leakage near the location of the abnormal node, calculating the pressure residual value of the leakage point, and when the pressure residual value is higher than a preset residual threshold, determining the leakage point as an abnormal leakage point.
2. The water supply and drainage system model building method according to claim 1, It is characterized in that The specific steps of step S10 include: Collect historical data on water use in the area to design the hydraulic network; Use hydraulic network design software to construct hydraulic network structure diagram; The optical fiber sensor is arranged along the pipeline on the outside of the pipeline.
3. The water supply and drainage system model building method according to claim 2, It is characterized in that The specific steps of step S20 include: The position of the optical fiber sensor is regarded as a node m and embedded into the hydraulic pipe network structure diagram; Consider the pipeline as edge k, and map the node m and the edge k to node category θ and edge category η respectively; Combining the node m, the edge k, the node category θ and the edge category η, a node-pipeline time motion graph is constructed according to time T; Based on the node-pipeline time motion graph, two status types, normal and abnormal, are assigned to the nodes, and all the nodes are sequentially connected according to the status types within a time period to obtain node-status lines for all time periods.
4. The method for constructing a water supply and drainage system model according to claim 3, It is characterized in that The specific steps of step S30 include: According to the self-attention mechanism, the position and pressure value of the node in the node-condition line are vectorized to obtain a position vector Q and a pressure vector W respectively, and the position vector Q and the pressure vector W are fused to obtain a vector A of the same dimension; The same-dimensional vector A is represented as A according to the time period of the node-status line t , t is the time period; The same dimension vector A t With the weight matrix O Z , O x , O c Multiply them together to get the query vector Z t , key vector X t and the value vector C t ; Monitor the node position information and node pressure information of the node-condition line in each time period, and mark the same-dimensional vector A corresponding to the node where the abnormality occurs according to the status of each node in the node-condition line t ; The same dimension vector A of the abnormal period t and the same dimension vector A in other time periods t To perform a relevance query, the formula is as follows: ; In the formula, d is the vector dimension, Sf is the normalization function, U t is the correlation, T is the total duration of all time periods; When the same-dimensional vector A t and the same dimension vector A in other time periods t Relevance Index U t When it is greater than the preset index, the same dimension vector A of other time periods is t The corresponding node is marked as a node to be verified, and it is queried whether the time period of the node to be verified is close to that of the node where the abnormality occurs. If not, the node where the abnormality occurs is marked as a priori node.
5. The method for constructing a water supply and drainage system model according to claim 4, It is characterized in that The specific steps of step S40 include: In the node-state line where the priori node is located, all nodes are collected to obtain L i , i is the number of the node in the current period; The same-dimensional vector A is represented as A according to the order of the nodes in the node-state line i ; The same dimension vector A i With the weight matrix O Z , O x , O c Multiply them together to get the query vector Z i , key vector X i and the value vector C i ; Traversing the node position information and node pressure information in the node-condition line in the same time period; Monitor all node position information and node pressure information in the node-status line where the a priori node is located, and mark the same-dimensional vector A corresponding to the a priori node i ; The vector A of the same dimension corresponding to the prior node i The same dimension vector A corresponding to other nodes in this period i To perform a relevance query, the formula is as follows: ; In the formula, d is the vector dimension, Sf is the normalization function, U i is the correlation, L is the total length of all pipe sections added together; The same-dimensional vector A whose correlation is greater than a preset threshold i The corresponding nodes are taken as adjacent nodes; When the adjacent node and the priori node are located in different pipelines, the priori node is used as a re-affirmative node.
6. The method for constructing a water supply and drainage system model according to claim 5, It is characterized in that The specific steps of step S50 include: A language model is introduced, and according to the result of traversing the node-condition line in the same time period, information of the re-verification node and information of points around the re-verification node are input into the language model for calculation, so as to find the leakage point with the highest probability of water seepage near the re-verification node; Among them, argmax is the maximum value solving function, represents the set of all hidden leakage points γ around the node m, R is the occurrence probability of the hidden leakage point γ, is the logarithm of the probability of the hidden leakage point γ around the node m appearing, and μ is the model parameter of the language model; Calculating the actual pressure residual of the hidden leakage point according to the node-condition line, and inferring the predicted pressure residual at the hidden leakage point according to historical data; Subtracting the actual pressure residual from the predicted pressure residual to obtain a residual value of the hidden leakage point; K=X-X s ; Wherein, X is the actual pressure residual, X s is the predicted pressure residual; The residual values of the hidden leakage points are subdivided according to time periods to obtain the residual matrix K nq ; The residual matrix K nq Where n represents the number of days and q represents the sampling interval; A residual threshold is preset in each time period of the residual matrix; When the residual threshold is higher than a preset residual standard threshold, the re-verification node is determined as an abnormal node, and the hidden leakage point is determined as an abnormal leakage point.
7. A water supply and drainage system model building system, It is characterized in that include: Design module: used to design a hydraulic pipe network according to the actual water usage in the area, and to construct a hydraulic pipe network structure diagram, in which a plurality of optical fiber sensors are arranged; Construction module: used for embedding the position of the optical fiber sensor into the hydraulic pipe network structure diagram, constructing a node-pipeline time motion diagram, and constructing a plurality of node-condition lines in different time periods according to the node-pipeline time motion diagram; Mapping module: used for mapping the node position information and the node pressure information in the node-condition line in each time period into a high-dimensional vector, and real-time monitoring the node position information and the node pressure information with correlation in different time periods; Search module: used for traversing the node-status line with abnormal node position information and node pressure information, finding out the adjacent nodes closely connected with the abnormal node, and analyzing the correlation between the position of the abnormal node and the position of the adjacent nodes; Determination module: used to find the leakage point with the highest possibility of leakage near the node position where the abnormality occurs, calculate the pressure residual value between the node where the abnormality occurs and the leakage, and when the residual value is higher than the preset residual threshold, determine the node position where the abnormality occurs as an abnormal node.
8. A storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method for constructing a water supply and drainage system model as described in any one of claims 1 to 6 is implemented.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the water supply and drainage system model building method according to any one of claims 1 to 6 is implemented.
