A problem solving method, an intelligent terminal and a storage medium

By acquiring question and paragraph information entities, constructing an entity graph using attention mechanisms and knowledge graphs, and combining graph convolution operations, the problem of low answer output accuracy in existing technologies is solved, achieving higher solution accuracy.

CN115248848BActive Publication Date: 2026-07-31TCL TECHNOLOGY GROUP CORPORATION
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TCL TECHNOLOGY GROUP CORPORATION
Filing Date
2021-04-26
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing question-solving methods based on multi-paragraph reasoning suffer from low accuracy in outputting answers due to limitations in feature extraction from relevant paragraphs, especially when the paragraphs are long and useful features cannot be extracted.

Method used

By acquiring the question to be answered and related paragraphs, the question information entities and the fused paragraph information entities are identified. An attention mechanism is used to fuse them, knowledge entities are obtained and an entity graph is constructed. Subgraph sampling algorithm and graph convolution operation are used to extract feature vectors, and finally the target answer is determined.

Benefits of technology

It improves the accuracy of problem-solving results by integrating external knowledge into the problem and paragraph information entities, thereby enhancing the ability to extract feature vectors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115248848B_ABST
    Figure CN115248848B_ABST
Patent Text Reader

Abstract

This invention discloses a problem-solving method, a smart terminal, and a storage medium. The method includes: acquiring a problem to be solved and several related paragraphs corresponding to the problem; determining several problem information entities and several fused paragraph information entities based on the problem to be solved and the related paragraphs; acquiring several knowledge entities corresponding to the fused paragraph information entities; constructing an entity graph based on the problem information entities, the fused paragraph information entities, and the knowledge entities; determining a feature vector corresponding to the problem to be solved based on the entity graph; and determining the target answer corresponding to the problem to be solved based on the feature vector. This invention constructs an entity graph based on problem information entities, paragraph information entities, and several knowledge entities corresponding to the paragraph information entities, and determines the target answer to the problem based on the feature vector determined from the entity graph. This allows external knowledge to be integrated into the problem information entities and paragraph information entities to extract feature vectors, improving the accuracy of the problem-solving results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and more particularly to a question-answering method, a smart terminal, and a storage medium. Background Technology

[0002] Text-based question answering (QA) is a classic problem in the field of natural language processing, and most existing methods focus on finding the answer to a specific question within a single paragraph. However, in real life, many difficult questions often require finding answers in the text of two or even more documents, which has led researchers to shift their focus to question answering based on multi-paragraph reasoning, which better reflects machine intelligence.

[0003] Current mainstream question-solving methods based on multi-paragraph reasoning extract features from relevant paragraphs retrieved from the question and output the probability distribution of the answer. This method is limited by the number of relevant paragraphs, resulting in a limited number of features extracted. Furthermore, when the paragraphs are long, it fails to extract useful features, leading to low accuracy in the final answer.

[0004] Therefore, existing technologies still need improvement and development. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a question-answering method, a smart terminal and a storage medium to address the above-mentioned defects of the prior art. The aim is to solve the problem that the existing question-answering methods based on multi-segment reasoning extract features from relevant paragraphs and output the probability distribution of the answer, resulting in low accuracy of the final output answer.

[0006] The technical solution adopted by this invention to solve the problem is as follows:

[0007] In a first aspect, embodiments of the present invention provide a problem-solving method, comprising:

[0008] Obtain the unanswered question and several associated paragraphs corresponding to the unanswered question; and obtain several question information entities and several fused paragraph information entities based on the unanswered question and the several associated paragraphs.

[0009] Obtain several knowledge entities corresponding to several fused paragraph information entities, and construct an entity graph based on several question information entities, several fused paragraph information entities, and several knowledge entities;

[0010] Based on the entity graph, the feature vector corresponding to the question to be solved is determined, and based on the feature vector, the target answer corresponding to the question to be solved is determined.

[0011] The problem-solving method, wherein the step of obtaining the problem to be solved and the corresponding associated paragraphs includes:

[0012] Obtain the question to be answered and a number of pre-stored original documents, and determine a number of candidate documents corresponding to the question to be answered from the number of original documents.

[0013] Based on the question to be answered, several related paragraphs corresponding to the question to be answered are determined from several candidate documents.

[0014] The problem-solving method, wherein the step of obtaining several problem information entities and several fused paragraph information entities based on the problem to be solved and several associated paragraphs includes:

[0015] The unanswered question and the several paragraphs are preprocessed to obtain several question information entities corresponding to the unanswered question and several candidate paragraph information entities corresponding to the several paragraphs.

[0016] Several problem information entities and several candidate paragraph information entities are fused using an attention mechanism to obtain several fused paragraph information entities.

[0017] The question-answering method, wherein the step of fusing several question information entities and several candidate paragraph information entities through an attention mechanism to obtain several fused paragraph information entities includes:

[0018] Attention calculations are performed on several question information entities and several candidate paragraph information entities to obtain the feature attention weights fused from the several question information entities and several candidate paragraph information entities;

[0019] The candidate paragraph information entities are weighted and summed based on the feature attention weights to obtain several fused paragraph information entities that are fused with the question information entities.

[0020] The problem-solving method, wherein the step of obtaining several knowledge entities corresponding to several fused paragraph information entities includes:

[0021] Several fused paragraph information entities are input into a knowledge graph to obtain several knowledge information related to the fused paragraph information entities; wherein, the knowledge graph stores several knowledge information related to the fused paragraph information entities;

[0022] The knowledge information is preprocessed to obtain several knowledge entities corresponding to the fused paragraph information entities.

