An intelligent search method for knowledge question answering based on block decomposition

Through the knowledge question-and-answer intelligent search method based on block decomposition, the knowledge question-and-answer intelligent search model is constructed using the tensor decomposition algorithm, which solves the problems of low search accuracy and low accuracy in the existing technology, and achieves an efficient and accurate search experience.

CN113987110BActive Publication Date: 2025-02-18THE FOURTH INST OF NUCLEAR ENG OF CNNC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111373960.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2025-02-18
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

With the low search accuracy, low accuracy and poor user search experience, existing intelligent search technology is difficult to effectively complete data search in the knowledge library.

Method used

Using the knowledge Q&A intelligent search method based on block decomposition, the knowledge Q&A intelligent search model is constructed by converting the knowledge graph data into a structured triple data set, and using One-hot encoding and BTD tensor decomposition algorithm to achieve more accurate search Complete.

Benefits of technology

It improves search accuracy and accuracy, improves users' search experience, and realizes an efficient and accurate search system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113987110B_ABST
    Figure CN113987110B_ABST
Patent Text Reader

Abstract

The present invention discloses a knowledge question and answer intelligent search method based on block decomposition, preprocessing the knowledge data imported into the database, converting it into a triple data set of structured form data; using One‑hot encoding to encode the triple data set of structured data after conversion; then dividing the data set into a training set and a test set, and using the BTD tensor decomposition algorithm to build a knowledge question and answer intelligent search model. This method converts it into a third-order binary tensor problem in mathematics, which can predict missing subject or object entities. The present invention uses all real triple subsets to learn the embedding vectors of entities and relationships, which is a more generalized decomposition based on mathematical tensors, and it can more accurately decompose the formed factors. The present invention can perform search completion in a more accurate way after a large amount of data training under the characteristics of low search accuracy and poor user search experience, so as to realize an efficient and accurate search system method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of natural language processing and information retrieval, and in particular relates to a knowledge question-answering intelligent search method based on block decomposition. Background Art

[0002] Intelligent search engines are a new generation of search engines that combine artificial intelligence technology. In the vast ocean of information, people can only rely on search engines to quickly obtain the information they need in the knowledge graph. Link prediction, as an important task in intelligent search, aims to meet people's increasingly complex search tasks based on the existing knowledge graph. It is essentially a graph of nodes and edges, where nodes are entities and edges are relationships. Generally, a fact in the real world is described in the form of a triple (head entity, relationship, tail entity). With the development of computer technology and the times, the data we store is growing at an astonishing rate. This requires us to better sort and refine effective data. Generally, in the real world, a triple (head entity, relationship, tail entity) is usually used to describe a fact. For example, (Jinjiangjiu, author, Li Bai), in real databases, there are many data that need to be completed or reasonably inferred to obtain reasonable prediction results. However, most methods that rely on manual search and completion have become incapable in this era of rapid data explosion. Therefore, it is very necessary for us to invent block decomposition algorithms and apply them to intelligent search.

[0003] With the rapid development of science and technology, emerging artificial intelligence methods have entered various fields and have become an important means for researchers in many scientific research fields to solve problems. In recent years, tensor decomposition technology has been well applied in the field of artificial intelligence. This method helps users search better by introducing the idea of ​​tensor decomposition into the search field.

[0004] This method previously used the existing knowledge base content for intelligent search prediction, which has high efficiency and explainability. With the development of neural network algorithms, some neural network methods have gradually been applied to this field, but the black box nature and opacity of neural network algorithms often make it impossible for researchers to explain the reasons and motivations for their speculations. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a knowledge question-answering intelligent search method based on block decomposition. It can complete the search in a more accurate way after a large amount of data training under the characteristics of low search accuracy, low precision and poor user search experience, so as to realize an efficient and accurate search system.

[0006] The present invention is achieved through the following technical solutions:

[0007] A knowledge question-answering intelligent search method based on block decomposition comprises the following steps:

[0008] Step S1: Store the data in the knowledge graph into the database;

[0009] Step S2: preprocess the knowledge data imported into the database and convert it into a triple data set of structured data;

[0010] Step S3: One-hot encoding is used to encode the triplet data set of structured data converted in step S2;

[0011] Step S4: Split the data set in step S3 into a training set and a test set, and use the BTD tensor decomposition algorithm to build a knowledge question-answering intelligent search model.

[0012] In the above technical solution, step S2 includes the following steps:

[0013] Step S2.1: Perform entity extraction: that is, the recognition of named entities, including entity detection and classification;

[0014] Step S2.2: Extract triple relations: A data set is represented as a set of head entity-relationship-tail entity;

[0015] Step S2.3: Perform entity unification;

[0016] Step S2.4: Perform reference resolution.

[0017] In the above technical solution, in step S3, the entity e in each data set of the structured data converted in step S2 is i is represented by a one-hot binary vector of dimension f, let The i-th element of The i-th element of is equal to 1, and the other elements are set to 0; for each relationship r, it is represented by an l-dimensional one-hot binary vector, let and The j-th element of is set to 1 and the rest are set to 0; f and l refer to the number of entities and the dimension of each entity vector embedding, respectively.

[0018] In the above technical solution, in step S4, the model initial parameters Learning rate, batch size, ent_vec_dim, rel_vec_dim, as well as the maximum number of iterations and step size are set.

[0019] In the above technical solution, in step S4, the training set data is fed into the model, and the data set, model parameters and number of iterations are adjusted according to the search results.

[0020] In the above technical solution, in step S4, the training is performed until the loss function converges, and after multiple adjustments, the model is formally trained.

[0021] In the above technical solution, in step S4, the test set data set is imported into the model, the model score function is calculated, and the score function is applied to judge the truth or falsity of the triple. The tensor coordinates correspond to the ID of the entity and the relationship in the triple. When the triple is true, the value of the corresponding third-order binary tensor will be set to 1, otherwise, it will be set to 0.

[0022] In the above technical solution, the score function is:

[0023] in:

[0024] is the head entity embedding matrix, Embedding matrix for the tail entity;

[0025] h s and t o are the row vectors of matrices H and T;

[0026] r r and r r -1 refers to the vector of relations;

[0027] k 1 and κ 2 are the core tensors of the positive and inverse terms respectively;

[0028] × n is the tensor product along the nth order;

[0029] If the triple is true when the scoring function is applied, the final scoring function score is a positive number; otherwise, the final score is a negative number.

[0030] The advantages and beneficial effects of the present invention are:

[0031] This method converts it into a third-order binary tensor problem in mathematics, which can predict missing subject or object entities. The present invention uses all real triple subsets to learn the embedding vectors of entities and relationships. It is a more generalized decomposition based on mathematical tensors, which can more accurately decompose the factors formed. On this basis, we can get more accurate embedding vectors of entities and relationships. The present invention can complete the search in a more accurate way after a large amount of data training under the characteristics of low search accuracy, low precision and poor user search experience, so as to realize an efficient and accurate search system method. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a flow chart of the knowledge question and answer intelligent search method based on block decomposition of the present invention.

[0033] For ordinary technicians in this field, other relevant drawings can be obtained based on the above drawings without any creative work. DETAILED DESCRIPTION

[0034] In order to enable those skilled in the art to better understand the technical solution of the present invention, the technical solution of the present invention is further described below in conjunction with specific embodiments.

[0035] Embodiment 1

[0036] A knowledge question-answering intelligent search method based on block decomposition comprises the following steps:

[0037] Step S1: Store the data in the knowledge graph into the database (SQL Server is used as the database). The specific steps are as follows:

[0038] Click "Data Import" on the page, select the database to be imported, and click "Upload" to complete the data import. These data come from the data in the knowledge graph library, including all the data sets you want to complete.

[0039] Step S2: pre-process the knowledge data imported into the database and convert it into a triple data set of structured data for reading by the system model, which can be used for the subsequent construction of the knowledge base. The specific steps are as follows:

[0040] Step S2.1: Perform entity extraction: that is, recognition of named entities, including entity detection and classification.

[0041] Step S2.2: Extract triple relations: A data set can be represented as a set of head entity-relationship-tail entity, for example: mining area-supervisor-control room, that is, the mining area is supervised by the control room.

[0042] Step S2.3: Perform entity unification: For example, "yellow cake" and "ammonium diuranate" and "ammonium diuranate" need to be unified.

[0043] Step S2.4: Perform reference digestion: For example, in “in-situ uranium leaching technology has become the main development direction of the natural uranium industry at home and abroad, and the natural uranium products it produces are close to 50% of the world's total production”, “it” refers to in-situ uranium leaching technology.

