Flood intelligent scheduling decision-making method and device based on scheduling service knowledge graph
By applying intelligent decision-making methods based on knowledge graphs in flood scheduling, the problems of untimely scheduling response and cumbersome operations in the existing technology are solved, and efficient and accurate flood scheduling decisions are achieved, which are suitable for the needs of basin cascade power stations.
Patent Information
- Application Number
- CN202510409805.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-04-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology lacks a systematic scheduling expert knowledge base in flood scheduling, resulting in untimely responses, inadequate scheduling measures, and cumbersome manual scheduling operations, making it difficult to meet the needs of the basin cascade power stations.
The flood intelligent scheduling decision-making method based on the scheduling business knowledge graph is used to extract knowledge of flood scheduling related text data and sequence data, establish a business knowledge graph, determine the analysis rules, build a centralized business model, and output the decision-making plan through the knowledge graph diagram model.
It improves the real-time and accuracy of flood scheduling, reduces the workload of manual operations, ensures the security and reliability of data storage, and provides good real-time scheduling decision-making suggestions.
Smart Images

Figure CN119904124A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the application field of knowledge graphs, and specifically relates to a flood intelligent scheduling decision-making method and device based on a scheduling business knowledge graph. Background Art
[0002] Flood dispatching is a core part of flood control project construction. In addition to ensuring the sustainable development of natural resources, it is also necessary to perform dispatching operations and implement flood control measures according to water conditions. Reasonable flood dispatching can control or reduce flood disaster losses to the maximum extent when a flood occurs. However, in the current practice of flood dispatching, a systematic dispatching expert knowledge base has not yet been formed, and relevant dispatching experience has not been effectively sorted out and applied, which often leads to problems such as untimely flood dispatching response and inadequate dispatching measures. The level of intelligent operation and management of the project is insufficient, and there is a lack of a complete management system. The defects in the real-time and accuracy of flood dispatching decisions indirectly expand the impact of flood disasters. However, the general artificial flood dispatching method is cumbersome, time-consuming and labor-intensive, and relies on post-experience summary and ignores the importance of real-time decision-making in flood dispatching, which is difficult to meet the needs of flood dispatching of cascade power stations in the basin.
[0003] Flood intelligent dispatch based on knowledge graph combines artificial intelligence, data mining and other technologies, and can realize real-time monitoring of relevant water data and identification of abnormal situations, so as to achieve intelligent decision-making. In the field of flood information management, knowledge graphs with high visualization, flexibility and strong interoperability as the main features are gradually playing an increasingly important role in flood dispatch. Knowledge graphs establish the relationship between various dispatch entities in a simple form, support efficient indexing and data query, and can also make inferences based on some dispatch rules, which provides the possibility of reducing the complexity of operations. Strengthening the application research of knowledge graphs in flood dispatch plays an important role in improving the efficiency of flood dispatch business. Knowledge graphs are usually composed of basic units in the form of RDF triples, etc., which are interconnected. The relationship between entities is emphasized through the mutual linking of metadata. It is mainly constructed through steps such as knowledge extraction, knowledge fusion and knowledge reasoning. In terms of structure, compared with the fixed architecture of traditional databases, knowledge graphs do not require a pre-defined architecture, but are established by mapping entities to existing ontologies, thereby allowing data to evolve flexibly and making interoperability better. At present, the research on knowledge graph construction in China is closely linked to actual needs, and a relatively systematic knowledge extraction method has been formed. However, its rule base is complex to build (such as CN111368095A), which requires a lot of expert experience and historical data to build the rule base. In the absence of labeled data, a lot of debugging is required to meet the requirements; for large-scale knowledge graphs and reasoning graphs, the reasoning efficiency may be low, and it is difficult to ensure the real-time decision-making; the reasoning results are poorly interpretable, and it is difficult to adjust the model accordingly. Summary of the invention
[0004] In order to at least overcome the deficiencies of the prior art, the present invention provides a flood intelligent scheduling decision method and device based on a scheduling business knowledge graph, which can effectively improve the real-time and accuracy of remote centralized flood scheduling of cascade hydropower stations.
[0005] The flood intelligent dispatching decision method based on the dispatching business knowledge graph provided by the present invention comprises the following steps: Extract knowledge from text data and sequence data related to flood dispatching and establish a knowledge graph for flood dispatching business; Determine the flood dispatching judgment rules, and establish a flood dispatching rule base based on the flood dispatching judgment rules and the flood dispatching business knowledge graph, and the rules in the flood dispatching rule base are stored in the flood dispatching business knowledge graph embedding layer in the form of attribute vectors; Construct a flood dispatching and centralized control business model, including a similarity model, an outlier diagnosis model, and a flood intelligent dispatching question-answering model. The similarity model is used to calculate and output the comprehensive similarity of attributes between flood cases; the outlier diagnosis model is used to diagnose and correct outliers in the flood case time series, and output the corrected flood case time series; the flood intelligent dispatching question-answering model is used to obtain information from the flood dispatching business knowledge graph based on the user input statement and return it to the user; Integrate the flood dispatch model, flood dispatch rule base, flood dispatch business knowledge graph and flood dispatch centralized control business model to form a flood intelligent dispatch system; The intelligent flood dispatching system outputs flood dispatching plans for decision-making through knowledge graph pattern reasoning and plan matching.
[0006] The flood intelligent dispatching system takes the real-time monitored and predicted water conditions in the river basin as input, and infers the water conditions in the river basin based on inference rules, and determines the flood dispatching plan of the river basin according to the dispatching target weight assignment.
[0007] The present invention also provides a computer device, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0008] Compared with the prior art, the present invention can at least achieve the following beneficial effects: (1) The present invention realizes flood intelligent dispatching auxiliary decision-making based on the dispatching business knowledge graph, and can provide dispatching decision suggestions with good real-time performance and high accuracy based on the water situation forecast of the river basin.
[0009] (2) The present invention can replace the manual scheme reasoning operation under normal reservoir operation and reduce the workload.
[0010] (3) The present invention can adopt an information management method based on a graph database to improve the storage efficiency of graph structure elements such as nodes, edges and attributes, thereby ensuring the security and reliability of data storage. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 It is a flood scheduling knowledge graph application technology roadmap provided by an embodiment of the present invention.
[0012] Figure 2 It is a structural diagram of the scheduling business knowledge graph in an embodiment of the present invention.
[0013] Figure 3 Schematic diagram of knowledge fusion result in an embodiment of the present invention.
[0014] Figure 4 It is a schematic diagram of basin water regime simulation in an embodiment of the present invention.
[0015] Figure 5 It is a logical diagram for generating scheduling decision suggestions in an embodiment of the present invention.
[0016] Figure 6 Schematic diagram of cumulative distance calculation of dynamic time warping in an embodiment of the present invention.
[0017] Figure 7 It is a composition logic diagram of the flood dispatch rule base in the embodiment of the present invention.
[0018] Figure 8 It is a logical diagram for generating scheduling decision suggestions in an embodiment of the present invention.
[0019] Fig. 9 Schematic diagram of PCA dimensionality reduction for clustering flood cases in an embodiment of the present invention.
[0020] Fig.10 Schematic diagram of text sequence annotation in an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not limited to the present invention.
[0022] See also Figure 1 , a flood intelligent dispatching decision method based on a dispatching business knowledge graph provided by an embodiment of the present invention comprises the following steps: Step S1, establishing a flood dispatching business knowledge graph. The flood dispatching business knowledge graph includes a flood dispatching logic knowledge graph and a flood dispatching case knowledge graph, wherein the flood dispatching case knowledge graph includes flood cases and flood dispatching plans corresponding to each flood case.
[0023] This step conducts knowledge mining by extracting knowledge from flood dispatch text data and sequence data to form a dispatch business knowledge graph. It specifically includes the following sub-steps: Step S11, first collect the data required to construct the knowledge graph. The data is divided into structured data, unstructured and semi-structured data according to the degree of structuring; divided into dynamic data and static data according to whether the data is received in real time; and divided into text data and sequence data according to the data format.
[0024] The flood dispatch logic knowledge graph is mainly constructed based on static text data, and the flood dispatch case knowledge graph is mainly constructed based on dynamic text data and sequence data received in real time.
[0025] In one embodiment of the present invention, structured data includes structured texts such as hydrological forecast data, emergency plans and scheduling plans; unstructured and semi-structured data include text data such as flood scheduling procedures and early warning logic.
[0026] The text data includes but is not limited to flood dispatching procedures, water and rainfall information and gate operation instructions, and the sequence data includes but is not limited to hydrological forecast data, gate opening and closing history and water situation point table, as shown in Table 1.
[0027] Table 1
[0028] Step S12: Use regular expressions and pre-trained language models to extract entities and relationships from structured, unstructured and semi-structured raw data, classify the entities, and establish head entity-relationship-tail entity triples; construct a knowledge graph pattern layer; import the head entity-relationship-tail entity triples into the knowledge graph pattern layer to obtain a flood dispatching business knowledge graph.
[0029] (1) For structured data and semi-structured data, regular expressions are used to extract entities, as follows: Entity labels such as river basins, hydrological elements and scheduling plans are proposed, and the data is processed in a predefined format with "label-content" as the main form. For each different entity, such as flood scheduling objects such as gates and flows, different labels are assigned in the form of prefixes to extract key entities. For example, in one of the embodiments of the present invention, for the original text "Beipanjiang River Basin Level I Warning Conditions: Heavy rains occur in the basin or the cumulative rainfall reaches 5mm, and the Shannipo Reservoir predicts a maximum inflow of 300m³ / s~500m³ / s", the result example of knowledge extraction using the above method is shown in Table 2. Different categories of text are extracted according to predefined codes and standardized according to predefined formats.
[0030] Table 2
[0031] (2) For unstructured data, entity extraction is performed by combining manual annotation with a pre-trained language model, as follows: Based on the pre-divided entity tags, the original text is converted into original tags through the BIO sequence tagging method, with "B"--the beginning of a noun phrase, "I"--the middle of a noun phrase and "O"--a non-noun phrase as the tag prefix, and the suffix--the named entity tag category together to form a joint tag. The Label-Studio sequence tagging component is used to tag part of the text to form a pre-annotated sequence, such as Fig.10 shown.
[0032] The pre-trained language model uses the Bert-BiLSTM model and combines the multi-head attention mechanism to recognize the processed pre-labeled sequence. The multi-head attention mechanism (MultiHeadAttention, MHA) is used to process sequence data and embed the sequence data into words to obtain an embedding vector , is the number of original word vectors, and the embedded vectors are pooled in parallel. Each output of the attention pooling is called a head, and the pooling result is expressed as: ; in, , are learnable parameters, i.e., the heads of attention, respectively Multiply to get the query vector , key vector Sum value vector , Represents the attention pooling function, where the query vector Sequentially with the key vector Sum value vector Compute the dot product and normalize. All embedding vectors and Group learning parameters After multiplication, the concatenated result is obtained and stored in the real number set middle: ; In one embodiment of the present invention, the extracted entity conditions are shown in Table 3.
[0033] Table 3
[0034] (3) After completing knowledge extraction, the extracted entities are further fused to correct the entity classification results.
[0035] The TF-IDF weighted technology is used to construct feature vectors to evaluate the similarity of word meanings in the text. TF stands for word frequency, which is the frequency of keywords appearing in the text, and IDF stands for inverse document frequency. Different text entities are classified according to the distribution of these two parameters in the text. The frequency and distribution of words in the text are taken into account, which can be used to evaluate the importance of different professional terms in the document. The word frequency of a single document and reverse file frequency The calculation method is as follows: ; ; If TF-IDF is extended to several documents, the above formula is equivalent to: ; ; Where: Indicates the term In the documentation The number of times it appears in Representation Document The sum of the number of occurrences of all words in ; Indicates the number of dictionaries in the document; Representation Document contains the target word Number of dictionaries ; Indicates a category Chinese entries Number of occurrences; Indicates a category The number of all words in ; Representation Document Contains the target term Number of dictionaries .
[0036] When performing knowledge fusion, first build a list of all words marked as entities, ensure that each entity is regarded as an independent "sentence", build a word frequency table through word segmentation, paragraph weighting and other processes, and then input the TF-IDF model to vectorize each entity and map the entity's features into the vector space. Please refer to Figure 3 The position of each vector in the vector space represents the characteristics of the entity, and the distance between vectors can reflect the similarity between entities. By dividing similar vectors into different groups according to the distance threshold, the entity classification can be completed.
[0037] The embodiment of the present invention extracts entities and relationships from data through knowledge extraction and knowledge fusion.
[0038] (4) After obtaining the structured entities and relationships, the nodes and relationships of the knowledge graph are constructed according to the triples and finally stored in the graph database to form a knowledge graph for flood dispatching business.
[0039] See also Figure 2 The knowledge graph constructed includes four layers: pattern layer, data layer, technology layer and application layer. It is constructed in a top-down and bottom-up manner. The method in the technology layer is used to extract entities and relationships from structured, semi-structured and unstructured data to form the data layer. The conceptual model is designed from the aspects of hierarchy, entity type and attribute, and the relationship between entities to complete the knowledge modeling. The pattern layer is the architecture composed of various water conservancy entities, attributes and their relationships. The extracted entity and relationship triples are imported into the neo4j database in the form of nested dictionaries, and the flood dispatch logic knowledge graph and flood dispatch case knowledge graph are constructed based on the corresponding pattern layer.
[0040] Step S2, flood dispatching rule parsing phase, establishes a flood dispatching rule base, and the rules in the flood dispatching rule base are stored in the knowledge graph embedding layer in the form of attribute vectors.
[0041] The establishment of flood dispatch rule base includes the following steps: Step S21, determine flood dispatch analysis rules.
[0042] Based on relevant hydrological, meteorological, water resources data, and text data, according to the spatial topological connection and dispatch response relationship between flood protection objects, control sites, and water conservancy projects in different flood control scenarios (flow levels, water levels, etc.), and based on the dispatch measures in the flood dispatch regulations, the flood dispatch analysis rules are determined according to the structure of "flood case-dispatch conditions-dispatch plan-dispatch effect". The flood case mainly clarifies the characteristics and situation of the flood control site, the dispatch target mainly clarifies the control threshold of the target object, and the dispatch plan mainly clarifies the dispatch measures, including the dispatched project combination, activation time, and reservoir storage and discharge methods. The dispatch effect is defined as an evaluation indicator for the implementation of the plan.
[0043] Step S22: Establish a candidate rule set, and obtain an available rule set based on the candidate rule set.
[0044] Step S221: Process the dispatching conditions in the flood dispatching analysis and judgment rules to obtain the dispatching conditions of discrete intervals, embed the attribute vectors through the flood dispatching business knowledge graph, perform entity splicing according to the mapping relationship between the dispatching conditions and the flood dispatching scheme, and construct a candidate rule set. , is the number of available rules in the candidate rule set in order to find a correct scheduling implementation plan. The structure of each rule is "premise-conclusion".
[0045] Step S222: Use a relaxed matching method to perform fuzzy matching on the rules in the candidate rule set, and screen out an available rule set.
[0046] According to the input water and rainfall conditions and other preconditions and flood dispatching analysis rules, fuzzy matching is performed to find the flood dispatching analysis rules whose premises match the facts or are closest to them, forming an available rule set of "premise-conclusion" structure.
[0047] The relaxed matching method is used to construct a flood scheduling knowledge graph reasoning mechanism. The flood scheduling knowledge connection is established with the coordination mechanism of "flood case-scheduling condition-scheduling plan-scheduling effect". The flood scheduling plan can be obtained later through graph pattern reasoning.
[0048] Wherein, the steps of the relaxation matching method include: If the candidate rule set Middle The premise of this rule is: , , , the conclusion is: , is the number of candidate rules, the premise is the input feature of flood dispatch decision, assuming the premise , , The corresponding facts are: the measured or predicted inflow into the reservoir , Interval traffic and reservoir water level , the fact comes from the flood case, then the rule weight is calculated as follows: First calculate the difference between the fact and the rule premise: ; ; ; Filter the maximum difference of each group of parameters: ; ; ; According to the above results, the distance between the fact and the premise of the rule is calculated as follows: : ; If the following conditions are met, the rule is a candidate rule: ; ; ; in, , , is a conditional threshold value, which is set based on experience. In one embodiment of the present invention, the water level on the dam is used as the fact , based on the flood limit water level , is the difference between the current water level and the flood limit water level, exist Take the value within the range; take the output of the hydropower station as the fact , based on the load curve , is the difference between the current output and the value at the corresponding moment of the load curve, exist The value is within the range; the reservoir outflow is taken as the fact , with downstream safety discharge flow as a prerequisite , exist The value is within the range.
[0049] The available rule set is formed according to the following rules. The size of the available rule set Select according to scheduling requirements.
[0050] I. When the number of candidate rules that meet the conditions is less than If there are , all candidate rules are put into the available rule set; II. When the number of candidate rules that meet the conditions is greater than The one with the smallest distance The candidate rules are placed into the set of available rules.
[0051] Step S23: assign weights to each rule in the available rule set to obtain the weight coefficients of each rule, form a flood scheduling rule base based on the available rule set and the weight coefficients corresponding to each rule in the available rule set, and store the rules in the flood scheduling rule base in the form of attribute vectors in the flood scheduling business knowledge graph embedding layer.
[0052] Calculate the distance between the premise and the fact of each rule in the available rule set, and assign weights to each rule based on the distance. The smaller the distance between the premise and the fact, the greater the weight coefficient of the corresponding rule, and the greater the proportion of its conclusion in the reasoning; conversely, the smaller the proportion.
[0053] Among them, when assigning weights, the weight coefficients corresponding to each rule are ,in( ): ; Normalize again and get: ; In one embodiment of the present invention, =5.
[0054] See also Figure 7 The flood dispatch rule library takes each reservoir as the basic component unit, determines the start time according to the upstream and downstream conditions of the reservoir and the dispatch requirements, determines the dispatch mode according to reference conditions such as water level and flow, and dispatch measures, and controls variables and values.
[0055] Step S3: Map the knowledge and rules to the flood dispatching business knowledge graph and instantiate them to build a flood dispatching centralized control business model. The flood dispatching centralized control business model includes a similarity model, an outlier diagnosis model and a flood intelligent dispatching question and answer model.
[0056] The similarity model is used to calculate the similarity of the concept features, element features and temporal features of flood cases and output the comprehensive similarity of attributes between flood cases; The outlier diagnosis model is used to diagnose and correct outliers in the flood case time series, and output the corrected flood case time series; The flood intelligent scheduling question-answering model is used to obtain information from the flood scheduling business knowledge graph based on the statements input by the user and return it to the user. When building the model, structured data and logic are mapped to instances based on flood dispatch analysis rules.
[0057] Step S31, the concept feature is the corresponding description of the characteristic index of the flood case obtained in the dispatching procedure. The attributes of this part of the concept feature include numerical values, words, short texts, etc., to comprehensively describe the different attributes of the concepts of various aspects of the flood case. According to the characteristics of this type of attribute description, the similarity calculation method for short texts is used to obtain the similarity of short texts; for numerical attributes, the traditional similarity calculation model is used to calculate to obtain the similarity of numerical values; for word attributes, the cosine similarity calculation is used to obtain the similarity of words. Through the above calculation, the similarity of different types of attributes can be obtained.
[0058] Among them, the similarity calculation method for short text is: Remove stop words, special characters and numbers, and perform word segmentation on the short text, and divide it into two word sets and , the word set sizes are , , respectively defined as: , ; in, and are the words in the word set, , .
[0059] Use the Word2vec word vector model to vectorize words, and use cosine similarity to calculate the similarity between words to obtain the similarity matrix of the word set. : ; Using the similarity matrix of the word set, the similarity between words is calculated , firstly, the similarity matrix Traverse each row and find the maximum similarity value , add to collection Then keep the corresponding Repeat the above two steps until the set The last similarity vector in , get the set of each similarity , ,……, , the collection Add the similarities in and normalize them to get the similarity of the short text. The formula is as follows: ; Where: is the similarity of short texts; and are two words selected from the short text; is the number of iterations; For collection The elements in .
[0060] By calculating the similarity of each short text and then weighting it, we can get the short text similarity of a single flood case. The calculation formula is as follows: ; In the formula, is the short text similarity of the flood case, is the number of similarities of short texts, Represents the semantic similarity between target short texts in flood cases, weight The sum is 1, which is generally set by experts based on experience. In one embodiment of the present invention, based on the distribution interval of similarity, The weights are calculated by iterative adjustment.
[0061] The calculation methods for numerical and word similarity are the same as above, as follows: ; ; In the formula, is the similarity of the values, is the similarity of words, and are the weights of numerical values and words respectively. The selection principle is the same as that of short text. and are the number of similarities of numerical values and words respectively; , They are the similarities of a single value and a word, calculated by the traditional similarity model and the cosine similarity model, respectively.
[0062] Attribute similarity based on the above concept features , the comprehensive similarity of attributes between flood cases is calculated according to the following formula: : ; The element characteristics include a series of parameters that characterize the characteristics of the flood process. In one embodiment of the present invention, the parameters in the element characteristics are shown in Table 4.
[0063] Table 4
[0064] in: is the flood duration, h; is the net rainfall, mm; is the number of rainfall stations; is the weight of the rainfall station; is the measured value at the rainfall station, mm; is the flood peak time point, h; is the total flow rate, m³; and are the end and start time of the flood, respectively, h; and are the time of flood rise and fall respectively; is the peak time, h; is the average flood flow, m³ / s.
[0065] For the feature features, the Kmeans method is used for cluster analysis to generate feature vectors, which are then reduced to a three-dimensional space including the first principal component, the second principal component, and the third principal component through PCA. Fig. 9, the distance of the characteristic vector of the feature feature in the three-dimensional space can represent the similarity of the feature feature. Based on the similarity of the feature feature, the flood cases in the three-dimensional space are divided into three clusters. The first cluster corresponds to the first type of flood, the second cluster corresponds to the second type of flood, and the third cluster corresponds to the third type of flood. In one embodiment of the present invention, for the first type of flood, its flood duration (DU) index is small, while the flood speed (Inr) and flood decline speed (Der) are large. It is a small flood with steep rise and fall, called "sharp and thin type", with a total of 930 cases, accounting for 93.47% of the total flood cases; for the second type of flood, the high flood peak accounts for a large proportion, and has a small flood peak time skewness (FT), the reservoir storage capacity is long, and the cycle of storage and release is mainly the flood when the reservoir is stored before the flood season, called "short and fat type", with a total of 14 cases, accounting for 1.41% of the total; for the third type of flood, its flood duration is long, the total flood volume and flood peak flow are large, and it belongs to a large flood with a long period, with a total of 51 cases, accounting for 5.12% of the total.
[0066] See also Figure 5 , time series features (time series features) include aggregate features, historical features, and composite features, which are evaluated using Dynamic Time Wrapping (DTW). Figure 6 , select flood cases from the flood dispatch case knowledge graph and match them with the target flood cases composed of real-time water and rainfall conditions, and construct a two-dimensional cumulative distance matrix. The rows and columns of the cumulative distance matrix correspond to each point in the time series of the selected flood cases and the target flood cases, respectively. Each group of elements in the cumulative distance matrix represents the cumulative distance from the starting point of the time series to the current point. According to continuity and monotonicity, find the best matching path under constraints so that the time series of the flood case and the target flood case are bent to match each other. Each matrix element in the cumulative distance matrix Represents two elements in a time series and Alignment, through iterative matching to plan the path, get a path with the minimum cumulative distance, its expression is shown in the following formula: ; Where: is the corrected flood duration, indicating the flood case and target flood cases Time series; , are the elements in the flood case time series and the target flood case time series; Indicates the matching path of each segment; is the number of path segments; is the minimum cumulative distance calculated.
[0067] The cumulative distance is shown in the following formula, which is used to evaluate the similarity between two time series. The smaller the cumulative distance, the greater the similarity.
[0068] ; Where: It represents the cumulative distance calculated based on the flood case time series and the target flood case time series, that is, the similarity of the time series features. Represents a curved path through several nodes in a matrix grid; Represents the cumulative distance between adjacent nodes.
[0069] Step S32: The outlier diagnosis model diagnoses and corrects outliers in the flood case time series through a time series prediction algorithm, and outputs the corrected flood case time series.
[0070] In one embodiment of the present invention, the time series prediction algorithm adopts any one or more of KNN, IsolationForest (IF), and HBOS.
[0071] In one embodiment of the present invention, the pyod platform is used to simulate flood cases with time series prediction algorithms KNN, Isolation Forest (IF), and HBOS, and single algorithm model parameter tuning is performed. Sklearnex is used as the engine, and the number of optimization rounds is 5. The Nash efficiency coefficient ( ), mean absolute error (MAE) and root mean square error (RMSE) are used as indicators to evaluate the prediction effect.
[0072] Among them, the Nash efficiency coefficient The calculation formula is: ; In the formula, Indicates the number of data sets, , , are the observed value, predicted value and average observed value of runoff respectively.
[0073] The prediction results are shown in Table 5.
[0074] Table 5
[0075] From the perspective of prediction accuracy, the prediction effect of the second type of flood is better in the three algorithm models; HBOS predicts the first type of flood better; while the detection effect of the third type of flood is poor, mainly because the sample size of this type of flood is small, and there are still some autocorrelations and features that have not been fully mined. Taking the above results into consideration, in the outlier diagnosis model, the HBOS algorithm is used for diagnosis and correction for the first and second type of floods; and the KNN algorithm is used for diagnosis and correction for the third type of floods.
[0076] The outlier diagnosis model can realize functions such as hydrological monitoring data abnormality alarm, over-threshold warning, and data tracking reminder.
[0077] Step S33: construct a flood intelligent scheduling question-answering model by adopting a knowledge question-answering method based on a question-answering rule dictionary and template.
[0078] The hydrological question-and-answer corpus is collected through the Internet, combined with texts such as flood dispatch regulations and emergency plans, and question-and-answer pairs are constructed through a predefined format to form a question-and-answer rule dictionary.
[0079] First, the sentence input by the user is processed by word segmentation and stop word removal, and then input into a pre-trained language model (such as the Bert-BiLSTM model) for entity recognition. Based on the template in the question-answer rule dictionary, the intention recognition is completed according to the question triple of "question question-question entity-question template", and the corresponding question-answer template is matched; if the corresponding question-answer template is not matched, the lightweight text data parsed in step S1 is used to form a text library, and a word embedding model is used to perform similarity analysis on the recognized entity and the corpus in the question-answer rule dictionary, and the corresponding entity is matched based on the similarity, and then the attributes of the entity are filled in the question-answer template, and the answer is generated and returned to the user. The question-answer record is processed to form a corpus and stored in the question-answer rule dictionary. Step S4: Using the C / S architecture, the flood dispatching rule base, the flood dispatching business knowledge graph, the flood dispatching model and the flood dispatching centralized control business model are integrated to obtain a flood intelligent dispatching system.
[0080] The flood dispatch rule base, flood dispatch centralized control business model, and dispatch business knowledge graph are deployed locally and encapsulated to form a local system; the flood dispatch model is remotely deployed on the water situation platform and encapsulated to form a business platform; the local system and the business platform use the HTTP protocol in combination with the FLASK API to exchange information between different services, and then visualize them in the local system to assist in flood dispatch decision-making. Among them, according to different knowledge representation requirements, chart visualization and text visualization can be performed. Specifically, the real-time rendering of the pushed information can be completed and visualized on the Echarts and react front-end frameworks respectively. The "parameter separation and object decoupling" method is adopted to encapsulate the model through a standardized interface, which can improve the model's ability to process information in large-sample, high-dimensional and multi-objective dispatch calculation scenarios.
[0081] The local system recognizes user intentions and provides simple text information such as real-time water conditions, scheduling procedures, and operating plans for decision makers' reference; the business platform regularly generates real-time water situation forecasts, plan push and other data stream information based on fixed templates, which can monitor the water conditions of cascade power stations in the basin and assist decision makers in flood scheduling.
[0082] The local system is mainly responsible for receiving user statements and flood dispatch plans and water situation forecast results transmitted by the business platform, providing data input for the internal flood dispatch centralized control business model, and storing historical information after the workflow is completed.
[0083] The business platform receives static knowledge from the outside world and instantiates a flood dispatch model, which returns real-time processed information such as flood dispatch plans and water situation forecast results based on the input real-time water situation data. In one embodiment of the present invention, the static knowledge includes hydrological and meteorological data, water situation warning information, flood forecast data, and engineering design parameters.
[0084] When the flood intelligent dispatching system is working, the business platform regularly obtains real-time data streams through the water situation platform, returns to the local system for anomaly detection and correction of real-time data, returns the anomaly detection and correction results to the business platform, generates a flood dispatching plan through the flood dispatching model, and then sends the flood dispatching plan to the local specified domain name, and completes real-time chart rendering and visualization operations on the local system; the flood intelligent dispatching question and answer model receives information from the user operation interface of the local system, generates answers and returns them to the user.
[0085] The encapsulated local system includes the flood dispatching business knowledge graph, the flood dispatching centralized control business model, the knowledge storage module and the Echarts front-end framework. The various parts exchange information and work together through the FLASK API service.
[0086] The encapsulated local system includes a knowledge storage module, a model storage module and an Echarts front end. The knowledge storage module is used to store the flood dispatching business knowledge graph and the flood dispatching scheme and water situation forecast results transmitted by the business platform, and provide knowledge storage services; the model storage module is used to carry the flood dispatching centralized control business model, regularly receive the water situation forecast results of the business platform, and provide model calculation services; based on the Django framework, the Echarts drawing component is introduced to form the Echarts front end to provide data visualization services.
[0087] In one embodiment of the present invention, when the local system is running, the Scheduler module performs regular tasks. The Scheduler module obtains real-time hydrological forecast data from the water situation platform at regular intervals, cleans and corrects the hydrological forecast data through the outlier diagnosis model, inputs the corrected hydrological forecast data into the similarity model to calculate the comprehensive similarity of attributes between flood cases, so as to match the flood cases in the flood scheduling case knowledge graph, and according to the matching results, queries the corresponding flood scheduling plan in the flood scheduling case knowledge graph and returns it to the front end, imports it into the drawing component to generate a chart and renders it on the page. Step S5: Flood dispatching auxiliary decision-making. The flood intelligent dispatching system outputs a flood dispatching plan for decision-making through knowledge graph pattern reasoning and plan matching.
[0088] The intelligent flood dispatching system simulates water dispatching for different scenarios, optimizes flood dispatching plans, and conducts performance evaluation on implemented technical plans to assist in flood dispatching decision-making.
[0089] This step includes the following sub-steps: Step S51: In the flood intelligent dispatching system, graph pattern reasoning is performed based on the flood dispatching business knowledge graph to obtain a flood dispatching plan; the attribute comprehensive similarity between the real-time water conditions and the flood cases in the flood dispatching case knowledge graph is calculated through a similarity model, and matching flood cases are screened in the flood dispatching case knowledge graph according to the attribute comprehensive similarity, and then the flood dispatching plan corresponding to the flood case is obtained; the flood dispatching model uses the basin water conditions monitored and predicted in real time as input, and reasons about the basin water conditions based on each rule in the available rule set, and generates a flood dispatching plan and water condition prediction results corresponding to each rule; Step S52: input the flood dispatching scheme obtained by graph pattern reasoning and the flood dispatching scheme obtained by similarity model matching into the flood dispatching business knowledge graph embedding layer, obtain the corresponding rules through vector similarity matching, and input the two flood dispatching schemes into the flood dispatching model to obtain the corresponding water situation forecast results; Step S53: Take each group of water situation prediction results in step S51 and step S52 as facts, calculate the distance between each group of water situation prediction results and the premise of the corresponding rule, calculate the weight coefficient based on the obtained distances, take the weight coefficient as the decision score, and the user selects the final flood dispatching plan according to the decision score. The above information is analyzed in combination with the dispatching target, and the corresponding decision suggestions are generated according to the "precondition"-"dispatching measures"-"dispatching target" mode for the basin water situation monitored and predicted in real time, the selected flood dispatching plan, and the water situation prediction results.
[0090] The flood scheduling model takes the real-time monitored and predicted water conditions in the river basin as input, infers the water conditions in the river basin based on the rules in the available rule set, and generates flood scheduling plans and water condition prediction results corresponding to each rule. The flood scheduling model adopts a flood hydrological element management method based on the deduction of river basin water conditions, generalizes the real-time data stream in the flood evolution into a continuously updated queue, simulates and predicts the river basin scheduling situation through the insertion and automatic access of the queue, and outputs the water condition prediction results.
[0091] The flood hydrological element management method based on basin water regime deduction is as follows: Queues are used as calculation units that carry sequence data. Queues include multiple time blocks, each of which contains a time and a value corresponding to the time. For example, for an inflow queue, the queue includes multiple lists containing inflows. The refresh of the reservoir status depends on the water balance formula. The change in reservoir capacity is calculated based on the difference between the inflow and outflow at a certain moment, and then the current water level of the reservoir is solved based on the reservoir capacity curve. Factors that affect inflow and outflow are stored in the queue manager in the form of queues.
[0092] The queues mainly include the following types: gate opening queue, discharge flow queue, power generation load queue, and forecast inflow flow queue.
[0093] The gate opening queue is set manually or by the automatic scheme generation function. The time block consists of time and the opening of each gate. When the queue management does not include a determined discharge flow queue, the current discharge flow is calculated after each time refresh step based on the gate opening queue.
[0094] After the calculation step is set, each refresh will increase the calculation step of the current time of each hydropower station, and then the queue manager will detect which time blocks should be read out for refreshing the reservoir status. Based on the topological relationship of the cascade hydropower stations in the basin, the flood evolution process is simulated through the four arithmetic operations of the queue. The use of queues to manage hydrological elements and the simulation of basin flood evolution through the four arithmetic operations of the queue can meet the needs of real-time calculation and dynamic update.
[0095] See also Figure 4The update method of the calculation unit is: start from the current time node and calculate backward, refresh the data every fifteen minutes or the time length specified by the calculation step, assign the outflow of each calculation unit to the next calculation unit, and record the current status of each reservoir unit and calculation unit after completing a refresh according to the inflow of the calculation unit and the river section corresponding to the calculation unit. And so on, until all deductions are completed, return the time series data containing the status of each reservoir at each time node.
[0096] The flood hydrological element management method is based on a series of static deduction queues. According to the current inflow and outflow of the basin, combined with forecast data, the water level change of the basin within a certain time range is inferred. The basin is divided into different deduction units. It is expressed as: ; In the formula, , are the total flood simulation duration and calculation step length respectively.
[0097] The method of reasoning the knowledge graph pattern in step S4 is to obtain a matching pattern from the scheduling business knowledge graph. The pattern is a template that includes group entities, relationships, and attributes. These patterns can be used to represent specific knowledge or queries. Knowledge graph pattern reasoning includes pattern extraction and pattern matching.
[0098] (1) Pattern extraction The water information is input into the word embedding model, and the fuzzy matching method is used to extract the flood dispatching business knowledge graph ( ) as the vertices to be searched, and then the depth-first search (DFS) algorithm is used to expand from the vertices downwards to obtain all subgraphs ( ): ; In the formula, is the size threshold of the subgraph, and all subgraphs smaller than the threshold are retained.
[0099] (2) Pattern matching Based on the basic search instructions in neo4j such as Create, Delete, Set, Match, Where and Index, predefined expressions are combined to query the information of target nodes and edges in the above subgraph.
[0100] According to the above query information, the flood dispatch plan is obtained by sorting it out based on the templates stored in the question-answer rule dictionary.
[0101] Flood dispatching plans, warning information formats, etc. are stored in the flood dispatching business knowledge graph; model parameter classes include design flood levels and reservoir water level curves, etc., which are stored in model instances; plan results classes include flood dispatching plans and water situation forecast results, etc., which are stored in json fields.
[0102] In one embodiment of the present invention, a computer device is further provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in the above embodiment.
[0103] The embodiment of the present invention can use a method combining batch processing and HTTP microservices to complete data receiving, processing and pushing operations. The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined in the present invention may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown in the present invention, but will conform to the widest scope consistent with the principles and novel features disclosed in the present invention.
Claims
1. A flood intelligent dispatching decision-making method based on dispatching business knowledge graph, characterized in that: The following steps are involved: Extract knowledge from text data and sequence data related to flood dispatching and establish a knowledge graph for flood dispatching business; Determine the flood dispatching judgment rules, and establish a flood dispatching rule base based on the flood dispatching judgment rules and the flood dispatching business knowledge graph, and the rules in the flood dispatching rule base are stored in the flood dispatching business knowledge graph embedding layer in the form of attribute vectors; Construct a flood dispatching and centralized control business model, including a similarity model, an outlier diagnosis model, and a flood intelligent dispatching question-answering model. The similarity model is used to calculate and output the comprehensive similarity of attributes between flood cases; the outlier diagnosis model is used to diagnose and correct outliers in the flood case time series, and output the corrected flood case time series; the flood intelligent dispatching question-answering model is used to obtain information from the flood dispatching business knowledge graph based on the user input statement and return it to the user; Integrate the flood dispatch model, flood dispatch rule base, flood dispatch business knowledge graph and flood dispatch centralized control business model to form a flood intelligent dispatch system; The intelligent flood dispatching system outputs flood dispatching plans for decision-making through knowledge graph pattern reasoning and plan matching.
2. The flood intelligent dispatching decision-making method based on the dispatching business knowledge graph according to claim 1 is characterized in that: The steps to build a knowledge graph for flood dispatching business include: Obtain text data and sequence data related to flood dispatch; Use regular expressions and pre-trained language models to extract entities and relations, classify entities, and establish head entity-relationship-tail entity triples; Build the knowledge graph model layer; Import the head entity-relationship-tail entity triples into the knowledge graph pattern layer to obtain the flood dispatch business knowledge graph.
3. The flood intelligent dispatching decision-making method based on the dispatching business knowledge graph according to claim 2 is characterized in that: When performing entity extraction, for structured data and semi-structured data, regular expressions are used to extract entities. For unstructured data, manual annotation combined with pre-trained language models are used to extract entities to obtain entity classification results.
4. The flood intelligent dispatching decision-making method based on the dispatching business knowledge graph according to claim 2 is characterized in that: After entity extraction, knowledge fusion is performed on the extracted entities to correct the entity classification results.
5. The flood intelligent dispatching decision-making method based on the dispatching business knowledge graph according to claim 1 is characterized in that: The flood dispatching rule base is established, and the rules in the flood dispatching rule base are stored in the form of attribute vectors in the flood dispatching business knowledge graph embedding layer, including: Based on relevant hydrological, meteorological, water resources data and text data, according to the spatial topological connection and dispatch response relationship between flood protection objects, control sites and water conservancy projects in different flood control scenarios, based on the dispatch measures in the flood dispatch regulations, the flood dispatch analysis rules are determined according to the structure of "flood case-dispatching condition-dispatching plan-dispatching effect"; Based on the flood dispatching analysis rules and the flood dispatching business knowledge graph, a candidate rule set is established, and an available rule set is obtained based on the candidate rule set; Assign weights to each rule in the available rule set to obtain the weight coefficients of each rule. A flood scheduling rule base is formed based on the available rule set and the weight coefficients corresponding to each rule in the available rule set. The rules in the flood scheduling rule base are stored in the flood scheduling business knowledge graph embedding layer in the form of attribute vectors.
6. The flood intelligent dispatching decision-making method based on the dispatching business knowledge graph according to claim 5 is characterized in that: The method of establishing a candidate rule set based on the flood dispatching judgment rules and the flood dispatching business knowledge graph and obtaining an available rule set based on the candidate rule set includes: The dispatching conditions in the flood dispatching analysis rules are processed to obtain the dispatching conditions in discrete intervals. The attribute vector is generated by embedding the flood dispatching business knowledge graph. The entity splicing is performed according to the mapping relationship between the dispatching conditions and the flood dispatching scheme to construct a candidate rule set. Perform fuzzy matching on the rules in the candidate rule set and filter out the available rule set.
7. The flood intelligent dispatching decision-making method based on the dispatching business knowledge graph according to claim 1 is characterized in that: When integrating the flood dispatch model, flood dispatch rule base, flood dispatch business knowledge graph and flood dispatch centralized control business model, the flood dispatch rule base, flood dispatch centralized control business model and dispatch business knowledge graph are deployed locally and encapsulated to form a local system; The flood dispatch model is remotely deployed on the water situation platform and encapsulated to form a business platform; Information is exchanged between the local system and the business platform and visualized in the local system.
8. The flood intelligent dispatching decision-making method based on the dispatching business knowledge graph according to claim 7 is characterized in that: The business platform regularly obtains real-time data streams through the water situation platform, returns them to the local system for anomaly detection and correction of real-time data, returns the anomaly detection and correction results to the business platform, generates a flood scheduling plan through the flood scheduling model, and then sends the flood scheduling plan to the local system, where real-time chart rendering and visualization operations are performed; the flood intelligent scheduling question and answer model receives information from the user operation interface of the local system, generates answers and returns them to the user.
9. The flood intelligent dispatching decision-making method based on the dispatching business knowledge graph according to any one of claims 1 to 8, characterized in that: The flood intelligent dispatching system outputs a flood dispatching plan for decision-making through knowledge graph pattern reasoning and plan matching, including: Based on the flood dispatching business knowledge graph, graph pattern reasoning is performed to obtain the flood dispatching plan; the comprehensive similarity of attributes between the real-time water conditions and the flood cases in the flood dispatching case knowledge graph is calculated through the similarity model, and matching flood cases are screened in the flood dispatching case knowledge graph according to the comprehensive similarity of attributes, and then the flood dispatching plan corresponding to the flood case is obtained; the flood dispatching model uses the basin water conditions monitored and predicted in real time as input, and reasons about the basin water conditions based on each rule in the available rule set, and generates the flood dispatching plan and water condition prediction results corresponding to each rule; The flood scheduling scheme obtained by graph pattern reasoning and the flood scheduling scheme obtained by similarity model matching are input into the flood scheduling business knowledge graph embedding layer, and the corresponding rules are obtained through vector similarity matching. The two flood scheduling schemes are input into the flood scheduling model to obtain the corresponding water situation forecast results. Each set of water situation forecast results is taken as a fact, and the distance between each set of water situation forecast results and the premise of the corresponding rule is calculated. The weight coefficient is calculated based on the obtained distances, and the weight coefficient is used as the decision score. The final flood scheduling plan is selected according to the decision score.
10. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of any one of claims 1-9.
Citation Information
Patent Citations
Decision support system architecture and method based on water conservancy knowledge-fact coupling network
CN111368095A
Flood control dispatching knowledge graph construction method
CN114510583A
Intelligent flood control scheduling rule recommendation method and device based on knowledge graph
CN116739259A
Cited By
Reservoir group scheduling method, device and equipment based on intelligent agent and storage medium
CN121073062A
Multi-mode intelligent monitoring method and device in water affair field
CN121354007A