Geoscience data question and answer method and system based on knowledge graph reasoning

By constructing a geoscience knowledge graph and performing entity alignment and knowledge embedding, the problem of difficult entity linking in knowledge graph question answering systems is solved, achieving efficient dataset question answering and knowledge reasoning, and improving the accuracy and recall of answers.

CN116955558BActive Publication Date: 2026-01-16SHANGHAI JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310893387.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-19
Publication Date
2026-01-16
Estimated Expiration
2043-07-19

AI Technical Summary

Technical Problem

Existing knowledge graph question answering systems face difficulties in entity linking and knowledge graph utilization, making it hard to effectively address the diversity of natural language expressions and the phenomenon of multiple words with the same meaning, resulting in low precision and recall rates for answer retrieval.

Method used

By constructing a geoscience knowledge graph, combining named entity recognition models and entity alignment technology, integrating textual and spatiotemporal information of geographic entities, performing entity alignment, and utilizing knowledge graph embedding for deep knowledge reasoning, multi-domain retrieval is achieved.

Benefits of technology

It improves the completeness of answers and the ability of knowledge reasoning, helps geoscientists quickly and accurately find target datasets, breaks down community barriers, and realizes the mining of implicit intrinsic connections in knowledge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116955558B_ABST
    Figure CN116955558B_ABST
Patent Text Reader

Abstract

The present application provides a kind of geoscience data set question and answer method and system based on knowledge graph reasoning, comprising: constructing geoscience knowledge graph according to geoscience data set information;Around the key intention of geoscience data set question, train named entity recognition model to carry out question semantic understanding and information extraction;Fusion text information and space-time information are carried out entity alignment to geographical entity;Based on the entity relationship structure of knowledge graph, carry out knowledge graph embedding, capture the potential relationship and global information across entities, realize the knowledge reasoning from geoscience explicit data to deep knowledge;Fusion alignment result and reasoning result carry out multi-domain search, obtain data set answer.The present application constructs a new knowledge graph intelligent question and answer system, compared with the existing question and answer system, can improve the answer check fullness, also has knowledge reasoning ability, can dig implicit internal correlation through explicit geoscience data, can help geoscience experts to quickly and accurately find target data set.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of knowledge graph, in particular, to a geoscience data question answering method and system based on knowledge graph reasoning. BACKGROUND

[0002] There are a large amount of data scattered on the open Internet, but due to their scattered distribution and uneven quality, it is difficult for scientific researchers to collect available scientific data. At the same time, in the era of big data, basic disciplines represented by earth science need to obtain accurate and high-quality scientific data. Therefore, how to help researchers quickly find target data has become an important issue, and the geoscience data question answering system based on knowledge graph provides a flexible, convenient and interactive solution.

[0003] Traditional knowledge graph question answering systems require a large number of artificially produced semantic parsers, but natural language questions are diverse, and artificial production is difficult to cover diversified inquiry methods, and the cost is high and the efficiency is low. With the gradual improvement of artificial intelligence technology and the improvement of computer computing power, machine learning methods gradually replace manual work, and knowledge graph question answering based on machine learning and deep learning has achieved good performance, but the current mainstream knowledge graph question answering system has two problems: entity linking is difficult and the knowledge of the graph is not fully utilized.

[0004] Although the knowledge graph stores the entities and relationships required for question answering, due to the diversity of natural language expression, both the question and the entity in the graph will have the phenomenon of one word with multiple meanings, which will cause a series of problems when linking the question entity and the graph entity, which is not conducive to the precision and recall of the answer. The traditional knowledge graph question answering system links the extracted entities and the graph entities through fuzzy matching, but the fuzzy matching based on character distance cannot deal with complex and diverse entity texts, and it is easy to have errors in which the character distance is similar but the actual semantics is different. Therefore, the present application uses the characteristics of earth science to align the key geographical entities of the geoscience graph by fusing the description information and the spatio-temporal information.

[0005] The mainstream question answering system method only relies on the explicit information of the knowledge graph for question answering, and only provides descriptive knowledge services, but the network structure between the entities of the knowledge graph contains deep knowledge, which provides the possibility for reasoning type knowledge services. Knowledge graph embedding is a method of mapping knowledge graph from semantic network to latent space, which has developed rapidly in the field of machine learning in recent years, and data mining around graph entity embedding representation is also a research hotspot in the current knowledge graph field.

[0006] Therefore, it is meaningful and necessary to build an interactive question and answer system to help researchers quickly find target data, and the knowledge graph-based question and answer method and system applying entity alignment, knowledge graph embedding and reasoning fusion are feasible and have important research value. SUMMARY

[0007] In view of the defects in the prior art, the purpose of the present application is to provide a geoscience data set question and answer method and system based on knowledge graph reasoning.

[0008] According to the geoscience data set question and answer method based on knowledge graph reasoning provided by the present application, the following steps are included:

[0009] Step S1: constructing a geoscience knowledge graph according to geoscience data set information;

[0010] Step S2: training a named entity recognition model for question semantic understanding and information extraction around the key intention of the geoscience data set question, and obtaining the corresponding extraction result;

[0011] Step S3: fusing the text information and spatio-temporal information corresponding to the geographic entity name in the extraction result, and performing entity alignment on the geographic entity in the extraction result, to obtain the corresponding alignment result;

[0012] Step S4: based on the entity relationship structure of the geoscience knowledge graph, carrying out knowledge graph embedding to capture the potential relationship and global information across entities, and carrying out knowledge reasoning from geoscience explicit data to deep knowledge, to obtain the corresponding reasoning result;

[0013] Step S5: fusing the extraction result, the alignment result and the reasoning result for multi-domain retrieval to obtain the data set answer.

