Artificial intelligence-based answer selection method, device, electronic device and medium

Through artificial intelligence-based methods, answers with high quality and accuracy are selected, which solves the problem that existing intelligent question-and-answer services are difficult to filter out high-quality answers from multiple answers, and improves the accuracy and user experience of answer selection.

CN114020892BActive Publication Date: 2025-05-02CHINA PING AN LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing smart Q&A services are difficult to filter out high-quality and accurate answers from multiple different answers, making it difficult for users to obtain accurate and high-quality information.

Method used

Through artificial intelligence-based methods, we can obtain the question text input by the user, determine the question keywords, match the questions, calculate the similarity, conduct knowledge reasoning, obtain the target user characteristics, calculate the user characteristic matching value, and filter out answers with high quality and accuracy.

Benefits of technology

Improve the accuracy of answer selection, ensure that users obtain high-quality and accurate information, and enhance user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114020892B_ABST
    Figure CN114020892B_ABST
Patent Text Reader

Abstract

The present application relates to the field of artificial intelligence technology, and provides an answer selection method, device, electronic device and medium based on artificial intelligence, the method comprising: obtaining a question text input by a user, and determining the question keywords corresponding to the question text; determining multiple matching questions based on the question keywords; calculating the similarity between the question text and each matching question, and determining a target question among the multiple matching questions based on the similarity; determining multiple question answers corresponding to the target question, and performing knowledge reasoning in a pre-built question knowledge base based on the multiple question answers to obtain the target user features corresponding to each question answer; calculating the matching value between the user information and the target user features corresponding to each question answer; and determining the target answer among the multiple question answers based on the matching value. The present application improves the accuracy of answer selection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and specifically to an answer selection method, device, electronic device and medium based on artificial intelligence. Background Art

[0002] With the rapid development of information technology, in order to facilitate users to find the information they want quickly and accurately, search engines generally provide intelligent question-answering services. At present, the intelligent question-answering services of search engines are generally based on the questions input by users. By searching and matching in the existing question-answering database, the answer text matching the question input by the user is obtained and fed back to the user.

[0003] However, in actual applications, there may be multiple different answers to the same question, for example, multiple people give different answers. The quality of answers to the same question is also different, for example, due to different understandings of the question, knowledge reserves, and answering attitudes of each person, the quality of the answers is also different. Therefore, how to select answers with higher quality and accuracy from all the answers has become an urgent problem to be solved. Summary of the invention

[0004] In view of the above, it is necessary to propose an answer selection method, device, electronic device and medium based on artificial intelligence, which can screen out answers with higher quality and accuracy from all answers according to the user characteristics corresponding to the user, thereby improving the accuracy of answer selection.

[0005] In a first aspect, the present application provides an answer selection method based on artificial intelligence, the method comprising:

[0006] Obtaining a question text input by a user, and determining question keywords corresponding to the question text;

[0007] Based on a pre-constructed keyword index list, determine the index number corresponding to the question keyword, and obtain multiple matching questions based on the index number;

[0008] Calculating the similarity between the question text and each of the matching questions, and determining a target question among the multiple matching questions based on the similarity;

[0009] Determine multiple answers to the target question, and perform knowledge reasoning in a pre-built question knowledge base based on the multiple answers to obtain target user features corresponding to each answer to the question;

[0010] Obtaining user information corresponding to the user, and calculating a matching value between the user information and a target user feature corresponding to each answer to the question;

[0011] Based on the matching value, a target answer is determined from among the plurality of question answers.

[0012] According to an optional implementation manner of the present application, the calculating a matching value between the user information and a target user feature corresponding to each of the answers to the questions includes:

[0013] Determine the characteristic dimension of the target user characteristic corresponding to the answer to the question and the dimension weight corresponding to the characteristic dimension;

[0014] Determine the target user feature as a node, and determine a weight corresponding to the node based on the feature dimension and the dimension weight;

[0015] Constructing a user feature tree corresponding to the answer to the question according to the nodes and the weights corresponding to the nodes;

[0016] A matching value between the user and the answer to the question is determined according to the user information corresponding to the user and the user feature tree.

[0017] According to an optional implementation manner of the present application, determining a matching value between the user and the answer to the question according to the user information corresponding to the user and the user feature tree includes:

[0018] Determining a user feature corresponding to the user based on the user information corresponding to the user;

[0019] Traversing the user feature tree according to the user feature, determining whether there is a target user feature matching the user feature in the user feature tree;

[0020] If there is a target user feature matching the user feature in the user feature tree, a matching value between the user and the answer to the question is determined based on the target user feature.

[0021] According to an optional implementation of the present application, determining the question keyword corresponding to the question text includes:

[0022] Performing word segmentation processing on the question text to obtain multiple word segments;

[0023] Replacing the multiple word segments according to words in a preset synonym library to obtain processed word segments;

[0024] The processed segmented words are subjected to stop word processing based on words in a preset stop word library to obtain question keywords corresponding to the question text.

[0025] According to an optional implementation of the present application, the calculating the similarity between the question text and each matching question includes:

[0026] Performing word segmentation processing on the question text to obtain a first word segmentation result and performing word segmentation processing on each matching question to obtain multiple second word segmentation results;

[0027] Extracting the word vector in the first word segmentation result based on word2vector to obtain a first word vector;

[0028] Extract the word vector in each of the second word segmentation results based on word2vector to obtain multiple second word vectors;

[0029] The similarity between the question text and each matching question is calculated based on the first word vector and the multiple second word vectors.

