Intelligent question-answering processing method, device, equipment and medium based on artificial intelligence

Through the intelligent question-and-answer processing method based on artificial intelligence, multiple rounds of layer-by-layer reasoning are used to perform multiple rounds of layer-by-layer reasoning, the limitations of the existing knowledge base question-and-answer methods are solved, and efficient knowledge base question-and-answer for different fields and scenarios is achieved, which improves the accuracy and generalization ability of answers.

CN119782458APending Publication Date: 2025-04-08PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411720488.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The existing knowledge base Q&A method has limitations and requires setting different rules for different fields, different scenarios and/or businesses to achieve effective knowledge base Q&A.

Method used

Using an intelligent question-and-answer processing method based on artificial intelligence, we finally determine the target answer to the user's questions, word segmentation, match with the preset knowledge base, build a subgraph, determine the basic instruction collection, and input it into the graph neural network for reasoning.

Benefits of technology

Without training analytical rules for specific knowledge bases, we can accurately answer questions that have not been seen in the training set, achieving knowledge base questions and answers for different fields and scenarios, and improving the generalization ability and the accuracy of answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782458A_ABST
    Figure CN119782458A_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and is also applicable to the medical health field and the financial field. An intelligent question-answering processing method based on artificial intelligence is disclosed, including: obtaining user questions, and segmenting the user questions to obtain segmentation results; matching the segmentation results with nodes in a preset knowledge base to obtain target nodes, and building subgraphs based on the target nodes; inputting the user questions and the segmentation results into a preset Bert model respectively to obtain a basic instruction collection for reasoning; inputting the user questions, subgraphs and basic instruction collections into a preset graph neural network to obtain reasoning results; and determining the target answer to the user question in the subgraph according to the reasoning results. Any type of question is answered by a retrieval method of a graph neural network, and a subgraph related to the original question is extracted to cover all nodes related to the subject entity, that is, all possible questions are covered, and questions not seen in the training set are accurately answered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology and is applicable to the medical health field and the financial field. In particular, it relates to an intelligent question and answer processing method, device, equipment and medium based on artificial intelligence. Background Art

[0002] Knowledge base question answering is a research focus in the field of natural language processing. Its core process is to parse natural language questions and return the corresponding answers in the knowledge base. Currently, some large commercial companies, such as IBM and Google, have launched automated programs based on knowledge base question answering.

[0003] With the development of knowledge base question and answer methods, more and more fields have begun to introduce knowledge base question and answer methods. For example, application scenarios such as online intelligent consultation and intelligent guidance in the medical field can improve users' service experience through knowledge base question and answer methods.

[0004] The traditional knowledge base question-answering method is based on semantic parsing. The general process is to train semantic parsing rules for a specific knowledge base, use the trained rules to parse natural language questions into an intermediate form, align the intermediate form with the knowledge base to generate an executable query statement, and execute the query statement to return the answer. This method based on semantic parsing can achieve good results on the knowledge base where the training data set is located, but the effect is very poor on other knowledge bases, which makes the existing knowledge base question-answering method have limitations. For example, after parsing the rules for the knowledge base in the financial field, the rules obtained are based on the characteristics of the knowledge base in the financial field, that is, the rules obtained have financial field characteristics, and when facing the medical field, which is very different from the financial field, the financial field characteristics are obviously not applicable to the knowledge base question-answering process in the medical field. Therefore, the knowledge base question-answering method in the prior art has limitations, that is, different rules need to be set for different fields, different scenarios and / or different businesses to realize the knowledge base question-answering process in different fields, different scenarios and / or different businesses. Summary of the invention

[0005] In view of this, the present invention provides an artificial intelligence-based intelligent question-answering processing method, device, equipment and medium, which are used to solve the problem of limitations of knowledge base question-answering methods in the prior art.

[0006] To achieve one or part or all of the above purposes or other purposes, the present invention proposes an intelligent question-answering processing method based on artificial intelligence, comprising: obtaining a user question, and segmenting the user question to obtain a segmentation result;

[0007] Matching the word segmentation result with nodes in a preset knowledge base to obtain a target node, and constructing a subgraph based on the target node, wherein the preset knowledge base is a knowledge base that stores data in the form of a relationship chain based on actual business, and the relationship chain includes at least two nodes and the relationship between the two nodes;

[0008] Determine a basic instruction set for reasoning according to the user question, the word segmentation result and a preset Bert model;

[0009] Inputting the user question, the subgraph and the basic instruction collection into a preset graph neural network to obtain an inference result in the form of a conditional vector;

[0010] A target answer to the user question is determined in the subgraph according to the inference result.