[0014] Preferably, the construction of the geoscience knowledge graph includes a concept layer construction step and an instance layer construction step:

[0015] The concept layer construction of the geoscience knowledge graph includes: describing and expressing the metadata information of geoscience knowledge through the knowledge graph, completing the construction of the concept layer of the graph, determining the entity types and relationship types, and taking the information that is not easy to connect as entity attributes to complete the graph architecture;

[0016] The instance layer construction of the geoscience knowledge graph includes: organizing, cleaning and deduplicating the metadata of the geoscience data set, completing the instantiation of the geoscience knowledge graph, and completely representing and connecting the geoscience data set information through triplets.

[0017] Preferably, the step S2 includes the following steps:

[0018] Step S2.1: constructing a training data set;

[0019] Step S2.2: Preprocess the text in the training data set and vectorize the text representation;

[0020] Step S2.3: Train the named entity recognition model using the vectorized text representation, as follows:

[0021]

[0022] wherein, represents the loss function, D represents the training corpus data set, x represents the input text vector, s represents the structure prompt of information extraction, and e , and d respectively represent the encoder and decoder parameters, the model is optimized by cross-entropy loss, and the corresponding result y is extracted.

[0023] Preferably, step S3 comprises the following steps:

[0024] Step S3.1: Perform information completion on the geographical location entities in the original geosciences knowledge graph in multiple expressions to obtain completed geographical entity information;

[0025] Step S3.2: Convert the completed geographical entity information into corresponding description text, and vectorize the description text to obtain corresponding text information;

[0026] Step S3.3: Encode the latitude and longitude range information and time information of the geographical entity to obtain the spatiotemporal information of the geographical entity;

[0027] Step S3.4: Fuse the text information and the spatiotemporal information, and perform geographical entity alignment using the fused representation, as follows:

[0028]

[0029]

[0030] wherein, {i,j} represents the alignment matrix between the i-th geographical entity and the j-th geographical entity, p i represents the vector representation of the i-th geographical entity, represents the transpose of the vector representation of the j-th geographical entity, and Score i,j represents the similarity between different representations calculated, and threshold represents the set similarity threshold.

[0031] According to the set threshold, it is determined whether the geographical entities are aligned or not, and a connection relationship is added in the knowledge graph for the geographical entities that can be aligned. When the similarity between different representations is greater than the threshold, it indicates alignment, and when the similarity between different representations is less than or equal to the threshold, it indicates no alignment.

[0032] Preferably, the step S4 comprises the following steps:

[0033] Step S4.1: knowledge graph preprocessing, additional disambiguation for entities with the same name but different categories, and random independent ID is given to each entity and relationship in the knowledge graph, mapping relationship between graph string and ID is established, the graph is stored in the form of triple (h, r, t), and a set of facts F is constructed:

[0034] F = {(h1, r1, t1), (h2, r2, t2), …, (h n ,r n ,t n )}

[0035] Step S4.2: graph embedding initialization, random embedding is performed for each random independent ID, and entity set E and relationship set R are established:

[0036] E = {(e1, b1), (e2, b2), …, (e |E| ,b |E| )}.

[0037] R = {r1, r2, …, r |n|}.

[0038] Wherein, the representation of each entity is composed of two parts e i and b i , representing the basic position embedding and translation variable of the entity respectively, and each relationship r is encoded as an axisymmetric hyperrectangle, and the dimension of each vector is 256;

[0039] Step S4.3: graph embedding modeling, in order to model complex entity relationships, each entity will have different representations in different facts, for any fact f = (e i ,r k ,e j ), the final entity representation under the relationship r k is:

[0040]

[0041] Wherein, b j represents the translation variable of entity j;

[0042] Step S4.4: select appropriate evaluation function according to graph embedding, including calculating by distance function as scoring function:

[0043]

[0044] Wherein, x k represents the center point of the rectangular frame, wk represents the width of the rectangular frame, k represents the bias related to the width, when the embedding point of the entity is located in the target rectangle, the distance is inversely proportional to the size of the rectangle, a lower update weight is given to make the point always remain in the frame; when the embedding point is located outside the target rectangle, the size of the rectangle is linearly related to the distance, a higher weight is used as a punishment term, and the total score function is defined as the sum of the 2nd norm of the distance in all n entity and relationship frames, and the formula is as follows:

[0045]

[0046] Step S4.5: After modeling, the graph embedding is trained, and the embedding of entities and relationships is continuously optimized through the logistic loss:

[0047]

[0048] When the triple is a positive example, y hrt takes 1, when the triple is a negative example, y hrt takes -1.

[0049] Step S4.6: Knowledge reasoning from explicit geoscience data to deep geoscience knowledge is realized by using the embedding representation, and the formula is as follows:

[0050]

[0051] Wherein, e ai represents the embedding representation of an author, e kj represents the embedding representation of a keyword, similar data sets of geoscience data sets are found, and the similarity of embedding representations of different entities is calculated, and the formula is as follows:

[0052]

[0053] Then, the similarity of all data sets of any data set i is:

[0054]

[0055] By sorting and taking the highest k values, the most relevant k data sets corresponding to the highest k values are inferred.

[0056] According to the geoscience data set question and answer system based on knowledge graph reasoning provided by the application, comprising:

[0057] Module M1: Constructing a geoscience knowledge graph according to geoscience data set information;

[0058] Module M2: Around the key intention of the geoscience data set question, training a named entity recognition model for question semantic understanding and information extraction to obtain the corresponding extraction result;

[0059] Module M3: fuse the text information corresponding to the geographical entity name in the extraction result and the spatio-temporal information, perform entity alignment on the geographical entity in the extraction result, and obtain the corresponding alignment result;