[0030] According to an optional implementation of the present application, before performing knowledge reasoning in a pre-built question knowledge base based on the multiple question answers, the method includes:

[0031] Based on the embedding points, determine the browsing users corresponding to the answer to the question;

[0032] Calculating the browsing time of the browsing user for the answer to the question;

[0033] If the browsing time is greater than or equal to the preset browsing time, obtaining user information corresponding to the browsing user;

[0034] Determining user characteristics based on the user information;

[0035] A question knowledge base is constructed based on the question answers and the user characteristics.

[0036] According to an optional implementation manner of the present application, determining a target answer from the multiple question answers based on the matching value includes:

[0037] If the matching value between a question answer and the user is greater than or equal to a matching threshold, determining the question answer as a target answer;

[0038] If there are multiple target answers, sort the multiple target answers based on the matching degree between each target answer and the user;

[0039] The plurality of target answers are displayed to the user according to the sorted order.

[0040] In a second aspect, the present application provides an answer selection device based on artificial intelligence, the device comprising:

[0041] A text acquisition module is used to acquire the question text input by the user and determine the question keywords corresponding to the question text;

[0042] A question matching module, used to determine the index number corresponding to the question keyword based on a pre-built keyword index list, and obtain multiple matching questions based on the index number;

[0043] A question determination module, configured to calculate the similarity between the question text and each of the matching questions, and determine a target question from among the multiple matching questions based on the similarity;

[0044] A feature determination module is used to determine multiple answers to the target question, and perform knowledge reasoning in a pre-built question knowledge base based on the multiple answers to obtain target user features corresponding to each answer to the question;

[0045] A feature matching module, used to obtain user information corresponding to the user, and calculate a matching value between the user information and a target user feature corresponding to each answer to the question;

[0046] An answer determination module is used to determine a target answer from the multiple question answers based on the matching value.

[0047] In a third aspect, the present application provides an electronic device comprising a processor and a memory, wherein the processor is used to implement the artificial intelligence-based answer selection method when executing a computer program stored in the memory.

[0048] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the artificial intelligence-based answer selection method is implemented.

[0049] In summary, the artificial intelligence-based answer selection method, device, electronic device and medium described in the present application obtain the question text input by the user and determine the question keywords corresponding to the question text; based on a pre-constructed keyword index list, determine the index number corresponding to the question keyword, and obtain multiple matching questions based on the index number. Through the question keywords, questions related to the user's question text can be selected from the numerous questions in the database to obtain a smaller number of matching questions, thereby reducing the workload of calculating the similarity between the question text and the question; calculate the similarity between the question text and each matching question, and determine the target question from the multiple matching questions based on the similarity, and the target question is the question text that matches the question text. The question with the highest text match improves the accuracy of the target question; then determine multiple question answers corresponding to the target question, and perform knowledge reasoning in a pre-built question knowledge base based on the multiple question answers to obtain target user features corresponding to each of the question answers; calculate the matching value between the user information corresponding to the user and the target user features corresponding to each of the question answers; based on the matching value, determine the target answer from the multiple question answers; the target user features are used to represent the features corresponding to the applicable population of the question answer, and the target user features are compared with the user features corresponding to the user to determine the applicability of the question answer to the user, that is, the matching degree, which can improve the efficiency of determining the target answer. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 This is a flowchart of the artificial intelligence-based answer selection method provided in Example 1 of the present application.

[0051] Figure 2 This is a structural diagram of the artificial intelligence-based answer selection device provided in Example 2 of the present application.

[0052] Figure 3 It is a schematic diagram of the structure of the electronic device provided in Example 3 of the present application. DETAILED DESCRIPTION

[0053] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0054] 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 the present application belongs. The terms used herein in the specification of the present application are only for the purpose of describing the embodiments in an optional embodiment and are not intended to limit the present application.

[0055] The answer selection method based on artificial intelligence provided in the embodiment of the present application is executed by an electronic device, and accordingly, the answer selection device based on artificial intelligence runs in the electronic device. The electronic device may include a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device.

[0056] The embodiment of the present application can process the question text input by the user based on artificial intelligence technology to obtain the target answer corresponding to the question text. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0057] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0058] Embodiment 1

[0059] Figure 1 This is a flowchart of the answer selection method based on artificial intelligence provided in Example 1 of the present application. The answer selection method based on artificial intelligence specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some can be omitted.

[0060] S11, obtaining a question text input by a user, and determining question keywords corresponding to the question text.

[0061] Exemplarily, the question text entered by the user in the input window of the search engine is obtained, and the question keywords in the question text are determined. The question keywords may be words with preset parts of speech in the question text, and the predicted parts of speech may include nouns, verbs, and adjectives. The question keywords may represent the basic meaning of the question text. For example, the question text is "What is the principle of achieving reliable data transmission according to the Back-N Frame Protocol?" The question keyword corresponding to the text is "The principle of achieving reliable data transmission according to the Back-N Frame Protocol."

[0062] In an optional implementation, determining the question keywords corresponding to the question text includes:

[0063] Performing word segmentation processing on the question text to obtain multiple word segments;

[0064] Replacing the multiple word segments according to words in a preset synonym library to obtain processed word segments;

[0065] Perform stop-word processing on the processed word segmentation based on the words in the preset stop-word library to obtain the problem keywords corresponding to the problem text.