[0023] The problem-solving method, wherein the step of preprocessing the knowledge information to obtain the knowledge entities corresponding to the fused paragraph information entities includes:

[0024] The aforementioned knowledge information is segmented into words to obtain several knowledge words corresponding to the aforementioned knowledge information.

[0025] Several knowledge words are input into a preset word embedding model, and the word embedding model is used to convert the knowledge words into word vectors to obtain several knowledge entities corresponding to several fused paragraph information entities.

[0026] The problem-solving method, wherein the step of constructing an entity graph based on a plurality of problem information entities, a plurality of fused paragraph information entities, and a plurality of knowledge entities includes:

[0027] A basic graph structure is constructed using several of the aforementioned problem information entities as central nodes and several of the aforementioned fused paragraph information entities as child nodes.

[0028] Several of the knowledge entities are added to the basic graph structure to construct an entity graph.

[0029] The problem-solving method, wherein the step of adding several knowledge entities to the basic graph structure to construct the entity graph includes:

[0030] Connect several knowledge entities to the corresponding fusion paragraph information entities in the basic graph structure, and establish edges between several knowledge entities and the corresponding question information entities in the basic graph structure to construct an entity graph.

[0031] The problem-solving method, wherein the step of determining the feature vector corresponding to the problem to be solved based on the entity graph includes:

[0032] A subgraph sampling algorithm is used to determine several subgraphs corresponding to the entity graph;

[0033] Graph convolution operations are performed on several of the subgraphs to determine the feature vectors corresponding to the problem to be solved.

[0034] The problem-solving method, wherein the step of determining several subgraphs corresponding to the entity graph using a subgraph sampling algorithm includes:

[0035] Traverse the entity graph to obtain the node degree corresponding to each of the problem information entities in the entity graph;

[0036] Based on the node degree, several subgraphs are generated with each of the aforementioned problem information entities as the central node.

[0037] The problem-solving method, wherein the step of generating several subgraphs with each of the problem information entities as central nodes based on the node degree includes:

[0038] When L≥M, generate a subgraph with each of the aforementioned problem information entities as the central node and M first-order neighbor nodes; where L is the node degree, M is a preset hyperparameter, and L and M are positive integers; or

[0039] When L < M, a subgraph is generated with each of the aforementioned problem information entities as the central node, having L first-order neighbor nodes and N second-order neighbor nodes; where L is the node degree, M is a preset hyperparameter, N is a positive integer, and L + N = M.

[0040] The problem-solving method, wherein the step of determining the target answer corresponding to the problem to be solved based on the feature vector includes:

[0041] The feature vector is input into a pre-trained classifier to obtain the probability distributions corresponding to several candidate answers;

[0042] The candidate answer with the highest probability value is selected from the probability distributions corresponding to the candidate answers, and determined as the target answer for the question to be answered.

[0043] Secondly, embodiments of the present invention also provide a question-answering device, comprising:

[0044] The entity acquisition module is used to acquire the question to be answered and several related paragraphs corresponding to the question to be answered, and to obtain several question information entities and several fused paragraph information entities based on the question to be answered and the several related paragraphs.

[0045] The graph construction module is used to obtain several knowledge entities corresponding to several fused paragraph information entities, and construct an entity graph based on several question information entities, several fused paragraph information entities and several knowledge entities.

[0046] The answer determination module is used to determine the feature vector corresponding to the question to be solved based on the entity graph, and to determine the target answer corresponding to the question to be solved based on the feature vector.

[0047] Thirdly, the present invention also provides a smart terminal, comprising: a processor and a storage medium communicatively connected to the processor, the storage medium being adapted to store multiple instructions; the processor being adapted to invoke the instructions in the storage medium to execute the steps of implementing the problem-solving method described above.

[0048] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having stored thereon a plurality of instructions adapted to be loaded and executed by a processor to perform the steps of implementing the problem-solving method described above.

[0049] The beneficial effects of this invention are as follows: First, the embodiments of this invention obtain the question to be answered and several related paragraphs corresponding to the question. Then, based on the question and the related paragraphs, several question information entities and several fused paragraph information entities are determined. Next, several knowledge entities corresponding to the fused paragraph information entities are obtained. An entity graph is constructed based on the question information entities, the fused paragraph information entities, and the knowledge entities. Finally, a feature vector corresponding to the question to be answered is determined based on the entity graph, and a target answer corresponding to the question to be answered is determined based on the feature vector. Therefore, by constructing an entity graph based on question information entities, paragraph information entities, and several knowledge entities corresponding to the paragraph information entities, and determining the target answer corresponding to the question to be answered based on the feature vector determined from the entity graph, external knowledge can be integrated into the question information entities and paragraph information entities to extract feature vectors, thereby improving the accuracy of the question-answering results. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 This is a flowchart illustrating the existing multi-segment splicing method;

[0052] Figure 2 This is a flowchart illustrating the existing single-segment synthesis method;

[0053] Figure 3 This is a flowchart illustrating the problem-solving method provided in an embodiment of the present invention;

[0054] Figure 4 This is a schematic diagram of the structure of the entity diagram provided in the embodiment of the present invention;

[0055] Figure 5 This is a schematic diagram of the structure of the subgraph generated in an embodiment of the present invention when the node degree is greater than or equal to the hyperparameter;

[0056] Figure 6 This is a schematic diagram of the structure of the subgraph generated in an embodiment of the present invention when the node degree is less than the hyperparameter;

[0057] Figure 7This is a schematic block diagram of the question-answering device provided in an embodiment of the present invention;

[0058] Figure 8 This is a block diagram illustrating the internal structure of a smart terminal provided in an embodiment of the present invention. Detailed Implementation