[0060] Module M4: based on the entity relationship structure of the geoscience knowledge graph, carry out knowledge graph embedding, capture the potential relationship and global information across entities, and carry out knowledge reasoning from geoscience explicit data to deep knowledge, and obtain the corresponding reasoning result;

[0061] Module M5: fuse the extraction result, alignment result and reasoning result for multi-domain retrieval, and obtain the dataset answer.

[0062] Preferably, the construction of the geoscience knowledge graph comprises a concept layer building module and an instance layer building module:

[0063] The concept layer building of the geoscience knowledge graph comprises: describing and expressing the metadata information of geoscience knowledge through the knowledge graph, completing the building of the concept layer of the graph, determining the entity type and the relationship type, and taking the information difficult to connect as an entity attribute, and completing the graph architecture;

[0064] The instance layer building of the geoscience knowledge graph comprises: collating, cleaning and deduplicating the metadata of the geoscience dataset, completing the instantiation of the geoscience knowledge graph, and completely expressing and connecting the geoscience dataset information through triplets.

[0065] Preferably, the module M2 comprises the following modules:

[0066] Module M2.1: construct a training dataset;

[0067] Module M2.2: pre-process the text in the training dataset and represent the text in a vectorized manner;

[0068] Module M2.3: train a named entity recognition model using the vectorized text representation, and the formula is as follows:

[0069]

[0070] wherein, represents the loss function of the model, D represents the training data set, x represents the input text vector, s represents the structure prompt of information extraction, and θ e ,θ d respectively represent the encoder and decoder parameters, the model is optimized through cross-entropy loss, and the corresponding result y is extracted.

[0071] Preferably, the module M3 comprises the following modules:

[0072] Module M3.1: Information completion is performed on the geographical position entities in the original geosciences knowledge graph in multiple expressions to obtain completed geographical entity information;

[0073] Module M3.2: The completed geographical entity information is converted into corresponding description text, and the description text is vectorized to obtain corresponding text information;

[0074] Module M3.3: The latitude and longitude range information and time information of the geographical entity are encoded to obtain the spatiotemporal information of the geographical entity;

[0075] Module M3.4: The text information and the spatiotemporal information are fused, and the fusion representation is used for geographical entity alignment, and the formula is as follows:

[0076]

[0077]

[0078] wherein, A {i,j} represents the alignment matrix between the i-th geographical entity and the j-th geographical entity, p i represents the vector representation of the i-th geographical entity, represents the transpose of the vector representation of the j-th geographical entity, Score i,j represents the similarity between different representations calculated, and threshold represents the set similarity threshold;

[0079] According to the set threshold, it is judged whether the geographical entities are aligned or not, and a connection relationship is added in the knowledge graph for the alignable geographical entities; when the similarity between different representations is greater than the threshold, it means alignment, and when the similarity between different representations is less than or equal to the threshold, it means no alignment.

[0080] Preferably, the module M4 comprises the following modules:

[0081] Module M4.1: Knowledge graph preprocessing, additional disambiguation is performed on entities with the same name but different categories, and a random independent ID is given to each entity and relationship in the knowledge graph, a mapping relationship between the graph string and the ID is established, the graph is stored in the form of triple (h, r, t), and a fact set F is formed:

[0082] F = {(h1, r1, t1), (h2, r2, t2), …, (h n , r n , t n )}

[0083] Module M4.2: Graph embedding initialization, random embedding is performed for each random independent ID, and an entity set E and a relationship set R are established:

[0084] E = {(e1, b1), (e2, b2), …, (e |E| , b |E| )}.

[0085] R = {r1, r2, …, r |n|}.

[0086] where the representation of each entity consists of two parts e i and b i , representing the basic position embedding and translation variable of the entity respectively, and each relation r is encoded as an axisymmetric hyperrectangle, with each vector having a dimension of 256;

[0087] Module M4.3: Graph embedding modeling. In order to model complex entity relationships, each entity will have different representations in different facts. For any fact f = (e i , r k , e j ), the final entity representation under the relation r k is:

[0088]

[0089] where b j represents the translation variable of entity j;

[0090] Module M4.4: Selecting appropriate evaluation functions according to graph embedding, including calculating the score function through the following distance function:

[0091]

[0092] where c k represents the center point of the rectangular frame, w k represents the width of the rectangular frame, and k represents the bias related to the width. When the embedding point of the entity is located in the target rectangle, the distance is inversely proportional to the size of the rectangle, giving a lower update weight so that the point always remains within the frame. When the embedding point is outside the target rectangle, the size of the rectangle is linearly related to the distance, and a higher weight is used as a punishment term. The total score function is defined as the sum of the 2nd norm of the distance in all n entity and relation frames, as follows:

[0093]

[0094] Module M4.5: After modeling, the graph embedding is trained, and the embedding of entities and relations is continuously optimized through the logistic loss:

[0095]

[0096] When the triple is positive, yhrt Take 1, when the triple is negative example, y hrt Take -1;

[0097] Module M4.6: Knowledge reasoning from explicit geoscience data to deep geoscience knowledge is realized by using embedding representation, and the formula is as follows:

[0098]

[0099] Wherein, e ai represents the embedding representation of a certain author, e kj represents the embedding representation of a certain keyword, and the similar data set of the geoscience data set is found, and the similarity is calculated by the embedding representation of different entities, and the formula is as follows:

[0100]

[0101] Then, the similarity of all data sets of any data set i is:

[0102]

[0103] By sorting and taking the highest k values, the most relevant k data sets are inferred.

[0104] Compared with the prior art, the present application has the following beneficial effects:

[0105] The present application constructs a brand new knowledge graph intelligent question and answer system, which improves the answer checking completeness compared with the existing question and answer system, and has knowledge reasoning ability, can mine implicit internal relations through explicit geoscience data, and can help geoscience experts to quickly and accurately find target data sets. BRIEF DESCRIPTION OF DRAWINGS

[0106] Other features, objects and advantages of the present application will become more apparent through reading the following detailed description of the non-limiting embodiments with reference to the accompanying drawings:

[0107] Figure 1 The method flowchart of the present application.

[0108] Figure 2 The geoscience data set knowledge graph framework of the present application.

[0109] Figure 3 The geographic entity alignment algorithm flowchart of the present application.

[0110] Figure 4 The knowledge graph knowledge reasoning algorithm flowchart of the present application. DETAILED DESCRIPTION

[0111] The application will be described in detail below with specific embodiments. The following examples will help those skilled in the art to further understand the application, but do not limit the application in any form. It should be pointed out that those skilled in the art can make several changes and improvements without departing from the concept of the application. These are within the scope of the present application.

[0112] The present application focuses on geoscience data question and answer reasoning in open network, and uses a method combining machine learning and deep learning to study and propose a geoscience data set question and answer system based on knowledge graph reasoning: the question and answer system uses a pre-trained language model to understand and extract user intent, and performs multi-domain retrieval in a knowledge graph using a regularized entity alignment method to achieve data retrieval; secondly, in order to further recommend heuristic related knowledge to the user, the question and answer system captures cross-entity hidden layer relationships and global information through knowledge graph embedding learning, so as to break through community barriers and realize knowledge reasoning question and answer.

[0113] The present application relates to geoscience knowledge graph construction and instantiation, language model-based text representation, modeling and parameter optimization of named entity recognition model, feature fusion of geographic entity information and text, entity alignment, knowledge graph embedding modeling, embedding training and optimization, and knowledge graph reasoning.

[0114] According to the geoscience data set question and answer method based on knowledge graph reasoning provided by the present application, as shown in Figure 1 , it comprises:

[0115] Step S1: Construct a geoscience knowledge graph according to geoscience data set information. The construction of the geoscience knowledge graph includes a concept layer construction step and an instance layer construction step. The concept layer construction of the geoscience knowledge graph includes: describing and expressing the metadata information of geoscience knowledge through a knowledge graph, completing the construction of the concept layer of the graph, determining the types of entities and the types of relationships, and taking information that is not easy to connect as entity attributes to complete the graph architecture. As shown in Figure 2 , a complete framework of the knowledge graph is constructed, showing various entity information of the graph and the correlation between them. The instance layer construction of the geoscience knowledge graph includes: organizing, cleaning and deduplicating the metadata of the geoscience data set, completing the instantiation of the geoscience knowledge graph, and completely expressing and connecting the geoscience data set information through triples, that is, converting the data set metadata originally stored in the crawling table into the form of the knowledge graph.

[0116] Step S2: Train a named entity recognition model around the key intent of the geoscience data set question to understand the semantics of the question and extract information, and obtain the corresponding extraction result. This step realizes the meaning understanding of the user's natural language question and realizes the basic requirements of the question and answer system. Specifically, step S2 includes the following steps:

[0117] Step S2.1: Construct the training dataset. Extract descriptive text, keywords, and geographic location field information from the dataset metadata crawling table in the database, and then concatenate them into natural language questions using random question templates to be used as the training dataset.

[0118] Step S2.2: Preprocess the text in the training dataset and vectorize it. Specifically, segment the Chinese and English texts into words and extract information annotations from the text entities. The annotation information includes the geographical location, keywords, and time range in the question.

[0119] Step S2.3: Train the named entity recognition model using vectorized text representations. This vectorization involves using Transformer and a pre-trained large language model, T5, to convert text information into computer-understandable and computable vector representations. The formula for training the named entity recognition model is as follows:

[0120]

[0121] in, Let represent the model loss function, D represent the training corpus dataset, x represent the input text vector, s represent the structural cue extracted from the information, and θ represent the input text vector. e ,θ d and represent the encoder and decoder parameters, respectively. The cross-entropy loss model is used to optimize the extraction of the corresponding result y. This result y includes the name of a geographic entity, such as Mount Everest or the Qinghai-Tibet Plateau. The textual and spatiotemporal information corresponding to the geographic entity name is retrieved based on the entity name and then converted into vectorized features.

[0122] Step S3: Merge the textual and spatiotemporal information corresponding to the geographic entity names in the extraction results, and perform entity alignment on the geographic entities in the extraction results to obtain the corresponding alignment results. Merging textual and spatiotemporal information for entity linking and alignment of geographic entities can overcome the difficulties in entity linking and question-answering retrieval caused by the diverse expression of questions in traditional knowledge graph question answering. Specifically, the textual and spatiotemporal information is retrieved by extracting the geographic entity text in the extraction result y. For example, Figure 3 As shown, step S3 includes the following steps:

[0123] Step S3.1: Geographic entity information completion. Complete the information of geographical entities with various representations in the original geoscience knowledge graph, obtain the standardized representation, type and subordinate information of the geographical entities, and obtain the completed geographical entity information.

[0124] Step S3.2: convert the completed geographic entity information into corresponding description text, and vectorize the description text to represent the text information of each geographic entity, to obtain corresponding text information. The text vectorization method can be implemented by step S2.3.

[0125] Step S3.3: encode the latitude and longitude range information and time information of the geographic entity to obtain the spatio-temporal information of the geographic entity.

[0126] Step S3.4: fuse the text information and spatio-temporal information, and perform geographic entity alignment using the fusion representation, as follows:

[0127]

[0128]