[0066] Exemplarily, the Jieba word segmentation tool can be used to perform word segmentation processing on the problem text to obtain multiple word segments. The word segments can be words composed of one character, two characters, three or more characters. Then, the electronic device matches each word segment with each word in the synonym library to query whether there is a synonym corresponding to the word segment in the synonym library, and replaces the word segment with the corresponding synonym. The applicability of the replaced synonym is higher than that of the word segment before replacement, the reference is more explicit, and the replaced synonym is more general. For example, replace the word segment "go back N frames protocol" in the problem keywords with the synonym "GBN protocol".

[0067] Use the stop-word library to remove the words that do not express any meaning in the problem text, such as removing function words and adverbs in the problem text. Such as "de", "a", etc.

[0068] For example, if the problem text is "What is the principle of realizing reliable data transmission according to the go back N frames protocol", after performing word segmentation processing, replacement processing, and general word processing on the problem text, the problem keywords corresponding to the problem text are "According to the GBN protocol to realize the principle of reliable data transmission".

[0069] S12. Based on the pre-constructed keyword index list, determine the index number corresponding to the problem keyword, and obtain multiple matching problems based on the index number.

[0070] The keyword index list is a list with the problem keyword as the key and the index number as the value, where the keyword index list includes the mapping relationship between the problem keyword and the index number. Querying based on the problem keyword in the keyword index list can determine the index number corresponding to the problem keyword. Based on the index number, the rate of determining matching problems can be improved, thereby improving the rate of answer selection.

[0071] Exemplarily, if the problem text includes multiple problem keywords, based on the pre-constructed keyword index list, determine the index number corresponding to each problem keyword, and according to the determined multiple index numbers, obtain the index number corresponding to the problem text, and perform a search in the preset database based on the index number to obtain multiple matching problems. For example, according to the order of the problem keywords, combine the multiple index numbers corresponding to the problem keywords to obtain the index number corresponding to the problem text.

[0072] In an optional embodiment, the method further includes: obtaining a plurality of questions, each of the questions including question keywords, and assigning corresponding index numbers to the question keywords; and constructing the keyword index list according to the index numbers and the question keywords.

[0073] Exemplarily, according to the index number corresponding to the question keyword, multiple questions matching the question keyword are searched in the question library corresponding to the search engine. For example, the question field corresponding to the question keyword can be searched, and multiple questions matching the question keyword are searched in the question field.

[0074] The question database can record multiple question texts corresponding to the index number. In the question-answer database, each index number corresponds to multiple questions. After obtaining the index number, the server queries the question database and extracts multiple matching questions corresponding to the index number from the question database.

[0075] S13, calculating the similarity between the question text and each of the matching questions, and determining a target question from the multiple matching questions based on the similarity.

[0076] Exemplarily, the similarity between the question text and each matching question can be calculated based on a text representation model, or the similarity between the question text and each matching question can be calculated based on a similarity measurement method. The similarity measurement method may include cosine similarity, Euclidean distance, minimum edit distance, Gerard similarity, etc.

[0077] The similarity between the question text and each matching question is determined, and the matching question with the highest similarity to the question text is determined as the target question.

[0078] In an optional implementation, the calculating the similarity between the question text and each matching question includes:

[0079] Performing word segmentation processing on the question text to obtain a first word segmentation result and performing word segmentation processing on each matching question to obtain multiple second word segmentation results;

[0080] Extracting the word vector in the first word segmentation result based on word2vector to obtain the first word vector;

[0081] Extract the word vector in each of the second word segmentation results based on word2vector to obtain multiple second word vectors;

[0082] The similarity between the question text and each matching question is calculated based on the first word vector and the multiple second word vectors.

[0083] For example, the Jieba word segmentation tool can be used to perform word segmentation on the question text and each matching question to obtain multiple word vectors, wherein a matching question has only one corresponding second word segmentation result.

[0084] Word2vector is a model used to generate word vectors, which can convert words into word vectors while ensuring the internal connection between words. A second word segmentation result has and only has one corresponding second word vector. Exemplarily, the similarity between the question text and the matching question corresponding to the second word vector can be determined based on the distance between the first word vector and the second word vector.

[0085] S14, determining multiple answers to the target question, and performing knowledge reasoning in a pre-built question knowledge base based on the multiple answers to obtain target user features corresponding to each of the answers to the question.

[0086] Exemplarily, multiple answers to the target question are respectively input into a pre-built question knowledge base for knowledge reasoning, and the target user corresponding to each question answer is determined to obtain the target user characteristics corresponding to the target user. The target user is the user to whom the question answer applies, and the target user characteristics corresponding to the target user are determined. The target user characteristics are the characteristics of the target user. Among them, the target user characteristics may include user position, user work, user age, user preferences, the field to which the user works, etc.

[0087] In an optional implementation, the question knowledge base includes a mapping relationship between question answers and target user characteristics. One question answer may correspond to one or more target user characteristics.

[0088] In an optional implementation, before performing knowledge reasoning in a pre-built question knowledge base based on the multiple question answers, the method includes:

[0089] Based on the embedding points, determine the browsing users corresponding to the answer to the question;

[0090] Calculating the browsing time of the browsing user for the answer to the question;

[0091] If the browsing time is greater than or equal to the preset browsing time, obtaining user information corresponding to the browsing user;

[0092] Determining user characteristics based on the user information;

[0093] A question knowledge base is constructed based on the question answers and the user characteristics.

[0094] Exemplarily, the user who clicks on the answer to the question, that is, the browsing user corresponding to the answer to the question, can be determined based on the web page embedding. The browsing time of the browsing user on the answer to the question can be calculated by recording the time each browsing user stays on the question answer interface. The longer the browsing user stays on the answer to the question, the more suitable the answer to the question is for the browsing user. If the browsing time is greater than or equal to the preset browsing time, it is determined that the answer to the question meets the needs of the browsing user, the user information corresponding to the browsing user is determined, and the user features corresponding to the user are extracted from the user information. According to the mapping relationship between the answer to the question and the user features, a question knowledge base is constructed.

