A plan fuzzy search method and device based on pipe network node feature vectorization
By using a fuzzy search method for contingency plans based on pipeline node feature vectorization, combined with a contingency plan vector model and a pre-set pipeline rainfall contingency plan vector library, the problem of reliance on human experience in existing technologies is solved, enabling rapid and accurate contingency plan matching and improving the efficiency and intelligence level of responding to sudden rainfall events.
Patent Information
- Application Number
- CN202510674754.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2045-05-23
AI Technical Summary
Existing methods for finding contingency plans rely too heavily on human experience, resulting in a slow response speed to sudden rainfall events. This makes it difficult to efficiently handle dynamic and complex rainfall scenarios and fails to meet the real-time and intelligent requirements in complex situations.
By acquiring real-time attribute features and embedding vectors of pipeline nodes, original vectors are generated and adjusted using a contingency plan vector model. This is then combined with a pre-set pipeline rainfall contingency plan vector library for rapid matching, reducing the difficulty of information processing and reliance on professional personnel. A loss function is constructed to optimize weights, thereby improving the accuracy and efficiency of the contingency plan vectors.
It enables the selection of the most suitable contingency plan from a large number of plans in a short period of time, which greatly improves the response speed and intelligence level to sudden rainfall events and meets the real-time requirements in complex scenarios.
Smart Images

