Artificial intelligence question and answer method and device
By searching candidate answers on the knowledge graph and generating representation vectors using the knowledge adaptation module, the problem of low Q&A accuracy in the prior art is solved, and higher Q&A accuracy and better generalization ability are achieved.
Patent Information
- Application Number
- CN202311382728.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-23
- Publication Date
- 2025-04-25
AI Technical Summary
The existing knowledge graph-based Q&A technology is sensitive to pre-trained corpus and has poor generalization ability, resulting in poor answering accuracy on unseen knowledge triplets and low accuracy of AI Q&A.
By obtaining the questions to be answered, the candidate answers are retrieved based on the preset knowledge graph, and when the number of candidate answers is at least two, the candidate answers and questions are spliced separately and input into the knowledge adaptation module to obtain the representation vector. Use the knowledge adaptation module of the preset training set to determine the most matching prediction answer.
It improves the accuracy of artificial intelligence Q&A, reduces dependence on external training corpus, and enhances the integrity and generalization ability of knowledge graph modeling.
Smart Images

Figure CN119884287A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an artificial intelligence question-answering method and device. Background Art
[0002] Existing question-answering technology based on knowledge graphs mainly integrates the knowledge in the knowledge graph with the pre-trained language model to improve the accuracy of the language model in related tasks such as knowledge question answering. However, the existing technology is sensitive to the pre-training corpus and has relatively poor generalization ability. The existing technology needs to use external training corpus to jointly model the knowledge triples in the knowledge graph, some of which do not appear in the pre-training corpus. The existing technology has poor modeling ability on these knowledge triples, and the accuracy of answering related questions is poor, resulting in low accuracy of AI question answering.
[0003] That is to say, the accuracy of artificial intelligence question answering in the existing technology is low. Summary of the invention
[0004] The embodiments of the present application provide an artificial intelligence question-answering method and device, which can improve the accuracy of artificial intelligence question-answering.
[0005] In the first aspect, the artificial intelligence question-answering method provided by this application includes:
[0006] Get questions to be answered;
[0007] Searching on a preset knowledge graph based on the question to be answered to obtain candidate answers to the question to be answered;
[0008] When the number of candidate answers to the question to be answered is at least two, the at least two candidate answers and the question to be answered are respectively concatenated and input into a knowledge adaptation module to obtain at least two representation vectors, wherein the knowledge adaptation module is trained according to a preset training set, and the preset training set is constructed from knowledge triples of the preset knowledge graph;
[0009] Determine a predicted answer corresponding to the question to be answered from at least two candidate answers based on at least two of the representation vectors.
[0010] In the second aspect, the artificial intelligence question-answering device provided by the present application includes:
[0011] An acquisition module is used to obtain questions to be answered;
[0012] A retrieval module, used to search on a preset knowledge graph based on the question to be answered to obtain candidate answers to the question to be answered;
[0013] A representation module, used for, when the number of candidate answers to the question to be answered is at least two, respectively splicing the at least two candidate answers and the question to be answered and inputting them into a knowledge adaptation module to obtain at least two representation vectors, wherein the knowledge adaptation module is trained according to a preset training set, and the preset training set is constructed by knowledge triples of the preset knowledge graph;
[0014] A determination module is used to determine a predicted answer corresponding to the question to be answered from at least two candidate answers based on at least two of the representation vectors.
[0015] On the third aspect, the electronic device provided in this application includes a memory and a processor, the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the steps in the artificial intelligence question-answering method provided in this application.
[0016] In a fourth aspect, the computer-readable storage medium provided in the present application stores a plurality of instructions, which are suitable for loading by a processor to implement the steps in the artificial intelligence question-answering method provided in the present application.
[0017] In a fifth aspect, the computer program product provided in the present application includes a computer program or instructions, which, when executed by a processor, implement the steps in the artificial intelligence question-answering method provided in the present application.
[0018] In the present application, compared with the related art, a question to be answered is obtained; based on the question to be answered, a search is performed on a preset knowledge graph to obtain candidate answers to the question to be answered; when the number of candidate answers to the question to be answered is at least two, at least two candidate answers and the question to be answered are respectively spliced and input into a knowledge adaptation module to obtain at least two representation vectors, wherein the knowledge adaptation module is trained according to a preset training set, and the preset training set is constructed by knowledge triples of a preset knowledge graph; based on the at least two representation vectors, the predicted answer corresponding to the question to be answered is determined from at least two candidate answers. The present application directly constructs a preset training set based on the knowledge triples in the knowledge graph, and trains the knowledge adaptation module according to the preset training set, thereby solving the problems of the prior art's dependence on external corpus and incomplete knowledge graph modeling, thereby improving the accuracy of artificial intelligence question answering. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1This is a schematic diagram of a scenario of an artificial intelligence question-answering system provided in an embodiment of the present application;
[0021] Figure 2 It is a flowchart of an embodiment of the artificial intelligence question-answering method provided in the embodiment of the present application;
[0022] Figure 3 It is a flowchart of another embodiment of the artificial intelligence question-answering method provided in the embodiment of the present application;
[0023] Figure 4 It is a schematic diagram of the framework of the artificial intelligence question-answering method provided in the embodiment of the present application;
[0024] Figure 5 is a schematic diagram of a knowledge adaptation module of the artificial intelligence question-answering method provided in an embodiment of the present application;
[0025] Figure 6 It is a structural diagram of an embodiment of an artificial intelligence question-answering device provided in an embodiment of the present application;
[0026] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] It should be noted that the principles of the present application are illustrated by implementing them in an appropriate computing environment. The following description is based on the illustrated specific embodiments of the present application and should not be considered as limiting other specific embodiments of the present application that are not described in detail herein.
[0028] In the following description of the present application, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0029] In the following description of the present application, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0031] In order to improve the index update efficiency of the global federated model, the embodiment of the present application provides an artificial intelligence question-answering method, an artificial intelligence question-answering device, an electronic device, a computer-readable storage medium, and a computer program product. The artificial intelligence question-answering method can be executed by the artificial intelligence question-answering device, or by an electronic device integrated with the artificial intelligence question-answering device.
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0033] Please refer to Figure 1 , this application also provides an artificial intelligence question answering system, such as Figure 1 As shown, the artificial intelligence question-answering system includes an electronic device 100, in which the artificial intelligence question-answering device provided by the present application is integrated.
[0034] Among them, the electronic device 100 can be any device equipped with a processor and has processing capabilities, such as mobile electronic devices with processors such as smart phones, tablet computers, PDAs, laptops, smart speakers, or fixed electronic devices with processors such as desktop computers, televisions, servers, industrial equipment, etc.
[0035] In addition, the artificial intelligence question-answering system may also include a memory 200 for storing original data, intermediate data, and result data.
[0036] In the embodiment of the present application, the memory may be a cloud memory. Cloud storage is a new concept extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as the storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of storage devices of various types (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.
[0037] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, ID entity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.
[0038] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.
[0039] It should be noted that Figure 1 The scenario diagram of the artificial intelligence question-answering system shown is merely an example. The artificial intelligence question-answering system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the artificial intelligence question-answering system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is equally applicable to similar technical problems.
[0040] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0041] Please refer to Figure 2 , Figure 2 : is a flowchart of an embodiment of the artificial intelligence question-answering method provided in the embodiment of the present application, such as Figure 2 As shown, the process of the artificial intelligence question-answering method provided by this application is as follows:
[0042] 201. Get questions to be answered.
[0043] In the embodiment of the present application, the question to be answered is a text input by the user. Of course, in other embodiments, the question to be answered may also be a voice input by the user, and the voice input by the user is converted into text to obtain the question to be answered.
[0044] Specifically, the user inputs the question to be answered in the form of natural language text through the user-side input device, such as keyboard input, voice-to-text conversion, etc. The question to be answered is "Who is the author of Twenty Thousand Leagues Under the Sea?" The question to be answered is sent to the server through the network, and the server invokes the artificial intelligence question-answering method to generate a natural language text answer to the question to be answered, such as "Jules Verne", and sends it to the user-side output device through the network for display, such as direct display on the display screen, or text-to-speech conversion, etc.
[0045] 202. Based on the question to be answered, search on the preset knowledge graph to obtain candidate answers to the question to be answered.
[0046] In the embodiment of the present application, the preset knowledge graph is a pre-established knowledge graph. The knowledge graph is a structured semantic knowledge base used to quickly describe concepts and their relationships in the physical world. The knowledge graph effectively processes, processes, and integrates the data of complex documents into simple and clear "entity, relationship, entity" triples, and finally aggregates a large amount of knowledge to achieve rapid response and reasoning of knowledge. There are two ways to build knowledge graphs: top-down and bottom-up. The so-called top-down construction is to extract ontology and pattern information from high-quality data with the help of structured data sources such as encyclopedia websites, and add it to the knowledge base; the so-called bottom-up construction is to extract resource patterns from publicly collected data with the help of certain technical means, select new patterns with higher confidence, and add them to the knowledge base after manual review.
[0047] The preset knowledge graph is composed of multiple triple knowledge groups. The preset knowledge graph includes entity sets, relationships, entity attribute sets, and knowledge triple sets. The preset knowledge graph KG = (E, R, ∑). E represents the entity set in the knowledge graph. Each entity corresponds to an object in real life. For example, the entity is "Jules Verne". R represents the relationship between entities and the attribute set of entities, such as "author" and "era". ∑ represents the knowledge triple set. Each knowledge triple is represented by (h, r, t)∈∑(h∈E, r∈R, t∈E or t∈V + ,V + represents a non-empty sentence), indicating that entity h and entity t have a relationship represented by r, such as the entity "Twenty Thousand Leagues Under the Sea" and the entity "Jules Verne" have a relationship of "author", in which case both h and t represent entities, or indicating that the attribute r of entity h is t, such as the attribute "era" of entity "Jules Verne" is "1828-1905", in which case h represents the entity and t represents the attribute value. Each entity h∈E has multiple names represented by natural language For example, the valid names of the entity Jules Verne include "Jules Verne" and "Verne". Similarly, each relation r∈R also has multiple valid names.
[0048] The preset knowledge graph in the embodiment of the present application includes the relationship between entities and entity attribute information, as well as all valid names of each entity and relationship (attribute). Such data samples can obtain input data sets through web crawling and manual annotation.
[0049] 203. When the number of candidate answers to the question to be answered is at least two, the at least two candidate answers and the question to be answered are concatenated and input into the knowledge adaptation module to obtain at least two representation vectors.
[0050] Among them, the knowledge adaptation module is trained according to a preset training set, and the preset training set is constructed by knowledge triples of a preset knowledge graph.
[0051] In an embodiment of the present application, if the number of candidate answers to the question to be answered is at least two, indicating that the most matching answer needs to be further determined, the at least two candidate answers and the question to be answered are respectively concatenated and input into the knowledge adaptation module to obtain at least two representation vectors.
[0052] In an embodiment of the present application, at least two candidate answers and the question to be answered are concatenated to obtain at least two concatenated texts, and the at least two concatenated texts are input into a knowledge adaptation module to obtain at least two representation vectors corresponding to the at least two concatenated texts.
[0053] 204. Determine a predicted answer corresponding to the question to be answered from at least two candidate answers based on at least two representation vectors.
[0054] In a specific embodiment, determining a predicted answer corresponding to a question to be answered from at least two candidate answers based on at least two representation vectors includes:
[0055] (1) Inputting at least two representation vectors into a preset linear neural network predictor respectively to obtain a matching degree of the predicted answer question corresponding to each representation vector.
[0056] The predicted answer question matching degree is the matching degree between the candidate answer corresponding to the representation vector and the question to be answered.
[0057] In the embodiment of the present application, the preset linear application network predictor is pre-trained.
[0058] (2) The candidate answer corresponding to the representation vector with the highest matching degree to the predicted answer question is determined as the predicted answer corresponding to the question to be answered.
[0059] Please refer to Figure 3 , Figure 3 is a flow chart of another embodiment of the artificial intelligence question-answering method provided in the embodiment of the present application, such as Figure 3As shown, the process of the artificial intelligence question-answering method provided by this application is as follows:
[0060] 301. Construct multiple text corpora based on knowledge triples of the preset knowledge graph.
[0061] like Figure 4 As shown, the embodiment of the present application proposes a knowledge-injected curriculum pretraining (KICP) framework, which includes three main modules: knowledge injection module, knowledge adaptation module and curriculum reasoning module. The knowledge injection module constructs a training corpus containing various knowledge information based on the knowledge graph for training the language model, the knowledge adaptation module uses the language model to model and learn the knowledge information in the training corpus, and the curriculum reasoning module constructs complex corpora of different difficulty levels to adapt to complex question-answering scenarios.
[0062] In the embodiment of the present application, a preset knowledge graph and a question-and-answer dataset in a broad sense are obtained as input datasets for training the required language model. The preset knowledge graph includes information about the relationship between entities and entity attributes, as well as all valid names of each entity and relationship (attribute). The question-and-answer dataset includes the content of the question and the correct answer to each question. Such data samples can be obtained by web crawling and manual annotation.
[0063] Before building and training the model, the collected data needs to be preprocessed to ensure the effectiveness of the model. Preprocessing mainly includes: knowledge graph filtering, question and answer data filtering, and sampling.
[0064] Knowledge graph filtering: The embodiments of the present application mainly need to utilize the stable knowledge information in the knowledge graph that reflects the real world. Therefore, it is necessary to filter the identification attributes in the graph that do not contain specific knowledge information (such as the type of entity) used to assist in graph construction and the unstable attributes that change dynamically over time (such as the number of song downloads).
[0065] Question and answer data filtering: To ensure the stability and reliability of model training, filter out questions that cannot be answered based on the knowledge graph and question-answer pairs with low answer confidence in the question and answer data.
[0066] Sampling: Randomly select questions from the filtered question-answering dataset, select a subset of the original dataset to train the model, and use the remaining part to evaluate the training progress.
[0067] In an embodiment of the present application, knowledge triples of a preset knowledge graph are obtained, a name is randomly sampled for each element of the knowledge triple, and attribute values of different types are uniformly converted into text format to obtain knowledge triples represented by text, thereby converting the knowledge triples represented by numbers into meaningful text representations. The knowledge triples represented by text are text-constructed using a preset text construction strategy to obtain multiple text corpora. The preset text construction strategy can be implemented in a variety of ways, including grammar-based rules, question-and-answer templates, and generative neural network methods. The preset text construction strategy can be various sentence construction strategies.
[0068] like Figure 4 As shown, in an embodiment of the present application, a knowledge injection module is used to construct multiple text corpora based on knowledge triples of a preset knowledge graph. Specifically, the knowledge injection module first samples a knowledge triple k=(h,r,t)∈∑ from the preset knowledge graph, where h is the number of an entity, r is the number of a relationship or attribute, and t represents an entity number or an attribute value. The attribute value may be of different types such as time, numerical value, and text. Then, a name is randomly sampled from all reasonable names of the entity, relationship / attribute, and attribute values of different types are uniformly converted into text format, thereby converting the knowledge triples represented by numbers into meaningful text representations, such as converting (E1,R1,1928-1905) into (Jules Verne, the era, 1928-1905) through a text mapping operation (Txt). Then, the sentence construction strategy τ is used to construct a sentence based on the basic elements in the knowledge triple, and the resulting sentence is "Jules Verne lived in the period 1928-1905". The construction strategy τ can be implemented in a variety of ways, including grammar-based rules, question-answering templates, and generative neural network methods.
[0069] In an embodiment of the present application, the plurality of text corpora include simple corpora and complex corpora. In other embodiments, the plurality of text corpora include at least one of simple corpora and complex corpora.
[0070] In the embodiment of the present application, a simple corpus is constructed from a single knowledge triple, which is suitable for a simple question-answering scenario. Specifically, constructing multiple text corpora based on knowledge triples of a preset knowledge graph includes: constructing a simple corpus based on a single knowledge triple.
[0071] like Figure 4 As shown, in the embodiment of the present application, the course reasoning module is used to generate text corpus. For example, a single knowledge triple is (Twenty Thousand Leagues Under the Sea, author, Jules Verne), and the simple corpus generated by the course reasoning module is "The author of Twenty Thousand Leagues Under the Sea is Jules Verne".
[0072] This application requires complex corpus with multiple knowledge triples for reasoning to adapt to complex real question-answering scenarios to enhance the question-answering ability of the language model. The present invention mainly adapts to two complex question-answering scenarios: multi-hop reasoning and multi-target reasoning.
[0073] In the embodiment of the present application, the complex corpus includes a logic chain corpus and a complex reasoning corpus. The logic chain corpus is constructed from multiple knowledge triples and is adapted to multi-hop reasoning question-answering scenarios. Specifically, multiple text corpora are constructed based on knowledge triples of a preset knowledge graph, including: constructing a logic chain corpus based on a first type triple set, wherein the head entity of each knowledge triple in the first type triple set is the same as the tail entity of the previous knowledge triple.
[0074] Multi-hop reasoning requires first inferring an intermediate result from the question, and then inferring the next intermediate result based on the intermediate result to get the answer. Figure 4 As shown, in the embodiment of the present application, the course reasoning module is used to generate a logical chain corpus. The course reasoning module first samples a set of first-type triples, which includes multiple knowledge triples with a chain structure. The head entity of each triple in the chain structure is the tail entity of the previous triple, such as (Twenty Thousand Leagues Under the Sea, author, Jules Verne) and (Jules Verne, era, 1828-1905). The triple entity in the knowledge graph is represented by its number; then a method similar to the knowledge injection module is used to map the entity number in the triple to a text name; then a complex sentence generation strategy τ′ is used to generate sentences based on the sampled triples, and the intermediate entities of the chain structure are deleted to construct a logical chain corpus that requires multi-hop reasoning, such as the logical chain corpus of the multi-hop reasoning logical chain corpus is "The author of Twenty Thousand Leagues Under the Sea is Verne, the era of Verne is 1828-1905, and the author of Twenty Thousand Leagues Under the Sea is 1828-1905". This strategy τ′ is implemented in a variety of ways, including grammar-based rules, question-answering templates, and generative neural network methods; finally, entity masking and full-word masking methods are used to mask some words to support the training task of the masked language model. For another example, the first type of triple set is (Twenty Thousand Leagues Under the Sea, author, Jules Verne) and (Jules Verne, era, 1828-1905), and the triple entity in the knowledge graph represents its number; construct complex reasoning corpus that requires multi-hop reasoning, such as (the author of Twenty Thousand Leagues Under the Sea is in the era of 1828-1905).
[0075] In the embodiment of the present application, the multi-objective reasoning corpus is constructed from multiple knowledge triples, which is adapted to the multi-objective reasoning question-answering scenario. Specifically, multiple text corpora are constructed based on knowledge triples of a preset knowledge graph, including: constructing a complex corpus based on a second type triple set, wherein among the multiple knowledge triples in the second type triple set, the head entity of each knowledge triple is the same and the tail entity is different.
[0076] Multi-objective reasoning requires inferring multiple reasonable answers from the same question, such as Jules Verne's occupation is novelist, and Jules Verne's occupation is also playwright. To adapt to the multi-objective question-answering scenario, the course reasoning module first samples multiple knowledge triples with the same head entity and relationship but different tail entities from the knowledge graph, such as (Jules Verne, occupation, novelist) and (Jules Verne, occupation, playwright); maps the triples to text names; uses the complex sentence generation strategy τ′ to generate sentences based on the knowledge triples, and deletes the same head entity and relationship in the triples to construct complex reasoning corpus that requires multi-objective reasoning, such as (Jules Verne's occupation is novelist and playwright); finally, masks some words to support the masked language model training task.
[0077] Among them, the process of constructing the above corpus can be expressed as
[0078] Comp(k 1 ,…,k n )=Msk′(τ′(Txt(h 1 ),Txt(r 1 ),Txt(t 1 ),…,Txt(t n ))),k i
[0079] =(h i ,r i ,t i )∈∑
[0080] Among them, k 1 ,k 2 ,…,k n are multiple knowledge triples sampled from the preset knowledge graph, Comp is the generation operation for generating complex corpus, τ′ represents the preset text construction strategy for generating complex corpus, such as complex sentence generation strategy, Msk′ represents the mask processing operation, and Txt represents the text mapping operation of entity, relationship, attribute, and attribute value.
[0081] 302. Mask the multiple text corpora to obtain multiple masked corpora corresponding to the multiple text corpora, and obtain a preset training set.
[0082] In an embodiment of the present application, different types of text corpora are masked using different masking methods. The masking methods can be basic-level masking, phrase-level masking, and entity-level masking. Basic-Level Masking: The masking mechanism exactly the same as BERT is used here. When processing Chinese corpus, character-level masking is used here. No higher-level semantic knowledge is added at this stage. Phrase-Level Masking: At this stage, a grammatical analysis tool is first used to obtain phrases in a sentence, such as "a serious of", and then a part is randomly masked, and the rest is used to predict these phrases. At this stage, phrase information is added to the word embedding. Entity-Level Masking: At this stage, some entities in the sentence are masked, so that the model has the ability to learn higher-level semantic information.
[0083] like Figure 4 As shown, in an embodiment of the present application, entity-level masking is used for entities, relationships, and attributes with a preset length of text phrases as a whole, that is, all words of the entire entity, relationship, and attribute are masked, such as Jules Verne #### is 1928-1905. For attribute values with large differences in length and more dispersed meanings, full-word masking is used, that is, phrase-level masking, that is, some words are randomly masked from the attribute values, such as Jules Verne's era is ####-1905.
[0084] The whole process of obtaining masked corpus according to knowledge triples can be expressed as
[0085] KI(k)=Msk(τ(Txt(h),Txt(r),Txt(t))),k=(h,r,t)∈∑
[0086] Among them, k represents the knowledge triple adopted from the knowledge graph, Txt represents the mapping of entities, relations, and attribute numbers to names and the conversion of attribute values into text, τ represents the preset text construction strategy for generating text expectations, such as a sentence construction strategy, and Msk represents the mask processing operation.
[0087] By performing the above operations on all knowledge triples in the entire knowledge graph, a preset training set containing knowledge information can be constructed for subsequent model training.
[0088] 303. Taking the preset mask language model as the objective function, the knowledge adaptation module is trained using the preset training set.
[0089] like Figure 4 and Figure 5As shown, in an embodiment of the present application, the knowledge adaptation module includes a language model, an adapter module and a fusion module, the language model includes multiple neural network layers, the adapter module includes multiple adaptation network layers, the multiple neural network layers and the multiple adaptation network layers correspond one to one, the adaptation network layer is used to fuse the corresponding neural network layer and the output of the previous adaptation network layer and input the next adaptation network layer, the fusion module fuses the output of the last adaptation network layer and the last neural network layer and outputs a representation vector.
[0090] The knowledge adaptation module uses a language model to accept a sentence as the input of the module, and outputs a vector representing the semantic information and related knowledge information of the sentence. The language model LM is a pre-trained bidirectional encoder representation language model based on Transformer (Bidirectional Encoder Representation from Transformers, BERT), which can be obtained through public data on the Internet or through additional training processes. L The adapter module Ad, which is also composed of K neural network adaptation layers AL, is added to the language model LM composed of i Accept peer The output vector s representing semantic information i And the previous adaptation layer AL i-1 The output vector h representing knowledge information i-1 As input, we first use a linear neural network layer The semantic vector s i Mapping to h i-1 Same vector space, add the two together and feed into a smaller additional Transformer neural network layer Trm K , get the vector h with knowledge information i As the adaptation layer AL i The output vector h i , the process is expressed as
[0091]
[0092] The last layer of the adapter module Ad is the adaptation layer AL K The output knowledge vector h K And the last neural network layer Trm in the language model LM L The output semantic vector s K concatenate and use a linear neural network layer Ln OThe output vector of the adapter module Ad is obtained as the representation vector h of the final output of the knowledge adaptation module. The process is expressed as
[0093] h=Ln O ([h K ,s K ])
[0094] Among them, [,] represents the vector concatenation operation.
[0095] In the pre-training phase, the knowledge adaptation module uses the text corpus generated by the knowledge injection module as input, and uses the masked language model as the loss function to train and adjust the learnable parameters of each neural network layer in the module. During the training process, the parameters of the BERT language model LM are fixed to maintain its original natural language understanding ability, and the parameters of the adapter module Ad are adjusted to model the knowledge information in the knowledge graph carried by the training corpus.
[0096] For example, if the input sentence is "The author of Twenty Thousand Leagues Under the Sea is Jules Verne", the fusion module, i.e. the linear neural network layer Ln O The sentence vector that integrates knowledge information is represented as a representation vector h.
[0097] like Figure 4 As shown, in an embodiment of the present application, the MLM (Masked Language Model) masked language model uses a large amount of unlabeled corpus during pre-training, so unsupervised training is adopted when designing the pre-training task. The preset masked language model can be an autoregressive model (autoregressive, AR) or an autoencoding model (autoencoding, AE). The autoregressive model only considers unilateral information. The autoregressive model can use contextual information to predict and reconstruct the original data from the damaged input data. For example: There is a text like this: I love to eat. AR: P (I love to eat) = P (I) P (love | I) P (eat | I love) P (rice | I love to eat) It can be found that AR uses unilateral information. AE: After masking: [I love masked rice] Use mask to cover certain words or several words, P(I love eating | I love masked rice) = P(mask = eating | I love rice), the mask mechanism is to break the original text information. During pre-training, let the model do text reconstruction. The model obtains various information from the context, so that the predicted masked vocabulary is infinitely close to or the same as the original vocabulary.
[0098] In the embodiment of the present application, the knowledge adaptation module is trained in a simple to complex manner to reduce the difficulty of model training. The preset mask language model is used as the objective function, and the knowledge adaptation module is trained using a preset training set, including:
[0099] (1) Taking the preset masked language model as the objective function, the knowledge adaptation module is trained using the masked corpus corresponding to multiple simple corpora.
[0100] like Figure 4 As shown in Figure 1, we first use the course reasoning module to perform course 1: knowledge training. Specifically, we only use a simple corpus generated by a single knowledge triple, use the preset masked language model as the objective function, and adjust the learnable neural network parameters of the training knowledge adaptation module. This process can be formally expressed as
[0101]
[0102] Among them, k is the knowledge triple sampled from the preset knowledge graph, KI represents the operation of constructing text corpus based on knowledge triple k, KA represents the knowledge adaptation module accepting text as input and outputting vector representation, MLM represents the objective function of the masked language model, and θ Ad and θ MLM Trainable neural network parameters representing the objective functions of the knowledge adaptation module and the masked language model, respectively.
[0103] like Figure 4 As shown in FIG. 1 , the simple corpus is “The author of Twenty Thousand Leagues Under the Sea is Jules Verne.” The masked corpus corresponding to multiple simple corpora will be used to train the knowledge adaptation module.
[0104] (2) Taking the preset masked language model as the objective function, the knowledge adaptation module is trained using the masked corpus corresponding to multiple complex corpora and the masked corpus corresponding to multiple simple corpora.
[0105] In an embodiment of the present application, after taking a preset masked language model as the objective function and using masked corpora corresponding to multiple simple corpora to train the knowledge adaptation module, taking the preset masked language model as the objective function and using masked corpora corresponding to multiple complex corpora and masked corpora corresponding to multiple simple corpora to train the knowledge adaptation module.
[0106] like Figure 4 As shown in the figure, first use the course reasoning module to perform course 1: knowledge training; then use the course reasoning module to perform course 2: logical chain training. Use the generated complex corpus and the simple corpus constructed by all the single knowledge triples related to it as input, and train the knowledge adaptation module with the masked language model as the objective function. When masking, mask all the occurrences of the same entity in the input sentence to improve the model training effect. The process is expressed as
[0107]
[0108] Among them, k 1 ,k 2 ,…,k nare multiple triples sampled from the knowledge graph by the course reasoning module, Comp is the generation operation of the above complex reasoning corpus, [,] represents the sentence concatenation operation, KI represents the construction of text corpus based on knowledge triple k, KA represents the knowledge adaptation module accepting text as input and outputting vector representation, MLM represents the objective function of the masked language model, and θ Ad and θ MLM They represent the trainable neural network parameters of the objective functions of the knowledge adaptation module and the masked language model respectively.
[0109] like Figure 4 As shown in the figure, the multiple simple corpora are "The author of Twenty Thousand Leagues Under the Sea is Jules Verne", "Jules Verne lived in the period of 1828-1905", and the complex corpora are "The author of Twenty Thousand Leagues Under the Sea lived in the period of 1828-1905". Then the masked corpora corresponding to the multiple complex corpora and the masked corpora corresponding to the multiple simple corpora are concatenated to obtain "The author of Twenty Thousand Leagues Under the Sea is Jules Verne, Jules Verne lived in the period of 1828-1905, and the author of Twenty Thousand Leagues Under the Sea lived in the period of 1828-1905". The knowledge adaptation module is trained using the masked corpora corresponding to the multiple complex corpora and the masked corpora corresponding to the multiple simple corpora.
[0110] (3) Taking the preset masked language model as the objective function, the knowledge adaptation module is trained using the masked corpus corresponding to multiple complex corpora.
[0111] In an embodiment of the present application, after taking a preset masked language model as the objective function and using masked corpora corresponding to multiple complex corpora and masked corpora corresponding to multiple simple corpora to train the knowledge adaptation module, taking a preset masked language model as the objective function and using masked corpora corresponding to multiple complex corpora to train the knowledge adaptation module.
[0112] like Figure 4 As shown in the figure, first use the course reasoning module to perform course 1: knowledge training; then use the course reasoning module to perform course 2: logical chain training; then use the course reasoning module to perform course 3: complex reasoning training. Finally, only the complex corpus generated by the course reasoning module is used to train the knowledge adaptation module, so as to be consistent with the real question-answering scenario. The process is expressed as
[0113]
[0114] Among them, k 1 ,k 2 ,…,k nare multiple triples sampled from the knowledge graph by the course reasoning module, Comp is the generation operation of the above complex reasoning corpus, [,] represents the sentence concatenation operation, KI represents the construction of text corpus based on knowledge triple k, KA represents the knowledge adaptation module accepting text as input and outputting vector representation, MLM represents the objective function of the masked language model, and θ Ad and θ MLM They represent the trainable neural network parameters of the objective functions of the knowledge adaptation module and the masked language model respectively.
[0115] like Figure 4 As shown in FIG. 1 , the complex corpus is “the author of Twenty Thousand Leagues Under the Sea lived in the period 1828-1905”. The masked corpus corresponding to multiple complex corpora is used to train the knowledge adaptation module.
[0116] 304. Obtain a question-answering dataset, where the question-answering dataset includes question samples and corresponding correct answers.
[0117] In the embodiment of the present application, the question-answering dataset includes multiple question-answering pairs (Q, Y). In the question-answering pair (Q, Y), question Q = q 1 ,q 2 ,…,q n}∈V + is a non-empty natural language sentence, such as "Who is the author of Twenty Thousand Leagues Under the Sea?", and the correct answer Y is the entity or attribute value that correctly answers the question, such as "Jules Verne".
[0118] 305. Fine-tune the preset linear neural network predictor and the trained knowledge adaptation module based on the question-answering dataset.
[0119] Model fine-tuning improves accuracy by using a pre-trained model obtained on big data to initialize the weights of your own model. This requires that the quality of the pre-trained model must be guaranteed. Fine-tuning is usually faster and more accurate. Of course, you can also use your own trained model as a pre-trained model, and then train it on your own dataset to make the model suitable for your own scenarios and tasks.
[0120] After the pre-training process on the above knowledge graph is completed, this application fine-tunes the model on the collected question-answering dataset to further adapt to the question-answering task and improve the effect of the algorithm.
[0121] In an embodiment of the present application, a question sample in a question-answering data set is retrieved on a preset knowledge graph to obtain multiple candidate answers for the question sample, the question sample and each candidate answer are concatenated and input into a knowledge adaptation module to obtain a representation vector of each candidate answer and the question sample, and then each candidate answer and the question sample are concatenated into a preset linear neural network predictor to obtain a predicted answer problem matching degree between each candidate answer and the question sample, calculate a true matching degree between each candidate answer and the correct answer, calculate a loss value based on a cross entropy loss function, the predicted answer problem matching degree and the true matching degree between each candidate answer and the question sample, iteratively update the knowledge adaptation module and the preset linear neural network predictor until the loss value is lower than a preset value. When the loss value is lower than the preset value, the candidate answer with the highest predicted answer problem matching degree predicted by the preset linear neural network predictor has the highest matching degree with the correct answer.
[0122] Specifically, the question sentence and each sampled candidate answer sentence are concatenated as sentence input, the above-mentioned knowledge adaptation module is used to output the vector representation of the input sentence, and the preset linear neural network predictor is used to predict the matching degree between the question and the candidate answer, and the cross entropy loss function is used to train the knowledge adaptation module and the preset linear neural network predictor to maximize the matching degree of the correct answer. The optimization process is expressed as
[0123]
[0124] Among them, Pred represents the linear neural network predictor, Q and Y represent the question samples and corresponding correct answers of each question-answer pair in the question-answer dataset, and θ represents the learnable parameters of the neural network.
[0125] 306. Get the questions to be answered.
[0126] In the embodiment of the present application, the question to be answered is a text input by the user. Of course, in other embodiments, the question to be answered may also be a voice input by the user, and the voice input by the user is converted into text to obtain the question to be answered.
[0127] 307. Based on the question to be answered, search on the preset knowledge graph to obtain candidate answers to the question to be answered.
[0128] The preset knowledge graph in the embodiment of the present application needs to include the relationship between entities and entity attribute information, as well as all valid names of each entity and relationship (attribute). Such data samples can obtain input data sets through web crawling and manual annotation.
[0129] 308. When the number of candidate answers to the question to be answered is at least two, the at least two candidate answers and the question to be answered are concatenated and input into the knowledge adaptation module to obtain at least two representation vectors.
[0130] Among them, the knowledge adaptation module is trained according to a preset training set, and the preset training set is constructed by knowledge triples of a preset knowledge graph.
[0131] In an embodiment of the present application, if the number of candidate answers to the question to be answered is at least two, indicating that the most matching answer needs to be further determined, the at least two candidate answers and the question to be answered are respectively concatenated and input into the knowledge adaptation module to obtain at least two representation vectors.
[0132] In an embodiment of the present application, at least two candidate answers and the question to be answered are concatenated to obtain at least two concatenated texts, and the at least two concatenated texts are input into a knowledge adaptation module to obtain at least two representation vectors corresponding to the at least two concatenated texts.
[0133] 309. Input at least two representation vectors into a preset linear neural network predictor respectively to obtain a predicted answer question matching degree corresponding to each representation vector.
[0134] The predicted answer question matching degree is the matching degree between the candidate answer corresponding to the representation vector and the question to be answered.
[0135] 310. The candidate answer corresponding to the representation vector with the highest matching degree to the predicted answer question is determined as the predicted answer corresponding to the question to be answered.
[0136] In the question-answering reasoning stage, a question to be answered Q is input, and the algorithm first retrieves and samples a series of possible candidate answers Y′ from the knowledge graph, concatenates the question and each candidate answer as input, uses the knowledge adaptation module and the linear neural network predictor to predict the matching degree between the question and the candidate answer, and takes the candidate answer with the highest matching degree as the answer Y output for the question. The process can be expressed as
[0137]
[0138] This application first designs a knowledge injection module to directly construct corpus for model training based on knowledge triples in the knowledge graph, thereby solving the existing problems of timely dependence on external corpus and incomplete knowledge graph modeling; and uses text to uniformly represent entities and attributes in the graph as input, solving the problem that existing methods are difficult to apply to non-enumerable attribute information; finally, by sampling multiple related knowledge triples to construct a complex corpus training model that requires reasoning, the complex reasoning in the real question-and-answer scenario is adapted, thereby enhancing the algorithm's support for complex questions and answers and improving its accuracy. The above innovative key technologies effectively solve the limitations of existing knowledge graph question-and-answer technologies and improve the effectiveness of question-and-answer tasks, which can provide certain technical support for related applications.
[0139] In order to facilitate better implementation of the artificial intelligence question-answering method provided in the embodiment of the present application, the embodiment of the present application also provides an artificial intelligence question-answering device based on the artificial intelligence question-answering method. The meanings of the terms are the same as those in the artificial intelligence question-answering method. For specific implementation details, please refer to the description in the above method embodiment.
[0140] Please refer to Figure 6 , Figure 6 This is a schematic diagram of the structure of an artificial intelligence question-answering device provided in an embodiment of the present application. The artificial intelligence question-answering device may include an acquisition module 601, a retrieval module 602, a characterization module 603, and a determination module 604, wherein:
[0141] An acquisition module 601 is used to acquire questions to be answered;
[0142] A retrieval module 602 is used to search on a preset knowledge graph based on the question to be answered to obtain a candidate answer to the question to be answered;
[0143] A representation module 603 is used for, when the number of candidate answers to the question to be answered is at least two, respectively splicing the at least two candidate answers and the question to be answered and inputting them into a knowledge adaptation module to obtain at least two representation vectors, wherein the knowledge adaptation module is trained according to a preset training set, and the preset training set is constructed by knowledge triples of the preset knowledge graph;
[0144] The determination module 604 is used to determine the predicted answer corresponding to the question to be answered from the at least two candidate answers based on the at least two representation vectors.
[0145] The specific implementation of each of the above modules can be found in the previous embodiments and will not be described in detail here.
[0146] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the processor is used to execute the steps in the artificial intelligence question-answering method provided in this embodiment by calling a computer program stored in the memory.
[0147] Please refer to Figure 7 , Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0148] The electronic device may include components such as a processor 101 with one or more processing cores, a memory 102 with one or more computer-readable storage media, a power supply 103, and an input unit 104. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0149] The processor 101 is the control center of the electronic device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 102, and calling data stored in the memory 102. Optionally, the processor 101 may include one or more processing cores; optionally, the processor 101 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 101.
[0150] The memory 102 can be used to store software programs and modules. The processor 101 executes various functional applications and data processing by running the software programs and modules stored in the memory 102. The memory 102 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 102 may also include a memory controller to provide the processor 101 with access to the memory 102.
[0151] The electronic device also includes a power supply 103 for supplying power to each component. Optionally, the power supply 103 can be logically connected to the processor 101 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 103 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0152] The electronic device may further include an input unit 104, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0153] Although not shown, the electronic device may also include a display unit, an image acquisition component, etc., which will not be described in detail here. Specifically in this embodiment, the processor 101 in the electronic device will load the executable code corresponding to one or more computer programs into the memory 102 according to the following instructions, and the processor 101 will execute the steps in the artificial intelligence question-answering method provided in this application, such as:
[0154] Obtain a question to be answered; search on a preset knowledge graph based on the question to be answered to obtain candidate answers to the question to be answered; when the number of candidate answers to the question to be answered is at least two, concatenate the at least two candidate answers and the question to be answered respectively and input them into a knowledge adaptation module to obtain at least two representation vectors, wherein the knowledge adaptation module is trained according to a preset training set, and the preset training set is constructed by knowledge triples of a preset knowledge graph; determine a predicted answer corresponding to the question to be answered from the at least two candidate answers based on the at least two representation vectors.
[0155] It should be noted that the electronic device provided in the embodiment of the present application belongs to the same concept as the artificial intelligence question-answering method in the above embodiment. The specific implementation process is detailed in the above related embodiments and will not be repeated here.
[0156] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program stored therein is executed on the processor of the electronic device provided in the embodiment of the present application, the processor of the electronic device executes the steps in the artificial intelligence question-answering method provided in the present application. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0157] The present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes various optional implementations of the above-mentioned artificial intelligence question-answering method.
[0158] The above is a detailed introduction to an artificial intelligence question-answering method and device provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0159] It should be noted that when the above embodiments of the present application are applied to specific products or technologies, the relevant data of the user is involved, and the user's permission or consent is required, and the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
Claims
1. An artificial intelligence question-answering method, characterized in that: include: Get questions to be answered; Searching on a preset knowledge graph based on the question to be answered to obtain candidate answers to the question to be answered; When the number of candidate answers to the question to be answered is at least two, the at least two candidate answers and the question to be answered are respectively concatenated and input into a knowledge adaptation module to obtain at least two representation vectors, wherein the knowledge adaptation module is trained according to a preset training set, and the preset training set is constructed from knowledge triples of the preset knowledge graph; Determine a predicted answer corresponding to the question to be answered from at least two candidate answers based on at least two of the representation vectors.
2. The artificial intelligence question-answering method according to claim 1, characterized in that: The preset training set includes a plurality of masked corpora, and the question-answering method includes: Constructing a plurality of the text corpora based on the knowledge triples of the preset knowledge graph; Masking the plurality of text corpora to obtain a plurality of masked corpora corresponding to the plurality of text corpora, thereby obtaining the preset training set; The preset mask language model is used as the objective function and the preset training set is used to train the knowledge adaptation module.
3. The artificial intelligence question-answering method according to claim 2, characterized in that: The plurality of text corpora include at least one of simple corpora and complex corpora, and the knowledge triples based on the preset knowledge graph construct the plurality of text corpora, including: Constructing the simple corpus based on a single knowledge triple; Alternatively, the complex corpus is constructed based on a plurality of the knowledge triples.
4. The artificial intelligence question-answering method according to claim 3, characterized in that: The method of taking the preset mask language model as the objective function and using the preset training set to train the knowledge adaptation module includes: Taking the preset mask language model as the objective function, the knowledge adaptation module is trained using the masked corpus corresponding to the plurality of simple corpora; Taking the preset mask language model as the objective function, the knowledge adaptation module is trained using the masked corpora corresponding to a plurality of the complex corpora and the masked corpora corresponding to a plurality of the simple corpora; The preset masked language model is used as the objective function, and the knowledge adaptation module is trained using the masked corpus corresponding to a plurality of the complex corpora.
5. The artificial intelligence question-answering method according to claim 1, characterized in that: The knowledge adaptation module includes a language model, an adapter module and a fusion module. The language model includes multiple neural network layers. The adapter module includes multiple adaptation network layers. Multiple neural network layers correspond to multiple adaptation network layers one by one. The adaptation network layer is used to fuse the output of the corresponding neural network layer and the previous adaptation network layer and input it into the next adaptation network layer. The fusion module fuses the output of the last adaptation network layer and the last neural network layer and outputs the representation vector. The step of respectively concatenating the at least two candidate answers and the question to be answered and inputting them into a knowledge adaptation module to obtain at least two representation vectors includes: Concatenate at least two of the candidate answers and the question to be answered respectively to obtain at least two concatenated texts; The concatenated text is sequentially input into a plurality of neural network layers to obtain the representation vector corresponding to the concatenated text output by the fusion module, and at least two representation vectors corresponding to at least two concatenated texts are obtained.
6. The artificial intelligence question-answering method according to claim 1, characterized in that: The determining, based on the at least two representation vectors, a predicted answer corresponding to the question to be answered from at least two candidate answers comprises: Inputting at least two of the representation vectors into a preset linear neural network predictor respectively to obtain a predicted answer question matching degree corresponding to each of the representation vectors, wherein the predicted answer question matching degree is a matching degree between the candidate answer corresponding to the representation vector and the question to be answered; The candidate answer corresponding to the representation vector with the highest matching degree to the predicted answer question is determined as the predicted answer corresponding to the question to be answered.
7. An artificial intelligence question-answering device, characterized in that: include: An acquisition module is used to obtain questions to be answered; A retrieval module, used to search on a preset knowledge graph based on the question to be answered to obtain candidate answers to the question to be answered; A representation module, used for, when the number of candidate answers to the question to be answered is at least two, respectively splicing the at least two candidate answers and the question to be answered and inputting them into a knowledge adaptation module to obtain at least two representation vectors, wherein the knowledge adaptation module is trained according to a preset training set, and the preset training set is constructed by knowledge triples of the preset knowledge graph; A determination module is used to determine a predicted answer corresponding to the question to be answered from at least two candidate answers based on at least two of the representation vectors.
8. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the steps in the artificial intelligence question-answering method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, which are suitable for loading by a processor to execute the steps in the artificial intelligence question-answering method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps in the artificial intelligence question-answering method described in any one of claims 1 to 6 are implemented.