[0095] S15, obtaining user information corresponding to the user, and calculating a matching value between the user information and a target user feature corresponding to each answer to the question.

[0096] Exemplarily, the user features in the user information corresponding to the user are determined, and the user features may include features such as user position, user job, user age, user preferences, and the field to which the user's job belongs, for example, English teacher, four years of work experience, 28 years old, photography sports, and education field. The matching value between the user features and the target user features corresponding to the answer to the question is calculated. The larger the matching value between the user features corresponding to the user and the target user features, the more applicable the answer to the question corresponding to the target user features is to the user; the smaller the matching value between the user features corresponding to the user and the target user features is, the less applicable the answer to the question corresponding to the target user features is to the user.

[0097] In an optional implementation, the calculating the matching value between the user information and the target user feature corresponding to each of the answers to the questions includes:

[0098] Determine the characteristic dimension of the target user characteristic corresponding to the answer to the question and the dimension weight corresponding to the characteristic dimension;

[0099] Determine the target user feature as a node, and determine a weight corresponding to the node based on the feature dimension and the dimension weight;

[0100] Constructing a user feature tree corresponding to the answer to the question according to the nodes and the weights corresponding to the nodes;

[0101] A matching value between the user and the answer to the question is determined according to the user information corresponding to the user and the user feature tree.

[0102] For example, a feature dimension table may be set in advance according to the content of the user feature, and the feature dimension table records the mapping relationship between each user feature and the feature dimension. After determining multiple target user features corresponding to the browsing user, the feature dimension table may be queried according to the target user features to determine the feature dimension corresponding to each target user feature. The dimension weight corresponding to each feature dimension may be set in advance.

[0103] The closer the node corresponding to the target user feature with a high feature dimension is to the root node, the greater the corresponding dimension weight is; the farther the node corresponding to the target user feature with a low feature dimension is from the root node, the smaller the corresponding dimension weight is. The nodes corresponding to the target user features with the same feature dimension have the same distance from the root node and the same corresponding dimension weight.

[0104] In an optional implementation, determining the matching value between the user and the answer to the question according to the user information corresponding to the user and the user feature tree includes:

[0105] Determining a user feature corresponding to the user based on the user information corresponding to the user;

[0106] Traversing the user feature tree according to the user feature, determining whether there is a target user feature matching the user feature in the user feature tree;

[0107] If there is a target user feature matching the user feature in the user feature tree, a matching value between the user and the answer to the question is determined based on the target user feature.

[0108] Exemplarily, if there is a target user feature matching the user feature in the user feature tree, the matching value between the user and the answer to the question is calculated based on the dimension weight corresponding to the target user feature. For example, if there are three target user features matching the user feature in the user feature tree, the dimension weights corresponding to the three target user features are added together to obtain the matching value between the user and the answer to the question.

[0109] S16: Determine a target answer from the multiple answers to the question based on the matching value.

[0110] The target answer may include one or more. The greater the matching value between the target user feature of a question answer and the user feature corresponding to the user, the more applicable the question answer is to the question raised by the user; the smaller the matching value between the target user feature of a question answer and the user feature corresponding to the user, the less applicable the question answer is to the question raised by the user.

[0111] In an optional implementation, determining a target answer from the multiple question answers based on the matching value includes:

[0112] If the matching value between a question answer and the user is greater than or equal to a matching threshold, determining the question answer as a target answer;

[0113] If there are multiple target answers, sort the multiple target answers based on the matching degree between each target answer and the user;

[0114] The plurality of target answers are displayed to the user according to the sorted order.

[0115] If the matching value between a question answer and the user is less than the matching degree threshold, it is determined that the question answer is not the target answer. The question answer does not match the user, and for the user, the question answer is an invalid answer.

[0116] For example, if there are multiple target answers, the multiple target answers can be sorted in reverse order based on the degree of match between each target answer and the user. The target answer with a greater degree of match is sorted first, and the target answer with a smaller degree of match is sorted last. The multiple target answers are displayed to the user according to the sorting order, that is, the target answer ranked first is displayed at the front, and the target answer ranked later is displayed at the back.

[0117] The artificial intelligence-based answer selection method described in the present application obtains the question text input by the user and determines the question keywords corresponding to the question text; determines the index number corresponding to the question keyword based on a pre-constructed keyword index list, and obtains multiple matching questions based on the index number, and selects questions related to the user's question text from a large number of questions in the database through the question keywords to obtain a small number of matching questions, thereby reducing the workload of calculating the similarity between the question text and the question; calculates the similarity between the question text and each matching question, and determines the target question from the multiple matching questions based on the similarity, the target question is the question with the highest degree of consistency with the question text, thereby improving the accuracy of the target question; then determines multiple question answers corresponding to the target question, and performs knowledge reasoning in a pre-constructed question knowledge base based on the multiple question answers to obtain the target user feature corresponding to each of the question answers; calculates the matching value between the user information corresponding to the user and the target user feature corresponding to each of the question answers; based on the matching value, determines the target answer from the multiple question answers; the target user feature is used to represent the feature corresponding to the applicable population of the question answer, and compares the target user feature with the user feature corresponding to the user to determine the applicability of the question answer to the user, that is, the matching degree, which can improve the efficiency of determining the target answer.