Figure CN120596543B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of contingency plan search technology, specifically to a fuzzy contingency plan search method and apparatus based on pipeline node feature vectorization. Background Technology
[0002] In current hydraulic calculations, traditional numerical methods, while capable of producing relatively accurate results, suffer from stringent data input requirements and cumbersome calculation processes, resulting in lengthy computation times. Consequently, they struggle to respond quickly to sudden rainfall events. To more effectively address such emergencies, establishing a contingency plan database is crucial. This involves selecting similar contingency plans from the database based on the initial conditions of drainage network calculations and rapidly developing emergency measures based on the calculation results.
[0003] Currently, the standard process for generating a contingency plan database includes three steps: constructing a drainage network simulation model, generating drainage contingency plans for different rainfall scenarios, and storing the plans to form the database. However, the resulting database is overly technical in its presentation. In terms of plan selection, it relies heavily on human experience. First, manual methods are used to formulate selection rules or matching algorithms, identifying problems by comprehensively analyzing the drainage network structure, historical operational data, and potential correlations. In practical applications, all feasible plans are compared one by one according to rule priorities to determine the most suitable plan. Second, the system acquires the attribute information of each plan and stores it in the database along with the calculation results. This attribute information also needs to be manually set and matched based on professional knowledge. In actual use, the database is searched using the attribute information of the on-site situation to find a matching plan.
[0004] While existing technologies have achieved some optimization in contingency plan selection, they still have many limitations in practical applications. For example, urban drainage networks are vast and feature-rich, requiring the processing of massive amounts of information during the contingency plan selection process, which is extremely complex. This not only leads to significant time and resources being spent on location issues, severely impacting emergency response efficiency and making it difficult to meet timeliness requirements, but also increases labor costs due to the high level of professional knowledge required and the stringent skill requirements for staff.
[0005] Therefore, constrained by the above factors, existing methods are unable to efficiently cope with dynamic, ever-changing, and complex rainfall scenarios, and cannot meet the demands for real-time performance and intelligence in complex scenarios. Summary of the Invention
[0006] In view of this, the present invention provides a fuzzy search method and apparatus for contingency plans based on pipeline node feature vectorization, in order to solve the problems of existing contingency plan search methods relying too much on human experience and having a low response speed to sudden rainfall events, which makes it difficult to efficiently cope with dynamic and complex rainfall scenarios and meet the real-time and intelligent requirements in complex scenarios.
[0007] In a first aspect, the present invention provides a fuzzy search method for pre-plans based on pipeline node feature vectorization, the method comprising:
[0008] The process involves: acquiring the real-time drainage network node attribute feature set and embedding vector of the target node within the target area to be searched under the first rainfall condition; where the target node is the drainage network node corresponding to the first rainfall condition in the target area to be searched, and one drainage network node corresponds to one embedding vector; generating a first original vector corresponding to the first rainfall condition based on the embedding vector and the real-time drainage network node attribute feature set; inputting the first original vector into the contingency plan vector model to obtain the first contingency plan vector corresponding to the first rainfall condition; determining the target drainage network rainfall contingency plan vector in a preset drainage network rainfall contingency plan vector library, which includes multiple contingency plan vectors for multiple rainfall contingency plans under different rainfall conditions; and determining the target drainage network rainfall contingency plan in the preset drainage network rainfall contingency plan library, which includes multiple rainfall contingency plans under different rainfall conditions, based on the target drainage network rainfall contingency plan vector.
[0009] The fuzzy search method for contingency plans based on pipeline node feature vectorization provided by this invention can generate a first original vector corresponding to the new first rainfall condition by combining the real-time drainage pipeline node feature set and corresponding embedded vector of the target node under the new first rainfall condition. Furthermore, by adjusting the first original vector through a contingency plan vector model, the generated first contingency plan vector more accurately reflects the contingency plan direction to be taken under the new first rainfall condition, reducing the difficulty of information processing and the reliance on professional personnel. Furthermore, the pre-constructed preset pipeline rainfall contingency plan vector library can efficiently express multiple contingency plan situations as a fixed-dimensional vector. Simultaneously, because vectors have the characteristic of intuitively displaying results, the usage threshold of the preset pipeline rainfall contingency plan library is greatly reduced. Therefore, by searching and matching the generated contingency plan vector in the preset pipeline rainfall contingency plan vector library, the most suitable contingency plan vector for the current rainfall condition can be selected from a large number of contingency plans in a short time, and the corresponding target pipeline rainfall contingency plan can be determined in the corresponding preset pipeline rainfall contingency plan library, significantly shortening the calculation time and greatly improving the response speed to sudden rainfall events. Therefore, by implementing this invention, we can efficiently cope with dynamic, ever-changing, and complex rainfall scenarios, thereby meeting the real-time and intelligent requirements in complex scenarios.
[0010] In one optional implementation, a first original vector corresponding to the first rainfall condition is generated based on the embedded vector and the real-time drainage network node attribute feature set, including:
[0011] The attribute features of each node in the real-time drainage network node attribute feature set are vectorized to obtain the attribute feature vector of the target node; the embedded vector and the attribute feature vector are concatenated to generate the first original vector corresponding to the first rainfall condition.
[0012] The fuzzy search method for contingency plans based on pipeline node feature vectorization provided by this invention comprehensively integrates the physical and environmental features of the nodes themselves, avoiding the limitations of single feature expression. This enables the generated contingency plan vectors to describe the state of the corresponding contingency plan more richly and accurately, providing support for improving the quality of contingency plan generation and search in the future.
[0013] In one alternative implementation, the method further includes:
[0014] The process involves acquiring a historical drainage network rainfall contingency plan database, an undirected topology graph of the drainage network, and attribute feature sets of multiple historical drainage network nodes for the target area under multiple second rainfall conditions. These historical drainage network node attribute feature sets characterize the attribute features of multiple drainage network nodes in the target area under multiple second rainfall conditions. Each drainage network node in the undirected topology graph is vectorized to obtain multiple embedding vectors for the multiple drainage network nodes. Based on the multiple embedding vectors and the multiple historical drainage network node attribute feature sets, multiple second original vectors corresponding to the multiple second rainfall conditions are generated. Finally, a contingency plan vector model is constructed based on the multiple second original vectors.
[0015] In one alternative implementation, a preliminary vector model is constructed based on multiple second original vectors, including:
[0016] Based on preset weights, multiple second original vectors are weighted and calculated to obtain multiple second contingency plan vectors corresponding to multiple second rainfall conditions; a loss function is constructed based on the historical pipeline rainfall contingency plan database and multiple second contingency plan vectors; the preset weights are optimized using gradient descent until the loss function value meets the requirements, thus obtaining the target weights; based on the target weights, multiple second original vectors are weighted and calculated to obtain multiple target pipeline rainfall contingency plan vectors corresponding to multiple second rainfall conditions; a contingency plan vector model is constructed using multiple second original vectors as input data and multiple target pipeline rainfall contingency plan vectors as output data.
[0017] The fuzzy contingency plan lookup method based on pipeline node feature vectorization provided by this invention constructs a loss function and optimizes the weights using gradient descent. This allows the weights of each feature in the second original vector corresponding to the second rainfall condition to be optimized and adjusted according to the historical drainage pipeline network contingency plan database. This results in a more accurate reflection of the actual situation by the generated target contingency plan vector, improving the alignment between the contingency plan vector and the actual operation of the drainage pipeline network. Furthermore, the contingency plan vector model constructed with the original vector as input and the target contingency plan vector as output can better learn patterns from historical data. Consequently, when facing new rainfall conditions, the model can more accurately generate corresponding contingency plan vectors, providing strong support for efficient target contingency plan lookup.
[0018] In one optional implementation, a loss function is constructed based on a historical pipeline rainfall contingency plan database and multiple second contingency plan vectors, including:
[0019] Based on the historical pipeline rainfall contingency plan database, a target distance function for the contingency plan is constructed; based on multiple second contingency plan vectors, an actual distance function for the contingency plan vectors is constructed; and based on the target distance function and the actual distance function for the contingency plan vectors, a loss function is constructed.
[0020] The fuzzy search method for contingency plans based on pipeline node feature vectorization provided by this invention constructs a target distance function and an actual distance function for the contingency plan vector, respectively, and combines them to construct a loss function. This accurately measures the difference between the second contingency plan vector and the actual situation, providing precise guidance for subsequent optimization of weights using gradient descent. This allows for more targeted weight adjustments to reduce the deviation between the second contingency plan vector and the actual situation, thereby improving the quality and accuracy of the generated target contingency plan vector. Furthermore, since the loss function is the difference between the initial contingency plan vector and the actual situation, even if there are no similar rainfall conditions in the preset pipeline network rainfall contingency plan database after a new rainfall event occurs, an ideal contingency plan can still be found in that database.
[0021] In an optional implementation, the method further includes: generating a preset pipeline rainfall contingency plan vector library based on the contingency plan vector model.
[0022] The present invention provides a fuzzy search method for contingency plans based on pipeline node feature vectorization. It generates a preset pipeline rainfall contingency plan vector library according to the contingency plan vector model, which can transform the contingency plan into a fixed-dimensional vector, thus providing support for quickly finding contingency plan vectors similar to the current situation under new rainfall conditions.
[0023] In one optional implementation, a pre-set pipeline rainfall contingency plan database includes:
[0024] Obtain the topology of the drainage pipe network; generate an undirected topology graph of the drainage pipe network based on the topology.
[0025] The fuzzy search method based on feature vectorization of pipeline network nodes provided by this invention effectively eliminates the interference caused by direction by transforming the obtained drainage pipeline network topology into an undirected topology graph. This allows nodes that originally differed greatly in the directed structure due to different directions to exhibit similarity in the vector space of the undirected graph, which helps to more accurately vectorize the nodes.
[0026] Secondly, the present invention provides a fuzzy search device for pre-plans based on pipeline node feature vectorization, the device comprising:
[0027] The module includes an acquisition module for acquiring real-time drainage network node attribute feature sets and embedding vectors of target nodes within the target area to be searched under the first rainfall condition. Each target node corresponds to a drainage network node under the first rainfall condition in the target area, and each drainage network node corresponds to an embedding vector. A generation module generates a first original vector corresponding to the first rainfall condition based on the embedding vectors and the real-time drainage network node attribute feature set. An input module inputs the first original vector into a contingency plan vector model to obtain a first contingency plan vector corresponding to the first rainfall condition. A first determination module determines a target drainage network rainfall contingency plan vector in a preset drainage network rainfall contingency plan vector library based on the first contingency plan vector. The preset drainage network rainfall contingency plan vector library includes multiple contingency plan vectors for multiple rainfall contingency plans under different rainfall conditions. A second determination module determines a target drainage network rainfall contingency plan in the preset drainage network rainfall contingency plan library based on the target drainage network rainfall contingency plan vector. The preset drainage network rainfall contingency plan library includes multiple rainfall contingency plans under different rainfall conditions.
[0028] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the pre-plan fuzzy search method based on network node feature vectorization described in the first aspect or any corresponding embodiment.
[0029] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the pre-plan fuzzy search method based on pipeline node feature vectorization described in the first aspect or any corresponding embodiment.
[0030] Fifthly, the present invention provides a computer program product, including computer instructions, which are used to cause a computer to execute the pre-plan fuzzy search method based on pipeline node feature vectorization as described in the first aspect or any corresponding embodiment. Attached Figure Description
[0031] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0032] Figure 1 This is a flowchart illustrating a fuzzy search method for pre-plans based on pipeline node feature vectorization according to an embodiment of the present invention.
[0033] Figure 2 This is a flowchart illustrating another fuzzy search method for pre-plans based on pipeline node feature vectorization according to an embodiment of the present invention;
[0034] Figure 3 This is a flowchart illustrating another fuzzy search method for pre-plans based on pipeline node feature vectorization according to an embodiment of the present invention;
[0035] Figure 4 This is a rainwater pipe network topology diagram according to an embodiment of the present invention;
[0036] Figure 5 This is a structural block diagram of a pre-plan fuzzy search device based on pipeline node feature vectorization according to an embodiment of the present invention;
[0037] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] Existing contingency plan lookup methods rely excessively on human experience and have a slow response time to sudden rainfall events. Furthermore, in urban drainage networks, the same calculation results for monitoring nodes may stem from different initial conditions; for example, rainfall at point A and point B may have the same impact on monitoring node C. However, existing contingency plan database technologies often map the actual initial calculation conditions to the calculation results one-to-one. This means that when the spatial structures of points A and B differ significantly, existing technologies cannot accurately match the contingency plan for point A with the initial calculation conditions for point B, greatly narrowing the coverage of the contingency plan database. Therefore, constrained by these factors, existing methods struggle to efficiently handle dynamically changing and complex rainfall scenarios, failing to meet the demands for real-time performance and intelligence in complex situations.
[0040] According to an embodiment of the present invention, a method for fuzzy search of a pre-plan based on feature vectorization of pipeline nodes is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0041] This embodiment provides a fuzzy search method for pre-plans based on pipeline node feature vectorization, which can be used in electronic devices such as computers, mobile phones, and tablets. Figure 1 This is a flowchart of a pre-plan fuzzy search method based on pipeline node feature vectorization according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0042] Step S101: Obtain the real-time drainage network node attribute feature set and embedding vector of the target node in the target area to be searched under the first rainfall condition.
[0043] The real-time drainage network node attribute feature set can include rainfall information and pipe segment and node attributes that affect the drainage speed of the network, such as slope, width, and pipe segment length.
[0044] Furthermore, the target node is the drainage network node corresponding to the first rainfall condition in the target area to be searched, and there can be one or more. In this embodiment, one target node is used as an example for explanation.
[0045] Furthermore, the embedding vector representation maps the topology of the drainage network nodes to a vector space representation, that is, one drainage network node corresponds to one embedding vector.
[0046] Step S102: Generate the first original vector corresponding to the first rainfall condition based on the embedded vector and the real-time drainage network node attribute feature set.
[0047] Specifically, by combining the embedded vector and the real-time drainage network node attribute feature set, the current first rainfall condition can be vectorized, thereby generating a first original vector that integrates the node's topological structure information and various attribute feature information, comprehensively describing the target node's situation under the first rainfall condition.
[0048] Step S103: Input the first original vector into the contingency plan vector model to obtain the first contingency plan vector corresponding to the first rainfall condition.
[0049] Among them, the pre-plan vector model represents a trained model that can transform the original input vector into a meaningful pre-plan vector.
[0050] Specifically, the first original vector of the first rainfall condition can be input into the contingency plan vector model. Furthermore, the contingency plan vector model can process and operate on the first original vector corresponding to the first rainfall condition based on its learned patterns and rules, and output the first contingency plan vector corresponding to the first rainfall condition.
[0051] Furthermore, in some optional implementations, when the new rainfall conditions involve multiple target nodes, each target node and the first rainfall condition will generate a corresponding contingency plan vector. Furthermore, multiple contingency plan vectors can be processed into the final first contingency plan vector corresponding to the first rainfall condition by averaging the vectors.
[0052] Step S104: Determine the target pipeline rainfall contingency plan vector from the preset pipeline rainfall contingency plan vector library based on the first contingency plan vector.
[0053] The preset pipeline rainfall contingency plan vector library is pre-built and can include multiple contingency plan vectors for multiple rainfall contingency plans under different rainfall conditions. Specifically, a drainage pipeline node corresponds to different rainfall contingency plans under different rainfall conditions, and each rainfall contingency plan corresponds to one contingency plan vector.
[0054] Specifically, each contingency plan vector is sequentially retrieved from the preset pipeline rainfall contingency plan vector library, and its similarity to the first contingency plan vector corresponding to the first rainfall condition is calculated. Then, based on the similarity calculation results, the contingency plan vector with the highest similarity is selected as the target pipeline rainfall contingency plan vector.
[0055] Step S105: Determine the target pipeline rainfall plan in the preset pipeline rainfall plan database based on the target pipeline rainfall plan vector.
[0056] The preset pipeline rainfall contingency plan library can include multiple rainfall contingency plans under different rainfall conditions, and each rainfall contingency plan corresponds one-to-one with each contingency plan vector in the preset pipeline rainfall contingency plan vector library.
[0057] Specifically, the corresponding target network rainfall plan can be found in the preset network rainfall plan database based on the determined target network rainfall plan vector.
[0058] The fuzzy search method for contingency plans based on pipeline node feature vectorization provided in this embodiment can generate a first original vector corresponding to the new first rainfall condition by combining the real-time drainage pipeline node feature set and corresponding embedded vector of the target node under the new first rainfall condition. Furthermore, the first original vector is adjusted through a contingency plan vector model, making the generated first contingency plan vector more accurately reflect the contingency plan direction to be taken under the new first rainfall condition, reducing the difficulty of information processing and the reliance on professional personnel. Furthermore, the pre-constructed preset pipeline rainfall contingency plan vector library can efficiently express multiple contingency plan situations as a fixed-dimensional vector. At the same time, because vectors have the characteristic of intuitively displaying results, the usage threshold of the preset pipeline rainfall contingency plan library is greatly reduced. Therefore, by searching and matching the generated contingency plan vector in the preset pipeline rainfall contingency plan vector library, the most suitable contingency plan vector for the current rainfall condition can be selected from a large number of contingency plans in a short time, and the corresponding target pipeline rainfall contingency plan can be determined in the corresponding preset pipeline rainfall contingency plan library, significantly shortening the calculation time and greatly improving the response speed to sudden rainfall events. Therefore, by implementing this invention, we can efficiently cope with dynamic, ever-changing, and complex rainfall scenarios, thereby meeting the real-time and intelligent requirements in complex scenarios.
[0059] This embodiment provides a fuzzy search method for pre-plans based on pipeline node feature vectorization, which can be used in electronic devices such as computers, mobile phones, and tablets. Figure 2 This is a flowchart of a pre-plan fuzzy search method based on pipeline node feature vectorization according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0060] Step S201: Obtain the real-time drainage network node attribute feature set and embedding vector of the target node within the target area to be searched under the first rainfall condition. For details, please refer to [link to relevant documentation]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.
[0061] Step S202: Generate the first original vector corresponding to the first rainfall condition based on the embedded vector and the real-time drainage network node attribute feature set.
[0062] Specifically, step S202 includes:
[0063] Step S2021: Vectorize the attribute features of each node in the real-time drainage network node attribute feature set to obtain the attribute feature vector of the target node.
[0064] The number and selection of attribute feature vectors can be adjusted as needed, and more detailed attribute feature vectors can help improve model accuracy.
[0065] Specifically, the rainfall information of each node in the feature set of the drainage network node is time series data, which is redundant if used directly. Therefore, the time series principal component analysis method is first used to reduce the dimensionality of the rainfall information.
[0066] Furthermore, different rainfall feature vectors can be generated based on different rainfall scenarios.
[0067] Furthermore, for the time when water flows from the nodes in the feature set of the drainage pipe network to the monitoring node, since the drainage pipe network relies on gravity flow for drainage, the water flow time is first calculated using a formula based on the slope and length of the pipe section, and then the depth-first search (DFS) algorithm is used to calculate the time from each node to the monitoring node. Finally, a set of one-dimensional vectors is obtained after normalization.
[0068] Finally, the vectors obtained above are integrated to form the attribute feature vector of the target node.
[0069] Step S2022: Concatenate the embedded vector and the attribute feature vector to generate the first original vector corresponding to the first rainfall condition.
[0070] Specifically, the embedding vector and attribute feature vector of the target node are concatenated in a certain order. Typically, the elements of the embedding vector and attribute feature vector are sequentially linked together to form a new vector, namely the original vector V corresponding to the first rainfall condition. j ={v j1 ,v j2 …v jm}. Where m represents the number of concatenated vectors.
[0071] Step S203: Input the first original vector into the contingency plan vector model to obtain the first contingency plan vector corresponding to the first rainfall condition. For details, please refer to [link to details]. Figure 1 Step S103 of the illustrated embodiment will not be described again here.
[0072] Step S204: Based on the first contingency plan vector, determine the target pipeline rainfall contingency plan vector from the preset pipeline rainfall contingency plan vector library. For details, please refer to [link to details]. Figure 1 Step S104 of the illustrated embodiment will not be described again here.
[0073] Step S205: Determine the target pipeline network rainfall contingency plan from the preset pipeline network rainfall contingency plan database based on the target pipeline network rainfall contingency plan vector. For details, please refer to [link to relevant documentation]. Figure 1 Step S105 of the illustrated embodiment will not be described again here.
[0074] The fuzzy search method for contingency plans based on pipeline node feature vectorization provided in this embodiment comprehensively integrates the physical and environmental features of the nodes themselves, avoiding the limitations of single feature expression. This allows the generated contingency plan vectors to describe the state of the corresponding contingency plan more richly and accurately, providing support for improving the quality of contingency plan generation and search in the future.
[0075] In some alternative implementations, prior to step S203 above, a contingency vector model can be constructed using the following steps:
[0076] Step a1: Obtain the historical pipeline rainfall plan database, drainage pipeline undirected topology map, and multiple historical drainage pipeline node attribute feature sets for the target area under multiple second rainfall conditions.
[0077] The historical pipeline rainfall contingency plan database can include multiple historical rainfall contingency plans for multiple second rainfall conditions; multiple historical drainage pipeline node attribute feature sets are used to characterize the attribute features of multiple drainage pipeline nodes in the target area to be searched under multiple second rainfall conditions.
[0078] Furthermore, the undirected topological graph G(N, E) of the drainage network is used to characterize the topological structure of the drainage network. Here, N represents a node, and E represents the edge between nodes, which can be obtained through the following steps:
[0079] Step a11: Obtain the drainage network topology.
[0080] Step a12: Generate an undirected topology graph of the drainage network based on the drainage network topology.
[0081] Specifically, drainage pipe networks are generally viewed as directed tree structures, but the direction of the pipe network nodes is an interference factor during the vectorization process. Therefore, in this embodiment, the obtained drainage pipe network topology is transformed into an undirected graph, so that nodes in different directions can also present similarity in the vector space.
[0082] Step a2 involves vectorizing each drainage network node in the undirected topology graph of the drainage network to obtain multiple embedding vectors for multiple drainage network nodes.
[0083] Specifically, the node2vec algorithm can be used to vectorize each node in the undirected topological graph G(N,E) of the drainage network. The node2vec algorithm is a graph embedding algorithm based on random walks, which can generate vector representations of nodes in the graph structure, capturing both local and global structural information of the nodes.
[0084] First, set the parameters of the node2vec algorithm, such as defining the length of the random walk, i.e., the number of nodes visited in each random walk; setting the return parameter and in-out parameter, etc. The return parameter determines the probability of the random walk returning to the previous node, while the in-out parameter determines whether the random walk tends to explore local neighbors or explore the graph structure more broadly.
[0085] Secondly, starting from each drainage network in the undirected topology graph of the drainage network, a random walk is performed according to the set parameters. During each random walk, the sequence of nodes visited is recorded.
[0086] Finally, the random walk sequences of all drainage network nodes are processed using machine learning or deep learning methods (such as neural networks) to map these sequences into fixed-dimensional vectors, i.e., the embedding vectors of each drainage network node. Furthermore, the embedding vectors contain the location information of the drainage network node within the entire network topology and its connection relationships with other drainage network nodes, reflecting the topological characteristics of the drainage network nodes.
[0087] Step a3: Based on multiple embedded vectors and multiple drainage network node attribute feature sets, generate multiple second original vectors corresponding to the second rainfall condition.
[0088] Among them, multiple second original vectors can be represented as: V1, V2, ... V n .
[0089] The specific process can be found in the description of step S202 above, and will not be repeated here.
[0090] Step a4: Construct a contingency plan vector model based on multiple second original vectors.
[0091] Specifically, step a4 above includes:
[0092] Step a41: Based on preset weights, perform weighted calculations on multiple second original vectors to obtain multiple second contingency plan vectors corresponding to multiple second rainfall conditions.
[0093] The distance between the second original vector obtained by simple concatenation in the vector space cannot represent the relationship between different plans. In order to better represent the relationship between the plans, the second original vector needs to be weighted.
[0094] Specifically, a set of weights W = {w1, w2, ... w} can be defined. mThen, for each second original vector V1, V2, ... V, its values in each dimension are multiplied by the corresponding preset weight value, and the products are summed to obtain a new value. Furthermore, the vector composed of these new values constitutes the multiple second contingency plan vectors V′1, V′2, ... V′ corresponding to the multiple second rainfall conditions. n .in,
[0095] Step a42: Construct a loss function based on the historical pipeline rainfall contingency plan database and multiple second contingency plan vectors.
[0096] The loss function is used to measure the difference between the planned target distance and the actual distance.
[0097] In some alternative implementations, step a42 above includes:
[0098] Step a421: Construct the target distance function of the plan based on the historical drainage network plan database.
[0099] Step a422: Construct the actual distance function of the plan vectors based on multiple second plan vectors.
[0100] Step a423: Construct a loss function based on the target distance function and the actual distance function of the target vector.
[0101] Among them, the target distance function of the contingency plan is used to reflect the distance metric corresponding to the similarity of monitoring results of different contingency plans under ideal conditions; the actual distance function of the contingency plan vector is used to measure the actual distance between different contingency plan vectors in the vector space.
[0102] Specifically, the calculation results of monitoring nodes (i.e., the plans corresponding to the drainage network nodes) can be obtained from the historical drainage network plan database. Based on these results, cosine similarity is used to calculate the similarity between the plans. For example, assuming there are n plans, an n×n dimensional similarity matrix can be generated. Furthermore, since the similarity between the proposed plan and itself is 1, the similarity matrix... The element on the diagonal is 1.
[0103] Furthermore, the similarity matrix This matrix represents the similarity of monitoring results between plan i and plan j. In essence, it reflects the target distance relationship between the plans, which can then be used to construct the corresponding plan target distance function.
[0104] Furthermore, the weighted vector V of each second plan can be calculated using distance metrics such as Euclidean distance and Manhattan distance. i ′ and V j′ The actual distance between
[0105] For example, when choosing Euclidean distance for calculation,
[0106] Finally, construct the loss function.
[0107] Furthermore, since the loss function is the difference between the second contingency plan vector and the actual situation, even if there are no similar rainfall conditions in the preset pipeline rainfall contingency plan database during subsequent contingency plan searches, an ideal contingency plan can still be found in the preset pipeline rainfall contingency plan database.
[0108] By constructing the target distance function and the actual distance function of the plan vector separately, and combining the two to construct the loss function, the difference between the second plan vector and the actual situation can be accurately measured. This provides accurate guidance for subsequent optimization of weights using gradient descent, enabling the adjustment of weights to more effectively reduce the deviation between the second plan vector and the actual situation, thereby improving the quality and accuracy of the generated target plan vector.
[0109] Step a43: Optimize the preset weights using gradient descent until the loss function value meets the requirements, thus obtaining the target weights.
[0110] Gradient descent is an iterative optimization algorithm used to solve unconstrained optimization problems. Its core purpose is to find the minimum (or approximate minimum) of the objective function by continuously adjusting the parameters.
[0111] Specifically, set the relevant parameters for gradient descent, such as the learning rate and the maximum number of iterations. Then, use gradient descent to apply the preset weights W = {w1, w2, ... w...} m Iterative optimization is then performed.
[0112] Furthermore, in each iteration, the gradient of the loss function L with respect to the preset weights W can be calculated, and the preset weights can be updated according to the direction and magnitude of the gradient, so that the weights are adjusted in a direction that can reduce the value of the loss function.
[0113] Finally, after each iteration, check if the value of the loss function is minimized, i.e., whether the preset requirement is met. If the requirement is met, stop the iteration, and the weight obtained at this time is the target weight; otherwise, continue to the next round of iteration until the termination condition is met.
[0114] By constructing a loss function and optimizing the weights using gradient descent, the weights of each feature in each second original vector can be optimized and adjusted according to the historical drainage network contingency plan database. This allows the generated target contingency plan vector to more accurately reflect the actual situation and improves the fit between the contingency plan vector and the actual operation of the drainage network.
[0115] Step a44: Based on the target weight, perform weighted calculations on multiple second original vectors to obtain multiple target pipeline rainfall plan vectors corresponding to multiple second rainfall conditions.
[0116] Specifically, based on the optimized target weights, the weighted calculation process in step a41 above is repeated to obtain the final target plan vector for each target network rainfall contingency plan. Through optimization, this target plan vector can more accurately reflect the status of the drainage network contingency plan.
[0117] Step a45: Using multiple second original vectors as input data and multiple target pipeline rainfall contingency plan vectors as output data, construct a contingency plan vector model.
[0118] Specifically, multiple second original vectors can be used as input data, and the corresponding multiple target pipeline rainfall contingency plan vectors can be used as output data, which are then input into a pre-set model architecture for training. During training, the model learns the mapping relationship between the original vectors and the target contingency plan vectors, adjusts the parameters within the model, and enables the model to accurately output the corresponding target pipeline rainfall contingency plan vectors based on the input original vectors.
[0119] The pre-defined model architecture can be a machine learning or deep learning model architecture, such as a multilayer perceptron (MLP), a recurrent neural network (RNN) and its variants (LSTM, GRU), etc.
[0120] Furthermore, the contingency plan vector model built through the training process can better learn the patterns in historical data, and thus, when facing new rainfall situations, the model can more accurately generate the corresponding contingency plan vector, providing strong support for efficiently finding the target contingency plan.
[0121] The fuzzy search method for contingency plans based on feature vectorization of drainage network nodes provided in this embodiment accurately measures the difference between the second contingency plan vector and the actual situation by constructing a target distance function and an actual distance function of the contingency plan vector, respectively, and combining the two to construct a loss function. Furthermore, the gradient descent method is used to optimize the weights, allowing the weights of each feature in the original vector of the drainage network node to be optimized and adjusted according to the historical drainage network contingency plan database. This results in the generated target contingency plan vector more accurately reflecting the actual situation and improving the fit between the contingency plan vector and the actual operation of the drainage network. Furthermore, the contingency plan vector model constructed with the original vector as input and the target contingency plan vector as output can better learn the patterns in historical data. Therefore, when facing new rainfall conditions, the model can more accurately generate corresponding contingency plan vectors, providing strong support for efficient search of target contingency plans. Simultaneously, since the loss function is the difference between the initial contingency plan vector and the actual situation, even if there are no similar rainfall conditions in the preset drainage network rainfall contingency plan database after a new rainfall event occurs, an ideal contingency plan can still be found in the preset drainage network rainfall contingency plan database.
[0122] In some optional implementations, after step S203 and before step S204, the following steps are also included:
[0123] Step a7: Generate a preset pipeline rainfall contingency plan vector library based on the contingency plan vector model.
[0124] Specifically, by continuously collecting raw vector data under different rainfall conditions and inputting it into the contingency plan vector model, a corresponding preset pipeline network rainfall contingency plan vector library can be continuously generated.
[0125] The fuzzy search method for contingency plans based on pipeline node feature vectorization provided in this embodiment generates a preset pipeline rainfall contingency plan vector library according to the contingency plan vector model. It can transform the contingency plan into a fixed-dimensional vector, which provides support for quickly finding contingency plan vectors similar to the current situation under new rainfall conditions.
[0126] In one instance, such as Figure 3 As shown, a fuzzy search method for contingency plans based on pipeline node feature vectorization is provided. This method constructs a pipeline rainfall contingency plan vector library by vectorizing the features of drainage pipeline network nodes. Node features include the pipeline network topology and node attribute characteristics, such as rainfall information and length information. The core lies in introducing vectorization technology to represent the initial calculation conditions in the contingency plan in a vectorized form. The magnitude and direction of the vectors are continuously adjusted based on the calculation results of the contingency plan, transforming complex physical problem-solving into simple vector operations.
[0127] Furthermore, when encountering new rainfall inputs, the system no longer relies on traditional segment-by-segment hydraulic solutions or requires manual rule matching. Instead, it can directly vectorize the initial calculation conditions based on a trained vectorized model. Through vector matching technology, it quickly finds contingency plan vectors similar to the current conditions, thereby obtaining the estimated output of the monitoring nodes and significantly reducing computation time. Moreover, since the vectorized model is trained based on the calculation results of the contingency plans, the distances between different initial calculation conditions in the vector space can be similar due to the similarity of the calculation results, improving the system's flexibility in responding to different rainfall events.
[0128] like Figure 4 The diagram shows the actual stormwater drainage network topology of a certain area. Circles represent manhole nodes, triangles represent outlets, and arrows indicate the upstream and downstream relationships of the drainage network. The drainage network primarily relies on gravity flow for drainage, and its topology exhibits a typical tree structure. The key feature of this invention is the vectorization of contingency plans to enable fuzzy search. This requires preparing a certain number of plans as a training dataset. Assume the plan library contains multiple pre-calculated plan models, each representing the impact of a manhole node on a monitoring node during rainfall. This invention constructs a pipeline rainfall contingency plan vector library by vectorizing these plans. The main steps include:
[0129] S1. Generate the embedding vectors of the network nodes.
[0130] S101. Obtain the pipeline network topology.
[0131] First, the topology of the pipe network is obtained, forming an undirected graph G(N, E), where N represents a node and E represents an edge between nodes. Although drainage pipe networks are generally considered as directed tree structures, the orientation of the pipe network nodes is an interference factor during vectorization. This example transforms it into an undirected graph, so that nodes with different orientations can also present similarity in the vector space.
[0132] S102. Node vectorization.
[0133] The node2vec algorithm is used to vectorize each node in the undirected graph G(N,E). A node sequence is generated by random walks, and the parameters are adjusted to make it more biased towards depth-first search, thereby capturing the local and global information of the nodes in the topology and finally obtaining the embedding vector of each node.
[0134] S2. Generate the attribute feature vectors for each node.
[0135] Attribute feature vectors are mainly divided into two categories. One category consists of pipe segment and node attributes that affect the drainage velocity of the pipe network, such as slope, width, and pipe segment length. The other category is rainfall information. Each model in the contingency plan database records the impact of each node on the monitoring results under different rainfall conditions. These rainfall conditions need to be vectorized and used as part of the node attribute feature vectors. The number and selection of attribute feature vectors can vary according to requirements. Detailed attribute feature vectors can improve the accuracy of the model.
[0136] S3. The embedded vector is concatenated with the attribute feature vector to form the pre-plan vector.
[0137] S301. Concatenate vectors.
[0138] The embedding vector and attribute feature vector of each plan node are concatenated to form the original vector of the plan. Assume there are n plans in the plan library, each plan calculating data for a monitoring node under different rainfall conditions. The n plans in the plan library are concatenated into n original vectors based on the node's embedding vector and attribute feature vector. Let V be the original vector of plan i. i ={v i1 ,v i2 …v im The n contingency plans in the contingency plan library form a set of original vectors V1, V2, ... V. n .
[0139] S302. Define the weights W = {w1, w2, ... w...} m}
[0140] The distance between the original vectors obtained by simple concatenation in the vector space cannot represent the relationship between different plans. To better characterize the relationship between the plans, the original vectors need to be weighted. Define a set of weights W = {w1, w2, ... w...} m By weighted calculation, the positions of each original vector in the vector space are adjusted to obtain the final vectors V′1, V′2, ..., V′. n ,in
[0141] S303. Define the distance metric.
[0142] Define the target distance of the contingency plan vector. and actual distance
[0143] The distance between contingency plan vectors in the vector space should correspond to the similarity between the calculated results of their monitoring nodes; contingency plan vectors with similar calculated results are closer in the vector space. Define the target distance. This represents the similarity between the monitoring results of plan i and plan j. The actual distance is defined. Represents the contingency plan vector Vi ′ and contingency plan vector V j ′ The distance between them.
[0144] S304. Define the loss function and optimize the weights.
[0145] Define loss function This is used to measure the difference between the target distance and the actual distance. By minimizing this loss function and adjusting the weights W, we can ensure that similar plans are closer to each other in the vector space, thus optimizing the accuracy and efficiency of plan matching.
[0146] Furthermore, based on the above examples, a specific implementation method is provided.
[0147] According to such Figure 4 The stormwater drainage network structure shown in this embodiment includes 32 nodes. Three different rainfall scenarios are set for each node, and the results are recorded in the SWMM model to form a contingency plan library. At this point, the contingency plan library contains 32 × 3 = 96 contingency plans. Next, a contingency plan vector library will be constructed based on this library. The specific implementation steps are as follows:
[0148] S1. Obtain the undirected graph and vectorize the nodes.
[0149] according to Figure 4 The stormwater pipe network topology shown is first represented as an undirected graph G(N, E), where N represents nodes and E represents connections between nodes. Then, the node2vec algorithm is used to vectorize each node in the undirected graph G(N, E), setting the embedding vector of each node to 5 dimensions. Finally, a set of 5-dimensional node embedding vectors is obtained. The vector values are shown in Table 1 below, using "J119" and "J120" as examples.
[0150] Table 1. Node Embedding Vector Values
[0151] Node number Node embedding vector J119 (-4.2967,-8.9209,-7.3558,-0.4359,0.4373) J120 (-4.5254,-9.0370,-6.3816,0.9147,0.8478)
[0152] S2. Obtain the attribute feature vector.
[0153] Attribute feature vector 1 represents the rainfall information for each node in the contingency plan database. The rainfall information is a time series data. Directly using the rainfall data as a vector would be redundant; therefore, temporal principal component analysis (TPA) is used to reduce the dimensionality of the rainfall data. Based on the criterion that the cumulative variance contribution rate of the principal components is greater than 90%, the number of principal components is determined to be 2. Three rainfall vectors are generated from three different rainfall scenarios. Attribute feature vector 2 represents the time it takes for water to reach the monitoring node from each node. Since the drainage network relies on gravity flow, the water flow time is calculated using formulas based on the slope and length of the pipe sections. Then, a depth-first search (DFS) algorithm is used to calculate the water flow time from each node to the monitoring node. After normalization, a set of one-dimensional vectors is obtained. The values of attribute feature vector 1 are based on rainfall, with the selected rainfall sequences being "2-yr", "10-yr", and "100-yr". The values of attribute feature vector 2 are shown in Table 2 below, using "J119" and "J120" as examples.
[0154] Table 2. Values of Attribute Feature Vectors
[0155]
[0156]
[0157] S3. Generate the contingency plan vector.
[0158] S301. Concatenate vectors.
[0159] The node embedding vector is concatenated with the attribute feature vector to form the original vector. Therefore, the 96 plans in the plan library are transformed into 96 original vectors V = {V1, V2, ... V...} q6 Each original vector contains the embedding vector and feature vector of a node, such as V. i ={v i1 ,v i2 ,v i3 Using "J119" and "J120" as examples, the original vectors are displayed. After adding rainfall to each node, they are concatenated into 2 × 3 = 6 original vectors, as shown in Table 3 below:
[0160] Table 3. Original Vectors
[0161] Nodes and Rainfall Original vector (feature vector 1, feature vector 2, embedding vector) J119+2-yr (-4.8492,0.1382,0.5684,-4.2967,-8.9209,-7.3558,-0.4359,0.4373) J119+10-yr (-1.8575,-0.1865,0.5684,-4.2967,-8.9209,-7.3558,-0.4359,0.4373) J119+100-yr (6.7066,0.0483,0.5684,-4.2967,-8.9209,-7.3558,-0.4359,0.4373) J120+2-yr (-4.8492,0.1382,0.3679,-4.5254,-9.0370,-6.3816,0.9147,0.8478) J120+10-yr (-1.8575,-0.1865,0.3679,-4.5254,-9.0370,-6.3816,0.9147,0.8478) J120+100-yr (6.7066,0.0483,0.3679,-4.5254,-9.0370,-6.3816,0.9147,0.8478)
[0162] S302. Define weights.
[0163] In this embodiment, the original vector consists of an embedded vector and two types of attribute feature vectors. A three-dimensional weight W = {w1, w2, w3} is defined to be used to weight the different parts of each original vector.
[0164] S303. Calculate the similarity matrix and the weighted vector distance.
[0165] Based on the calculation results of the monitoring nodes in the contingency plan database, cosine similarity was used to calculate the similarity between 96 contingency plans, generating a 96×96 dimensional similarity matrix. Next, the weighted contingency plan vector is calculated. and The actual distance is calculated using the Euclidean distance ||V i ′-V j ′||. It is a 96×96 matrix with diagonal elements all being 1, as shown in the following expression:
[0166] tensor([[1.0000, 0.9902, 0.8566,..., -0.2986, –0.2488, 0.9528],
[0167] [0.9902, 1.0000, 0.9128, ..., -0.3165, -0.2757, 0.9029],
[0168] [0.8566, 0.9128, 1.0000, ..., -0.3201, -0.3130, 0.6759],
[0169] ...,
[0170] [-0.2986, -0.3165, -0.3201, ..., 1.0000, 0.9831, -0.1836],
[0171] [-0.2488, -0.2757, -0.3130, ..., 0.9831, 1.0000, -0.1088], |
[0172] [0.9528, 0.9029, 0.6759, ..., -0.1836, -0.1088, 1.0000]])
[0173] S304. Optimize the weights and minimize the loss function.
[0174] Define loss function The gradient descent method is used to continuously optimize the weights and minimize the loss function. The goal of the optimization process is to make the distance between the weighted different plan vectors in the vector space as close as possible to the similarity of the calculation results of the monitoring nodes. After training, the final plan vectors are obtained. Taking "J119" and "J120" as examples, the final plan vectors are shown in Table 4 below:
[0175] Table 4. Contingency Plan Vectors
[0176]
[0177] S305. Plan retrieval and matching.
[0178] Under new rainfall scenarios, the embedding vector and attribute feature vector of the nodes in the initial conditions can be directly calculated, and weighted according to the pre-trained model to obtain a weighted vector. Then, the vector matching algorithm is used to quickly retrieve the contingency plan vector in the contingency plan vector library that is closest to the current input conditions, so as to realize the fuzzy search of the contingency plan.
[0179] Taking the "50-yr" rainfall sequence, which differs from the training set, implemented on node "J119" as an example, we compared the results of finding the top three similar plans in the plan database using a vectorization method with those obtained by hydraulic calculations based on the cosine similarity of the monitoring node's calculation results. The results are shown in Table 5 below. The selected plans are almost identical, indicating that the plans found using the vectorization method, while avoiding hydraulic calculations, still possess a certain degree of reliability.
[0180] Table 5
[0181]
[0182] This example presents a fuzzy contingency plan search method based on pipeline node feature vectorization. By pre-constructing a rainfall contingency plan vector library, it efficiently represents various contingency plan scenarios as a fixed-dimensional vector. When a new rainfall scenario occurs, the initial calculation conditions are vectorized using a vector model. Based on vector space similarity calculation techniques, the best matching solution is quickly found in the contingency plan library. Even if there are no similar initial calculation conditions in the library, because the loss function of the vector model is the difference in calculation results, different initial calculation conditions may yield the same calculation results. Therefore, an ideal contingency plan can still be found to support subsequent work. This significantly solves the problems of high computational complexity and response cost in existing technologies and greatly improves the coverage of the contingency plan library.
[0183] Meanwhile, traditional contingency plan matching methods require a high level of expertise and skilled personnel. This solution, however, uses vectorization, which, due to its intuitive result presentation, significantly lowers the barrier to entry for the contingency plan database. Furthermore, through a suitable training process, various features can be incorporated into the contingency plan vectors, fully utilizing historical data and the expressive power of multi-dimensional features. This avoids matching errors caused by insufficient features in traditional methods, enabling the contingency plan database to be flexibly expanded to adapt to more complex rainfall scenarios. Consequently, it provides strong support for the accurate prediction and efficient scheduling of drainage networks.
[0184] This embodiment also provides a fuzzy search device for pre-planned solutions based on pipeline node feature vectorization. This device is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0185] This embodiment provides a fuzzy search device for pre-planned solutions based on pipeline node feature vectorization, such as... Figure 5 As shown, the device includes:
[0186] The acquisition module 501 is used to acquire the real-time drainage network node attribute feature set and embedding vector of the target node in the target area to be searched under the first rainfall condition. The target node is the drainage network node corresponding to the first rainfall condition in the target area to be searched, and one drainage network node corresponds to one embedding vector.
[0187] The generation module 502 is used to generate the first original vector corresponding to the first rainfall condition based on the embedded vector and the real-time drainage network node attribute feature set.
[0188] The input module 503 is used to input the first original vector into the contingency plan vector model to obtain the first contingency plan vector corresponding to the first rainfall condition.
[0189] The first determining module 504 is used to determine the target pipeline rainfall plan vector in the preset pipeline rainfall plan vector library according to the first plan vector. The preset pipeline rainfall plan vector library includes multiple plan vectors of multiple rainfall plans under different rainfall conditions.
[0190] The second determining module 505 determines the target pipeline rainfall plan in the preset pipeline rainfall plan library based on the target pipeline rainfall plan vector. The preset pipeline rainfall plan library includes multiple rainfall plans under different rainfall conditions.
[0191] Further functional descriptions of the above modules are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0192] In this embodiment, the pre-plan fuzzy search device based on pipeline node feature vectorization is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0193] This invention also provides a computer device having the above-described features. Figure 5The device shown is a fuzzy search device for pre-planned solutions based on feature vectorization of pipeline nodes.
[0194] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 6 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take a processor 10 as an example.
[0195] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0196] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0197] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0198] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0199] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0200] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0201] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0202] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A fuzzy search method for contingency plans based on feature vectorization of pipeline network nodes, characterized in that, The method includes: Obtain the real-time drainage network node attribute feature set and embedding vector of the target node in the target area to be searched under the first rainfall condition, wherein the target node is the drainage network node corresponding to the first rainfall condition in the target area to be searched, and one drainage network node corresponds to one embedding vector. Based on the embedded vector and the real-time drainage network node attribute feature set, a first original vector corresponding to the first rainfall condition is generated. Input the first original vector into the contingency vector model to obtain the first contingency vector corresponding to the first rainfall condition; Based on the first contingency plan vector, the target pipeline rainfall contingency plan vector is determined in the preset pipeline rainfall contingency plan vector library, which includes multiple contingency plan vectors for multiple rainfall contingency plans under different rainfall conditions. The target pipeline rainfall plan is determined from the preset pipeline rainfall plan library based on the target pipeline rainfall plan vector. The preset pipeline rainfall plan library includes multiple rainfall plans under different rainfall conditions.
2. The method according to claim 1, characterized in that, Based on the embedded vector and the real-time drainage network node attribute feature set, a first original vector corresponding to the first rainfall condition is generated, including: The attribute features of each node in the real-time drainage network node attribute feature set are vectorized to obtain the attribute feature vector of the target node. The embedding vector and the attribute feature vector are concatenated to generate the first original vector corresponding to the first rainfall condition.
3. The method according to claim 1, characterized in that, The method further includes: The historical pipeline rainfall plan database, drainage pipeline undirected topology graph, and multiple historical drainage pipeline node attribute feature sets of the target area to be searched under multiple second rainfall conditions are obtained. The multiple historical drainage pipeline node attribute feature sets are used to characterize the attribute features of multiple drainage pipeline nodes in the target area to be searched under multiple second rainfall conditions. Each drainage network node in the undirected topology graph of the drainage network is vectorized to obtain multiple embedding vectors for multiple drainage network nodes; Based on the multiple embedded vectors and the multiple historical drainage network node attribute feature sets, multiple second original vectors corresponding to the multiple second rainfall conditions are generated; The proposed vector model is constructed based on the plurality of second original vectors.
4. The method according to claim 3, characterized in that, Based on the plurality of second original vectors, the proposed vector model is constructed, including: Based on preset weights, the multiple second original vectors are weighted and calculated to obtain multiple second contingency vectors corresponding to the multiple second rainfall conditions; Based on the historical pipeline rainfall contingency plan database and the multiple second contingency plan vectors, a loss function is constructed; The preset weights are optimized using gradient descent until the loss function value of the loss function meets the requirements, thus obtaining the target weights. Based on the target weights, the multiple second original vectors are weighted and calculated to obtain multiple target pipeline rainfall contingency plan vectors corresponding to the multiple second rainfall conditions; Using the multiple second original vectors as input data and the multiple target pipeline rainfall contingency plan vectors as output data, the contingency plan vector model is constructed.
5. The method according to claim 4, characterized in that, Based on the historical pipeline rainfall contingency plan database and the multiple second contingency plan vectors, a loss function is constructed, including: Based on the historical pipeline rainfall contingency plan database, construct the target distance function for the contingency plan; Based on the multiple second plan vectors, construct the actual distance function of the plan vectors; The loss function is constructed based on the target distance function of the plan and the actual distance function of the plan vector.
6. The method according to claim 4, characterized in that, The method further includes: The preset pipeline rainfall contingency plan vector library is generated based on the contingency plan vector model.
7. The method according to claim 3, characterized in that, Obtain the undirected topology graph of the drainage pipe network, including: Obtain the topology of the drainage pipe network; Generate an undirected topology graph of the drainage network based on the drainage network topology.
8. A fuzzy search device for pre-planned solutions based on pipeline node feature vectorization, characterized in that, The device includes: The acquisition module is used to acquire the real-time drainage network node attribute feature set and embedding vector of the target node in the target area to be searched under the first rainfall condition, wherein the target node is the drainage network node corresponding to the first rainfall condition in the target area to be searched, and one drainage network node corresponds to one embedding vector. The generation module is used to generate a first original vector corresponding to the first rainfall condition based on the embedded vector and the real-time drainage network node attribute feature set; The input module is used to input the first original vector into the contingency plan vector model to obtain the first contingency plan vector corresponding to the first rainfall condition; The first determining module is used to determine the target pipeline rainfall plan vector in the preset pipeline rainfall plan vector library according to the first plan vector. The preset pipeline rainfall plan vector library includes multiple plan vectors of multiple rainfall plans under different rainfall conditions. The second determining module is used to determine the target pipeline rainfall plan in the preset pipeline rainfall plan library according to the target pipeline rainfall plan vector. The preset pipeline rainfall plan library includes multiple rainfall plans under different rainfall conditions.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the fuzzy search method based on pipeline node feature vectorization as described in any one of claims 1 to 7.
10. A computer program product, characterized in that, It includes computer instructions for causing a computer to execute the pre-planned fuzzy search method based on pipeline node feature vectorization as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Urban water runoff control method and system
CN119272616A
Urban intelligent drainage management system based on big data analysis
CN119886589A