[0059] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0060] It should be noted that if the embodiments of the present invention involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.

[0061] Currently, the mainstream question-solving methods based on multi-parameter reasoning include two modes: pipeline and end-to-end. The pipeline mode separates the modules such as retrieval, reading, and candidate answer ranking into independent modules, while the end-to-end mode integrates these modules. Compared with the pipeline mode, the end-to-end mode has received more attention.

[0062] End-to-end problem-solving methods include multi-paragraph splicing and single-paragraph synthesis. For example... Figure 1 As shown, the multi-paragraph concatenation method combines multiple question-related paragraphs into a single long paragraph, extracts features from this long paragraph, and outputs the probability distribution of the answer. This method has high computational resource consumption, and when the paragraph is too long, it cannot extract useful features, resulting in low accuracy of the final output answer. Figure 2 As shown, the single-paragraph synthesis method extracts features from each paragraph and synthesizes and splices these features to output the probability distribution of the answer. Although this method can overcome the problem that long paragraphs cannot extract useful features, the accuracy of the final output answer is still low because the features extracted from related paragraphs are limited.

[0063] To address the problems of existing technologies, this embodiment provides a problem-solving method. This method integrates external knowledge into problem information entities and paragraph information entities, improving the accuracy of problem-solving results. Specifically, the method first obtains the problem to be solved and several associated paragraphs corresponding to the problem. Based on the problem and the associated paragraphs, several problem information entities and several integrated paragraph information entities are determined. Then, several knowledge entities corresponding to the integrated paragraph information entities are obtained. An entity graph is constructed based on the problem information entities, the integrated paragraph information entities, and the knowledge entities. Finally, a feature vector corresponding to the problem to be solved is determined based on the entity graph. The target answer to the problem is then determined based on the feature vector. Therefore, by constructing an entity graph based on the problem information entities, paragraph information entities, and the corresponding knowledge entities, and determining the target answer based on the feature vector determined from the entity graph, external knowledge entities can be integrated into the problem information entities and paragraph information entities to extract feature vectors, thus improving the accuracy of problem-solving results.

[0064] For example, when the question to be answered is "Who directed the internationally acclaimed film shot at the Qiao Family Compound in Shanxi in 1991?", paragraph 1 states, "The Qiao Family Compound rose to fame because of films and television dramas such as 'Raise the Red Lantern' and 'Qiao Family Compound,' and lanterns are still one of the key words of the scenic area today," and paragraph 2 states, "After the filming of 'Raise the Red Lantern,' directed by Zhang Yimou and starring Gong Li, was completed, tourists flocked to the Qiao Family Compound." To deduce the answer from paragraphs 1 and 2, the following steps are taken: First, determine the question information entities based on the question to be answered (1991, Qiao Family Compound in Shanxi, internationally acclaimed film, director). Then, determine the fused paragraph information based on paragraphs 1 and 2. The information entities are (Qiao Family Compound, Raise the Red Lantern, Qiao Family Compound, Zhang Yimou, Director, Raise the Red Lantern, Qiao Family Compound); then, several knowledge entities corresponding to the fused paragraph information entities are obtained. For example, based on the fused paragraph information entity "Zhang Yimou", the corresponding knowledge entity "Raise the Red Lantern" is obtained, and based on the fused paragraph information entity "Raise the Red Lantern", the corresponding knowledge entity "Silver Lion Award of Venice International Film Festival" is obtained. An entity graph is constructed based on several question information entities, several fused paragraph information entities, and several knowledge entities; finally, the feature vector corresponding to the question to be answered is determined based on the entity graph, and the target answer corresponding to the question to be answered is determined based on the feature vector. Therefore, external knowledge entities can be integrated into question information entities and paragraph information entities to extract feature vectors, thereby improving the accuracy of question answering results.

[0065] Exemplary methods

[0066] This embodiment provides a problem-solving method that can be applied to smart terminals. Specifically, as follows... Figure 3 As shown, the method includes:

[0067] Step S100: Obtain the question to be answered and several related paragraphs corresponding to the question to be answered, and obtain several question information entities and several fused paragraph information entities based on the question to be answered and several related paragraphs.

[0068] Specifically, the unanswered question is the question that needs to be answered in the question-and-answer process. It is a query statement entered by the user according to the actual application needs. Several related paragraphs are document paragraphs related to the unanswered question and used to deduce the answer to the unanswered question. They can be obtained from existing document libraries such as online encyclopedias based on the query statement entered by the user. The question information entity is a key information entity extracted from the unanswered question. The fused paragraph information entity is a key information entity extracted from the related paragraphs that is related to the question information entity. In this embodiment, after receiving the unanswered question entered by the user, the unanswered question is obtained, and several related paragraphs related to the unanswered question are determined. Then, key information entities are extracted from the unanswered question and the several related paragraphs to determine the several question information entities corresponding to the unanswered question and the several fused paragraph information entities corresponding to the several related paragraphs.

[0069] For example, if a user inputs the question "Who is the director of the internationally acclaimed film shot in the Qiao Family Compound in Shanxi in 1991?", the relevant paragraphs determined based on the question are "The Qiao Family Compound became famous for films and television dramas such as 'Raise the Red Lantern' and 'Qiao Family Compound,' and lanterns are still one of the keywords of the scenic area." Based on the question and the relevant paragraphs, the following question information entities are determined: (1991, Qiao Family Compound in Shanxi, internationally acclaimed film, director), and the following merged paragraph information entities are: (Qiao Family Compound, Raise the Red Lantern, Qiao Family Compound).

