A method for constructing an intelligent question-answering system and related equipment

By acquiring dialogue data and personality rating data between users and business experts, personalized user profiles are generated. Combined with dialogue data and rating data between users and other users, an intelligent question-and-answer system is built, which solves the problem of ignoring individual characteristics in existing technologies and improves the accuracy and effectiveness of the system's dialogue.

CN114218374BActive Publication Date: 2025-10-31PING AN PAY ELECTRONIC PAYMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111560809.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-20
Publication Date
2025-10-31
Estimated Expiration
2041-12-20

AI Technical Summary

Technical Problem

Existing intelligent question-answering systems neglect individual characteristics during their development, resulting in poor dialogue performance and an inability to fully utilize users' personalized information.

Method used

By acquiring dialogue data and personality rating data between users and business experts, personalized user profiles are generated. Combined with dialogue data and rating data between users and other users, an intelligent question-and-answer system is built, incorporating personalized feature vectors to improve the system's targeting and accuracy.

Benefits of technology

It improves the accuracy and effectiveness of the intelligent question-answering system's dialogue, and enhances the system's ability to understand and respond to users' individual characteristics through personalized corpus data training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114218374B_ABST
    Figure CN114218374B_ABST
Patent Text Reader

Abstract

This application discloses a method and related equipment for constructing an intelligent question-answering system. The method includes: acquiring first dialogue data between a first user and a business expert, and first gender score data from the business expert for the first user, to obtain first corpus data; obtaining a first word frequency feature vector and a first gender feature vector based on the first user's first historical dialogue data; generating a first profile based on the first user's basic information, the first word frequency feature vector, and the first gender feature vector; acquiring second dialogue data between the first user and a second user, second gender score data from the first user for the second user, and third gender score data from the second user for the first user; and constructing an intelligent question-answering system based on the first corpus data, the second dialogue data, the second gender score data, the third gender score data, and the first profile. This application embodiment is beneficial for improving the dialogue effect of the intelligent question-answering system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent question answering, specifically to a method for constructing an intelligent question answering system and related equipment. Background Technology

[0002] With the development of computer-related technologies, intelligent question-answering systems have been widely applied in scenarios such as healthcare, product recommendations, product introductions, and government and enterprise services. They play a positive role in saving human resources, improving information processing efficiency, and reducing website operating costs. Intelligent question-answering systems typically organize accumulated unordered corpus information in an orderly and scientific manner, establishing knowledge-based classification models. These models can provide consultation and services for newly added corpus information. Currently, the construction of intelligent question-answering systems relies to some extent on user profiles, which are mostly based on personal information such as user age, gender, and consumption history. In addition, there are some related solutions for chatbots and intelligent recommendation systems. However, these solutions mostly rely on capturing user consumption habits or the evolution of interests based on consumption records, supplemented by personal information such as user age, gender, and region. In building intelligent question-answering systems, certain key information is overlooked, resulting in poor dialogue performance. Summary of the Invention

[0003] This application provides a method for constructing an intelligent question-answering system and related equipment.

[0004] In a first aspect, embodiments of this application provide a method for constructing an intelligent question-answering system, the method comprising:

[0005] Acquire the first dialogue data between the first user and the business expert, and the first personality score data of the business expert for the first user;

[0006] The first corpus data was obtained based on the first dialogue data and the first gender scoring data;

[0007] Based on the first user's first historical dialogue data, the first user's first word frequency feature vector and first gender feature vector are obtained. The first historical dialogue data includes the first dialogue data.

[0008] Obtain the basic information of the first user, and generate the first profile of the first user based on the basic information of the first user, the first word frequency feature vector, and the first gender feature vector;

[0009] Acquire the second corpus data of the dialogue between the first user and the second user. The second corpus data includes the second dialogue data between the first user and the second user, the second gender score data of the first user on the second user, and the third gender score data of the second user on the first user.

[0010] Based on the first corpus data, the second dialogue data, the second gender scoring data, and the third gender scoring data, the third corpus data was obtained;

[0011] An intelligent question-answering system was constructed using first-person profile data and third-person corpus data.

[0012] In some possible implementations, based on the first user's first historical dialogue data, the first user's first word frequency feature vector and first gender feature vector are obtained, including:

[0013] Obtain the frequency of each word in the first historical dialogue data, and determine the frequency of each word as the first word frequency feature vector;

[0014] Based on a pre-defined list of personalized tags, the first historical dialogue data is personalized and encoded to obtain the first personalized feature vector.

[0015] In some possible implementations, the method further includes: acquiring a user question input by a third user to the intelligent question-answering system, and acquiring a vector representation of the user question; if a third profile of the third user exists in the user profile database, based on the vector representation of the user question and the third profile, querying the knowledge question-answering database to obtain at least one reference user question with a similarity greater than or equal to a preset value that is similar to the user question; based on the user question and at least one reference user question, determining the target user question from the at least one reference user question; and returning the answer corresponding to the target user question to the third user.