[0129] wherein A {i,j} represents the alignment matrix between the i-th geographic entity and the j-th geographic entity, p i represents the vector representation of the i-th geographic entity, represents the transpose of the vector representation of the j-th geographic entity, Score i,j represents the similarity between different representations calculated, and threshold represents the set similarity threshold. According to the set threshold, it is judged whether the geographic entities are aligned or not. For the alignable geographic entities, a connection relationship is added in the knowledge graph; when the similarity between different representations is greater than the threshold, it means alignment; when the similarity between different representations is less than or equal to the threshold, it means no alignment.

[0130] Step S4: based on the entity relationship structure of the geoscience knowledge graph, carry out knowledge graph embedding to capture the potential relationship and global information across entities, and perform knowledge reasoning from geoscience explicit data to deep knowledge, that is, implement knowledge reasoning on the geoscience research field and geoscience data set, to obtain corresponding reasoning results. Specifically, the keyword information, geographic entity information and author information obtained in y are mainly reasoned, as shown in Figure 4 Step S4 includes the following steps:

[0131] Step S4.1: knowledge graph preprocessing, additional disambiguation is performed on entities with the same name but different categories, and the knowledge graph saved in the form of property graph is converted to RDF resource description framework. Each entity in the graph is assigned a random independent ID, a mapping relationship between the graph string and the ID is established, the graph is stored in the form of triple (h, r, t), and a fact set F is formed:

[0132] F = {(h1, r1, t1), (h2, r2, t2), …, (h n , r n , tn )

[0133] Step S4.2: graph embedding initialization, i.e. graph embedding preprocessing, random embedding is performed for each random independent ID, and the entity set E and the relationship set R are established:

[0134] E = {(e1, b1), (e2, b2), …, (e |E| , b |E| )}.

[0135] R = {r1, r2, …, r |n|}.

[0136] Wherein, the representation of each entity is composed of two parts e i and b i , representing the basic position embedding and translation variable of the entity respectively, and each relationship r is encoded as an axisymmetric hyperrectangle, and the dimension of each vector is 256.

[0137] Step S4.3: graph embedding modeling, in order to model complex entity relationships, each entity will have different representations in different facts, for any fact f = (e i , r k , e j ), the final entity representation corresponding to the relationship r k is:

[0138]

[0139] Wherein, b j represents the translation variable of entity j; the existence of b can effectively model the complex interaction between entities, and the entity can be embedded in the respective relationship frame r k as needed.

[0140] Step S4.4: select appropriate evaluation function according to graph embedding, in order to fully reflect the effect of embedding modeling, make the score of the real existing fact higher and the score of the false constructed fact lower through appropriate evaluation function. The following distance function is used as the scoring function:

[0141]

[0142] Wherein, c k represents the center point of the rectangular frame, and w kThe width of the rectangular frame is represented by k, and the bias related to the width is represented by k. When the embedding point of the entity is located in the target rectangle, the distance is inversely proportional to the size of the rectangle, and a lower update weight is given to keep the point in the frame; when the embedding point is located outside the target rectangle, the size of the rectangle is linearly related to the distance, and a higher weight is used as a punishment term. The total score function is defined as the sum of the 2-norm of the distance in all n entity and relation frames, and the formula is as follows:

[0143]

[0144] Step S4.5: After modeling, the graph embedding is trained, and the training is performed under the open world assumption. The embedding of entities and relations is continuously optimized through the logistic loss:

[0145]

[0146] When the triple is positive, y hrt takes 1, and when the triple is negative, y hrt takes -1.

[0147] Step S4.6: According to the obtained embedding representation, knowledge reasoning from explicit geoscience data to deep geoscience knowledge is realized. Through graph embedding, potential relationships and global information across entities can be discovered, so the embedding representation can be used for knowledge reasoning. That is, finding related keywords of keywords, finding similar datasets of datasets, etc. The formula is as follows:

[0148]

[0149] Where e ai represents the embedding representation of a certain author, e kj represents the embedding representation of a certain keyword, and similar datasets of geoscience datasets are found by calculating the similarity of the embedding representations of different entities. The formula is as follows:

[0150]

[0151] Then the similarity of all datasets of any dataset i is:

[0152]

[0153] By sorting and taking the top k values, the most relevant k datasets are inferred. Knowledge reasoning from dataset to dataset is realized. And the related keywords of the keywords, the professionals in the field of specific keywords, are inferred in turn. Through the knowledge graph embedding representation that implies deep information, knowledge discovery and knowledge reasoning are realized.

[0154] Step S5: fuse the extraction result, the alignment result and the reasoning result to perform multi-domain retrieval to obtain a dataset answer. Specifically, the final entity alignment and knowledge reasoning result are arranged, and corresponding knowledge information is added to the knowledge graph. A question and answer system based on entity alignment and knowledge reasoning is built, the input of which is a natural language question, the system first performs semantic understanding and extraction through an entity extraction model, and performs entity linking and entity alignment on the extraction result according to the saved aligned entities, and performs multi-domain retrieval on the graph to return an answer.

[0155] The application further provides a geoscience dataset question and answer system based on knowledge graph reasoning, and a person skilled in the art can realize the geoscience dataset question and answer system based on knowledge graph reasoning by executing the step flow of the geoscience dataset question and answer method based on knowledge graph reasoning, that is, the geoscience dataset question and answer method based on knowledge graph reasoning can be understood as a preferred implementation manner of the geoscience dataset question and answer system based on knowledge graph reasoning.

[0156] The application provides a geoscience dataset question and answer system based on knowledge graph reasoning.

[0157] Module M1: constructing a geoscience knowledge graph according to geoscience dataset information. The construction of the geoscience knowledge graph includes a concept layer construction module and an instance layer construction module. The construction of the concept layer of the geoscience knowledge graph includes: describing and expressing metadata information of geoscience knowledge through a knowledge graph, completing the construction of the concept layer of the graph, determining entity types and relationship types, and taking information that is not easy to connect as entity attributes to complete the graph architecture. The construction of the instance layer of the geoscience knowledge graph includes: arranging, cleaning and deduplicating metadata of the geoscience dataset, completing the instantiation of the geoscience knowledge graph, and completely representing and connecting the geoscience dataset information through triples.

[0158] Module M2: training a named entity recognition model to perform question semantic understanding and information extraction around the key intention of the geoscience dataset question to obtain corresponding extraction results. Module M2 includes the following modules: Module M2.1: constructing a training dataset. Module M2.2: preprocessing the text in the training dataset and vectorizing the text representation. Module M2.3: training a named entity recognition model using the vectorized text representation, and the formula is as follows:

[0159]

[0160] wherein, represents the loss function of the model, D represents the training corpus dataset, x represents the input text vector, s represents the structure prompt of information extraction, and represents the parameter of the model. e ,θ drespectively represent the encoder and decoder parameters, and the model is optimized by cross-entropy loss to extract the corresponding result y.

[0161] Module M3: Fuse the text information and the spatio-temporal information corresponding to the geographical entity names in the extracted results, and perform entity alignment on the geographical entities in the extracted results to obtain the corresponding alignment results. Module M3 includes the following modules: Module M3.1: Perform information completion on the geographical position entities in the original geoscience knowledge graph in multiple expressions to obtain completed geographical entity information. Module M3.2: Convert the completed geographical entity information into corresponding description text, and vectorize the description text to obtain corresponding text information. Module M3.3: Encode the latitude and longitude range information and the time information of the geographical entity to obtain the spatio-temporal information of the geographical entity. Module M3.4: Fuse the text information and the spatio-temporal information, and perform geographical entity alignment using the fused representation, as follows:

[0162]

[0163]

[0164] wherein A {i,j} represents the alignment matrix between the i-th geographical entity and the j-th geographical entity, p i represents the vector representation of the i-th geographical entity, represents the transpose of the vector representation of the j-th geographical entity, Score i,j represents the similarity between different representations calculated, and threshold represents the set similarity threshold. According to the set threshold, it is judged whether the geographical entities are aligned or not. For the alignable geographical entities, a connection relationship is added in the knowledge graph; when the similarity between different representations is greater than the threshold, it means alignment; when the similarity between different representations is less than or equal to the threshold, it means no alignment.

[0165] Module M4: Based on the entity relationship structure of the geoscience knowledge graph, carry out knowledge graph embedding to capture the potential relationship and global information across entities, and perform knowledge reasoning from geoscience explicit data to deep knowledge to obtain the corresponding reasoning result. Module M4 includes the following modules:

[0166] Module M4.1: Knowledge graph preprocessing, additional disambiguation is performed on entities with the same name but different categories, and a random independent ID is assigned to each entity and relationship in the knowledge graph, a mapping relationship between the graph string and the ID is established, the graph is stored in the form of triplets (h, r, t), and a fact set F is formed:

[0167] F = {(h1, r1, t1), (h2, r2, t2), …, (h n , r n , t n}

[0168] Module M4.2: Graph embedding initialization, random embedding for each random independent ID, establishing entity set E and relationship set R:

[0169] E = {(e1, b1), (e2, b2), …, (e |E| , b |E| )}.

[0170] R = {r1, r2, …, r |n|}.

[0171] Wherein, the representation of each entity consists of two parts e i and b i , representing the basic position embedding and translation variable of the entity, and each relationship r is encoded as an axisymmetric hyperrectangle, and the dimension of each vector is 256.

[0172] Module M4.3: Graph embedding modeling, in order to model complex entity relationships, each entity will have different representations in different facts, for any fact f = (e i , r k , e j ), the final entity representation under the relationship r k is:

[0173]

[0174] Wherein, b j represents the translation variable of entity j;

[0175] Module M4.4: Select appropriate evaluation function according to graph embedding, including calculating by the following distance function as the scoring function:

[0176]

[0177] Wherein, c k represents the center point of the rectangular frame, w k represents the width of the rectangular frame, and k represents the bias related to the width. When the embedding point of the entity is located in the target rectangle, the distance is inversely proportional to the size of the rectangle, and a lower update weight is given to keep the point inside the frame; when the embedding point is located outside the target rectangle, the size of the rectangle is linearly related to the distance, and a higher weight is given as a punishment term. The total scoring function is defined as the sum of the 2nd norm of the distance in all n entity and relationship frames, and the formula is as follows:

[0178]

[0179] Module M4.5: Train the graph embedding after the modeling is completed, and continuously optimize the embedding of entities and relationships through the logistic loss:

[0180]

[0181] When the triple is positive, y hrt takes 1, when the triple is negative, y hrt takes -1.

[0182] Module M4.6: Use the embedding representation to realize knowledge reasoning from explicit geoscience data to deep geoscience knowledge, and the formula is as follows:

[0183]

[0184] Where, e ai represents the embedding representation of an author, e kj represents the embedding representation of a keyword, find similar data sets of geoscience data sets, and calculate the similarity of embedding representations of different entities, and the formula is as follows:

[0185]

[0186] Then the similarity of all data sets of any data set i is:

[0187]

[0188] By sorting and taking the highest k values, the most relevant k data sets are inferred.

[0189] Module M5: Fuse the extraction result, alignment result and reasoning result to perform multi-domain retrieval to obtain the data set answer.

[0190] Those skilled in the art know that in addition to implementing the system, device and each module thereof provided by the present application in the form of pure computer readable program code, the same program can be realized by logically programming the method steps to make the system, device and each module thereof provided by the present application in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded microcontrollers. Therefore, the system, device and each module thereof provided by the present application can be considered as a hardware component, and the modules included therein for realizing various programs can also be considered as structures within the hardware component; the modules for realizing various functions can also be considered as both software programs for realizing methods and structures within the hardware component.

[0191] The specific embodiments of the present application are described above. It needs to be understood that the present application is not limited to the specific embodiments described above, and various changes or modifications can be made by those skilled in the art within the scope of the claims, which does not affect the essential content of the present application. The embodiments of the present application and the features in the embodiments can be combined with each other at will without conflict.

Claims

1. A geoscience data question and answer method based on knowledge graph reasoning, characterized in that, The method comprises the following steps: Step S1: constructing a geoscience knowledge graph according to geoscience dataset information; Step S2: training a named entity recognition model to perform question semantic understanding and information extraction around the key intention of the geoscience dataset question, and obtaining the corresponding extraction result; Step S3: fusing the text information and spatio-temporal information corresponding to the geographic entity name in the extraction result, and performing entity alignment on the geographic entity in the extraction result, to obtain the corresponding alignment result; Step S4: based on the entity relationship structure of the geoscience knowledge graph, carrying out knowledge graph embedding to capture the potential relationship and global information across entities, and carrying out knowledge reasoning from explicit geoscience data to deep knowledge, to obtain the corresponding reasoning result; Step S5: fusing the extraction result, the alignment result and the reasoning result to perform multi-domain retrieval, to obtain the dataset answer; The step S4 comprises the following steps: Step S4.1: knowledge graph preprocessing, additional disambiguation is performed on entities with the same name but different categories, and a random independent ID is assigned to each entity and relationship in the knowledge graph, a mapping relationship between the graph string and the ID is established, the graph is stored in the form of triple (h, r, t), and a fact set F is formed: Step S4.2: graph embedding initialization, random embedding is performed on each random independent ID, and an entity set E and a relationship set R are established: where the representation of each entity is composed of two parts and representing the entity's basic position embedding and translation variable, respectively, and each relation r is encoded as an axisymmetric hyperrectangle with 256 dimensions for each vector; Step S4.3: Graph embedding modeling. To model complex entity relationships, each entity can have different representations in different facts. The final entity representation for any fact is given by: In the relationship is given by: wherein, represents the translation variable of the jth entity; Step S4.4: selecting a suitable evaluation function according to the graph embedding, including calculating by using the following distance function as the scoring function: wherein, represents a center point of a rectangular frame, represents a width of a rectangular frame, represents a bias related to the width, when the embedding point of an entity is located in the target rectangle, the distance is inversely proportional to the size of the rectangle, a lower update weight is given to make the point always remain in the frame; when the embedding point is located outside the target rectangle, the size of the rectangle is linearly related to the distance, a higher weight is taken as a punishment term, and the total score function is defined as the sum of the 2nd norm of the distance in all n entity and relation frames, and the formula is as follows: Step S4.5: after the modeling is completed, the graph embedding is trained, and the embedding of the entity and the relationship is continuously optimized through the logistic loss: When the triple is positive, Take 1, when the triple is negative, Take -1; Step S4.6: using the embedding representation to realize knowledge reasoning from explicit geoscience data to deep geoscience knowledge, and the formula is as follows: wherein, represents an embedding representation of a certain author, represents an embedding representation of a certain keyword, finding similar datasets of geoscience datasets, computing similarity by embedding representation of different entities, the formula is as follows: Then the similarity of all datasets of any dataset i is: By sorting and taking the highest k values, the most relevant k datasets are reasoned out.

2. The geoscience data question answering method based on knowledge graph reasoning according to claim 1, characterized in that, The construction of the geoscience knowledge graph comprises a concept layer construction step and an instance layer construction step: The concept layer construction of the geoscience knowledge graph comprises the following steps: for metadata information of geoscience knowledge, description and expression are performed through a knowledge graph, the construction of the concept layer of the graph is completed, the entity category and the relationship category are determined, and information that is not easy to connect is taken as an entity attribute, and the graph architecture is completed; The instance layer construction of the geoscience knowledge graph comprises the following steps: the metadata of the geoscience dataset is sorted, cleaned and deduplicated, the instantiation of the geoscience knowledge graph is completed, the geoscience dataset information is completely represented and connected through triplets.

3. The geoscience data question answering method based on knowledge graph reasoning according to claim 1, characterized in that, The step S2 comprises the following steps: Step S2.1: constructing a training dataset; Step S2.2: preprocessing the text in the training dataset and representing the text in a vector form; Step S2.3: training a named entity recognition model by using the vectorized text representation, and the formula is as follows: wherein, a loss function representing the model, D represents a training corpus dataset, x represents an input text vector, s represents a structure prompt for information extraction, respectively represent the encoder and decoder parameters, and the model is optimized by cross-entropy loss to extract the corresponding result y.

4. The geoscience data question answering method based on knowledge graph reasoning according to claim 3, characterized in that, Step S3 comprises the following steps: Step S3.1: performing information completion on the geographic position entities with multiple expressions in the original geoscience knowledge graph, to obtain completed geographic entity information; Step S3.2: converting the completed geographic entity information into corresponding description text, and vectorizing the description text to obtain corresponding text information; Step S3.3: encode the latitude and longitude range information and the time information of the geographic entity to obtain the spatiotemporal information of the geographic entity; Step S3.4: fuse the text information and the spatiotemporal information, and perform geographic entity alignment using the fused representation, according to the following formula: wherein, represents an alignment matrix between the i-th geographical entity and the j-th geographical entity, represents a vector representation of the i-th geographical entity, represents a transpose of the vector representation of the j-th geographical entity, represents a similarity between the different representations calculated, represents a similarity threshold set. Determine whether the geographic entities are aligned according to the set threshold, and add a connection relationship in the knowledge graph for the alignable geographic entities; when the similarity between different representations is greater than the threshold, it indicates alignment; when the similarity between different representations is less than or equal to the threshold, it indicates no alignment.

5. A geoscience data question and answer system based on knowledge graph reasoning, characterized in that, Comprise: Module M1: construct a geoscience knowledge graph according to geoscience dataset information; Module M2: train a named entity recognition model to perform question semantic understanding and information extraction around the key intent of the geoscience dataset question, and obtain the corresponding extraction result; Module M3: fuse the text information and spatiotemporal information corresponding to the geographic entity name in the extraction result, and perform entity alignment on the geographic entity in the extraction result to obtain the corresponding alignment result; Module M4: based on the entity relationship structure of the geoscience knowledge graph, carry out knowledge graph embedding to capture the potential relationship and global information across entities, and perform knowledge reasoning from geoscience explicit data to deep knowledge to obtain the corresponding reasoning result; Module M5: fuse the extraction result, alignment result and reasoning result for multi-domain retrieval to obtain the dataset answer; The module M4 comprises the following modules: Module M4.1: knowledge graph preprocessing, additional disambiguation for entities with the same name but different categories, and random independent ID for each entity and relationship in the knowledge graph, mapping relationship between graph string and ID, graph stored in the form of triple (h, r, t) to form a fact set F: Module M4.2: graph embedding initialization, random embedding for each random independent ID, and establishment of entity set E and relationship set R: where the representation of each entity is composed of two parts and representing the entity's basic position embedding and translation variable, respectively, and each relation r is encoded as an axisymmetric hyperrectangle with each vector being 256-dimensional. Module M4.3: Graph embedding modeling, to model complex entity relationships, each entity will have different representations in different facts, for any fact , the corresponding final entity representation is: ​ wherein, denotes the translation variable of entity j; Module M4.4: select a suitable evaluation function according to the graph embedding, including calculating the score function by the following distance function: wherein, represents a center point of a rectangular frame, represents a width of a rectangular frame, represents a bias related to the width, when the embedding point of an entity is located in the target rectangle, the distance is inversely proportional to the size of the rectangle, a lower update weight is given to make the point always remain in the frame; when the embedding point is located outside the target rectangle, the size of the rectangle is linearly related to the distance, a higher weight is taken as a punishment term, and the total score function is defined as the sum of the 2nd norm of the distance in all n entity and relation frames, and the formula is as follows: Module M4.5: after modeling, train the graph embedding, and continuously optimize the embedding of entities and relationships through logistic loss: when the triple is positive, take 1 when the triple is negative, take -1; Module M4.6: use embedding representation to realize knowledge reasoning from explicit geoscience data to deep geoscience knowledge, according to the following formula: wherein, represents an embedding representation of a certain author, represents an embedding representation of a certain keyword, finding similar datasets of geoscience datasets, computing similarity by embedding representations of different entities, the formula is as follows: Then the similarity of all datasets of any dataset i is: Sort and take the top k values to infer the most relevant k datasets.

6. The geoscience knowledge graph reasoning-based question answering system according to claim 5, characterized in that, Constructing a geoscience knowledge graph includes a concept layer construction module and an instance layer construction module: The concept layer construction of the geoscience knowledge graph comprises: describing and expressing the metadata information of geoscience knowledge through a knowledge graph, completing the construction of the concept layer of the graph, determining the entity categories and relationship categories, and completing the graph architecture by taking information that is not easy to connect as entity attributes; The instance layer construction of the geoscience knowledge graph comprises: organizing, cleaning and deduplicating the metadata of the geoscience dataset, completing the instantiation of the geoscience knowledge graph, and connecting the geoscience dataset information through triplets.

7. The geoscience knowledge graph reasoning-based question answering system according to claim 5, characterized in that, The module M2 comprises the following modules: Module M2.1: construct a training dataset; Module M2.2: pre-process the text in the training data set and vectorize the text representation; Module M2.3: train the named entity recognition model using the vectorized text representation, as follows: wherein, a loss function representing a model, D represents a training corpus data set, x represents an input text vector, s represents a structure prompt of information extraction, respectively represent the encoder and decoder parameters, and the model is optimized by cross-entropy loss to extract the corresponding results y.

8. The geoscience knowledge graph reasoning-based question answering system according to claim 7, characterized in that, Module M3 includes the following modules: Module M3.1: complete the information of geographical location entities in various expressions in the original geosciences knowledge graph to obtain completed geographical entity information; Module M3.2: convert the completed geographical entity information into corresponding description text and vectorize the description text to obtain corresponding text information; Module M3.3: encode the latitude and longitude range information and time information of the geographical entity to obtain the spatio-temporal information of the geographical entity; Module M3.4: fuse the text information and the spatio-temporal information, and perform geographical entity alignment using the fused representation, as follows: wherein, represents an alignment matrix between the i-th geographical entity and the j-th geographical entity, represents a vector representation of the i-th geographical entity, represents a transpose of the vector representation of the j-th geographical entity, represents a similarity between the different representations calculated, represents a similarity threshold set. Determine whether the geographical entities are aligned according to the set threshold, and add a connection relationship in the knowledge graph for the geographical entities that can be aligned; when the similarity between different representations is greater than the threshold, it indicates alignment, and when the similarity between different representations is less than or equal to the threshold, it indicates no alignment.

Citation Information

Patent Citations

  • Knowledge graph question-answering method and system based on graph neural network embedding matching

    CN112765312A

  • Question and answer method and system based on knowledge enhancement generative language model and medium

    CN115759254A