[0070] In one specific embodiment, step S100, which involves obtaining the question to be answered and the associated paragraphs corresponding to the question, includes:

[0071] Step S110: Obtain the question to be answered and a number of pre-stored original documents, and determine a number of candidate documents corresponding to the question to be answered from the number of original documents.

[0072] Step S120: Based on the question to be answered, determine several related paragraphs corresponding to the question to be answered from several candidate documents.

[0073] The plurality of original documents comprises several documents, each consisting of several paragraphs. These original documents are stored in a document database, such as an existing document database or online encyclopedia. Considering the large number of documents contained within the plurality of original documents, to improve question-answering efficiency, upon receiving a user's input question, the system retrieves the question and the pre-stored plurality of original documents. Based on the question, several candidate documents related to the question are selected from the plurality of original documents. Since some paragraphs in the candidate documents are unrelated to the question, after selecting candidate documents from the plurality of original documents, several related paragraphs corresponding to the question are further selected from the candidate documents based on the question. For example, if a user inputs the question "Who directed the internationally acclaimed film shot in the Qiao Family Compound in Shanxi in 1991?", then documents A and B are selected from several original documents to be relevant to the question. From document A, the relevant paragraph is selected: "The Qiao Family Compound rose to fame because of films and television dramas such as 'Raise the Red Lantern' and 'Qiao Family Compound,' and lanterns are still one of the keywords of the scenic area." From document B, the relevant paragraph is selected: "After the film 'Raise the Red Lantern,' directed by Zhang Yimou and starring Gong Li, was filmed, tourists flocked to the Qiao Family Compound."

[0074] In one specific implementation, step S100, which involves obtaining several question information entities and several fused paragraph information entities based on the unanswered question and several associated paragraphs, includes:

[0075] Step S130: Preprocess the unanswered question and the several paragraphs respectively to obtain several question information entities corresponding to the unanswered question and several candidate paragraph information entities corresponding to the several paragraphs;

[0076] Step S140: The problem information entities and candidate paragraph information entities are fused through an attention mechanism to obtain several fused paragraph information entities.

[0077] The question information entity is a key information entity extracted from the question to be answered. It is obtained by word segmentation and vectorization of the question to be answered. The fused paragraph information entity is a key information entity related to the question information entity extracted from the associated paragraphs. It is obtained by word segmentation and vectorization of the associated paragraphs and fused with the question information entity. In this embodiment, after obtaining the question to be answered and several associated paragraphs corresponding to the question to be answered, the question to be answered and several associated paragraphs are first segmented using existing word segmentation methods to obtain several question words and several paragraph words. For example, the question to be answered, "Who is the director of the film that won an international award and was filmed in the Qiao Family Compound in Shanxi in 1991?" is segmented into several question words such as "1991", "year", "in", "mountain", "west", "Qiao", "family", "big", "compound", "film", "of", "win", "international", "big", "award", "of", "director", "actor", "is", "who"; then, the obtained question words and Several paragraph segments are input into preset word embedding models such as Word2Vec and GloVe. The word embedding models are used to vectorize the question segments and paragraph segments to obtain several question information entities Q(Entity1, Entity2, ... EntityN) corresponding to the question to be answered and several candidate paragraph information entities (P1, P2, ... PN) corresponding to several related paragraphs. Finally, Attention(Q, P1, P2, ... PN) is executed, that is, the question information entities and candidate paragraph information entities are fused through the attention mechanism to obtain several fused paragraph information entities corresponding to several related paragraphs.

[0078] For example, consider the user-input question, "Who directed the internationally acclaimed film shot in the Qiao Family Compound in Shanxi in 1991?". Paragraph 1 states, "The Qiao Family Compound rose to fame due to films and television dramas such as 'Raise the Red Lantern' and 'Qiao Family Compound,' and lanterns remain one of the key words for the scenic area." Paragraph 2 states, "'Raise the Red Lantern' is a feature film produced by the China Film Co-production Corporation. In 1991, it won the 48th Venice International Film Festival Award." When determining the question information entities and the integrated paragraph information entities, the first step is to segment the question, paragraph 1, and paragraph 2 into words, resulting in question word segments and paragraph segments. The problem segment and several paragraph segments are then input into a general word embedding engine such as Word2Vec or Glove for word embedding processing. This yields several problem information entities (1991, Qiao Family Compound in Shanxi, won an international award, film, director) and several candidate paragraph information entities. Then, an attention mechanism is used to fuse these problem information entities and candidate paragraph information entities to obtain the fused paragraph information entities corresponding to paragraph 1 (Qiao Family Compound, Raise the Red Lantern, Qiao Family Compound) and paragraph 2 (Raise the Red Lantern, 1991, Venice International Film Awards).

[0079] In one specific embodiment, step S140 specifically includes:

[0080] Step S141: Perform attention calculation on several question information entities and several candidate paragraph information entities to obtain the feature attention weights fused from several question information entities and several candidate paragraph information entities;

[0081] Step S142: The candidate paragraph information entities are weighted and summed based on the feature attention weights to obtain several fused paragraph information entities that fuse the question information entities.