[0016] In some possible implementations, determining the target user question from the at least one reference user question based on the user question and at least one reference user question includes: concatenating the at least one reference user question with the user question to obtain at least one question pair; performing binary classification on the at least one question pair using natural language processing techniques to obtain a similarity score for each question pair in the at least one question pair; determining the question pair with the highest similarity score among the at least one question pair, and identifying the reference user question in the question pair with the highest similarity score as the target user question.

[0017] In some possible implementations, if there is no reference user question in the knowledge question-answering base that has a similarity greater than or equal to a preset value to the user question, the method further includes: pushing the user question to a business expert; obtaining the business expert's answer to the user question; returning the business expert's answer to the user question to a third user; and adding the user question and the business expert's answer to the user question to the knowledge question-answering base.

[0018] In some possible implementations, before acquiring the second corpus data of the dialogue between the first user and the second user, the method further includes: acquiring a second user recommended by a pre-built user recommendation system based on a first profile for the first user;

[0019] In some possible implementations, the second corpus data also includes the first user's rating of the recommendation effect of the user recommendation system. The method further includes: encoding the first profile to obtain a first encoding vector; encoding the second profile to obtain a second encoding vector; encoding the topics initiated by the first user and the second user during their dialogue to obtain a third encoding vector; and training the user recommendation system using the first encoding vector, the second encoding vector, the third encoding vector, and the first user's rating of the recommendation effect of the user recommendation system.

[0020] Secondly, embodiments of this application provide a dialogue device, the device comprising: an acquisition module, a storage module, a feature extraction module, a user profile module, and a construction module.

[0021] The acquisition module is used to acquire the first dialogue data between the first user and the business expert, and the first personality score data of the business expert for the first user.

[0022] The storage module is used to obtain the first corpus data based on the first dialogue data and the first gender scoring data;

[0023] The feature extraction module is used to obtain the first word frequency feature vector and the first gender feature vector of the first user based on the first user's first historical dialogue data, wherein the first historical dialogue data includes the first dialogue data.

[0024] The user profile module is used to obtain the basic information of the first user and generate the first profile of the first user based on the basic information, the first word frequency feature vector, and the first gender feature vector.

[0025] The acquisition module is also used to acquire second corpus data of the dialogue between the first user and the second user. The second corpus data includes the second dialogue data between the first user and the second user, the second gender score data of the first user on the second user, and the third gender score data of the second user on the first user.

[0026] The storage module is also used to obtain the third corpus data based on the first corpus data, the second dialogue data, the second gender scoring data, and the third gender scoring data;

[0027] The system is built using a first profile and third corpus data to construct an intelligent question-answering system.

[0028] Thirdly, embodiments of this application provide an electronic device, including: a processor connected to a memory for storing a computer program, and the processor for executing the computer program stored in the memory to cause the electronic device to perform the method as described in the first aspect.

[0029] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that causes a computer to perform the method described in the first aspect.

[0030] Fifthly, embodiments of this application provide a computer program product, the computer program product including a non-transitory computer-readable storage medium storing a computer program, the computer being operable to perform the method as described in the first aspect.

[0031] As can be seen, in this embodiment, the system obtains first dialogue data between a first user and a business expert, and first gender score data from the business expert for the first user; first corpus data is obtained based on the first dialogue data and the first gender score data; first word frequency feature vector and first gender feature vector are obtained based on the first user's first historical dialogue data, the first historical dialogue data including the first dialogue data; basic information of the first user is obtained, and a first profile of the first user is generated based on the basic information, the first word frequency feature vector, and the first gender feature vector; second corpus data of the dialogue between the first user and a second user is obtained, the second corpus data including the second dialogue data between the first user and the second user, the second gender score data from the first user for the second user, and the third gender score data from the second user for the first user; third corpus data is obtained based on the first corpus data, the second dialogue data, the second gender score data, and the third gender score data; and an intelligent question-answering system is constructed using the first profile and the third corpus data. This approach, which incorporates personalized features (i.e., the first gender feature vector) to construct the first profile, and then uses this first profile to build the intelligent question-answering system, allows the system to engage in more targeted dialogues. Furthermore, the third corpus data is obtained by expanding the first corpus data using second dialogue data, second gender scoring data, and third gender scoring data. This not only makes the corpus data more comprehensive but also incorporates personalized features (i.e., second and third gender scoring data). Training the intelligent question-answering system with more comprehensive corpus data and personalized user profiles improves the accuracy and effectiveness of the dialogue. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 A flowchart illustrating a method for constructing an intelligent question-answering system provided in an embodiment of this application;

[0034] Figure 2 A schematic diagram of the structure of a personalized encoder provided in this application embodiment;

[0035] Figure 3 This is a schematic diagram of the structure of a user recommendation system provided in an embodiment of this application;

[0036] Figure 4 A schematic diagram of a natural language processing representation model provided in an embodiment of this application;

[0037] Figure 5 A flowchart illustrating another method for constructing an intelligent question-answering system provided in this application embodiment;

[0038] Figure 6 A schematic diagram of a device for building an intelligent question-answering system provided in this application embodiment;

[0039] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0041] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0042] In this document, the term "embodiment" means that a particular feature, result, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0043] See Figure 1 , Figure 1 This application provides a method for constructing an intelligent question-answering system, which is applied to electronic devices, such as... Figure 1 As shown, the method includes steps 101-107:

[0044] 101: Obtain the first dialogue data between the first user and the business expert and the first personality score data of the business expert for the first user.

[0045] For example, by building a person-to-person dialogue platform, the first user can have a dialogue with a business expert, and the first dialogue data between the first user and the business expert can be obtained. Optionally, the business expert can ask questions or have a dialogue with the first user on the topic raised in the dialogue. The business expert is a person with relevant knowledge background, and the dialogue topic is a certain problem, a certain product, or a certain type of product.

[0046] For example, after the first user and the business expert finish their conversation, the business expert obtains the first user's initial personality score data. Specifically, this includes: the business expert selects a target personality tag from a preset personality tag list, and then scores the first user's performance on the target personality tag. The personality tag list is defined by the business expert, and its number and order of elements remain fixed. For example, if the number of elements N = 100, the personality tag list may include: "positive", "negative", "aggressive", "conservative", "enthusiastic", "indifferent", "pursuing quality", "pursuing cost-effectiveness", etc. Then, the scoring range for each personality tag is set to [0, 1]. This scoring range represents the first user's state from completely non-compliant to completely compliant on the personality tag. Furthermore, the personality tag can be divided into V levels. For example, when V = 3, the scoring options are [0, 0.5, 1.0].

[0047] 102: The first corpus data is obtained based on the first dialogue data and the first personality scoring data.

[0048] For example, a first corpus data, including the first dialogue data between the first user and the business expert and the first personality score data of the business expert for the first user, is stored in a corpus database and continuously expanded and updated to train the personality encoder. Here, the first corpus data refers to the corpus data in the current corpus database, including the first dialogue data and the first personality score data, which may also include dialogue data between other users and the business expert, and the business expert's personality score data for that user.

[0049] 103: Based on the first user's first historical dialogue data, obtain the first word frequency feature vector and the first gender feature vector of the first user, wherein the first historical dialogue data includes the first dialogue data.

[0050] For example, the first historical dialogue data includes the aforementioned first dialogue data, which may specifically be the dialogue data of the first user in a recent period (or in the most recent few dialogues). Optionally, the first word frequency feature vector of the first user is obtained based on the first historical dialogue data of the first user, which specifically includes: obtaining the frequency of each word in the first historical dialogue data through a word segmentation tool, and using the frequency of each word as the first word frequency feature vector.

[0051] For example, based on the first user's first historical dialogue data, the first user's first personality feature vector is obtained, specifically including: encoding the first historical dialogue data based on a preset personality tag list to obtain the first personality feature vector. Optionally, a pre-built personality encoder is used to encode the first historical dialogue data to obtain the first personality feature vector. The personality encoder can adopt an LSTM (Long Short-Term Memory) model. Please refer to the schematic diagram of the personality encoder structure. Figure 2 The input is the first user's first historical dialogue data, and the output is the first characteristic feature vector. Specifically, it includes: obtaining the first user's first historical dialogue data from the corpus database, and using the first historical dialogue data as the model input x (i.e., x1…x). t …x n Furthermore, the length n of the first historical dialogue data is not fixed, and the model output y is a first-order feature vector of length N, obtained through the output h of each state (i.e., h0, h1...h). t-1 h t …h n-1 ) and the input and output x and c (i.e. c0, c1...c) of each state. t-1 c t …c n-1 Multiply by , and determine which information to discard or retain.

[0052] Optionally, the first personality feature vector of length N can be encoded as follows: Based on a preset list of personality tags of length N, the corresponding scores are arranged into an N-dimensional vector according to the order of the tags in the list, serving as the first personality feature vector of the first user. For example, for a list of personality tags of length N = 100 ["positive", "negative", "indifferent", ...], the first personality feature vector of the first user can be represented as a vector of length N [a, b, c, ...], where the i-th element is the score for the i-th tag, for example: positive = a, negative = b, indifferent = c, ..., where, for the above unscored personality tags, the average score of all users on that personality tag is filled by default.

[0053] 104: Obtain the basic information of the first user, and generate the first profile of the first user based on the basic information of the first user, the first word frequency feature vector, and the first personality feature vector.

[0054] For example, in a specific embodiment of this application, the basic information of the first user may include: the first user's gender, age, region, and consumption history; then, based on the first user's basic information, the aforementioned first word frequency feature vector, and the first gender feature vector, a first profile of the first user is obtained, and the first profile is stored in a user profile database for training of the user recommendation system and intelligent question answering system models. In this embodiment, incorporating the first user's personality features (first gender feature vector) into the first profile enables the first profile to more accurately describe the first user.

[0055] Optionally, in this embodiment, it is also necessary to obtain third dialogue data between the second user and the business expert, and obtain the second word frequency feature vector and the second personality feature vector of the second user based on the second historical dialogue data. The second historical dialogue data includes the third dialogue data, specifically the dialogue data of the second user in a recent period (or in the most recent few dialogues). The second basic information of the second user is obtained, and based on the second user's basic information, the second word frequency feature vector, and the second personality feature vector, a second profile of the second user is generated and added to the user profile database for training models such as user recommendation systems and intelligent question-answering systems. The second user's basic information may also include: the second user's gender, age, region, and consumption history.