[0044] Step S3: One-hot encoding is used to encode the data set of structured data converted in step S2 (referring to triples (head entity-relationship-tail entity)); the specific steps are as follows:

[0045] The entity e in each data set of the structured data converted in step S2 iis represented by a one-hot binary vector of dimension f, let The i-th element of The i-th element of is equal to 1, and the other elements are set to 0; similarly, for each relationship r represented by an l-dimensional one-hot binary vector, let and The jth element of is set to 1, and the rest are set to 0; f and l refer to the number of entities and the dimension of each entity vector embedding, respectively. If this triplet dataset is true, then the corresponding core tensor κ 1 The value of is 1, and the others are -1. And set the core tensor κ 2 The value of is 1, and the others correspond to -1. For example, for a certain sample, take (male, US, Internet Explorer) as an example, and the feature of this classification value needs to be digitized, "male" corresponds to [1, 0], "US" corresponds to [0, 1, 0], and "Internet Explorer" corresponds to [0, 0, 0, 1]. The encoding result of the complete feature digitization is: [1, 0, 0, 1, 0, 0, 0, 1].

[0046] Step S4: Split the data set in step S3 into a training set and a test set, and use the BTD tensor decomposition algorithm to build a knowledge question answering intelligent search model. The specific steps are as follows:

[0047] Step S4.1: First, select the data set to be completed in step S3, and divide the data set into a training set and a test set according to a certain ratio. The training set is used to train the model parameters after the model is determined. Note that the training is for ordinary parameters (each time a data is added to train the model, the parameters in the model will be affected, and it is continuously updated through multiple iterations, which is a gradient descent process) rather than hyperparameters (hyperparameters refer to the parameters set before the start of training. The selection of hyperparameters is actually independent of the training process, and the training process will not affect the hyperparameters. However, after the training is completed, it can be considered whether the hyperparameters can be optimized based on the training results. If it can be optimized, adjust the value of the hyperparameters to start the next training); the test set is to test the model with the test set after the model is trained with the training set to test whether the model is accurate. Generally, the data set usually uses 80% of the data set as the training set and 20% as the test set.

[0048] Step S4.2: Set the model initial parameters Learning rate, batch size, ent_vec_dim, rel_vec_dim, as well as the maximum number of iterations and step size. See Table 1 for a description of these parameters.

[0049] Table 1, description of parameters

[0050]

[0051] Step S4.3: Send the training set data into the model, and adjust the data set, model parameters and number of iterations according to the search results.

[0052] Step S4.4: Train until the loss function converges, that is, the predicted value is closer to the true value. After multiple adjustments, the model is formally trained. This embodiment uses the full binary cross entropy loss and uses the Adam optimizer to optimize our loss:

[0053]

[0054] in:

[0055]

[0056] p=σ(κ× 1 h s × 2 r r × 3 to)

[0057] Step S4.5: Import the test set dataset into the model.

[0058] Step S4.6: The model score function is calculated and the score function is applied to determine the truth or falsity of the triple. The tensor coordinates correspond to the ID of the entity and the relationship in the triple. When the triple is true, the value of the corresponding third-order binary tensor will be set to 1, otherwise, it will be set to 0.

[0059] The scoring function is: in:

[0060] is the head entity embedding matrix, Embedding matrix for the tail entity;

[0061] h s and t o are the row vectors of matrices H and T;

[0062] r r and r r -1 refers to the vector of relations;

[0063] κ 1 and κ 2 are the core tensors of the positive and inverse terms respectively;

[0064] × n is the tensor product along the nth order;

[0065] If the triple is true when the scoring function is applied, the final scoring function score is a positive number; otherwise, the final score is a negative number.

[0066] Embodiment 2

[0067] This embodiment conducts an experimental verification of the effectiveness of the knowledge question-answering intelligent search method based on block decomposition described in the first embodiment.

[0068] This embodiment compares the block decomposition-based knowledge question answering intelligent search model of the present invention with existing TransE, DisMult, ANALOG, ComplEx, ConvE, CrossE and other different models. In order to evaluate the performance of different models, this embodiment uses four evaluation indicators: MRR, Hit@10, Hit@3, Hit@1.

[0069] MRR is the average of the reciprocal Mean Reciprocal Rank, and the calculation formula is as follows:

[0070] Among them, |Q| is the total number of prediction results, rank i Indicates the ranking of the expected output results in the actual results.