[0082] The candidate paragraph information entities include all paragraph information entities from several related paragraphs. To avoid interference from irrelevant paragraph information entities in the candidate paragraph information entities on the question answer, this embodiment employs an attention mechanism to filter out several fused paragraph information entities related to several question information entities from the candidate paragraph information entities. When determining the several fused paragraph information entities, attention is first calculated on the several question information entities and the several candidate paragraph information entities to obtain the feature attention weights of the fused question information entities and the several candidate paragraph information entities. Generally, the higher the feature attention weights, the higher the correlation between the candidate paragraph information entities and the question information entities. Then, the several candidate paragraph information entities are weighted and summed based on the feature attention weights to obtain several fused paragraph information entities that fuse the several question information entities. For example, several candidate paragraph information entities are obtained from the paragraph "After the filming of the TV series 'Raise the Red Lantern,' directed by Zhang Yimou and starring Gong Li, was completed, tourists flocked to the Qiao Family Compound." These entities are (Zhang Yimou, director, Gong Li, starring, "Raise the Red Lantern," Qiao Family Compound). Attention is calculated on several question information entities (1991, Qiao Family Compound in Shanxi, won an international award, film, director) and several candidate paragraph information entities (Zhang Yimou, director, Gong Li, starring, "Raise the Red Lantern," Qiao Family Compound) to obtain feature attention weights. Then, the several candidate paragraph information entities (Zhang Yimou, director, Gong Li, starring, "Raise the Red Lantern," Qiao Family Compound) are weighted and summed based on the feature attention weights to obtain several fused paragraph information entities (Zhang Yimou, director, Qiao Family Compound).

[0083] Step S200: Obtain several knowledge entities corresponding to several fused paragraph information entities, and construct an entity graph based on several question information entities, several fused paragraph information entities, and several knowledge entities.

[0084] The knowledge entities are those obtained from existing knowledge graphs and related to several fused paragraph information entities. They serve as auxiliary information for inferring the answer to the question from several related paragraphs. For example, several fused paragraph information entities are (Zhang Yimou, director, "Raise the Red Lantern", "Qiao Family Courtyard"), and their corresponding knowledge entities are (Zhang Yimou, Zhang Yimou). To improve the accuracy of the final output answer, this embodiment introduces a knowledge graph, which is an existing knowledge graph such as ConceptNet, Baidu Encyclopedia, Wikipedia, etc. The knowledge graph stores several knowledge information related to the fused paragraph information entities. After determining several fused paragraph information entities, the several fused paragraph information entities are input into the knowledge graph to obtain several knowledge entities related to the several fused paragraph information entities; then, an entity graph is constructed based on the several question information entities, the several fused paragraph information entities, and the several knowledge entities.

[0085] In one specific implementation, step S200, which involves obtaining several knowledge entities corresponding to several fused paragraph information entities, includes:

[0086] Step S210: Input several of the fused paragraph information entities into a knowledge graph to obtain several knowledge information related to the several fused paragraph information entities; wherein, the knowledge graph stores several knowledge information related to the fused paragraph information entities;

[0087] Step S220: Preprocess the knowledge information to obtain several knowledge entities corresponding to the fused paragraph information entities.

[0088] The knowledge information refers to knowledge paragraphs related to several fused paragraph information entities. This knowledge information is stored in existing knowledge graphs such as ConceptNet, Baidu Encyclopedia, and Wikipedia. By inputting several fused paragraph information entities into the knowledge graph, several pieces of knowledge information related to these entities can be obtained. For example, inputting Zhang Yimou into Baidu Encyclopedia yields knowledge information 1: "Zhang Yimou's name was given to him by his father; originally, he was called Zhang Yimou, and his father hoped his son would achieve great things. Zhang Yimou's ancestral home is Lintong, Shaanxi, and his family was a prominent family in Tianshi Town, Lintong City during the late Qing Dynasty." and knowledge information 2: "The film 'Raise the Red Lantern,' directed by Zhang Yimou, won the Silver Lion Award at the 48th Venice International Film Festival."

[0089] Since the knowledge information refers to knowledge paragraphs related to several fused paragraph information entities, after determining the knowledge information related to several fused paragraph information entities, it is also necessary to determine several knowledge entities based on the knowledge information. Similar to the aforementioned methods for determining question information entities and candidate paragraph information entities, when determining several knowledge entities, the knowledge information is first segmented into words to obtain several knowledge words corresponding to the knowledge information. These knowledge words are then input into a preset word embedding model such as Word2Vec or Glove. The word embedding model is used to vectorize the knowledge words to obtain several knowledge entities corresponding to several fused paragraph information entities. For example, the knowledge information 1 "Zhang Yimou's name was given to him by his father. Originally, his name was Zhang Yimou, and his father hoped that his son would achieve something in the future. Zhang Yimou's ancestral home is Lintong, Shaanxi. During the late Qing Dynasty, his family was a prominent family in Tianshi Town, Lintong City" and knowledge information 2 "The film 'Raise the Red Lantern,' directed by Zhang Yimou, won the Silver Lion Award at the 48th Venice International Film Festival" are processed into word segments to obtain several knowledge words. These knowledge words are then input into a general word embedding engine to obtain the knowledge entities corresponding to knowledge information 1 (Zhang Yimou, Zhang Yimou) and knowledge information 2 (Zhang Yimou, Raise the Red Lantern, Silver Lion Award at the Venice International Film Festival).

[0090] In one specific implementation, the step S200 of constructing an entity graph based on a plurality of question information entities, a plurality of fused paragraph information entities, and a plurality of knowledge entities includes:

[0091] Step S210: Construct a basic graph structure using several of the aforementioned problem information entities as central nodes and several of the aforementioned fused paragraph information entities as child nodes;

[0092] Step S220: Add several of the knowledge entities to the basic graph structure to construct an entity graph.