[0118] Embodiment 2

[0119] Figure 2 It is a structural diagram of the artificial intelligence-based answer selection device provided in Example 2 of the present application.

[0120] In some embodiments, the artificial intelligence-based answer selection device 20 may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments in the artificial intelligence-based answer selection device 20 may be stored in a memory of an electronic device and executed by at least one processor to perform (see Figure 1 Description) Functionality of an artificial intelligence-based answer selection method.

[0121] In this embodiment, the artificial intelligence-based answer selection device 20 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a text acquisition module 201, a question matching module 202, a question determination module 203, a feature determination module 204, a feature matching module 205 and an answer determination module 206. The module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0122] The text acquisition module 201 is used to acquire the question text input by the user and determine the question keywords corresponding to the question text.

[0123] Exemplarily, the question text entered by the user in the input window of the search engine is obtained, and the question keywords in the question text are determined. The question keywords may be words with preset parts of speech in the question text, and the predicted parts of speech may include nouns, verbs, and adjectives. The question keywords may represent the basic meaning of the question text. For example, the question text is "What is the principle of achieving reliable data transmission according to the Back-N Frame Protocol?" The question keyword corresponding to the text is "The principle of achieving reliable data transmission according to the Back-N Frame Protocol."

[0124] In an optional implementation, the text acquisition module 201 determines that the question keywords corresponding to the question text include:

[0125] Performing word segmentation processing on the question text to obtain multiple word segments;

[0126] Replacing the multiple word segments according to words in a preset synonym library to obtain processed word segments;

[0127] The processed segmented words are subjected to stop word processing based on words in a preset stop word library to obtain question keywords corresponding to the question text.

[0128] Exemplarily, the Jieba word segmentation tool can be used to segment the problem text to obtain multiple segmented words, which can be words composed of one character, two characters, or three or more characters. Then, the electronic device matches each segmented word with each word in the synonym library to query whether there is a synonym corresponding to the segmented word in the synonym library, and replaces the segmented word with the corresponding synonym. The applicability of the replaced synonym is higher than that of the segmented word before replacement, the referentiality is more explicit, and the replaced synonym is more general. For example, the segmented word "go back N frames protocol" in the problem keyword is replaced with the synonym "GBN protocol".

[0129] Use the stop word library to remove the words that do not express any meaning in the problem text, such as removing the function words and adverbs in the problem text. Such as "de", "a", etc.

[0130] For example, if the problem text is "What is the principle of implementing reliable data transmission according to the go back N frames protocol", after performing word segmentation processing, replacement processing, and general word processing on the problem text, the problem keyword corresponding to the problem text is "Implement the principle of reliable data transmission according to the GBN protocol".

[0131] The problem matching module 202 is used to determine the index number corresponding to the problem keyword based on the pre-constructed keyword index list, and obtain multiple matching problems based on the index number.

[0132] The keyword index list is a list with the problem keyword as the key and the index number as the value, where the keyword index list includes the mapping relationship between the problem keyword and the index number. Querying based on the problem keyword in the keyword index list can determine the index number corresponding to the problem keyword. Based on the index number, the rate of determining the matching problem can be improved, thereby improving the rate of answer selection.

[0133] Exemplarily, if the problem text includes multiple problem keywords, the index number corresponding to each problem keyword can be determined based on the pre-constructed keyword index list. According to the determined multiple index numbers, the index number corresponding to the problem text can be obtained, and based on the index number, a search can be performed in the pre-set database to obtain multiple matching problems. For example, in the order of the problem keywords, the multiple index numbers corresponding to the problem keywords can be combined to obtain the index number corresponding to the problem text.

[0134] In an optional embodiment, the question matching module 202 is further used to: obtain multiple questions, each of which includes a question keyword, assign a corresponding index number to the question keyword; and construct the keyword index list according to the index number and the question keyword. Exemplarily, according to the index number corresponding to the question keyword, multiple questions matching the question keyword are searched in the question library corresponding to the search engine. For example, the question field corresponding to the question keyword can be searched, and multiple questions matching the question keyword can be searched in the question field.

[0135] The question database can record multiple question texts corresponding to the index number. In the question-answer database, each index number corresponds to multiple questions. After obtaining the index number, the server queries the question database and extracts multiple matching questions corresponding to the index number from the question database.

[0136] The question determination module 203 is used to calculate the similarity between the question text and each of the matching questions, and determine a target question from the multiple matching questions based on the similarity.

[0137] Exemplarily, the similarity between the question text and each matching question can be calculated based on a text representation model, or the similarity between the question text and each matching question can be calculated based on a similarity measurement method. The similarity measurement method may include cosine similarity, Euclidean distance, minimum edit distance, Gerard similarity, etc.

[0138] The similarity between the question text and each matching question is determined, and the matching question with the highest similarity to the question text is determined as the target question.

[0139] In an optional implementation, the question determination module 203 calculates the similarity between the question text and each matching question including:

[0140] Performing word segmentation processing on the question text to obtain a first word segmentation result and performing word segmentation processing on each matching question to obtain multiple second word segmentation results;

[0141] Extracting the word vector in the first word segmentation result based on word2vector to obtain the first word vector;

[0142] Extract the word vector in each of the second word segmentation results based on word2vector to obtain multiple second word vectors;

[0143] The similarity between the question text and each matching question is calculated based on the first word vector and the multiple second word vectors.

[0144] For example, the Jieba word segmentation tool can be used to perform word segmentation on the question text and each matching question to obtain multiple word vectors, wherein a matching question has only one corresponding second word segmentation result.