[0056] 105: Obtain the second corpus data of the dialogue between the first user and the second user. The second corpus database includes the second dialogue data between the first user and the second user, the second gender score data of the first user on the second user, and the third gender score data of the second user on the first user.

[0057] For example, the second corpus data mentioned above includes the second dialogue data between the first user and the second user, the second gender rating data of the first user to the second user, and the third gender rating data of the second user to the first user. The second corpus data is also stored in the corpus database to further expand the data in the corpus database so as to train and optimize the aforementioned personality encoder, user recommendation system or intelligent question answering system. The method for obtaining the second corpus data can refer to the description in step 101, the difference being that the first user and the second user engage in a dialogue and need to give each other personality ratings.

[0058] For example, before obtaining the second corpus data of the dialogue between the first user and the second user, it is also necessary to obtain the second user recommended by the pre-constructed user recommendation system based on the aforementioned first profile. For example, the user recommendation system can match the user profile with the highest similarity to the first profile from the user profile library and recommend the second user to which the user profile belongs to the first user. The aforementioned second corpus data also includes the first user's score for the recommendation effect of the user recommendation system. The score for the recommendation effect of the user recommendation system is the achievement of the goal after the dialogue between the first user and the second user. The specific score range can be selected as [0, 1]. Optionally, referring to the personalized tag scoring method in step 101, the score is used as feedback and evaluation of the recommendation effect. Optionally, the topics initiated by the first user and the second user during the dialogue and the first user's score for the recommendation effect of the user recommendation system are stored in the aforementioned user profile library for the training of the user recommendation system.

[0059] For example, the user recommendation system can be trained using the following steps: encode the first profile to obtain a first encoding vector, encode the second profile to obtain a second encoding vector, encode the topics initiated by the first user and the second user during their conversation to obtain a third encoding vector, and then use the first encoding vector, the second encoding vector, the third encoding vector, and the first user's rating of the recommendation effect of the user recommendation system to train the user recommendation system.

[0060] For an example, please refer to the schematic diagram of the user recommendation system structure. Figure 3The system comprises a "first profile module," a "second profile module," a "topic module," and a "collaborative filtering module." The "first profile module" encodes the first profile of the first user to obtain a first encoded vector, and the "second profile module" encodes the second profile of the second user to obtain a second encoded vector. The first and second profile modules have identical structures and weight parameters, except for input and output features. The "topic module" encodes the topics initiated during the dialogue between the first and second users to obtain a third encoded vector. Optionally, the topic module can use an encoding layer, the structure of which can be found in the LSTM model described above and will not be repeated here. The "collaborative filtering module" includes a concatenation layer and two fully connected layers. The concatenation layer concatenates the first, second, and third encoded vectors to obtain a concatenated vector. The two fully connected layers classify the concatenated vector to obtain a predicted score for the user recommendation system's recommendation performance. The first user's score for the recommendation system is used as the true value for supervised training of the user recommendation system. Optionally, the loss function used for training can be the cross-entropy function, and the training method can be stochastic gradient descent, primarily for online training.

[0061] In other words, the inputs for training the user recommendation system are the first profile of the first user, the second profile of the second user, and the topic initiated by the first user. The first profile includes a first word frequency feature vector, a first gender feature vector, and basic information about the first user. The first encoding layer encodes the first word frequency feature vector, the first gender feature vector, and the basic information about the first user, resulting in encoding vectors A1, A2, and A3, respectively. The first concatenation layer concatenates the input encoding vectors A1, A2, and A3 to obtain the first encoding vector. The second profile includes a second word frequency feature vector, a second gender feature vector, and basic information about the second user. The second encoding layer encodes the second word frequency feature vector, the second gender feature vector, and the basic information about the second user, resulting in encoding vectors B1, B2, and B3, respectively. The second concatenation layer concatenates the input encoding vectors B1, B2, and B3 to obtain the second encoding vector.

[0062] 106: Based on the first corpus data, the second dialogue data, the second personality scoring data, and the third personality scoring data, the third corpus data is obtained.

[0063] For example, the second dialogue data, the second gender score data, and the third gender score data are added to the corpus database to expand the first corpus data. The corpus data in the expanded corpus database is the third corpus data. The third corpus data may also include dialogue data between other users and business experts and the business experts' personality score data for the user. The third corpus data can be used to build and train the intelligent question answering system.

[0064] 107: Construct an intelligent question-answering system using the first profile and the third corpus data.

[0065] In a specific embodiment of this application, an intelligent question-answering system is built, and the third corpus data and the first profile are used as training data to train the intelligent question-answering system.