[0093] The entity graph includes several central nodes and several child nodes connected to these central nodes. In constructing the entity graph, this embodiment uses several problem information entities as central nodes and several fused paragraph information entities as child nodes to build a basic graph structure. Then, several knowledge entities corresponding to the acquired fused paragraph information entities are added to the basic graph structure to construct the entity graph. For example, as... Figure 4 As shown, for problem information entity 1, problem information entity 2 and problem information entity 3, the fused paragraph information entity is connected to the problem information entity respectively to construct the basic graph structure. Then, several knowledge entities are added to the basic graph structure to construct the entity graph.

[0094] In one specific embodiment, the step of adding several knowledge entities to the basic graph structure and constructing the entity graph in step S220 includes:

[0095] Step S221: Connect several knowledge entities to the corresponding fusion paragraph information entities in the basic graph structure, and establish connections between several knowledge entities and the corresponding question information entities in the basic graph structure to construct an entity graph.

[0096] Continue to refer to Figure 4 As shown, when adding several knowledge entities to the basic graph structure, the knowledge entities are first connected to the corresponding fused paragraph information entities in the basic graph structure. Then, edges are established between the knowledge entities and the corresponding question information entities in the basic graph structure to construct an entity graph. The integration of knowledge entities shortens the distance between related paragraphs and previously non-adjacent nodes of the answer, improving the accuracy of the question-answering results. Constructing new edge relationships based on knowledge entities expands the graph topology, making the graph topology dynamically variable. This flexible graph construction method can be widely adapted to various data samples.

[0097] For example, in the basic graph structure, the problem information entity "Qiao Family Compound in Shanxi" is connected to the fusion paragraph information entity "Raise the Red Lantern High". The knowledge entity identified by "Raise the Red Lantern High" is "Zhang Yimou". Therefore, the knowledge entity "Zhang Yimou" is connected to the fusion paragraph information entity "Raise the Red Lantern High", and an edge is constructed between the knowledge entity "Zhang Yimou" and the problem information entity "Qiao Family Compound in Shanxi", thereby adding the knowledge entity "Zhang Yimou" to the basic graph structure.

[0098] Step S300: Determine the feature vector corresponding to the question to be solved based on the entity graph, and determine the target answer corresponding to the question to be solved based on the feature vector.

[0099] After fusing question information entities, paragraph information entities, and knowledge entities to construct an entity graph, a feature vector corresponding to the unsolved question is extracted from the entity graph through graph convolution. This feature vector is then input into a pre-trained classifier to determine the target answer to the unsolved question. By involving question, knowledge, and paragraph-related information entities in graph convolution operations, the accuracy of the question-solving results is improved.

[0100] In one specific implementation, step S300, which involves determining the feature vector corresponding to the problem to be solved based on the entity graph, includes:

[0101] Step S310: Use a subgraph sampling algorithm to determine several subgraphs corresponding to the entity graph;

[0102] Step S320: Perform graph convolution operation on several of the subgraphs to determine the feature vector corresponding to the problem to be solved.

[0103] Traditional graph convolutional models suffer from low efficiency and high computational cost due to the different graph topologies constructed from different training data, limiting training to only one graph per session and thus hindering their ability to support training on extremely large-scale graph data. This embodiment employs a subgraph sampling algorithm. Using the problem information entity in the graph network as an index, the algorithm traverses the entity graph to obtain several subgraphs centered on the problem information entity. Then, graph convolution operations are performed on these subgraphs to extract the feature vector corresponding to the problem to be solved. By using subgraph sampling, a series of relatively consistent subgraphs can be extracted from flexibly constructed, irregular large graph structures, thereby increasing the scale of the model training data.