[0145] Word2vector is a model used to generate word vectors, which can convert words into word vectors while ensuring the internal connection between words. A second word segmentation result has and only has one corresponding second word vector. Exemplarily, the similarity between the question text and the matching question corresponding to the second word vector can be determined based on the distance between the first word vector and the second word vector.

[0146] The feature determination module 204 is used to determine multiple answers to the target question, and perform knowledge reasoning in a pre-built question knowledge base based on the multiple answers to obtain target user features corresponding to each of the answers to the question.

[0147] Exemplarily, multiple answers to the target question are respectively input into a pre-built question knowledge base for knowledge reasoning, and the target user corresponding to each question answer is determined to obtain the target user characteristics corresponding to the target user. The target user is the user to whom the question answer applies, and the target user characteristics corresponding to the target user are determined. The target user characteristics are the characteristics of the target user. Among them, the target user characteristics may include user position, user work, user age, user preferences, the field to which the user works, etc.

[0148] In an optional implementation, the question knowledge base includes a mapping relationship between question answers and target user features. A question answer may correspond to one or more target user features. The target user features are features possessed by the user to whom the question answer applies.

[0149] In an optional implementation, before the feature determination module 204 performs knowledge reasoning in a pre-built question knowledge base based on the multiple question answers, the feature determination module 204 is further configured to:

[0150] Based on the embedding points, determine the browsing users corresponding to the answer to the question;

[0151] Calculating the browsing time of the browsing user for the answer to the question;

[0152] If the browsing time is greater than or equal to the preset browsing time, obtaining user information corresponding to the browsing user;

[0153] Determining user characteristics based on the user information;

[0154] A question knowledge base is constructed based on the question answers and the user characteristics.

[0155] Exemplarily, the user who clicks on the answer to the question, that is, the browsing user corresponding to the answer to the question, can be determined based on the web page embedding. The browsing time of the browsing user on the answer to the question can be calculated by recording the time each browsing user stays on the question answer interface. The longer the browsing user stays on the answer to the question, the more suitable the answer to the question is for the browsing user. If the browsing time is greater than or equal to the preset browsing time, it is determined that the answer to the question meets the needs of the browsing user, the user information corresponding to the browsing user is determined, and the user features corresponding to the user are extracted from the user information. According to the mapping relationship between the answer to the question and the user features, a question knowledge base is constructed.

[0156] The feature matching module 205 is used to obtain the user information corresponding to the user, and calculate the matching value between the user information and the target user feature corresponding to each of the answers to the questions.

[0157] Exemplarily, the user features in the user information corresponding to the user are determined, and the user features may include features such as user position, user job, user age, user preferences, and the field to which the user's job belongs, for example, English teacher, four years of work experience, 28 years old, photography sports, and education field. The matching value between the user features and the target user features corresponding to the answer to the question is calculated. The larger the matching value between the user features corresponding to the user and the target user features, the more applicable the answer to the question corresponding to the target user features is to the user; the smaller the matching value between the user features corresponding to the user and the target user features is, the less applicable the answer to the question corresponding to the target user features is to the user.

[0158] In an optional implementation, the feature matching module 205 calculates the matching value between the user information and the target user feature corresponding to each of the question answers, including:

[0159] Determine the characteristic dimension of the target user characteristic corresponding to the answer to the question and the dimension weight corresponding to the characteristic dimension;

[0160] Determine the target user feature as a node, and determine a weight corresponding to the node based on the feature dimension and the dimension weight;

[0161] Constructing a user feature tree corresponding to the answer to the question according to the nodes and the weights corresponding to the nodes;

[0162] A matching value between the user and the answer to the question is determined according to the user information corresponding to the user and the user feature tree.

[0163] For example, a feature dimension table may be set in advance according to the content of the user feature, and the feature dimension table records the mapping relationship between each user feature and the feature dimension. After determining multiple target user features corresponding to the browsing user, the feature dimension table may be queried according to the target user features to determine the feature dimension corresponding to each target user feature. The dimension weight corresponding to each feature dimension may be set in advance.

[0164] The closer the node corresponding to the target user feature with a high feature dimension is to the root node, the greater the corresponding dimension weight is; the farther the node corresponding to the target user feature with a low feature dimension is from the root node, the smaller the corresponding dimension weight is. The nodes corresponding to the target user features with the same feature dimension have the same distance from the root node and the same corresponding dimension weight.

[0165] In an optional implementation, the feature matching module 205 determines the matching value between the user and the answer to the question according to the user information corresponding to the user and the user feature tree, including:

[0166] Determining a user feature corresponding to the user based on the user information corresponding to the user;

[0167] Traversing the user feature tree according to the user feature, determining whether there is a target user feature matching the user feature in the user feature tree;

[0168] If there is a target user feature matching the user feature in the user feature tree, a matching value between the user and the answer to the question is determined based on the target user feature.

[0169] Exemplarily, if there is a target user feature matching the user feature in the user feature tree, the matching value between the user and the answer to the question is calculated based on the dimension weight corresponding to the target user feature. For example, if there are three target user features matching the user feature in the user feature tree, the dimension weights corresponding to the three target user features are added together to obtain the matching value between the user and the answer to the question.

[0170] The answer determination module 206 is configured to determine a target answer from among the plurality of question answers based on the matching value.

[0171] The target answer may include one or more. The greater the matching value between the target user feature of a question answer and the user feature corresponding to the user, the more applicable the question answer is to the question raised by the user; the smaller the matching value between the target user feature of a question answer and the user feature corresponding to the user, the less applicable the question answer is to the question raised by the user.