[0066] For example, after constructing an intelligent question-answering system using the first profile and the third corpus data, the system can be used to engage in dialogue with users. In a specific question-answering scenario, the system obtains the user question input by the third user and its vector representation. If a third profile of the third user exists in the aforementioned user profile database, based on the vector representation of the user question and the third profile, it retrieves at least one reference user question from a preset knowledge question-answering database that has a similarity greater than or equal to a preset value. Then, based on the user question and at least one reference user question, it determines the target user question from the at least one reference user question and returns the answer corresponding to the target user question to the third user. It should be understood that user questions and corresponding answers in the knowledge question-answering database are usually stored in association. For example, a user question might be a question about a product, and the answer to the target user question might be a solution to that question, etc. Optionally, the intelligent question-answering system also supports voice input, meaning that the user question input by the third user can be voice, which can be converted into corresponding text using a speech recognition model.

[0067] For example, based on the user's question and at least one reference user's question, the target user's question is determined from the at least one reference user's question. Specifically, this includes: concatenating the at least one reference user's question with the user's question to obtain at least one question pair; then using natural language processing technology to perform binary classification on the at least one question pair to obtain a similarity score for each question pair; then determining the question pair with the highest similarity score among the at least one question pair, and identifying the reference user's question in the question pair with the highest similarity score as the target user's question.

[0068] For example, for a user question input by a third user, a Natural Language Processing (NLP) representation model is used for encoding to obtain the corresponding vector representation, such as... Figure 4 The NLP representation model can be a BERT (Bidirectional Encoder Representation from Transformers) model pre-trained on Chinese corpus. First, the user question is converted into a token sequence and input into the BERT model. After bidirectional deep interaction through multiple layers of transformers (TRM), the vector corresponding to the output of the last TRM layer is obtained as the vector representation of the user question. The system then queries the user profile database to see if a third user's third profile exists. If it does, the user question vector representation and the third profile are combined to form a query vector. This query vector is then used to search a pre-defined knowledge question and answer database, obtaining a set of vectors with a similarity greater than or equal to a preset value. All questions corresponding to this vector set are used as reference user questions, resulting in at least one reference user question. Optionally, the questions in the knowledge question-answering base can be questions from a corpus database. These questions can be converted into corresponding semantic vector representations in advance using the BERT model, and the semantic vector representations can be partitioned and stored according to the user profiles corresponding to these questions. For example, the semantic vector representation of the first user's question can be stored in a separate area for use when querying. The partitioning method can use hash bucketing or clustering algorithms such as K-means, which are not limited here.

[0069] Specifically, assuming at least one reference user question includes reference user question 1, reference user question 2, and reference user question 3, reference user question 1 is concatenated with the user question to form a first question pair, for example: [CLS] Is this product good? [SEP] How's the weather today? The token sequence of the first question pair is obtained, and this token sequence is input into the BERT model for processing to obtain an output vector. This output vector is then input into a fully connected layer for binary classification to obtain the output result, for example: the output result can be represented as [0.1, 0.9], where the first element, i.e., element 0.1, represents the similarity score between reference user question 1 and the user question, and the second element, i.e., 0.9, represents the dissimilarity score between reference user question 1 and the user question. It should be understood that reference user question 2 and reference user question 3 are also concatenated with the user question to form question pairs. Thus, the similarity score of each question pair in at least one question pair can be obtained. The reference user question in the question pair with the highest similarity score is determined as the target user question. For example, if reference user question 3 has the highest similarity score with the user question, then reference user question 3 is the target user question.

[0070] For example, if there is no reference user question in the knowledge question and answer base that has a similarity greater than or equal to a preset value to the user question, the user question is pushed to the business expert, then the business expert's answer to the user question is obtained, the business expert's answer to the user question is returned to the third user, and the user question and the business expert's answer to the user question are added to the knowledge question and answer base to expand the knowledge question and answer base.

[0071] As can be seen, in this embodiment, the system obtains first dialogue data between a first user and a business expert, and first gender score data from the business expert for the first user; first corpus data is obtained based on the first dialogue data and the first gender score data; first word frequency feature vector and first gender feature vector are obtained based on the first user's first historical dialogue data, the first historical dialogue data including the first dialogue data; basic information of the first user is obtained, and a first profile of the first user is generated based on the basic information, the first word frequency feature vector, and the first gender feature vector; second corpus data of the dialogue between the first user and a second user is obtained, the second corpus data including the second dialogue data between the first user and the second user, the second gender score data from the first user for the second user, and the third gender score data from the second user for the first user; third corpus data is obtained based on the first corpus data, the second dialogue data, the second gender score data, and the third gender score data; and an intelligent question-answering system is constructed using the first profile and the third corpus data. This approach, which incorporates personalized features (i.e., the first gender feature vector) to construct the first profile, and then uses this first profile to build the intelligent question-answering system, allows the system to engage in more targeted dialogues. Furthermore, the third corpus data is obtained by expanding the first corpus data using second dialogue data, second gender scoring data, and third gender scoring data. This not only makes the corpus data more comprehensive but also incorporates personalized features (i.e., second and third gender scoring data). Training the intelligent question-answering system with more comprehensive corpus data and personalized user profiles improves the accuracy and effectiveness of the dialogue.

[0072] See Figure 5 , Figure 5 A flowchart illustrating another intelligent question-answering system construction method provided in this application embodiment is shown below. Figure 5 As shown, the method includes steps 501-511:

[0073] 501: Obtain the first dialogue data between the first user and the business expert and the first personality score data of the business expert for the first user;

[0074] 502: The first corpus data is obtained based on the first dialogue data and the first personality scoring data;

[0075] 503: Based on the first user's first historical dialogue data, obtain the first word frequency feature vector and the first gender feature vector of the first user, wherein the first historical dialogue data includes the first dialogue data;

[0076] 504: Obtain the basic information of the first user, and generate the first profile of the first user based on the basic information of the first user, the first word frequency feature vector, and the first personality feature vector;

[0077] 505: Obtain the second corpus data of the dialogue between the first user and the second user. The second corpus data includes the second dialogue data between the first user and the second user, the second gender score data of the first user on the second user, and the third gender score data of the second user on the first user.

[0078] 506: Based on the first corpus data, the second dialogue data, the second personality scoring data, and the third personality scoring data, the third corpus data is obtained;

[0079] 507: Construct an intelligent question-answering system using the first profile and the third corpus data;

[0080] 508: Obtain the user question input by the third user to the intelligent question answering system, and obtain the vector representation of the user question;

[0081] For example, the user's question can be about a specific product. Optionally, the user's question input by the third user can be speech, which can be converted into corresponding text using a speech recognition model. The user's question input by the third user can be encoded using an NLP representation model to obtain a corresponding vector representation.

[0082] 509: If a third profile of the third user exists in the user profile database, based on the vector representation of the user question and the third profile, at least one reference user question with a similarity greater than or equal to a preset value is retrieved from the knowledge question and answer database.

[0083] For example, after querying the third user's third profile in the aforementioned user profile database, a query vector is formed based on the third profile and the vector representation of the user's question. Based on the query vector, a preset knowledge question and answer database is queried to obtain a set of vectors with a similarity greater than or equal to a preset value to the query vector. All questions corresponding to this set of vectors are used as reference user questions to obtain at least one reference user question.

[0084] 510: Based on the user question and the at least one reference user question, determine the target user question from the at least one reference user question;

[0085] For example, based on a user question and at least one reference user question, the target user question is determined from the at least one reference user question. Specifically, this includes: concatenating the at least one reference user question with the user question to obtain at least one question pair; performing binary classification on the at least one question pair using natural language processing technology to obtain a similarity score for each question pair in the at least one question pair; determining the question pair with the highest similarity score among the at least one question pair, and identifying the reference user question in the question pair with the highest similarity score as the target user question.

[0086] Optionally, if there is no reference user question in the knowledge question-answering base that has a similarity greater than or equal to the preset value, the user question is pushed to a business expert; the business expert's answer to the user question is obtained; the business expert's answer to the user question is returned to a third user; and the user question and the business expert's answer to the user question are added to the knowledge question-answering base to expand the knowledge question-answering base.

[0087] 511: Return the answer corresponding to the question posed by the target user to the third user.

[0088] The specific implementation of steps 501-511 is as follows: Figure 1 The embodiments shown have already been described, and they can achieve the same or similar beneficial effects, so they will not be repeated here.

[0089] See Figure 6 , Figure 6 This application provides a schematic diagram of the structure of an intelligent question-answering system construction device, as shown in the embodiments of this application. Figure 6 As shown, the intelligent question-answering system construction device 600 includes: an acquisition module 601, a storage module 602, a feature extraction module 603, a user profile module 604, and a construction module 605.

[0090] The acquisition module 601 is used to acquire the first dialogue data between the first user and the business expert and the first personality score data of the business expert on the first user.

[0091] Storage module 602 is used to obtain first corpus data based on first dialogue data and first gender scoring data;

[0092] The feature extraction module 603 is used to obtain the first word frequency feature vector and the first gender feature vector of the first user based on the first user's first historical dialogue data, wherein the first historical dialogue data includes the first dialogue data.

[0093] User profile module 604 is used to obtain the basic information of the first user and generate the first profile of the first user based on the basic information of the first user, the first word frequency feature vector and the first gender feature vector.

[0094] The acquisition module 601 is also used to acquire second corpus data of the dialogue between the first user and the second user. The second corpus data includes second dialogue data between the first user and the second user, second gender score data of the first user to the second user, and third gender score data of the second user to the first user.

[0095] Storage module 602 is also used to obtain third corpus data based on the first corpus data, the second gender scoring data, and the third gender scoring data;

[0096] Module 605 is used to build an intelligent question-answering system using the first profile and the third corpus data.

[0097] In one possible implementation, in obtaining the first user's first word frequency feature vector and first gender feature vector based on the first user's first historical dialogue data, the feature extraction module 603 is specifically used for:

[0098] Obtain the frequency of each word in the first historical dialogue data, and determine the frequency of each word as the first word frequency feature vector;

[0099] Based on a preset list of personalized tags, the first historical dialogue data is personalized and encoded to obtain the first personalized feature vector.

[0100] In one possible implementation, the user profiling module 604 is further configured to:

[0101] Obtain the third dialogue data between the second user and the business expert;

[0102] Based on the second user's second historical dialogue data, the second user's second word frequency feature vector and second personality feature vector are obtained, and the second historical dialogue data includes the third dialogue data;