[0071] Hit@n: It represents the percentage of the top n rankings. The higher the value, the better the performance. In this embodiment, Hit@10, Hit@3, and Hit@1 are selected to evaluate the performance of the model of the present invention to ensure the comprehensiveness of the model evaluation.

[0072] Commonly used datasets: Tmall dataset, Beibei dataset, Google dataset, FB15K, WN18RR, WN18, ICEWS14, ICEWS05-15, YAGO3-10 and other commonly used datasets. This example uses the following three datasets for performance testing:

[0073] FB15K-237: FB15K-237 is a subset of FB15K, taken from Freebase and contains 237 relations, 14,541 entities, and 310,116 triples. During the construction process, in order to increase the difficulty of prediction, the inverse relations were cancelled during the construction process.

[0074] WN18: WN18 is a subset of WordNet, containing 40,943 entities with 18 different relationships and 93,003 triples. The main relationship patterns of this dataset are symmetric, asymmetric and reflexive. The type of relationship has a profound impact on information extraction and information representation in link prediction tasks, which can also help us test our model more comprehensively.

[0075] WN18RR: WN18RR is derived from WN18, mainly including 11 relations, 40943 entities, 93003 triples, and mainly retains the symmetric and asymmetric relations in the WN18 dataset.

[0076] The following table shows the effects of the block decomposition-based knowledge question-answering intelligent search model of the present invention and the existing TransE, DisMult, ANALOG, ComplEx, ConvE, CrossE and other different models.

[0077] Table 2. Comparison of the effects of different models

[0078]

[0079] The present invention is described above by way of example. It should be noted that, without departing from the core of the present invention, any simple deformation, modification or other equivalent replacement that can be made by those skilled in the art without inventive effort falls within the protection scope of the present invention.

Claims

1. A knowledge question answering intelligent search method based on block decomposition, characterized by: The following steps are involved: Step S1: storing the knowledge data in the knowledge graph into the database; Step S2: preprocess the knowledge data imported into the database and convert it into a triple data set of structured data; Step S3: One-hot encoding is used to encode the triplet data set of structured data converted in step S2; Step S4: Split the data set in step S3 into a training set and a test set, and use the BTD tensor decomposition algorithm to build a knowledge question answering intelligent search model; In step S3, the entity e in each data set of the structured data converted in step S2 is i is represented by a one-hot binary vector of dimension f, let The i-th element of The i-th element of is equal to 1, and the other elements are set to 0; for each relationship r, it is represented by an l-dimensional one-hot binary vector, let and The jth element of is set to 1, and the rest of the elements are set to 0; f and l refer to the number of entities and the dimension of each entity vector embedding respectively; In step S4, the test set data set is imported into the model, and the model score function is calculated. The score function is applied to determine the truth or falsity of the triple. The tensor coordinates correspond to the ID of the entity and the relationship in the triple. When the triple is true, the value of the corresponding third-order binary tensor will be set to 1, otherwise, it will be set to 0. The score function is: in: is the head entity embedding matrix, Embedding matrix for the tail entity; h s and t o are the row vectors of matrices H and T; r r and A vector that refers to a relationship; κ1 and κ2 are the core tensors for the positive and inverse terms, respectively; × n is the tensor product along the nth order; If the triple is true when the scoring function is applied, the final scoring function score is a positive number; otherwise, the final score is a negative number.

2. The block decomposition-based knowledge question-answering intelligent search method according to claim 1 is characterized by: Step S2 includes the following steps: Step S2.1: Perform entity extraction: that is, the recognition of named entities, including entity detection and classification; Step S2.2: Extract triple relations: A data set is represented as a set of head entity-relationship-tail entity; Step S2.3: Perform entity unification; Step S2.4: Perform reference resolution.

3. The block decomposition-based knowledge question-answering intelligent search method according to claim 1 is characterized in that: In step S4, the initial model parameters Learning rate, batch size, ent_vec_dim, rel_vec_dim, as well as the maximum number of iterations and step size are set.

4. The block decomposition-based knowledge question-answering intelligent search method according to claim 1 is characterized in that: In step S4, the training set data is fed into the model, and the data set, model parameters and number of iterations are adjusted according to the search results.

5. The block decomposition-based knowledge question-answering intelligent search method according to claim 1 is characterized by: In step S4, the training is performed until the loss function converges, and after multiple adjustments, the model is formally trained.

6. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed, the steps of the method according to any one of claims 1 to 5 are implemented.