[0011] On the other hand, the present application provides an intelligent question-answering processing device based on artificial intelligence, the device comprising:

[0012] A data receiving module is used to obtain user questions and segment the user questions to obtain segmentation results;

[0013] A subgraph construction module is used to match the word segmentation result with the nodes in a preset knowledge base to obtain a target node, and to construct a subgraph based on the target node. The preset knowledge base is a knowledge base that stores data in the form of a relationship chain based on actual business, and the relationship chain includes at least two nodes and the relationship between the two nodes;

[0014] A generation module, used to determine a basic instruction set for reasoning according to the user question, the word segmentation result and a preset Bert model;

[0015] An inference module, used for inputting the user question, the subgraph and the basic instruction set into a preset graph neural network to obtain an inference result in the form of a conditional vector;

[0016] A determination module is used to determine a target answer to the user question in the subgraph according to the reasoning result.

[0017] On the other hand, the present application provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to perform: obtaining a user question, and segmenting the user question to obtain a segmentation result; matching the segmentation result with a node in a preset knowledge base to obtain a target node, and building a subgraph based on the target node, the preset knowledge base is a knowledge base that stores data in the form of a relationship chain based on actual business, and the relationship chain includes at least two nodes and the relationship between the two nodes; determining a basic instruction collection for reasoning based on the user question, the segmentation result and a preset Bert model; inputting the user question, the subgraph and the basic instruction collection into a preset graph neural network to obtain an inference result in the form of a conditional vector; and determining the target answer to the user question in the subgraph based on the inference result.

[0018] On the other hand, the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed when the processor is running: obtaining a user question, and segmenting the user question to obtain a segmentation result; matching the segmentation result with a node in a preset knowledge base to obtain a target node, and building a subgraph based on the target node, wherein the preset knowledge base is a knowledge base that stores data in the form of a relationship chain based on actual business, and the relationship chain includes at least two nodes and the relationship between the two nodes; determining a basic instruction collection for reasoning based on the user question, the segmentation result and a preset Bert model; inputting the user question, the subgraph and the basic instruction collection into a preset graph neural network to obtain an inference result in the form of a conditional vector; and determining a target answer to the user question in the subgraph based on the inference result.

[0019] Implementing the embodiments of the present invention will have the following beneficial effects:

[0020] By obtaining the user question and segmenting the user question to obtain the segmentation result; matching the segmentation result with the node in the preset knowledge base to obtain the target node, and building a subgraph based on the target node; determining the basic instruction collection for reasoning according to the user question, the segmentation result and the preset Bert model; inputting the user question, the subgraph and the basic instruction collection into the preset graph neural network to obtain the reasoning result; determining the target answer to the user question in the subgraph according to the reasoning result. The reasoning result corresponding to the user question is obtained by the preset graph neural network, and the target answer to the user question is determined in the subgraph according to the reasoning result, that is, the retrieval method of the graph neural network is used to answer any type of question, extract the subgraph related to the user question to cover all nodes related to the subject entity in the user question, that is, it covers all possible questions, and can accurately answer questions that have not been seen in the training set. The reasoning process of inputting the user question, the subgraph and the basic instruction collection into the preset graph neural network is a multi-round layer-by-layer reasoning process. Through multi-round layer-by-layer reasoning on the graph neural network, the original question is aligned with the knowledge base to the greatest extent, and an answer with extremely high accuracy can be returned. There is no need to train parsing rules for a specific knowledge base, and any type of question can be answered directly through a retrieval method based on a graph neural network. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] in:

[0023] Figure 1 This is an application scenario diagram of an intelligent question-answering processing method based on artificial intelligence provided in an embodiment of the present application;

[0024] Figure 2 is a flow chart of an intelligent question-answering processing method based on artificial intelligence provided in an embodiment of the present application;

[0025] Figure 3 It is a structural diagram of an intelligent question-answering processing device based on artificial intelligence provided in an embodiment of the present application;

[0026] Figure 4 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;

[0027] Figure 5 It is another structural schematic diagram of a computer device in one embodiment of the present invention.