[0103] Obtain the basic information of the second user, and generate a second profile of the second user based on the basic information of the second user, the second word frequency feature vector, and the second personality feature vector, and add the second profile to the user profile database.

[0104] In one possible implementation, the assembly module 605 is also used for:

[0105] Obtain the user question input by the third user to the intelligent question answering system, and obtain the vector representation of the user question;

[0106] If a third profile of the third user exists in the user profile database, based on the vector representation of the user question and the third profile, at least one reference user question with a similarity greater than or equal to a preset value is retrieved from the knowledge question and answer database.

[0107] Based on the user question and the at least one reference user question, determine the target user question from the at least one reference user question;

[0108] Return the answer corresponding to the question posed by the target user to the third user.

[0109] In one possible implementation, in determining the target user question from the at least one reference user question based on the user question and the at least one reference user question, the building module 605 is specifically used for:

[0110] Concatenate the at least one reference user question with the user question to obtain at least one question pair;

[0111] Natural language processing techniques are used to perform binary classification on the at least one question pair to obtain a similarity score for each question pair in the at least one question pair;

[0112] Identify the question pair with the highest similarity score among the at least one question pair, and determine the reference user question in the question pair with the highest similarity score as the target user question.

[0113] In one possible implementation, the assembly module 605 is also used for:

[0114] The user's question is pushed to the business expert.

[0115] Obtain the business expert's answer to the user's question;

[0116] Return the business expert's answer to the user's question to the third user, and add the user's question and the business expert's answer to the user's question to the knowledge question and answer base.

[0117] In one possible implementation, the acquisition module 601 is further configured to:

[0118] The pre-built user recommendation system obtains the second user recommended by the first user based on the first profile;

[0119] In one possible implementation, the assembly module 605 is also used for:

[0120] The first image is encoded to obtain a first encoding vector;

[0121] The second image is encoded to obtain a second encoding vector;

[0122] The topics initiated during the conversation between the first user and the second user are encoded to obtain a third encoding vector;

[0123] The user recommendation system is trained using the first encoding vector, the second encoding vector, the third encoding vector, and the first user's score on the recommendation effect of the user recommendation system.

[0124] According to one embodiment of this application, Figure 6 The various units of the intelligent question-answering system construction device shown can be individually or entirely merged into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effects of the embodiments of this application. The above units are based on logical function division. In practical applications, the function of one unit can also be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the pathological slide image processing device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.

[0125] According to another embodiment of this application, the following can be achieved by running on a general-purpose computing device, such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM), capable of performing operations such as... Figure 1 or Figure 5 The computer program (including program code) for each step involved in the corresponding method shown, to construct such... Figure 6 The apparatus for building an intelligent question-answering system shown herein, as well as the method for building an intelligent question-answering system to implement the embodiments of this application, are described. The computer program may be recorded on, for example, a computer-readable recording medium, loaded onto the aforementioned computing device via the computer-readable recording medium, and run therein.

[0126] See Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 700 includes a transceiver 701, a processor 702, and a memory 703. These are connected via a bus 704. The memory 703 stores computer programs and data, and can transfer data stored in the memory 703 to the processor 702.

[0127] Processor 702 is used to read the computer program in memory 703 and perform the following operations:

[0128] Acquire the first dialogue data between the first user and the business expert, and the first personality score data of the business expert for the first user;

[0129] The first corpus data was obtained based on the first dialogue data and the first gender scoring data;

[0130] Based on the first user's first historical dialogue data, the first user's first word frequency feature vector and first gender feature vector are obtained. The first historical dialogue data includes the first dialogue data.

[0131] Obtain the basic information of the first user, and generate the first profile of the first user based on the basic information of the first user, the first word frequency feature vector, and the first gender feature vector;

[0132] Acquire the second corpus data of the dialogue between the first user and the second user. The second corpus data includes the second dialogue data between the first user and the second user, the second gender score data of the first user on the second user, and the third gender score data of the second user on the first user.

[0133] Based on the first corpus data, the second dialogue data, the second gender scoring data, and the third gender scoring data, the third corpus data was obtained;

[0134] An intelligent question-answering system was constructed using first-person profile data and third-person corpus data.

[0135] For example, the above-mentioned electronic device 700 may be a computer, server, cloud server, computer host, server cluster, etc. The electronic device 700 includes, but is not limited to, transceiver 701, processor 702 and memory 703. Those skilled in the art will understand that the schematic diagram is merely an example of the electronic device 700 and does not constitute a limitation on the electronic device 700. It may include more or fewer components than shown in the diagram, or combine certain components, or different components.

[0136] It should be noted that since the processor 701 of the electronic device 700 implements the steps in the above-described intelligent question-answering system construction method when executing the computer program, all embodiments of the above-described intelligent question-answering system construction method are applicable to the electronic device and can achieve the same or similar beneficial effects.

[0137] This application also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement some or all of the steps of any of the intelligent question-answering system construction methods described in the above method embodiments.

[0138] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the intelligent question-answering system construction methods described in the above method embodiments.

