Hydrological forecast model recommendation method and device based on knowledge graph
By constructing a hydrological forecast knowledge graph and searching using CYPHER query language, the problem that traditional methods are difficult to accurately recommend hydrological models is solved, efficient and accurate hydrological model recommendations are achieved, and the accuracy and efficiency of hydrological forecasts are improved.
Patent Information
- Application Number
- CN202411328803.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-09-24
AI Technical Summary
Traditional hydrological model recommendation methods are difficult to accurately find hydrological models suitable for a certain river basin, and cannot meet the complex and changeable hydrological forecasting needs.
Using a knowledge graph-based method, we will collect and process the full text information of historical hydrological forecast-related documents to build a hydrological forecast knowledge graph, and use CYPHER query language to search in the knowledge graph to find an algorithm model that matches the target information.
The efficiency, accuracy and scalability of model recommendations are achieved, and the hydrological model suitable for a certain river basin can be accurately found, thereby improving the accuracy and efficiency of hydrological forecasts.
Smart Images

Figure CN118861323B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of hydrological forecasting, and more specifically, to a method and device for recommending a hydrological forecasting model based on a knowledge graph. Background Art
[0002] With the development of hydrological forecasting technology, hundreds of hydrological models have been proposed. Each hydrological model has its own advantages and disadvantages, and is therefore only applicable to a certain type of river basin with common characteristics. Traditional model recommendation methods often rely on expert experience or simple data matching, making it difficult to accurately find a hydrological model suitable for a certain river basin and unable to meet the complex and changing needs of hydrological forecasting. Summary of the invention
[0003] The embodiments of the present application provide a method and device for recommending a hydrological forecast model based on a knowledge graph, aiming to solve the problem that traditional model recommendation methods are difficult to accurately find a hydrological model suitable for a certain river basin and cannot meet the complex and changeable hydrological forecast needs.
[0004] The first aspect of the embodiment of the present application provides a hydrological forecast model recommendation method based on a knowledge graph, comprising:
[0005] Collect full-text information of historical hydrological forecast-related literature;
[0006] Determine the hydrological forecast knowledge graph ontology layer, including: defining the ontology and determining the ontology relationship; the ontology includes: basic information of the basin, forecasting method, document name, input data and algorithm model;
[0007] Using natural language processing technology, performing entity recognition and relationship extraction on the full-text information to obtain entities and entity relationships;
[0008] Based on the hydrological forecast knowledge graph ontology layer, using Neo4j graph database technology, the entities and entity relationships are stored to construct a hydrological forecast knowledge graph;
[0009] Input the target information, use the CYPHER query language to search in the hydrological forecast knowledge graph, and find the algorithm model that matches the target information.
[0010] In an optional implementation, the use of natural language processing technology to perform entity recognition and relationship extraction on the full-text information to obtain entities and entity relationships includes:
[0011] Performing text cleaning on the full text information, including: removing HTML tags, punctuation marks and stop words;
[0012] Using the named entity recognition technology in the natural language processing technology, the cleaned text is subjected to entity recognition to obtain the entity; and the relationship of the entity is extracted to obtain the entity relationship.
[0013] In an optional implementation, the input target information is searched in the knowledge graph using the CYPHER query language to find an algorithm model matching the target information, including:
[0014] In a case where the target information is the basic information of the watershed and the forecasting method, searching for the input data and the algorithm model that match the target information;
[0015] In a case where the target information is the input data, the algorithm model matching the target information is searched.
[0016] In an optional implementation manner, the forecasting method includes: short-term forecasting, flood forecasting and medium- and long-term forecasting; when the target information is the basic information of the river basin and the forecasting method, searching for the input data and the algorithm model matching the target information includes:
[0017] When the target information is the basic information of the river basin and the forecasting method, and the forecasting method is the short-term forecast or the flood forecast, searching for the input data and the first type of algorithm model that match the target information;
[0018] When the target information is the basic information of the river basin and the forecasting method, and the forecasting method is the medium- and long-term forecast, the input data and the second type of algorithm model matching the target information are searched; the first type of algorithm model is different from the second type of algorithm model, and the second type of algorithm model includes a model based on a data-driven method.
[0019] In an optional implementation, after searching for the algorithm model matching the target information, the method further includes:
[0020] In the case that there are multiple algorithm models, the algorithm models are sorted according to the set first priority and second priority; the first priority is that the algorithm model has a corresponding forecasting method, and the higher the level of the algorithm model is; the second priority is that the more the number of input data corresponding to the algorithm model is, the higher the level of the algorithm model is.
[0021] In an optional implementation, the using of natural language processing technology to perform entity recognition and relationship extraction on the full-text information to obtain entities and entity relationships includes:
[0022] Using natural language processing technology, annotating the entities and entity relationships corresponding to the full-text information to obtain an annotated data set;
[0023] The data set is divided into a first training set, a first validation set and a first test set, and the model is trained and optimized by a BiLSTM-CRF algorithm to obtain a trained entity recognition model; the entity recognition model is used to perform entity recognition on new documents, and output entities and entity relationships corresponding to the new documents;
[0024] The entities and entity relationships corresponding to the new document are updated into the hydrological forecast knowledge graph.
[0025] In an optional implementation, the data set is divided into a first training set, a first validation set, and a first test set, and the model is trained and optimized by a BiLSTM-CRF algorithm to obtain a trained entity recognition model, including:
[0026] Randomly divide the data set into the first training set, the first validation set and the first test set according to a preset ratio;
[0027] Construct the model based on the BiLSTM-CRF algorithm, use the data in the first training set to train the model and optimize the model parameters; use the data in the first validation set to evaluate the model and adjust the model hyperparameters; use the data in the first test set to test the model, and obtain the trained entity recognition model when the accuracy of the recognition result of the model reaches a preset value.
[0028] In an optional implementation, the ontology further includes: instructions for use of the algorithm model and reference cases of the algorithm model; the input target information is searched in the hydrological forecast knowledge graph using the CYPHER query language to find the algorithm model matching the target information, including:
[0029] In the case where the target information is the basic information of the watershed and the forecasting method, searching for the input data, the algorithm model, the algorithm model usage instructions and the algorithm model reference case that match the target information;
[0030] When the target information is the input data, the algorithm model, the algorithm model usage instructions and the algorithm model reference case that match the target information are searched.
[0031] In an optional implementation, the collecting of full-text information of historical hydrological forecast-related documents includes:
[0032] The scientific and technological literature database is searched by keywords to collect and store the full text information of historical hydrological forecast related documents. The scientific and technological literature database includes: Chinese scientific and technological literature database and English scientific and technological literature database. The keywords include: hydrological forecast, hydrological model, flood forecast, hydrological forecast, hydrological model, floodforecast.
[0033] In an optional embodiment, the method further includes:
[0034] Extracting Chinese abstracts and English abstracts from the full-text information collected in the Chinese scientific literature database;
[0035] Perform word segmentation on the Chinese abstract and the English abstract respectively to obtain a Chinese and English abstract data set;
[0036] The Chinese and English abstract data sets are randomly divided into a second training set, a second validation set, and a second test set according to a preset ratio;
[0037] Based on the second training set, the second validation set, and the second test set, the Chinese abstract is used as a model input, and the English abstract corresponding to the Chinese abstract is used as a model output, training a Chinese-to-English translation model based on the Transformer algorithm;
[0038] The Chinese-English abstract data set is randomly divided into a third training set, a third validation set and a third test set according to the preset ratio, and the English abstract is used as a model input and the Chinese abstract corresponding to the English abstract is used as a model output, and an English-Chinese translation model based on the Transformer algorithm is trained;
[0039] The Chinese-to-English translation model and the English-to-Chinese translation model serve as Chinese-English conversion models.
[0040] In an optional embodiment, the method further includes:
[0041] Inputting Chinese target information, converting the Chinese target information into English target information through the Chinese-English conversion model, searching in the hydrological forecast knowledge graph using the CYPHER query language, and finding the algorithm model matching the Chinese target information;
[0042] Input English target information, convert the English target information into Chinese target information through the Chinese-English conversion model, use the CYPHER query language to search in the hydrological forecast knowledge graph, and find the algorithm model that matches the English target information.
[0043] In an optional implementation, determining the ontology relationship includes:
[0044] The basic information of the watershed, forecasting method, input data and algorithm model are respectively subordinate to the document name.
[0045] In an optional implementation, the use of Neo4j graph database technology to store the entities and the entity relationships to construct a hydrological forecast knowledge graph includes:
[0046] The entities and entity relationships are stored in a Neo4j graph database through a Py2neo library to construct the hydrological forecast knowledge graph; the Py2neo library is used to input data.
[0047] In an optional implementation, for an unfamiliar river basin, basic river basin information corresponding to the unfamiliar river basin is collected, and the forecast method is determined; the basic river basin information and the forecast method corresponding to the unfamiliar river basin are input, and the CYPHER query language is used to search in the hydrological forecast knowledge graph to find the input data and the algorithm model that match the basic river basin information and the forecast method, and obtain a recommendation result.
[0048] A second aspect of an embodiment of the present application provides a hydrological forecast model recommendation device based on a knowledge graph, comprising:
[0049] The collection module is used to collect the full text information of historical hydrological forecast related documents;
[0050] A determination module is used to determine the hydrological forecast knowledge graph ontology layer, including: defining the ontology and determining the ontology relationship; the ontology includes: basic information of the basin, forecasting method, document name, input data and algorithm model;
[0051] A processing module, used to use natural language processing technology to perform entity recognition and relationship extraction on the full-text information to obtain entities and entity relationships;
[0052] A construction module is used to store the entities and the entity relationships based on the hydrological forecast knowledge graph ontology layer and to construct a hydrological forecast knowledge graph using Neo4j graph database technology;
[0053] The retrieval module is used to input target information, use the CYPHER query language to search in the hydrological forecast knowledge graph, and find the algorithm model that matches the target information.
[0054] In the disclosed embodiment, by integrating the knowledge graph of basic information of the basin, model input data, algorithm model, forecasting method and literature name, and combining natural language processing technology and graph database technology, a queryable and inferable hydrological forecasting knowledge graph is constructed, and the target information is input, and the CYPHER query language is used to search in the hydrological forecasting knowledge graph to find the algorithm model matching the target information. The efficiency, accuracy and scalability of model recommendation are achieved, and the hydrological model suitable for a basin can be accurately found; for unfamiliar basins, there is no need to compare multiple models, which improves work efficiency; effectively improves the scientific nature of the model selected in the hydrological forecast process, and improves the accuracy and efficiency of hydrological forecast. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0056] Figure 1 It is a flowchart of the steps of a hydrological forecast model recommendation method based on knowledge graph proposed in one embodiment of the present application;
[0057] Figure 2 This is a first query result graph of a hydrological forecast model recommendation method based on knowledge graph proposed in one embodiment of the present application;
[0058] Figure 3 This is the second query result graph of the hydrological forecast model recommendation method based on knowledge graph proposed in one embodiment of the present application. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0060] In the drawings, the size of the constituent elements, the thickness of the layer or the area may be exaggerated for the sake of clarity. Therefore, any implementation of the present disclosure is not necessarily limited to the size shown in the drawings, and the shapes and sizes of the components in the drawings do not reflect the true proportions. In addition, the drawings schematically show ideal examples, and any implementation of the present disclosure is not limited to the shapes or values shown in the drawings.
[0061] Knowledge Graph is a series of graphs that show the development process and structural relationship of knowledge. It describes concepts, entities and their relationships in the objective world in a structured form, expresses the information on the Internet in a form closer to the human cognitive world, and provides a better ability to organize, manage and understand the massive amount of information on the Internet. Specifically, the knowledge graph consists of nodes (representing entities) and edges (representing relationships). Each node represents an entity, which can refer to people, things, and objects in the objective world. Each edge represents a relationship, which can express the connection between different entities. In essence, the knowledge graph can be understood as a semantic network stored in a graph structure.
[0062] Reference Figure 1 , Figure 1 : is a flowchart of the steps of the hydrological forecast model recommendation method based on the knowledge graph proposed in the first embodiment of the present application. Figure 1 As shown, the method includes the following steps S11 to S15:
[0063] Step S11: Collect the full text information of historical hydrological forecast related documents.
[0064] The full text information of historical hydrological forecast related documents can be directly searched and downloaded in the relevant scientific and technological literature database. Through the retrieval and collection of scientific and technological literature, the latest research results and dynamics in the field of hydrological forecast can be obtained, providing data support for subsequent analysis.
[0065] Furthermore, the collection of full-text information of historical hydrological forecast related documents includes:
[0066] The scientific and technological literature database is searched by keywords to collect and store the full text information of historical hydrological forecast related documents. The scientific and technological literature database includes: Chinese scientific and technological literature database and English scientific and technological literature database. The keywords include: hydrological forecast, hydrological model, flood forecast, hydrological forecast, hydrological model, floodforecast.
[0067] For hydrological forecast, "hydrological forecast", "hydrological model", "flood forecast" and other keywords are selected as the main search keywords, and relevant keywords can be further expanded as needed, such as "watershed hydrological model", "flood warning system", "real-time hydrological forecast", etc. Search in the Chinese scientific literature database according to the selected keywords, and directly download the full text information of the retrieved historical hydrological forecast related documents and store them in the local computer or cloud storage service. At the same time, when searching, you can also search in the English scientific literature database according to the keywords such as "hydrological forecast", "hydrological model", "flood forecast", etc., to ensure that comprehensive historical hydrological forecast related literature resources are retrieved.
[0068] Step S12: Determine the hydrological forecast knowledge graph ontology layer, including: defining the ontology and determining the ontology relationship; the ontology includes: basic information of the watershed, forecasting method, document name, input data and algorithm model.
[0069] The knowledge graph ontology layer is the basic structure of the knowledge graph, which is a conceptual representation of a certain field or a certain type of entity in the real world. Determining the hydrological forecast knowledge graph ontology layer includes defining the ontology and determining the ontology relationship. In this embodiment, the defined ontology includes: basic information of the basin, forecasting method, document name, input data and algorithm model. After defining each ontology, further determine the relationship between them to construct a complete hydrological forecast knowledge graph structure.
[0070] Basic information of the basin: describes the basic information of the basin, such as the natural geographical characteristics, hydrological characteristics, and meteorological characteristics. The basic information of the basin includes at least: basin area, topography, location, and climate type. This information is the basis of hydrological forecasting. Clear and standardized representation through the ontology layer helps to systematically and accurately understand the characteristics and environment of the basin.
[0071] Forecasting method: describes the method or technical means used for hydrological forecasting. Forecasting methods include at least: forecast type (such as river flood forecasting, reservoir water level forecasting, etc.), forecasting method (such as river flood movement evolution calculation, rainfall-runoff simulation, etc.), forecasting time scale (such as short-term forecast, medium-term forecast, long-term forecast), etc. By defining the forecasting method as the ontology layer, the system can facilitate subsequent accurate retrieval and recommendation.
[0072] Document name: The identifier of the hydrological forecast-related document cited or referenced. By defining the document name as the ontology layer, it is easy to establish the connection between ontologies.
[0073] Input data: Input data of algorithm models related to hydrological forecasting. Input data at least includes: temperature, precipitation, evapotranspiration, etc. By defining input data as the ontology layer, the type and source of these input data can be clearly represented, which is convenient for subsequent retrieval and recommendation of the system.
[0074] Algorithm model: the mathematical model or algorithm used in hydrological forecasting, such as the SWAT model, combined wavelet BP neural network model, etc. By defining the algorithm model as the ontology layer, the characteristics and application scope of various models can be clarified, providing a basis for subsequent model recommendations.
[0075] Furthermore, the determining of the ontology relationship includes:
[0076] The basic information of the watershed, forecasting method, input data and algorithm model are respectively subordinate to the document name.
[0077] The basic information of the basin, forecasting methods, input data and algorithm models are respectively subordinated to the document names, such as the basic information of the basin is subordinate to the document name. By establishing associations between ontologies, intelligent reasoning can be performed based on this information to provide users with more accurate and personalized model recommendations, thereby supporting a more efficient decision-making process.
[0078] Step S13: Use natural language processing technology to perform entity recognition and relationship extraction on the full-text information to obtain entities and entity relationships.
[0079] Natural Language Processing (NLP) is an important branch of the field of Artificial Intelligence (AI), which aims to enable computers to understand, interpret, process and generate human language. Natural language processing technology simulates human language understanding and analysis capabilities to achieve tasks such as human-computer interaction, information extraction, and semantic analysis. Its core is to convert natural language into a computer-readable form, and then use various algorithms and models to perform semantic understanding, information extraction, and text generation. By using natural language processing technology, entity recognition and relationship extraction of full-text information can be performed to obtain entities and entity relationships. Entities can be terrain, location, document names, etc., and relationships are the connection between entities, such as terrain is subordinate to document names. By deeply analyzing the literature related to hydrological forecasting and combining natural language processing technology, various types of information closely related to hydrological forecasting can be accurately extracted, which helps to build a complete hydrological forecasting knowledge graph.
[0080] Furthermore, the use of natural language processing technology to perform entity recognition and relationship extraction on the full-text information to obtain entities and entity relationships includes:
[0081] Performing text cleaning on the full text information, including: removing HTML tags, punctuation marks and stop words;
[0082] Using the named entity recognition technology in the natural language processing technology, the cleaned text is subjected to entity recognition to obtain the entity; and the relationship extraction is performed on the entity to obtain the entity relationship.
[0083] Named Entity Recognition (NER): refers to extracting entities with specific meanings from text, such as locations (provinces, cities, county-level administrative regions), terrain, flood forecasts, etc., and determining their boundaries and categories. Named entity recognition is a key step in converting unstructured data into structured data in information extraction.
[0084] The full text information is cleaned to remove irrelevant information such as HTML tags, punctuation marks, stop words, etc., to improve the accuracy of subsequent entity recognition. Then, the named entity recognition technology in natural language processing technology is used to perform entity recognition on the cleaned text. Combined with the results of entity recognition, pattern matching, dependency syntax analysis, relationship classification and other methods are used to extract relationships, identify and extract the relationships between entities, and finally obtain entities and entity relationships.
[0085] Furthermore, the use of natural language processing technology to perform entity recognition and relationship extraction on the full-text information to obtain entities and entity relationships includes:
[0086] Using natural language processing technology, annotating the entities and entity relationships corresponding to the full-text information to obtain an annotated data set;
[0087] The data set is divided into a first training set, a first validation set and a first test set, and the model is trained and optimized by a BiLSTM-CRF algorithm to obtain a trained entity recognition model; the entity recognition model is used to perform entity recognition on new documents, and output entities and entity relationships corresponding to the new documents;
[0088] The entities and entity relationships corresponding to the new document are updated into the hydrological forecast knowledge graph.
[0089] Using natural language processing technology, the entities and entity relationships corresponding to the full-text information are annotated to obtain an annotated data set, which refers to the full-text information with the corresponding entities and entity relationships marked. The data set is divided into the first training set, the first validation set, and the first test set, and the model is trained and optimized using the BiLSTM-CRF (bidirectional long short-term memory network combined with conditional random field) algorithm to obtain a trained entity recognition model. The BiLSTM-CRF algorithm can effectively capture contextual information in the text, thereby improving the accuracy of entity recognition. The entity recognition model is used to perform entity recognition on new documents, output the entities and entity relationships corresponding to the new documents, and update the entities and entity relationships corresponding to the new documents to the hydrological forecast knowledge graph. Continuously enrich and improve the content of the hydrological forecast knowledge graph to make it more comprehensive and accurate, and provide strong data support and decision-making basis for applications such as hydrological forecasting.
[0090] Furthermore, the data set is divided into a first training set, a first validation set and a first test set, and the model is trained and optimized by a BiLSTM-CRF algorithm to obtain a trained entity recognition model, including:
[0091] Randomly divide the data set into the first training set, the first validation set and the first test set according to a preset ratio;
[0092] Construct the model based on the BiLSTM-CRF algorithm, use the data in the first training set to train the model and optimize the model parameters; use the data in the first validation set to evaluate the model and adjust the model hyperparameters; use the data in the first test set to test the model, and obtain the trained entity recognition model when the accuracy of the recognition result of the model reaches a preset value.
[0093] The data set is randomly divided into the first training set, the first validation set, and the first test set according to the preset ratio. The preset ratio can be 70% of the first training set, 15% of the first validation set, 15% of the first test set, or similar distributions. The specific ratio can be adjusted according to the actual data volume and needs. Build a model based on the BiLSTM-CRF algorithm, input the data in the first training set into the model, and use the back propagation algorithm and optimizer (such as Adam, SGD, etc.) to update the parameters of the model to minimize the loss function. This process will be repeated many times until a certain stop condition is met (such as reaching the preset number of iterations, the loss value no longer decreases significantly, etc.). During the training process, the first validation set is used regularly to evaluate the performance of the model, and the hyperparameters of the model (such as learning rate, hidden layer size, batch size, etc.) are adjusted to further improve the performance of the model. After the model training is completed, the first test set is used to perform a final test on the model. If the accuracy of the model's recognition result reaches the preset value (such as 90%, 95%, etc.), the model is considered to have been trained, and a trained entity recognition model is obtained. Entities and their relationships can be accurately extracted from text, which helps to build a richer, more accurate and comprehensive hydrological forecast knowledge graph.
[0094] Step S14: Based on the hydrological forecast knowledge graph ontology layer, using Neo4j graph database technology, the entities and the entity relationships are stored to construct a hydrological forecast knowledge graph.
[0095] Neo4j is a high-performance graph database that stores structured data on the network (called a graph from a mathematical perspective) instead of traditional tables. Neo4j can be seen as a high-performance graph engine with all the features of a mature database.
[0096] According to the determined hydrological forecast knowledge graph ontology layer, nodes and relationships are created in the Neo4j graph database. Each ontology can be represented as a node, and relationships are created between nodes according to the determined ontology relationships. The prepared entities and entity relationships are linked to the corresponding correct ontology in the Neo4j graph database through entity links. Finally, a queryable and reasonable hydrological forecast knowledge graph is constructed. It helps to organize and display knowledge related to hydrological forecasting and provides strong support for model recommendation of hydrological forecasting.
[0097] Furthermore, the use of Neo4j graph database technology to store the entities and the entity relationships to construct a hydrological forecast knowledge graph includes:
[0098] The entities and entity relationships are stored in a Neo4j graph database through a Py2neo library to construct the hydrological forecast knowledge graph; the Py2neo library is used to input data.
[0099] Py2neo is a Python client library for interacting with the Neo4j graph database. It provides an intuitive interface that allows developers to create, query, and manage graph data through Python code. By using the Py2neo library, entities and entity relationships can be easily stored in the Neo4j graph database, thereby building a queryable and reasonable hydrological forecast knowledge graph. Query, reasoning, and visualization of graph data are achieved.
[0100] Step S15: Input target information, use CYPHER query language to search in the hydrological forecast knowledge graph, and find the algorithm model that matches the target information.
[0101] According to the input target information, the CYPHER query language is used to perform complex data query and reasoning, find the algorithm model that matches the target information, and obtain the recommended results. For example, the recommended algorithm model can be obtained by querying according to the province, city and forecast method. The efficiency and accuracy of model recommendation are achieved, and the scientific nature of the model selection in the hydrological forecast process is effectively improved.
[0102] Furthermore, the input target information is searched in the knowledge graph using the CYPHER query language to find an algorithm model matching the target information, including:
[0103] In a case where the target information is the basic information of the watershed and the forecasting method, searching for the input data and the algorithm model that match the target information;
[0104] In a case where the target information is the input data, the algorithm model matching the target information is searched.
[0105] Input the target information, use the CYPHER query language to search in the knowledge graph, and find the algorithm model that matches the target information. There are two query methods, corresponding to two specific recommendation functions.
[0106] The first query method is to input the basic information of the basin and the forecast method to find the input data and algorithm model to be used. CYPHER statement example:
[0107] Match(n:`province`{name:"Shandong Province"})-->(q)<--(m:`city`{name:"Jinan City"}),(t:`forecast method`{name:"flood forecast"})-->(q),(a:`input data`)-->(q)<--(b:`algorithm model`)returna,q,b.
[0108] The query results are as follows Figure 2As shown, what is returned are input data, document name, and algorithm model. That is, by inputting the basic information of the basin (Shandong Province, Jinan City) and the forecast method (flood forecast), the corresponding input data (precipitation, temperature, humidity), algorithm model (CaMa-Flood model, WRF-Hydro model, WRF model) and subordinate document name (basin-scale flood forecasting method based on meteorological-hydrological-hydrodynamic coupling model: taking Beijiang Basin as an example) can be found.
[0109] The second query method is to input existing input data and find the algorithm model that can be used. CYPHER statement example:
[0110] Match(a:`input data`{name:'precipitation'})-->(q)<--(b:`input data`{name:'evapotranspiration'}),(c:`algorithm model`)-->(q)returnq,c.
[0111] The query results are as follows Figure 3 As shown, what is returned are the document name and algorithm model.
[0112] Furthermore, the forecasting methods include: short-term forecasting, flood forecasting and medium- and long-term forecasting; when the target information is the basic information of the river basin and the forecasting method, searching for the input data and the algorithm model matching the target information includes:
[0113] When the target information is the basic information of the river basin and the forecasting method, and the forecasting method is the short-term forecast or the flood forecast, searching for the input data and the first type of algorithm model that match the target information;
[0114] When the target information is the basic information of the river basin and the forecasting method, and the forecasting method is the medium- and long-term forecast, the input data and the second type of algorithm model matching the target information are searched; the first type of algorithm model is different from the second type of algorithm model, and the second type of algorithm model includes a model based on a data-driven method.
[0115] Different forecasting methods usually use different models due to differences in physical mechanisms. For example, in short-term forecasting and flood forecasting, the runoff process is highly correlated with the precipitation process, and the precipitation process is predictable in the short term, so various hydrological models are often used for forecasting; in medium- and long-term forecasting, although the runoff process is also affected by factors such as precipitation and evaporation, it is difficult to make medium- and long-term forecasts due to factors such as precipitation and evaporation, so statistical methods, machine learning, neural networks and other data-driven methods are often used for prediction.
[0116] Depending on the specific forecasting method (short-term forecast, flood forecast and medium- and long-term forecast), the types of algorithm models found are also different. Specifically, input basic information of the basin, short-term forecast or flood forecast, and search for input data and the first type of algorithm model that match its input information; input basic information of the basin and medium- and long-term forecast, and search for input data and the second type of algorithm model that match its input information.
[0117] The first type of algorithm model is different from the second type of algorithm model. The second type of algorithm model includes models based on data-driven methods (such as statistical methods, machine learning, and neural networks). The appropriate algorithm model can be better selected according to the needs and characteristics of the forecast method, thereby improving the accuracy and efficiency of the forecast.
[0118] Furthermore, the ontology also includes: instructions for using the algorithm model and reference cases of the algorithm model; the input target information is searched in the hydrological forecast knowledge graph using the CYPHER query language to find the algorithm model matching the target information, including:
[0119] In the case where the target information is the basic information of the watershed and the forecasting method, searching for the input data, the algorithm model, the algorithm model usage instructions and the algorithm model reference case that match the target information;
[0120] When the target information is the input data, the algorithm model, the algorithm model usage instructions and the algorithm model reference case that match the target information are searched.
[0121] In this embodiment, when defining the ontology in step S12, the algorithm model usage instructions and algorithm model reference cases are also defined. Then, when searching in the hydrological forecast knowledge graph using the CYPHER query language based on the input target information, the algorithm model usage instructions and algorithm model reference cases corresponding to the algorithm model can also be obtained. Specifically, input basic basin information and forecasting methods to find input data, algorithm models, algorithm model usage instructions, and algorithm model reference cases that match the input information; input existing input data to find algorithm models, algorithm model usage instructions, and algorithm model reference cases that match the input information. Providing algorithm model usage instructions and reference cases will help users better understand and use the algorithm model and improve user satisfaction.
[0122] Further, after searching for the algorithm model matching the target information, the method further comprises:
[0123] In the case that there are multiple algorithm models, the algorithm models are sorted according to the set first priority and second priority; the first priority is that the algorithm model has a corresponding forecasting method, and the higher the level of the algorithm model is; the second priority is that the more the number of input data corresponding to the algorithm model is, the higher the level of the algorithm model is.
[0124] In the case of finding and recommending multiple algorithm models, the algorithm models are sorted according to the set first priority and second priority. The first priority is to clarify which algorithm models have corresponding forecasting methods. If the conditions for recommending an algorithm model include the forecasting method, the fitness ranking level of the algorithm model is higher. Because the algorithm models used by different forecasting methods are quite different, and these algorithm models more directly meet specific forecasting needs. The second priority is to clarify the number of input data corresponding to each algorithm model when the forecasting method is available or not. The more input data is included in the conditions for recommending a model, the higher the fitness ranking level of the algorithm model. Because some algorithm models have strict requirements on the type of input data, if certain types of input data are lacking, the algorithm model cannot be used for calculation.
[0125] Furthermore, the method further comprises:
[0126] Extracting Chinese abstracts and English abstracts from the full-text information collected in the Chinese scientific literature database;
[0127] Perform word segmentation on the Chinese abstract and the English abstract respectively to obtain a Chinese and English abstract data set;
[0128] The Chinese and English abstract data sets are randomly divided into a second training set, a second validation set, and a second test set according to a preset ratio;
[0129] Based on the second training set, the second validation set, and the second test set, the Chinese abstract is used as a model input, and the English abstract corresponding to the Chinese abstract is used as a model output, training a Chinese-to-English translation model based on the Transformer algorithm;
[0130] The Chinese-English abstract data set is randomly divided into a third training set, a third validation set and a third test set according to the preset ratio, and the English abstract is used as a model input and the Chinese abstract corresponding to the English abstract is used as a model output, and an English-Chinese translation model based on the Transformer algorithm is trained;
[0131] The Chinese-to-English translation model and the English-to-Chinese translation model serve as Chinese-English conversion models.
[0132] Based on the full-text information of historical hydrological forecast-related documents collected by the Chinese scientific and technological literature database, the Chinese abstract and the English abstract can be extracted from the full-text information of each document through programming scripts or database query statements. Use Chinese word segmentation tools (such as jieba, HanLP, etc.) to segment the Chinese abstract and convert it into a sequence of words or phrases. The English abstract can be pre-processed by word form restoration or root extraction to improve the translation quality. The result after word segmentation retains the corresponding relationship of the original abstract, that is, each Chinese abstract corresponds to an English abstract.
[0133] The Chinese and English abstract datasets after word segmentation are randomly re-divided into the second training set, the second validation set, and the second test set according to the preset ratio (such as 70% training set, 15% validation set, and 15% test set). Use a deep learning framework based on the Transformer algorithm (such as TensorFlow, PyTorch, etc.) to build a Chinese-to-English translation model, use the Chinese abstracts in the second training set as the model input, and the corresponding English abstracts as the model output to train the model. During the training process, use the second validation set to monitor the performance of the model and adjust the model parameters as needed. After the training is completed, use the second test set to evaluate the final performance of the model. Finally, a trained Chinese-to-English translation model is obtained. Similar to the training of the Chinese-to-English model, but this time the English abstracts in the third training set are used as the model input, and the corresponding Chinese abstracts are used as the model output for training. Finally, a trained English-to-Chinese translation model is obtained. The Chinese-to-English translation model and the English-to-Chinese translation model are used as Chinese-English conversion models to provide bidirectional language conversion capabilities. It can also be expanded to other cross-language document content conversion.
[0134] Furthermore, the method further comprises:
[0135] Inputting Chinese target information, converting the Chinese target information into English target information through the Chinese-English conversion model, searching in the hydrological forecast knowledge graph using the CYPHER query language, and finding the algorithm model matching the Chinese target information;
[0136] Input English target information, convert the English target information into Chinese target information through the Chinese-English conversion model, use the CYPHER query language to search in the hydrological forecast knowledge graph, and find the algorithm model that matches the English target information.
[0137] If the user inputs the target information in Chinese, the Chinese target information will be converted into English target information through the Chinese-English conversion model. Conversely, if the user inputs the target information in English, the Chinese target information will be converted into English target information through the Chinese-English conversion model. The converted information will be used to find the algorithm model that matches the input information in the Chinese and English literature nodes of the hydrological forecast knowledge graph. Avoid language barriers and ensure that no matter what language the user inputs, the system can effectively search and match in the knowledge graph.
[0138] Furthermore, for unfamiliar river basins, the basic information of the river basin corresponding to the unfamiliar river basin is collected, and the forecast method is determined; the basic information of the river basin corresponding to the unfamiliar river basin and the forecast method are input, and the CYPHER query language is used to search in the hydrological forecast knowledge graph to find the input data and the algorithm model that match the basic information of the river basin and the forecast method, and obtain the recommended results.
[0139] When facing an unfamiliar river basin, the first thing to do is to collect the basic information of the river basin. This basic information may include the location of the river basin, the area of the river basin, etc. According to actual needs, determine the required forecast method. The collected basic information of the river basin and the determined forecast method are used as query conditions and input into the query system of the hydrological forecast knowledge graph. The CYPHER query language is used to search in the hydrological forecast knowledge graph, and the input data and algorithm model that match the input basic information of the river basin and the forecast method are returned as the recommendation result.
[0140] The hydrological forecast model recommendation method based on knowledge graph provided by the embodiment of the present disclosure integrates the knowledge graph of basic information of the basin, model input data, algorithm model, forecast method and literature name, combines natural language processing technology and graph database technology, builds a queryable and inferable hydrological forecast knowledge graph, inputs target information, uses CYPHER query language to search in the hydrological forecast knowledge graph, and finds the algorithm model matching the target information. The model recommendation is efficient, accurate and scalable, and the hydrological model suitable for a basin can be accurately found; for unfamiliar basins, there is no need to compare multiple models, which improves work efficiency; effectively improves the scientific nature of the model selected in the hydrological forecast process, and improves the accuracy and efficiency of the hydrological forecast.
[0141] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0142] Based on the same inventive concept, the embodiment of the present application discloses a hydrological forecast model recommendation device based on a knowledge graph, comprising:
[0143] The collection module is used to collect the full text information of historical hydrological forecast related documents;
[0144] A determination module is used to determine the hydrological forecast knowledge graph ontology layer, including: defining the ontology and determining the ontology relationship; the ontology includes: basic information of the basin, forecasting method, document name, input data and algorithm model;
[0145] A processing module, used to use natural language processing technology to perform entity recognition and relationship extraction on the full-text information to obtain entities and entity relationships;
[0146] A construction module is used to store the entities and the entity relationships based on the hydrological forecast knowledge graph ontology layer and to construct a hydrological forecast knowledge graph using Neo4j graph database technology;
[0147] The retrieval module is used to input target information, use the CYPHER query language to search in the hydrological forecast knowledge graph, and find the algorithm model that matches the target information.
[0148] In an optional implementation, the collection module is specifically used for:
[0149] The scientific and technological literature database is searched by keywords to collect and store the full text information of historical hydrological forecast related documents. The scientific and technological literature database includes: Chinese scientific and technological literature database and English scientific and technological literature database. The keywords include: hydrological forecast, hydrological model, flood forecast, hydrological forecast, hydrological model, floodforecast.
[0150] In an optional implementation, the determining module is specifically configured to:
[0151] The basic information of the watershed, forecasting method, input data and algorithm model are respectively subordinate to the document name.
[0152] In an optional implementation, the processing module is specifically used for:
[0153] Performing text cleaning on the full text information, including: removing HTML tags, punctuation marks and stop words;
[0154] Using the named entity recognition technology in the natural language processing technology, the cleaned text is subjected to entity recognition to obtain the entity; and the relationship extraction is performed on the entity to obtain the entity relationship.
[0155] In an optional implementation, the processing module is specifically used for:
[0156] Using natural language processing technology, annotating the entities and entity relationships corresponding to the full-text information to obtain an annotated data set;
[0157] The data set is divided into a first training set, a first validation set and a first test set, and the model is trained and optimized by a BiLSTM-CRF algorithm to obtain a trained entity recognition model; the entity recognition model is used to perform entity recognition on new documents, and output entities and entity relationships corresponding to the new documents;
[0158] The entities and entity relationships corresponding to the new document are updated into the hydrological forecast knowledge graph.
[0159] In an optional implementation, the processing module is specifically used for:
[0160] Randomly divide the data set into the first training set, the first validation set and the first test set according to a preset ratio;
[0161] Construct the model based on the BiLSTM-CRF algorithm, use the data in the first training set to train the model and optimize the model parameters; use the data in the first validation set to evaluate the model and adjust the model hyperparameters; use the data in the first test set to test the model, and obtain the trained entity recognition model when the accuracy of the recognition result of the model reaches a preset value.
[0162] In an optional implementation, the building block is specifically used for:
[0163] The entities and entity relationships are stored in a Neo4j graph database through a Py2neo library to construct the hydrological forecast knowledge graph; the Py2neo library is used to input data.
[0164] In an optional implementation, the retrieval module is specifically used to:
[0165] In a case where the target information is the basic information of the watershed and the forecasting method, searching for the input data and the algorithm model that match the target information;
[0166] In a case where the target information is the input data, the algorithm model matching the target information is searched.
[0167] In an optional implementation, the forecasting methods include: short-term forecasting, flood forecasting and medium- and long-term forecasting; the retrieval module is specifically used for:
[0168] When the target information is the basic information of the river basin and the forecasting method, and the forecasting method is the short-term forecast or the flood forecast, searching for the input data and the first type of algorithm model that match the target information;
[0169] When the target information is the basic information of the river basin and the forecasting method, and the forecasting method is the medium- and long-term forecast, the input data and the second type of algorithm model matching the target information are searched; the first type of algorithm model is different from the second type of algorithm model, and the second type of algorithm model includes a model based on a data-driven method.
[0170] In an optional implementation, the ontology further includes: instructions for use of the algorithm model and reference cases for the algorithm model; and the retrieval module is specifically used to:
[0171] In the case where the target information is the basic information of the watershed and the forecasting method, searching for the input data, the algorithm model, the algorithm model usage instructions and the algorithm model reference case that match the target information;
[0172] When the target information is the input data, the algorithm model, the algorithm model usage instructions and the algorithm model reference case that match the target information are searched.
[0173] In an optional implementation, the retrieval module is specifically used to:
[0174] In the case that there are multiple algorithm models, the algorithm models are sorted according to the set first priority and second priority; the first priority is that the algorithm model has a corresponding forecasting method, and the higher the level of the algorithm model is; the second priority is that the more the number of input data corresponding to the algorithm model is, the higher the level of the algorithm model is.
[0175] In an optional embodiment, the device further comprises:
[0176] The Chinese-English conversion module is used to extract Chinese abstracts and English abstracts from the full-text information collected by the Chinese scientific literature database; segment the Chinese abstracts and the English abstracts respectively to obtain Chinese-English abstract data sets; randomly divide the Chinese-English abstract data sets into a second training set, a second verification set, and a second test set according to a preset ratio; based on the second training set, the second verification set, and the second test set, the Chinese abstract is used as a model input and the English abstract corresponding to the Chinese abstract is used as a model output to train a Chinese-English translation model based on the Transformer algorithm; the Chinese-English abstract data sets are randomly divided into a third training set, a third verification set, and a third test set according to the preset ratio, the English abstract is used as a model input and the Chinese abstract corresponding to the English abstract is used as a model output to train an English-Chinese translation model based on the Transformer algorithm; the Chinese-English translation model and the English-Chinese translation model are used as Chinese-English conversion models.
[0177] In an optional embodiment, the device further comprises:
[0178] A comprehensive search module is used to input Chinese target information, convert the Chinese target information into English target information through the Chinese-English conversion model, use the CYPHER query language to search in the hydrological forecast knowledge graph, and find the algorithm model that matches the Chinese target information; input English target information, convert the English target information into Chinese target information through the Chinese-English conversion model, use the CYPHER query language to search in the hydrological forecast knowledge graph, and find the algorithm model that matches the English target information.
[0179] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0180] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices, electronic devices, and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0181] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0182] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0183] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0184] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0185] The above is a detailed introduction to a hydrological forecast model recommendation method and device based on a knowledge graph provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A hydrological forecast model recommendation method based on knowledge graph, characterized in that: include: Collect full-text information of historical hydrological forecast-related literature; Determine the hydrological forecast knowledge graph ontology layer, including: defining the ontology and determining the ontology relationship; the ontology includes: basic information of the basin, forecasting method, document name, input data and algorithm model; Using natural language processing technology, performing entity recognition and relationship extraction on the full-text information to obtain entities and entity relationships; Based on the hydrological forecast knowledge graph ontology layer, using Neo4j graph database technology, the entities and entity relationships are stored to construct a hydrological forecast knowledge graph; Input target information, use CYPHER query language to search in the hydrological forecast knowledge graph, and find the algorithm model matching the target information, including: when the target information is the basic information of the river basin and the forecast method, find the input data and the algorithm model matching the target information; when the target information is the input data, find the algorithm model matching the target information; The forecasting methods include: short-term forecasting, flood forecasting and medium- and long-term forecasting; when the target information is the basic information of the river basin and the forecasting method, searching for the input data and the algorithm model matching the target information includes: When the target information is the basic information of the river basin and the forecasting method, and the forecasting method is the short-term forecast or the flood forecast, searching for the input data and the first type of algorithm model that match the target information; When the target information is the basic information of the watershed and the forecast method, and the forecast method is the medium- and long-term forecast, searching for the input data and the second type of algorithm model that match the target information; the first type of algorithm model is different from the second type of algorithm model, and the second type of algorithm model includes a model based on a data-driven method; After searching for the algorithm model matching the target information, the method further comprises: In the case where there are multiple algorithm models, the algorithm models are sorted according to the set first priority and second priority; the first priority is that the algorithm model has the corresponding forecast method, and the higher the level of the algorithm model; the second priority is that the more the number of input data corresponding to the algorithm model is, the higher the level of the algorithm model is; The method of using natural language processing technology to perform entity recognition and relationship extraction on the full-text information to obtain entities and entity relationships includes: Using natural language processing technology, annotating the entities and entity relationships corresponding to the full-text information to obtain an annotated data set; The data set is divided into a first training set, a first validation set and a first test set, and the model is trained and optimized by a BiLSTM-CRF algorithm to obtain a trained entity recognition model; the entity recognition model is used to perform entity recognition on new documents, and output entities and entity relationships corresponding to the new documents; Updating the entities and entity relationships corresponding to the new document into the hydrological forecast knowledge graph; The data set is divided into a first training set, a first validation set and a first test set, and the model is trained and optimized by a BiLSTM-CRF algorithm to obtain a trained entity recognition model, including: Randomly divide the data set into the first training set, the first validation set and the first test set according to a preset ratio; Construct the model based on the BiLSTM-CRF algorithm, use the data in the first training set to train the model and optimize the model parameters; use the data in the first validation set to evaluate the model and adjust the model hyperparameters; use the data in the first test set to test the model, and obtain the trained entity recognition model when the accuracy of the recognition result of the model reaches a preset value.
2. The hydrological forecast model recommendation method based on knowledge graph according to claim 1, characterized in that: The method of using natural language processing technology to perform entity recognition and relationship extraction on the full-text information to obtain entities and entity relationships includes: Performing text cleaning on the full text information, including: removing HTML tags, punctuation marks and stop words; Using the named entity recognition technology in the natural language processing technology, the cleaned text is subjected to entity recognition to obtain the entity; and the relationship of the entity is extracted to obtain the entity relationship.
3. The hydrological forecast model recommendation method based on knowledge graph according to claim 1, characterized in that: The ontology also includes: instructions for using the algorithm model and reference cases for the algorithm model; the input target information is searched in the hydrological forecast knowledge graph using the CYPHER query language to find the algorithm model matching the target information, including: In the case where the target information is the basic information of the watershed and the forecasting method, searching for the input data, the algorithm model, the algorithm model usage instructions and the algorithm model reference case that match the target information; When the target information is the input data, the algorithm model, the algorithm model usage instructions and the algorithm model reference case that match the target information are searched.
4. The hydrological forecast model recommendation method based on knowledge graph according to claim 1, characterized in that: The full text information of the historical hydrological forecast related documents is collected, including: The scientific and technological literature database is searched by keywords to collect and store the full text information of historical hydrological forecast related documents. The scientific and technological literature database includes: Chinese scientific and technological literature database and English scientific and technological literature database. The keywords include: hydrological forecast, hydrological model, flood forecast, hydrological forecast, hydrological model, floodforecast.
5. The hydrological forecast model recommendation method based on knowledge graph according to claim 4 is characterized in that: The method further comprises: Extracting Chinese abstracts and English abstracts from the full-text information collected in the Chinese scientific literature database; Perform word segmentation on the Chinese abstract and the English abstract respectively to obtain a Chinese and English abstract data set; The Chinese and English abstract data sets are randomly divided into a second training set, a second validation set, and a second test set according to a preset ratio; Based on the second training set, the second validation set, and the second test set, the Chinese abstract is used as a model input, and the English abstract corresponding to the Chinese abstract is used as a model output, training a Chinese-to-English translation model based on the Transformer algorithm; The Chinese-English abstract data set is randomly divided into a third training set, a third validation set and a third test set according to the preset ratio, and the English abstract is used as a model input and the Chinese abstract corresponding to the English abstract is used as a model output, and an English-Chinese translation model based on the Transformer algorithm is trained; The Chinese-to-English translation model and the English-to-Chinese translation model serve as Chinese-English conversion models.
6. The hydrological forecast model recommendation method based on knowledge graph according to claim 5 is characterized in that: The method further comprises: Inputting Chinese target information, converting the Chinese target information into English target information through the Chinese-English conversion model, searching in the hydrological forecast knowledge graph using the CYPHER query language, and finding the algorithm model matching the Chinese target information; Input English target information, convert the English target information into Chinese target information through the Chinese-English conversion model, use the CYPHER query language to search in the hydrological forecast knowledge graph, and find the algorithm model that matches the English target information.
7. The hydrological forecast model recommendation method based on knowledge graph according to claim 1, characterized in that: The determining of the ontology relationship comprises: The basic information of the watershed, forecasting method, input data and algorithm model are respectively subordinate to the document name.
8. The hydrological forecast model recommendation method based on knowledge graph according to claim 1, characterized in that: The use of Neo4j graph database technology to store the entities and the entity relationships to construct a hydrological forecast knowledge graph includes: The entities and entity relationships are stored in a Neo4j graph database through a Py2neo library to construct the hydrological forecast knowledge graph; the Py2neo library is used to input data.
9. The hydrological forecast model recommendation method based on knowledge graph according to claim 1, characterized in that: For unfamiliar river basins, the basic information of the river basin corresponding to the unfamiliar river basin is collected, and the forecast method is determined; the basic information of the river basin corresponding to the unfamiliar river basin and the forecast method are input, and the CYPHER query language is used to search in the hydrological forecast knowledge graph to find the input data and the algorithm model that match the basic information of the river basin and the forecast method, and obtain the recommended results.
10. A hydrological forecast model recommendation device based on knowledge graph, characterized in that: The device comprises: The collection module is used to collect the full text information of historical hydrological forecast related documents; A determination module is used to determine the hydrological forecast knowledge graph ontology layer, including: defining the ontology and determining the ontology relationship; the ontology includes: basic information of the basin, forecasting method, document name, input data and algorithm model; A processing module is used to use natural language processing technology to perform entity recognition and relationship extraction on the full-text information to obtain entities and entity relationships; use natural language processing technology to annotate the entities and entity relationships corresponding to the full-text information to obtain an annotated data set; divide the data set into a first training set, a first validation set and a first test set, and train and optimize the model through the BiLSTM-CRF algorithm to obtain a trained entity recognition model; the entity recognition model is used to perform entity recognition on new documents, and output the entities and entity relationships corresponding to the new documents; update the entities and entity relationships corresponding to the new documents to the hydrological forecast knowledge graph; randomly divide the data set into the first training set, the first validation set and the first test set according to a preset ratio; construct the model based on the BiLSTM-CRF algorithm, use the data in the first training set to train the model and optimize the model parameters; use the data in the first validation set to evaluate the model and adjust the model hyperparameters; use the data in the first test set to test the model, and when the accuracy of the recognition result of the model reaches a preset value, obtain the trained entity recognition model; A construction module is used to store the entities and the entity relationships based on the hydrological forecast knowledge graph ontology layer and to construct a hydrological forecast knowledge graph using Neo4j graph database technology; A retrieval module is used to input target information, use the CYPHER query language to search in the hydrological forecast knowledge graph, and find the algorithm model that matches the target information; when the target information is the basic information of the watershed and the forecast method, find the input data and the algorithm model that match the target information; when the target information is the input data, find the algorithm model that matches the target information; the forecast methods include: short-term forecast, flood forecast and medium- and long-term forecast; when the target information is the basic information of the watershed and the forecast method, and the forecast method is the short-term forecast or the flood forecast, find the input data that matches the target information and the first type of algorithm model; when the target information is the basic information of the watershed and the forecast method, and the forecast method is the medium- and long-term forecast, searching for the input data and the second type of algorithm model that match the target information; the first type of algorithm model is different from the second type of algorithm model, and the second type of algorithm model includes a model based on a data-driven method; when there are multiple algorithm models, sorting the algorithm models according to the set first priority and second priority; the first priority is that the algorithm model has a corresponding forecast method, and the higher the level of the algorithm model; the second priority is that the more the number of the input data corresponding to the algorithm model, the higher the level of the algorithm model.
Citation Information
Patent Citations
Water conservancy project dispatching regulation reasoning method based on knowledge graph
CN113377966A
Context parameter Chinese entity prediction method based on water environment knowledge graph enhancement relation
CN114444507A