[0104] Furthermore, in this embodiment, a two-layer graph convolution operation is applied to the several subgraphs. First, the node features and adjacency matrices corresponding to the several subgraphs are obtained. Then, a first-layer convolution operation is performed on the node features corresponding to the subgraphs based on the first weight matrix and the adjacency matrix of the subgraphs to obtain an intermediate vector. Finally, a second-layer convolution operation is performed on the intermediate vector obtained in the first-layer convolution operation based on the second weight matrix and the adjacency matrix of the subgraphs to obtain the feature vector corresponding to the problem to be solved. The formula for the first-layer convolution operation is: H... 0 =ρ(N(W) 0 (X)A)), the formula for the second convolution operation is: H 1 =ρ(W 1 (H 0 In the subgraph, X represents the node features, A represents the adjacency matrix of the subgraph, N represents the node feature normalization function, defined as SparseRowSoftmax(LeakyReLU()), ρ represents the activation function, defined as ReLU(), and H... 0 W is the intermediate vector. 0 W is the first weight matrix. 1 This is the second weight matrix. This embodiment innovatively designs the graph convolution operation, using matrix transformations and normalization to transmit and aggregate information between graph nodes, thereby improving the feature extraction capability of the graph convolution algorithm.

[0105] In one specific embodiment, step S310 specifically includes:

[0106] Step S311: Traverse the entity graph and obtain the node degree corresponding to each of the problem information entities in the entity graph;

[0107] Step S312: Based on the node degree, generate several sub-graphs with each of the problem information entities as the central node.

[0108] The node degree corresponding to the problem information entity is the number of child nodes that the problem information entity has. In this embodiment, when using a subgraph sampling algorithm to determine several subgraphs corresponding to the entity graph, the first problem information entity V1 in the entity graph is found, and the node degree L1 corresponding to the problem information entity V1 is obtained. A subgraph with the problem information entity V1 as the center node is generated based on the node degree L1. Then, the next problem information entity V2 is found, and the node degree L2 corresponding to the problem information entity V2 is obtained. A subgraph with the problem information entity V2 as the center node is generated based on the node degree L2. This process is repeated until the next problem information entity V1 is found. n Obtain the problem information entity V n The corresponding node degree L n According to the node degree L n Generate a problem information entity V n The process continues until the entire entity graph is traversed, generating several subgraphs with each problem information entity in the entity graph as the central node.

[0109] In one specific embodiment, step S312 specifically includes:

[0110] Step S3121: When L≥M, generate a subgraph with each of the problem information entities as the central node and M first-order neighbor nodes; where L is the node degree, M is a preset hyperparameter, and L and M are positive integers.

[0111] Step S3122: When L < M, generate a subgraph with each of the problem information entities as the central node, having L first-order neighbor nodes and N second-order neighbor nodes; where L is the node degree, M is a preset hyperparameter, N is a positive integer, and L + N = M.

[0112] In this embodiment, a hyperparameter M is pre-set. After obtaining the node degree corresponding to each problem information entity in the entity graph, the node degree L is compared with the hyperparameter M. When L≥M, a subgraph is generated with each of the problem information entities as the center node and M first-order neighbor nodes, such as... Figure 5 As shown; where L is the node degree, M is a preset hyperparameter, and L and M are positive integers; when L < M, a subgraph is generated with each of the aforementioned problem information entities as the central node, having L first-order neighbor nodes and N second-order neighbor nodes, as shown. Figure 6 As shown; where L is the node degree, M is a preset hyperparameter, N is a positive integer, and L+N=M, thereby extracting several subgraphs with relatively consistent specifications from the entity graph. In a specific embodiment, the default value of the hyperparameter M is 6, and it can be adjusted as needed.

[0113] In one specific implementation, step S300, which involves determining the target answer corresponding to the question to be solved based on the feature vector, includes:

[0114] Step S330: Input the feature vector into a pre-trained classifier to obtain the probability distributions corresponding to several candidate answers;

[0115] Step S340: Select the candidate answer with the highest probability value from the probability distributions corresponding to the candidate answers, and determine it as the target answer for the question to be answered.

[0116] In this embodiment, a standard classifier with fully connected and Softmax classification is pre-built, and cross-entropy is used as the loss function. The classifier is iteratively trained using training samples. In each training iteration, the error value between the output answer of the classifier and the actual answer of the question in the training samples is calculated through forward propagation. When the error value is greater than a preset threshold or the number of iterations has not reached a preset number, the model parameters of the classifier are updated by standard backpropagation until the error value is greater than or equal to the preset threshold or the number of iterations has not reached a preset number, thus obtaining the pre-trained classifier.

[0117] After extracting the feature vector corresponding to the question to be solved from the entity graph, the feature vector is input into a pre-trained classifier, and the classifier outputs a probability distribution corresponding to several candidate answers; then, the candidate answer with the highest probability value is selected from the probability distributions of the candidate answers and determined as the target answer corresponding to the question to be solved.

[0118] Therefore, the embodiments of the present invention first obtain the question to be answered and several related paragraphs corresponding to the question to be answered. Based on the question to be answered and the several related paragraphs, several question information entities and several fused paragraph information entities are determined. Then, several knowledge entities corresponding to the several fused paragraph information entities are obtained. An entity graph is constructed based on the several question information entities, the several fused paragraph information entities, and the several knowledge entities. Finally, a feature vector corresponding to the question to be answered is determined based on the entity graph. The target answer corresponding to the question to be answered is determined based on the feature vector. Therefore, by constructing an entity graph based on question information entities, paragraph information entities, and several knowledge entities corresponding to the paragraph information entities, and determining the target answer based on the feature vector determined from the entity graph, external knowledge can be integrated into the question information entities and paragraph information entities to extract feature vectors, thus improving the accuracy of the question answering results.

[0119] Exemplary device

[0120] like Figure 7As shown in the illustration, this embodiment of the invention provides a question-solving device, which includes: an entity acquisition module 710, a graph construction module 720, and an answer determination module 730. Specifically, the entity acquisition module 710 is used to acquire a question to be answered and several associated paragraphs corresponding to the question to be answered, and to obtain several question information entities and several fused paragraph information entities based on the question to be answered and the several associated paragraphs. The graph construction module 720 is used to acquire several knowledge entities corresponding to the several fused paragraph information entities, and to construct an entity graph based on the several question information entities, the several fused paragraph information entities, and the several knowledge entities. The answer determination module 730 is used to determine the feature vector corresponding to the question to be answered based on the entity graph, and to determine the target answer corresponding to the question to be answered based on the feature vector.

[0121] Based on the above embodiments, the present invention also provides a smart terminal, the principle block diagram of which can be as follows: Figure 8 As shown, the smart terminal includes a processor, memory, network interface, display screen, and temperature sensor connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a problem-solving method. The display screen can be an LCD screen or an e-ink screen. The temperature sensor is pre-installed inside the smart terminal to detect the operating temperature of internal devices.

[0122] Those skilled in the art will understand that Figure 8 The block diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the smart terminal to which the present invention is applied. A specific smart terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0123] In one embodiment, a smart terminal is provided, including a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations:

[0124] Obtain the unanswered question and several associated paragraphs corresponding to the unanswered question; and obtain several question information entities and several fused paragraph information entities based on the unanswered question and the several associated paragraphs.

[0125] Obtain several knowledge entities corresponding to several fused paragraph information entities, and construct an entity graph based on several question information entities, several fused paragraph information entities, and several knowledge entities;

[0126] Based on the entity graph, the feature vector corresponding to the question to be solved is determined, and based on the feature vector, the target answer corresponding to the question to be solved is determined.

[0127] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0128] In summary, this invention discloses a problem-solving method, a smart terminal, and a storage medium. The method includes: acquiring a problem to be solved and several associated paragraphs corresponding to the problem; determining several problem information entities and several fused paragraph information entities based on the problem to be solved and the associated paragraphs; acquiring several knowledge entities corresponding to the fused paragraph information entities; constructing an entity graph based on the problem information entities, the fused paragraph information entities, and the knowledge entities; determining a feature vector corresponding to the problem to be solved based on the entity graph; and determining the target answer corresponding to the problem to be solved based on the feature vector. This invention constructs an entity graph based on problem information entities, paragraph information entities, and several knowledge entities corresponding to the paragraph information entities, and determines the target answer based on the feature vector determined from the entity graph. This allows external knowledge to be integrated into the problem information entities and paragraph information entities to extract feature vectors, improving the accuracy of the problem-solving results.