[0139] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0140] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0141] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0142] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0143] Furthermore, the functional units in the various embodiments of this 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 integrated unit can be implemented in hardware or as a software program module.

[0144] If the integrated unit is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0145] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0146] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for constructing an intelligent question-answering system, characterized in that, The method includes: Acquire the first dialogue data between the first user and the business expert, and the first personality score data of the business expert for the first user; The first corpus data is obtained based on the first dialogue data and the first personality scoring data; Based on the frequency of each word in the first user's first historical dialogue data, the frequency of each word is determined as a first word frequency feature vector; based on a preset list of personalized tags, the first historical dialogue data is personalized and encoded to obtain a first personalized feature vector; the first historical dialogue data includes the first dialogue data. Obtain the basic information of the first user, and generate the first profile of the first user based on the basic information of the first user, the first word frequency feature vector, and the first personality feature vector; Acquire second corpus data of the dialogue between the first user and the second user. The second corpus data includes second dialogue data between the first user and the second user, second gender score data of the first user on the second user, and third gender score data of the second user on the first user. Based on the first corpus data, the second dialogue data, the second personality scoring data, and the third personality scoring data, the third corpus data is obtained; An intelligent question-answering system is constructed using the first profile and the third corpus data.

2. The method according to claim 1, characterized in that, The method further includes: Obtain the third dialogue data between the second user and the business expert; Based on the second user's second historical dialogue data, the second user's second word frequency feature vector and second personality feature vector are obtained, and the second historical dialogue data includes the third dialogue data; Obtain the basic information of the second user, and generate a second profile of the second user based on the basic information of the second user, the second word frequency feature vector and the second personality feature vector, and add the second profile to the user profile library.

3. The method according to claim 2, characterized in that, After constructing the intelligent question-answering system using the first profile and the third corpus data, the method further includes: Obtain the user question input by the third user to the intelligent question answering system, and obtain the vector representation of the user question; If a third profile of the third user exists in the user profile database, based on the vector representation of the user question and the third profile, at least one reference user question with a similarity greater than or equal to a preset value is retrieved from the knowledge question and answer database. Based on the user question and the at least one reference user question, determine the target user question from the at least one reference user question; Return the answer corresponding to the question posed by the target user to the third user.

4. The method according to claim 3, characterized in that, Based on the user question and the at least one reference user question, the target user question is determined from the at least one reference user question, including: Concatenate the at least one reference user question with the user question to obtain at least one question pair; Natural language processing techniques are used to perform binary classification on the at least one question pair to obtain a similarity score for each question pair in the at least one question pair; Identify the question pair with the highest similarity score among the at least one question pair, and determine the reference user question in the question pair with the highest similarity score as the target user question.

5. The method according to claim 4, characterized in that, If no reference user question with a similarity greater than or equal to the preset value exists in the knowledge question-answering base, the method further includes: The user's question is pushed to the business expert. Obtain the business expert's answer to the user's question; Return the business expert's answer to the user's question to the third user, and add the user's question and the business expert's answer to the user's question to the knowledge question and answer base.

6. The method according to any one of claims 1-5, characterized in that, Before acquiring the second corpus data of the dialogue between the first user and the second user, the method further includes: The pre-built user recommendation system obtains the second user recommended by the first user based on the first profile; The second corpus data also includes the first user's rating of the recommendation effect of the user recommendation system, and the method further includes: The first image is encoded to obtain a first encoding vector; The second image is encoded to obtain a second encoding vector; The topics initiated during the conversation between the first user and the second user are encoded to obtain a third encoding vector; The user recommendation system is trained using the first encoding vector, the second encoding vector, the third encoding vector, and the first user's score on the recommendation effect of the user recommendation system.

7. A device for constructing an intelligent question-answering system, characterized in that, The device includes: an acquisition module, a storage module, a feature extraction module, a user profiling module, and a construction module; The acquisition module is used to acquire the first dialogue data between the first user and the business expert and the first personality score data of the business expert for the first user; The storage module is used to obtain the first corpus data based on the first dialogue data and the first personality scoring data; The feature extraction module is used to determine the frequency of each word as a first word frequency feature vector based on the frequency of each word in the first user's first historical dialogue data; and to perform personalized encoding on the first historical dialogue data based on a preset personalized tag list to obtain a first personalized feature vector; the first historical dialogue data includes the first dialogue data. The user profiling module is used to obtain the basic information of the first user and generate a first profile of the first user based on the basic information of the first user, the first word frequency feature vector, and the first personality feature vector. The acquisition module is further configured to acquire second corpus data of the dialogue between the first user and the second user. The second corpus data includes second dialogue data between the first user and the second user, second gender score data of the first user on the second user, and third gender score data of the second user on the first user. The storage module is further configured to obtain third corpus data based on the first corpus data, the second dialogue data, the second personality scoring data, and the third personality scoring data; The construction module uses the first profile and the third corpus data to build an intelligent question-answering system.

8. An electronic device, characterized in that, include: A processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, and the processor being used to execute the computer program stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Extraction type intelligent question-answering method and system introducing agricultural domain knowledge

    CN112527999A

  • Question recommendation method and device, electronic equipment and storage medium

    CN113254611A