[0028] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0029] Figure 7 It is a structural schematic diagram of a storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] The intelligent question-answering processing method based on artificial intelligence provided by the embodiment of the present invention can be applied in Figure 1 In an application environment, the client communicates with the server through a network. The server can obtain user questions, and segment the user questions to obtain segmentation results; match the segmentation results with nodes in a preset knowledge base to obtain target nodes, and build a subgraph based on the target nodes. The preset knowledge base is a knowledge base that stores data in the form of a relationship chain based on actual business, and the relationship chain includes at least two nodes and the relationship between the two nodes; according to the user question, the segmentation result and the preset Bert model, determine the basic instruction collection for reasoning; input the user question, the subgraph and the basic instruction collection into a preset graph neural network to obtain a reasoning result in the form of a conditional vector; determine the target answer to the user question in the subgraph according to the reasoning result. In the present invention, any type of question is answered by the retrieval method of the graph neural network, and the subgraph related to the original question is extracted to cover all nodes related to the subject entity, that is, all possible questions are covered, and questions that have not been seen in the training set can be accurately answered. Through multiple rounds of layer-by-layer reasoning on the graph neural network, the original question and the knowledge base are aligned to the greatest extent, and an answer with extremely high accuracy can be returned. There is no need to train parsing rules for a specific knowledge base, and any type of question can be answered directly through a retrieval method based on a graph neural network. Among them, the client can be but not limited to various personal computers, laptops, smart phones, tablets and portable wearable devices. The server can be implemented with an independent server or a server cluster composed of multiple servers. The present invention is described in detail below through specific embodiments.

[0032] like Figure 2 As shown, the embodiment of the present application provides an intelligent question-answering processing method based on artificial intelligence, including:

[0033] S101, obtaining a user question, and segmenting the user question to obtain a segmentation result;

[0034] The intelligent question-and-answer processing method provided by the present invention can be applied to intelligent question-and-answer engines such as intelligent customer service or intelligent assistants in various application scenarios. The intelligent question-and-answer engine is usually implemented through a server, which can receive user questions in real time. For example, in the field of insurance applications, users often ask questions by phone or online chat, and often need to use intelligent question-and-answer engines to answer some of the customers' insurance questions in order to improve the efficiency of insurance promotion and user experience. For another example, in the medical field, users often consult by phone or online chat, and often need to use intelligent question-and-answer engines to answer some of the customers' medical questions in order to ensure user experience and liberate human resources.

[0035] For example, after receiving the user question, the intelligent question-answering engine needs to segment the user question. The embodiment of the present application segments the user question through a preset sequence labeling model to obtain a segmentation result. The preset sequence labeling model is a sequence labeling model based on a bidirectional long short-term memory network and a conditional random field.

[0036] Specifically, in the sequence tagging model based on the bidirectional long short-term memory network and conditional random field, i.e., the bilstm-crf model, if the input sentence consists of 120 words, each word is represented by a 100-dimensional word vector, and the sentence input dimension is (120, 100), after equal-length convolution, T2 (120, 50) is obtained, where 50 is the number of convolution kernels. The 50-dimensional vector corresponding to the current word contains its local context information, and the first hidden layer vector T1 is concatenated with the second hidden layer vector T2 to obtain the third hidden layer vector T3 (120, 178). T3 is passed through the fully connected layer to obtain the fourth hidden layer vector T4 (120, 4), and T4 is input to the CRF layer to calculate the final optimal sequence to obtain the word segmentation result. Among them, a convolutional neural network (CNN) layer is added to the bilstm-crf model to avoid discarding some important information due to model capacity issues. At the same time, the named entity recognition (bilstm-crf) model has the function of realizing that the current word contains both historical information and future information, which is more conducive to labeling the current word and further facilitating the effect of word segmentation.

[0037] S102, matching the word segmentation result with nodes in a preset knowledge base to obtain a target node, and constructing a subgraph based on the target node, wherein the preset knowledge base is a knowledge base that stores data in the form of a relationship chain based on actual business, and the relationship chain includes at least two nodes and a relationship between the two nodes;

[0038] In a possible implementation, the step of matching the word segmentation result with a node in a preset knowledge base to obtain a target node, and constructing a subgraph based on the target node includes:

[0039] Taking the node in the preset knowledge base that matches the word segmentation result as the target node;

[0040] In the preset knowledge base, extracting each node within a preset range centered on the target node as a first node set;

[0041] Screening all nodes in the first node set to obtain edge nodes in the first node set at the edge of the preset knowledge base;

[0042] Extracting nodes in the preset knowledge base that are surrounded by the edge nodes and do not belong to the first node set as the second node set;

[0043] A subgraph is constructed based on the first node set and the second node set.

[0044] Specifically, all entity nodes in the knowledge base are traversed, for example, product nodes, category nodes and / or company nodes and relationship nodes. For example, the edge connecting the product node and the category node in the knowledge base is used as a relationship node. If the value of a node exists in the word segmentation result, the current node is regarded as the target node, and then the target node and the surrounding nodes within three hops are all extracted to obtain the first node set. After the traversal is completed, the edge nodes on the edge of the first node set are counted, and other nodes surrounded by the edge nodes and not belonging to the first node set are also extracted, that is, the second node set is obtained. Finally, the first node set and the second node set are summarized, and a subgraph related to the user's question is obtained based on the first node set and the second node set. For example, the knowledge base is regarded as a rectangle, the first node set includes at least four subsets, and one point in the four subsets is connected in sequence to form a quadrilateral. The other points in all points in the quadrilateral that do not belong to the four subsets are extracted to obtain the second node set.