[0172] In an optional implementation, the answer determination module 206 determines the target answer from the multiple answers to the question based on the matching value, including:

[0173] If the matching value between a question answer and the user is greater than or equal to a matching threshold, determining the question answer as a target answer;

[0174] If there are multiple target answers, sort the multiple target answers based on the matching degree between each target answer and the user;

[0175] The plurality of target answers are displayed to the user according to the sorted order.

[0176] If the matching value between a question answer and the user is less than the matching degree threshold, it is determined that the question answer is not the target answer. The question answer does not match the user, and for the user, the question answer is an invalid answer.

[0177] For example, if there are multiple target answers, the multiple target answers can be sorted in reverse order based on the degree of match between each target answer and the user. The target answer with a greater degree of match is sorted first, and the target answer with a smaller degree of match is sorted last. The multiple target answers are displayed to the user according to the sorting order, that is, the target answer ranked first is displayed at the front, and the target answer ranked later is displayed at the back.

[0178] The artificial intelligence-based answer selection device described in the present application obtains the question text input by the user and determines the question keywords corresponding to the question text; determines the index number corresponding to the question keyword based on a pre-constructed keyword index list, and obtains multiple matching questions based on the index number. The question keywords can be used to select questions related to the user's question text from a large number of questions in the database to obtain a smaller number of matching questions, thereby reducing the workload of calculating the similarity between the question text and the question; calculates the similarity between the question text and each matching question, and determines the target question from the multiple matching questions based on the similarity. The target question is the question with the highest degree of consistency with the question text, thereby improving the accuracy of the target question; then determines multiple question answers corresponding to the target question, and performs knowledge reasoning in a pre-constructed question knowledge base based on the multiple question answers to obtain the target user feature corresponding to each of the question answers; calculates the matching value between the user information corresponding to the user and the target user feature corresponding to each of the question answers; based on the matching value, determines the target answer from the multiple question answers; the target user feature is used to represent the feature corresponding to the applicable population of the question answer, and the target user feature is compared with the user feature corresponding to the user to determine the applicability of the question answer to the user, that is, the matching degree, which can improve the efficiency of determining the target answer.

[0179] Embodiment 3

[0180] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the embodiment of the above-mentioned answer selection method based on artificial intelligence are implemented, such as Figure 1 S11-S16 shown:

[0181] S11, obtaining a question text input by a user, and determining question keywords corresponding to the question text;

[0182] S12, based on a pre-constructed keyword index list, determining an index number corresponding to the question keyword, and obtaining a plurality of matching questions based on the index number;

[0183] S13, calculating the similarity between the question text and each of the matching questions, and determining a target question from the multiple matching questions based on the similarity;

[0184] S14, determining multiple answers corresponding to the target question, and performing knowledge reasoning in a pre-built question knowledge base based on the multiple answers to obtain target user features corresponding to each of the answers to the question;

[0185] S15, obtaining user information corresponding to the user, and calculating a matching value between the user information and a target user feature corresponding to each answer to the question;

[0186] S16: Determine a target answer from the multiple answers to the question based on the matching value.

[0187] Alternatively, when the computer program is executed by a processor, the functions of each module / unit in the above-mentioned device embodiment are realized, for example Figure 2 Modules 201-206:

[0188] The text acquisition module 201 is used to acquire the question text input by the user and determine the question keywords corresponding to the question text;

[0189] A question matching module 202 is used to determine the index number corresponding to the question keyword based on a pre-built keyword index list, and obtain multiple matching questions based on the index number;

[0190] A question determination module 203 is used to calculate the similarity between the question text and each of the matching questions, and determine a target question from the multiple matching questions based on the similarity;

[0191] The feature determination module 204 is used to determine multiple answers to the target question, and perform knowledge reasoning in a pre-built question knowledge base based on the multiple answers to obtain target user features corresponding to each of the answers to the question;

[0192] A feature matching module 205 is used to obtain user information corresponding to the user and calculate a matching value between the user information and a target user feature corresponding to each answer to the question;

[0193] The answer determination module 206 is configured to determine a target answer from among the plurality of question answers based on the matching value.

[0194] Embodiment 4

[0195] See also Figure 3 FIG. 2 is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present application. In a preferred embodiment of the present application, the electronic device 3 includes a memory 31 , at least one processor 32 , a transceiver 33 and at least one communication bus 34 .

[0196] Those skilled in the art should understand that Figure 3 The structure of the electronic device shown does not constitute a limitation of the embodiments of the present application, and may be either a bus structure or a star structure. The electronic device 3 may also include more or less other hardware or software than shown in the figure, or a different component arrangement.

[0197] In some embodiments, the electronic device 3 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The electronic device 3 may also include client devices, which include but are not limited to any electronic product that can interact with a client through a keyboard, mouse, remote control, touchpad, or voice-controlled device, such as a personal computer, tablet computer, smart phone, digital camera, etc.

[0198] It should be noted that the electronic device 3 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.

[0199] In some embodiments, the memory 31 stores a computer program, and when the computer program is executed by the at least one processor 32, all or part of the steps in the answer selection method based on artificial intelligence are implemented. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0200] Furthermore, the computer-readable storage medium 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, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0201] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0202] In some embodiments, the at least one processor 32 is the control core (ControlUnit) of the electronic device 3, and uses various interfaces and lines to connect the various components of the entire electronic device 3, and executes various functions and processes data of the electronic device 3 by running or executing the program or module stored in the memory 31, and calling the data stored in the memory 31. For example, when the at least one processor 32 executes the computer program stored in the memory, it implements all or part of the steps of the answer selection method based on artificial intelligence described in the embodiment of the present application; or implements all or part of the functions of the answer selection device based on artificial intelligence. The at least one processor 32 can be composed of an integrated circuit, for example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple integrated circuits with the same function or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips.