[0129] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A problem solving method characterized by, include: Obtain the unanswered question and several associated paragraphs corresponding to the unanswered question; and obtain several question information entities and several fused paragraph information entities based on the unanswered question and the several associated paragraphs. Obtain several knowledge entities corresponding to several fused paragraph information entities, and construct an entity graph based on several question information entities, several fused paragraph information entities, and several knowledge entities; Based on the entity graph, determine the feature vector corresponding to the question to be answered, and based on the feature vector, determine the target answer corresponding to the question to be answered; The step of obtaining several question information entities and several fused paragraph information entities based on the unanswered question and several associated paragraphs includes: The unanswered question and the several paragraphs are preprocessed to obtain several question information entities corresponding to the unanswered question and several candidate paragraph information entities corresponding to the several paragraphs. Several problem information entities and several candidate paragraph information entities are fused using an attention mechanism to obtain several fused paragraph information entities; The step of constructing an entity graph based on several question information entities, several fused paragraph information entities, and several knowledge entities includes: A basic graph structure is constructed using several of the aforementioned problem information entities as central nodes and several of the aforementioned fused paragraph information entities as child nodes. Connect several knowledge entities to the corresponding fusion paragraph information entities in the basic graph structure, and establish connections between several knowledge entities and the corresponding question information entities in the basic graph structure to construct an entity graph; The step of determining the feature vector corresponding to the unsolved problem based on the entity graph includes: A subgraph sampling algorithm is used to determine several subgraphs corresponding to the entity graph; Perform graph convolution operations on several of the subgraphs to determine the feature vectors corresponding to the problem to be solved. The step of determining the several subgraphs corresponding to the entity graph using the subgraph sampling algorithm includes: Traverse the entity graph to obtain the node degree corresponding to each of the problem information entities in the entity graph; Based on the node degree, several subgraphs are generated with each of the aforementioned problem information entities as the central node.

2. The question answering method according to claim 1, characterized in that, The steps for obtaining the unanswered question and the corresponding related paragraphs include: Obtain the question to be answered and a number of pre-stored original documents, and determine a number of candidate documents corresponding to the question to be answered from the number of original documents. Based on the question to be answered, several related paragraphs corresponding to the question to be answered are determined from several candidate documents.

3. The question answering method of claim 1, wherein, The step of fusing several question information entities and several candidate paragraph information entities through an attention mechanism to obtain several fused paragraph information entities includes: Attention calculations are performed on several question information entities and several candidate paragraph information entities to obtain the feature attention weights fused from the several question information entities and several candidate paragraph information entities; The candidate paragraph information entities are weighted and summed based on the feature attention weights to obtain several fused paragraph information entities that are fused with the question information entities.

4. The question answering method of claim 1, wherein, The step of obtaining several knowledge entities corresponding to several fused paragraph information entities includes: Several fused paragraph information entities are input into a knowledge graph to obtain several knowledge information related to the fused paragraph information entities; wherein, the knowledge graph stores several knowledge information related to the fused paragraph information entities; The knowledge information is preprocessed to obtain several knowledge entities corresponding to the fused paragraph information entities.

5. The question answering method according to claim 4, characterized in that, The step of preprocessing the knowledge information to obtain the knowledge entities corresponding to the fused paragraph information entities includes: The aforementioned knowledge information is segmented into words to obtain several knowledge words corresponding to the aforementioned knowledge information. Several knowledge words are input into a preset word embedding model, and the word embedding model is used to convert the knowledge words into word vectors to obtain several knowledge entities corresponding to several fused paragraph information entities.

6. The question answering method of claim 1, wherein, The step of generating several subgraphs with each of the problem information entities as the central node based on the node degree includes: When L≥M, a subgraph is generated with each of the aforementioned problem information entities as the central node and M first-order neighbor nodes; where L is the node degree, M is a preset hyperparameter, and L and M are positive integers; or when L<M, a subgraph is generated with each of the aforementioned problem information entities as the central node and L first-order neighbor nodes and N second-order neighbor nodes; where L is the node degree, M is a preset hyperparameter, N is a positive integer, and L+N=M.

7. The question answering method of claim 1, wherein, The step of determining the target answer to the question to be answered based on the feature vector includes: The feature vector is input into a pre-trained classifier to obtain the probability distributions corresponding to several candidate answers; The candidate answer with the highest probability value is selected from the probability distributions corresponding to the candidate answers, and determined as the target answer for the question to be answered.

8. A smart terminal, characterized in that, include: A processor, a storage medium communicatively connected to the processor, the storage medium being adapted to store multiple instructions; the processor being adapted to invoke the instructions in the storage medium to execute the steps of implementing the problem-solving method according to any one of claims 1-7.

9. A computer-readable storage medium storing a plurality of instructions thereon, characterized in that, The instructions are adapted to be loaded and executed by a processor to perform the steps of implementing the problem-solving method according to any one of claims 1-7.