[0045] In a possible implementation, the step of constructing a subgraph based on the first node set and the second node set includes:

[0046] Traversing each child node in the first node set and the second node set, and acquiring a node to be detected that is connected to the child node through an edge;

[0047] Matching the node to be detected with the first node set and the second node set respectively, and if the node to be detected exists in the first node set and the second node set, saving the child node, the node to be detected, and the edge between the child node and the node to be detected in the form of a triple;

[0048] If the node to be detected does not exist in the first node set and the second node set, discarding the node to be detected;

[0049] A subgraph is constructed based on the child nodes, the node to be detected, and the edges between the child nodes and the node to be detected that are saved in the form of triples.

[0050] Specifically, assume that the target node set for summarizing the first node set and the second node set is E, wherein a single node is e, a set of edges connecting the nodes is R, and a single edge is r.

[0051] For any node e in the set E, check the node p in the preset knowledge base that is connected to the node e by an edge r, that is, the above-mentioned node to be detected, and determine whether the connected node p is in the set E. If the node to be detected exists in the first node set and the second node set, it can be understood that if the node to be detected exists in the target node set E, if so, it is stored in the form of a triple of (node ​​e, edge r, node p); if the node p is not in the set E, the p node is discarded, and the same operation is performed on other nodes connected to the e node.

[0052] Traverse the set E, perform a check operation on each node, obtain a series of triples, remove the repeated triples, and the final set of triples is the basic data of the subgraph. Since the triple is the basic component unit of the knowledge graph, the subgraph is obtained based on the triple set.

[0053] Specifically, when facing the financial field, all entity nodes in the knowledge base of the financial field are traversed, for example, financial product nodes, first category nodes and / or company nodes and relationship nodes; when facing the medical field, all entity nodes in the knowledge base of the medical field are traversed, for example, medical product nodes, second category nodes and / or company nodes and relationship nodes; the first category node is determined according to the attributes of the financial product node, and the second category node is determined according to the attributes of the medical product node. The process of matching the word segmentation result with the nodes in the preset knowledge base to obtain the target node and constructing the subgraph based on the target node has been described and will not be repeated here.

[0054] S103, determining a basic instruction set for reasoning according to the user question, the word segmentation result and a preset Bert model;

[0055] In a possible implementation, the step of determining a basic instruction set for reasoning according to the user question, the word segmentation result, and a preset Bert model includes:

[0056] Input the user question and the word segmentation result into a preset Bert model respectively to obtain a first vector representation of the user question and a second vector representation of the word segmentation result;

[0057] Calculating an attention score between the first vector representation and the second vector representation based on the first vector representation and the second vector representation;

[0058] Performing softmax processing on the attention score to obtain a weight parameter of the word segmentation result;

[0059] Based on the weight parameters of the word segmentation result and the second vector representation, a basic instruction collection for reasoning is obtained.

[0060] Specifically, the user question Q and the word segmentation result are input into the pre-trained Bert model to obtain each word t in the word segmentation result. i The corresponding vector representation p i and the vector representation q of the user question Q, that is, the vector representation p i is the second vector, and the vector representation q is the first vector representation. By calculating p i The attention score W between and q i , and the attention score W i Perform softmax processing to obtain each word t in the word segmentation result i The corresponding weight parameter u i , where u i The value of u is 0 or 1. i and p i Multiply and get the basic instruction I k Repeat the above operation K times, where K is the number of words in the word segmentation result, and remove the repeated basic instructions to obtain a basic instruction set that can be used for reasoning

[0061] Compared with the existing recurrent neural network (RNN) model and long short-term memory network (LSTM) model, the Bert model can be executed concurrently, extract the relationship features of words in sentences at the same time, and extract relationship features at multiple different levels, thereby more comprehensively reflecting the semantics of sentences. Compared with the word2vec model used to generate word vectors, the Bert model can obtain word meanings based on the sentence context, thereby avoiding ambiguity.

[0062] S104, inputting the user question, the subgraph and the basic instruction collection into a preset graph neural network to obtain an inference result in the form of a conditional vector;

[0063] In a possible implementation, the step of inputting the user question, the subgraph, and the basic instruction set into a preset graph neural network to obtain an inference result in the form of a conditional vector includes:

[0064] Input the subgraph and the basic instruction collection into a preset graph neural network, and obtain the vector representation of each basic instruction in the basic instruction collection in the current layer of the preset graph neural network through the vector representation of the previous layer in the preset graph neural network and the second conditional probability function, wherein the second conditional probability function is a conditional probability function of updateable parameters;

[0065] When the current layer in the preset graph neural network is the first layer, obtaining a vector representation of the first layer of each basic instruction in the basic instruction collection in the preset graph neural network through a first conditional probability function according to the subgraph and the basic instruction collection;

[0066] When the network in the preset graph neural network iterates to the last layer, the initial inference result is calculated by using the preset learning parameters;

[0067] The process of calculating the initial reasoning result is repeated by updating the preset learning parameters to obtain a reasoning result in the form of a conditional vector.

[0068] Specifically, the user question Q, the subgraph, and the initialized basic instruction set Input into a graph neural network H with J layers, each layer of H is represented by H j It means that J is greater than 4 and less than 10, which avoids inaccurate reasoning due to too few layers and excessive information propagation loss due to too many layers.

[0069] In the jth layer network, through H j,k =φ(M j ∣I k ) Get each basic instruction I k The vector representation at the current layer, where M j It is the basic instruction I in the sub-graph k Related node information, function φ is a conditional probability function. For example, in the first layer of the network, according to the subgraph and the basic instruction set, the first conditional probability function is used, that is, function φ obtains the vector representation of each basic instruction in the basic instruction set in the first layer of the preset graph neural network.

[0070] Afterwards, by:

[0071]

[0072] Get the vector representation of the current layer, H j-1is the vector representation of the previous layer relative to the current layer, where ψ is the conditional probability function of the updateable parameters, and K is the number of words in the above segmentation result. When the network iterates to the last layer, Rt = SOFTMAX (W*H last ) function calculates the inference result R of the current round t , H last is the vector representation of the last layer, where W is a learnable parameter. Repeat the reasoning T times, updating the parameter W each time, and finally obtain the reasoning result R in the form of a conditional vector.

[0073] S105: Determine a target answer to the user question in the subgraph according to the inference result.

[0074] For the inference result R, the value of each element in the inference result R represents the probability of occurrence of the corresponding node in the subgraph. After the inference result R is vector normalized, the elements in the inference result R are sorted and the element with the largest value is selected. The node corresponding to the element with the largest value in the inference result R is found in the subgraph, that is, it is determined as the target answer to the user question Q.

[0075] Reduce training costs. The solution described in the embodiment of the present application does not need to train parsing rules for a specific knowledge base, and directly answers any type of question through a retrieval method based on a graph neural network; improve generalization capabilities by extracting subgraphs related to the original question to cover all nodes related to the subject entity, while also covering all possible questions, so that the model can accurately answer questions that have not been seen in the training set. Through multiple rounds of layer-by-layer reasoning on the graph neural network, the original question is aligned with the knowledge base to the greatest extent, and a highly accurate answer can be returned.

[0076] In a possible implementation manner, before the step of matching the word segmentation result with the nodes in the preset knowledge base to obtain the target node and constructing the subgraph based on the target node, the method further includes:

[0077] Obtaining original data of the actual business stored in a table format;

[0078] Traversing the original data to obtain product nodes, category nodes and company nodes;

[0079] Determining a node relationship among the product node, the category node, and the company node according to an attribute of the product node;

[0080] A preset knowledge base including the product node, the category node and the company node is constructed based on the node relationship.

[0081] In a possible scenario, such as a banking and insurance business scenario, the original data for building an insurance product knowledge base is stored in a table format. The table has id, product name, category, company, product introduction, coverage period, claim materials, insured age, and coverage scope. The specific construction process is:

[0082] Traverse each row of the original data table, extract all the categories that appear and store them in a list, then remove the duplicate elements in the list to get a list L containing all the categories.

[0083] Traverse each row of the original data table, extract all the companies that appear and store them in a list, then remove the duplicate elements in the list to get a list C containing all the companies.

[0084] The insurance product class is predefined, and all the attributes of this class are the attribute values ​​of the table, such as id, product name, category, etc. Traverse each row of the original data table, instantiate the insurance product class according to the content of each row to obtain the insurance product object, and finally summarize these objects in the form of list P.

[0085] Traverse the category list L, and build a corresponding category node according to the value of each element l. The name attribute of the node is the value of l.

[0086] Traverse the company list C and build a corresponding company node according to the value of each element c. The name of the node is the value of c.

[0087] Traverse the insurance product list P and construct the corresponding insurance product node according to the attribute value of each object.