[0203] In some embodiments, the at least one communication bus 34 is configured to implement connection and communication between the memory 31 and the at least one processor 32, etc.

[0204] Although not shown, the electronic device 3 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 32 through a power management device, so that the power management device can manage charging, discharging, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0205] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, electronic device, or network device, etc.) or a processor to execute part of the method described in each embodiment of the present application.

[0206] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0207] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0208] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0209] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "including" does not exclude other units or, and the singular does not exclude the plural. Multiple units or devices stated in the specification can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0210] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.

Claims

1. An answer selection method based on artificial intelligence, characterized in that: The method comprises: Obtaining a question text input by a user, and determining question keywords corresponding to the question text; Based on a pre-constructed keyword index list, determine the index number corresponding to the question keyword, and obtain multiple matching questions based on the index number; Calculating the similarity between the question text and each of the matching questions, and determining a target question among the multiple matching questions based on the similarity; Determine multiple answers to the target question, and perform knowledge reasoning in a pre-built question knowledge base based on the multiple answers to obtain target user features corresponding to each answer to the question; Obtaining user information corresponding to the user, and calculating a matching value between the user information and a target user feature corresponding to each of the answers to the questions, including: determining a feature dimension of the target user feature corresponding to the answer to the question and a dimension weight corresponding to the feature dimension, determining the target user feature as a node, and determining a weight corresponding to the node based on the feature dimension and the dimension weight, constructing a user feature tree corresponding to the answer to the question according to the node and the weight corresponding to the node, and determining a matching value between the user and the answer to the question according to the user information corresponding to the user and the user feature tree; The determining the matching value between the user and the answer to the question according to the user information corresponding to the user and the user feature tree comprises: determining the user feature corresponding to the user based on the user information corresponding to the user, traversing the user feature tree according to the user feature, determining whether there is a target user feature matching the user feature in the user feature tree, and if there is a target user feature matching the user feature in the user feature tree, determining the matching value between the user and the answer to the question based on the target user feature; Based on the matching value, a target answer is determined from among the plurality of question answers.

2. The answer selection method based on artificial intelligence as claimed in claim 1, characterized in that: Determining the question keywords corresponding to the question text includes: Performing word segmentation processing on the question text to obtain multiple word segments; Replacing the multiple word segments according to words in a preset synonym library to obtain processed word segments; The processed segmented words are subjected to stop word processing based on words in a preset stop word library to obtain question keywords corresponding to the question text.

3. The answer selection method based on artificial intelligence as claimed in claim 1, characterized in that: The calculating the similarity between the question text and each of the matching questions comprises: Performing word segmentation processing on the question text to obtain a first word segmentation result and performing word segmentation processing on each matching question to obtain multiple second word segmentation results; Extracting the word vector in the first word segmentation result based on word2vector to obtain a first word vector; Extract the word vector in each of the second word segmentation results based on word2vector to obtain multiple second word vectors; The similarity between the question text and each matching question is calculated based on the first word vector and the multiple second word vectors.

4. The answer selection method based on artificial intelligence as claimed in claim 1, characterized in that: Before performing knowledge reasoning in a pre-built question knowledge base based on the multiple question answers, the method includes: Based on the embedding points, determine the browsing users corresponding to the answer to the question; Calculating the browsing time of the browsing user for the answer to the question; If the browsing time is greater than or equal to the preset browsing time, obtaining user information corresponding to the browsing user; Determining user characteristics based on the user information; A question knowledge base is constructed based on the question answers and the user characteristics.

5. The artificial intelligence-based answer selection method according to any one of claims 1 to 4, characterized in that: Determining a target answer from among the multiple question answers based on the matching value comprises: If the matching value between a question answer and the user is greater than or equal to a matching threshold, determining the question answer as a target answer; If there are multiple target answers, sort the multiple target answers based on the matching degree between each target answer and the user; The plurality of target answers are displayed to the user according to the sorted order.

6. An answer selection device based on artificial intelligence, the device is used to implement the answer selection method based on artificial intelligence as claimed in any one of claims 1 to 5, characterized in that: The device comprises: A text acquisition module is used to acquire the question text input by the user and determine the question keywords corresponding to the question text; A question matching module, used to determine the index number corresponding to the question keyword based on a pre-built keyword index list, and obtain multiple matching questions based on the index number; A question determination module, configured to calculate the similarity between the question text and each of the matching questions, and determine a target question from among the multiple matching questions based on the similarity; A feature determination module is used to determine multiple answers to the target question, and perform knowledge reasoning in a pre-built question knowledge base based on the multiple answers to obtain target user features corresponding to each answer to the question; A feature matching module, used to obtain user information corresponding to the user, and calculate a matching value between the user information and a target user feature corresponding to each answer to the question; An answer determination module is used to determine a target answer from the multiple question answers based on the matching value.

7. An electronic device, characterized in that: The electronic device comprises a processor and a memory, and the processor is used to implement the artificial intelligence-based answer selection method as claimed in any one of claims 1 to 5 when executing a computer program stored in the memory.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the artificial intelligence-based answer selection method as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method and device for determining answers to questions and processor

    CN111881274A

  • Intelligent question and answer method and device, computer equipment and storage medium

    CN112765306A