[0088] Traverse each insurance product node, and obtain the "belong to a certain category" relationship and "a certain category contains" relationship between it and the corresponding category node according to its "category" attribute. At the same time, obtain the "belong to a certain company" and "a certain company contains" relationship between it and the corresponding company node according to its "company" attribute.

[0089] With respect to the above nodes and relationships, the insurance product knowledge base is stored in the form of (node, relationship, node), that is, the insurance product preset knowledge base.

[0090] In another possible scenario, such as a drug use business scenario, the original data for building a drug knowledge base is stored in a table format, and the table has id, drug name, category, company, drug introduction, drug shelf life, efficacy, usage cycle, and applicable scope. The specific construction process of the preset knowledge base for the drug use business scenario is the same as the construction process of the preset knowledge base for the above-mentioned insurance products, and will not be repeated here.

[0091] In a possible implementation, Figure 3As shown, the present application provides an intelligent question-answering processing device based on artificial intelligence, the device comprising:

[0092] The data receiving module 201 is used to obtain user questions and segment the user questions to obtain segmentation results;

[0093] A subgraph construction module 202 is used to match the word segmentation result with a node in a preset knowledge base to obtain a target node, and to construct a subgraph based on the target node. The preset knowledge base is a knowledge base that stores data in the form of a relationship chain based on actual business, and the relationship chain includes at least two nodes and the relationship between the two nodes.

[0094] A generation module 203 is used to determine a basic instruction set for reasoning according to the user question, the word segmentation result and a preset Bert model;

[0095] Reasoning module 204, used for inputting the user question, the subgraph and the basic instruction set into a preset graph neural network to obtain a reasoning result in the form of a conditional vector;

[0096] The determination module 205 is used to determine the target answer to the user question in the subgraph according to the reasoning result.

[0097] In a possible implementation manner, the data receiving module 201 is specifically configured to:

[0098] The user question is segmented by a preset sequence labeling model to obtain a segmentation result. The preset sequence labeling model is a sequence labeling model based on a bidirectional long short-term memory network and a conditional random field.

[0099] In a possible implementation manner, the subgraph construction module 202 is specifically configured to:

[0100] Obtaining original data of the actual business stored in a table format;

[0101] Traversing the original data to obtain product nodes, category nodes and company nodes;

[0102] Determining a node relationship among the product node, the category node, and the company node according to an attribute of the product node;

[0103] A preset knowledge base including the product node, the category node and the company node is constructed based on the node relationship.

[0104] In a possible implementation manner, the subgraph construction module 202 is further configured to:

[0105] Taking the node in the preset knowledge base that matches the word segmentation result as the target node;

[0106] In the preset knowledge base, extracting each node within a preset range centered on the target node as a first node set;

[0107] Screening all nodes in the first node set to obtain edge nodes in the first node set at the edge of the preset knowledge base;

[0108] Extracting nodes in the preset knowledge base that are surrounded by the edge nodes and do not belong to the first node set as the second node set;

[0109] A subgraph is constructed based on the first node set and the second node set.

[0110] In a possible implementation manner, the subgraph construction module 202 is specifically configured to:

[0111] Traversing each child node in the first node set and the second node set, and acquiring a node to be detected that is connected to the child node through an edge;

[0112] Matching the node to be detected with the first node set and the second node set respectively, and if the node to be detected exists in the first node set and the second node set, saving the child node, the node to be detected, and the edge between the child node and the node to be detected in the form of a triple;

[0113] If the node to be detected does not exist in the first node set and the second node set, discarding the node to be detected;

[0114] A subgraph is constructed based on the child nodes, the node to be detected, and the edges between the child nodes and the node to be detected that are saved in the form of triples.

[0115] In a possible implementation manner, the generating module 203 is specifically configured to:

[0116] Input the user question and the word segmentation result into a preset Bert model respectively to obtain a first vector representation of the user question and a second vector representation of the word segmentation result;

[0117] Calculating an attention score between the first vector representation and the second vector representation based on the first vector representation and the second vector representation;

[0118] Performing softmax processing on the attention score to obtain a weight parameter of the word segmentation result;

[0119] Based on the weight parameters of the word segmentation result and the second vector representation, a basic instruction collection for reasoning is obtained.

[0120] In a possible implementation, the reasoning module 204 is specifically configured to:

[0121] Input the subgraph and the basic instruction collection into a preset graph neural network, and obtain the vector representation of each basic instruction in the basic instruction collection in the current layer of the preset graph neural network through the vector representation of the previous layer in the preset graph neural network and the second conditional probability function, wherein the second conditional probability function is a conditional probability function of updateable parameters;

[0122] When the current layer in the preset graph neural network is the first layer, obtaining a vector representation of the first layer of each basic instruction in the basic instruction collection in the preset graph neural network through a first conditional probability function according to the subgraph and the basic instruction collection;

[0123] When the network in the preset graph neural network iterates to the last layer, the initial inference result is calculated by using the preset learning parameters;

[0124] The process of calculating the initial reasoning result is repeated by updating the preset learning parameters to obtain a reasoning result in the form of a conditional vector.

[0125] The present invention provides an intelligent question-answering processing device based on artificial intelligence, which answers any type of question through the retrieval method of a graph neural network, extracts subgraphs related to the original question to cover all nodes related to the subject entity, that is, covers all possible questions, and can accurately answer questions that have not been seen in the training set. Through multiple rounds of layer-by-layer reasoning on the graph neural network, the original question is aligned with the knowledge base to the greatest extent, and an answer with extremely high accuracy can be returned. There is no need to train parsing rules for a specific knowledge base, and any type of question can be answered directly through a retrieval method based on a graph neural network.

[0126] For the specific definition of the intelligent question and answer processing device, please refer to the definition of the intelligent question and answer method above, which will not be repeated here. Each module in the above-mentioned report recommendation device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0127] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the server side of an intelligent question-answering processing method based on artificial intelligence.

[0128] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the client side of an intelligent question-answering processing method based on artificial intelligence.

[0129] In a possible implementation, Figure 6 As shown, an embodiment of the present application provides an electronic device 300, including: a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, it implements: obtaining a user question, and segmenting the user question to obtain a segmentation result; matching the segmentation result with a node in a preset knowledge base to obtain a target node, and building a subgraph based on the target node, wherein the preset knowledge base is a knowledge base that stores data in the form of a relationship chain constructed according to actual business, and the relationship chain includes at least two nodes and the relationship between the two nodes; determining a basic instruction collection for reasoning according to the user question, the segmentation result, and a preset Bert model; inputting the user question, the subgraph, and the basic instruction collection into a preset graph neural network to obtain an inference result in the form of a conditional vector; and determining the target answer to the user question in the subgraph according to the inference result.

[0130] Answer any type of question through the retrieval method of graph neural network, extract subgraphs related to the original question to cover all nodes related to the subject entity, that is, cover all possible questions, and accurately answer questions not seen in the training set. Through multiple rounds of layer-by-layer reasoning on the graph neural network, the original question is aligned with the knowledge base to the greatest extent, and highly accurate answers can be returned. There is no need to train parsing rules for a specific knowledge base, and any type of question can be answered directly through the retrieval method based on graph neural network.

[0131] In a possible implementation, Figure 7 As shown, an embodiment of the present application provides a computer-readable storage medium 400, on which a computer program 411 is stored, and when the computer program 411 is executed by a processor, it implements: obtaining a user question, and segmenting the user question to obtain a segmentation result; matching the segmentation result with a node in a preset knowledge base to obtain a target node, and building a subgraph based on the target node, wherein the preset knowledge base is a knowledge base that stores data in the form of a relationship chain constructed according to actual business, and the relationship chain includes at least two nodes and the relationship between the two nodes; determining a basic instruction collection for reasoning according to the user question, the segmentation result and a preset Bert model; inputting the user question, the subgraph and the basic instruction collection into a preset graph neural network to obtain an inference result in the form of a conditional vector; and determining the target answer to the user question in the subgraph according to the inference result.

[0132] Answer any type of question through the retrieval method of graph neural network, extract subgraphs related to the original question to cover all nodes related to the subject entity, that is, cover all possible questions, and accurately answer questions not seen in the training set. Through multiple rounds of layer-by-layer reasoning on the graph neural network, the original question is aligned with the knowledge base to the greatest extent, and highly accurate answers can be returned. There is no need to train parsing rules for a specific knowledge base, and any type of question can be answered directly through the retrieval method based on graph neural network.

[0133] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0134] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0135] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0136] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0137] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0138] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described above, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

[0139] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. An intelligent question-answering processing method based on artificial intelligence, characterized in that: include: Obtaining a user question, and segmenting the user question to obtain a segmentation result; Matching the word segmentation result with nodes in a preset knowledge base to obtain a target node, and constructing a subgraph based on the target node, wherein the preset knowledge base is a knowledge base that stores data in the form of a relationship chain based on actual business, and the relationship chain includes at least two nodes and the relationship between the two nodes; Determine a basic instruction set for reasoning according to the user question, the word segmentation result and a preset Bert model; Inputting the user question, the subgraph and the basic instruction collection into a preset graph neural network to obtain an inference result in the form of a conditional vector; A target answer to the user question is determined in the subgraph according to the inference result.

2. The intelligent question-answering processing method based on artificial intelligence according to claim 1, characterized in that: The step of segmenting the user question to obtain a segmentation result includes: The user question is segmented by a preset sequence labeling model to obtain a segmentation result. The preset sequence labeling model is a sequence labeling model based on a bidirectional long short-term memory network and a conditional random field.

3. The intelligent question-answering processing method based on artificial intelligence according to claim 1, characterized in that: Before the step of matching the word segmentation result with the nodes in the preset knowledge base to obtain the target node and constructing a subgraph based on the target node, the method further includes: Obtaining original data of the actual business stored in a table format; Traversing the original data to obtain product nodes, category nodes and company nodes; Determining a node relationship among the product node, the category node, and the company node according to an attribute of the product node; A preset knowledge base including the product node, the category node and the company node is constructed based on the node relationship.

4. The intelligent question-answering processing method based on artificial intelligence according to claim 1, characterized in that: The step of matching the word segmentation result with the nodes in the preset knowledge base to obtain the target node, and constructing a subgraph based on the target node includes: Taking the node in the preset knowledge base that matches the word segmentation result as the target node; In the preset knowledge base, extracting each node within a preset range centered on the target node as a first node set; Screening all nodes in the first node set to obtain edge nodes in the first node set at the edge of the preset knowledge base; Extracting nodes in the preset knowledge base that are surrounded by the edge nodes and do not belong to the first node set as the second node set; A subgraph is constructed based on the first node set and the second node set.

5. The intelligent question-answering processing method based on artificial intelligence according to claim 4, characterized in that: The step of constructing a subgraph based on the first node set and the second node set comprises: Traversing each child node in the first node set and the second node set, and acquiring a node to be detected that is connected to the child node through an edge; Matching the node to be detected with the first node set and the second node set respectively; If the node to be detected exists in the first node set and the second node set, the child node, the node to be detected, and the edge between the child node and the node to be detected are saved in the form of a triple; If the node to be detected does not exist in the first node set and the second node set, discarding the node to be detected; A subgraph is constructed based on the child nodes, the node to be detected, and the edges between the child nodes and the node to be detected that are saved in the form of triples.

6. The intelligent question-answering processing method based on artificial intelligence according to claim 1, characterized in that: The step of determining a basic instruction set for reasoning according to the user question, the word segmentation result and the preset Bert model includes: Input the user question and the word segmentation result into a preset Bert model respectively to obtain a first vector representation of the user question and a second vector representation of the word segmentation result; Calculating an attention score between the first vector representation and the second vector representation based on the first vector representation and the second vector representation; Performing softmax processing on the attention score to obtain a weight parameter of the word segmentation result; Based on the weight parameters of the word segmentation result and the second vector representation, a basic instruction collection for reasoning is obtained.

7. The intelligent question-answering processing method based on artificial intelligence according to claim 1, characterized in that: The step of inputting the user question, the subgraph and the basic instruction set into a preset graph neural network to obtain an inference result in the form of a conditional vector includes: Input the subgraph and the basic instruction collection into a preset graph neural network, and obtain the vector representation of each basic instruction in the basic instruction collection in the current layer of the preset graph neural network through the vector representation of the previous layer in the preset graph neural network and the second conditional probability function, wherein the second conditional probability function is a conditional probability function of updateable parameters; When the current layer in the preset graph neural network is the first layer, inputting the subgraph and the basic instruction collection into the preset graph neural network, and obtaining a vector representation of each basic instruction in the basic instruction collection in the first layer of the preset graph neural network through a first conditional probability function; When the network in the preset graph neural network iterates to the last layer, the initial inference result is calculated by using the preset learning parameters; By updating the preset learning parameters, an inference result in the form of a conditional vector is obtained.

8. An intelligent question-answering processing device based on artificial intelligence, characterized in that: The device comprises: A data receiving module is used to obtain user questions and segment the user questions to obtain segmentation results; A subgraph construction module is used to match the word segmentation result with the nodes in a preset knowledge base to obtain a target node, and to construct a subgraph based on the target node. The preset knowledge base is a knowledge base that stores data in the form of a relationship chain based on actual business, and the relationship chain includes at least two nodes and the relationship between the two nodes; A generation module, used to determine a basic instruction set for reasoning according to the user question, the word segmentation result and a preset Bert model; An inference module, used for inputting the user question, the subgraph and the basic instruction set into a preset graph neural network to obtain an inference result in the form of a conditional vector; A determination module is used to determine a target answer to the user question in the subgraph according to the reasoning result.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the intelligent question-answering processing method based on artificial intelligence are performed as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the intelligent question-answering processing method based on artificial intelligence as described in any one of claims 1 to 7 are executed.