Corpus updating method and device, computer device, storage medium and product
By acquiring an initial corpus and user history data in a specific business domain, and using collaborative filtering algorithms to identify high-accuracy question-answer pairs, the corpus is automatically updated, solving the problems of high cost and low efficiency in traditional methods and achieving efficient corpus updates.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2022-08-31
- Publication Date
- 2026-04-28
AI Technical Summary
Building a corpus for a specific business domain using traditional technologies requires a significant amount of time and cost, and cannot meet the question-answering needs of that specific business domain.
By acquiring an initial corpus of specific business domains, historical behavioral data of user identifiers, and question-and-answer profiles, a collaborative filtering algorithm is used to determine target question-and-answer pairs that meet a preset accuracy threshold, and the corpus is automatically updated.
It reduces the cost of corpus updates, improves update efficiency, and avoids the time-consuming process of experts manually building dictionaries.
Smart Images

Figure CN115422214B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a corpus updating method, apparatus, computer equipment, storage medium, and product. Background Technology
[0002] Intelligent question-answering systems are an advanced form of information retrieval systems. Users can input questions into the system, which then accesses a corpus to retrieve the answer and outputs it to the user. When users seek business advice in a specific area, intelligent question-answering systems can significantly improve consultation efficiency and reduce labor costs for businesses if they can provide accurate advice.
[0003] When users access an intelligent question-answering system, the system primarily matches answers to questions from a corpus to provide consultation services. Therefore, the corpus is crucial for intelligent question-answering systems.
[0004] However, corpora for specific business domains are highly specialized, and therefore, their corpora are also highly specialized. Using a general-purpose dictionary to build a corpus for a specific business domain cannot meet its question-answering requirements. Therefore, traditional technologies require domain experts to spend a significant amount of time building domain-specific dictionaries to update the corpus. However, this traditional method of updating the corpus by having experts build domain-specific dictionaries is both costly and inefficient. Summary of the Invention
[0005] Therefore, it is necessary to provide a corpus updating method, apparatus, computer equipment, storage medium, and product that can reduce costs and improve efficiency in response to the above-mentioned technical problems.
[0006] Firstly, this application provides a corpus updating method. The method includes:
[0007] Obtain an initial corpus for a specific business domain, as well as historical behavior data and historical question-and-answer profiles corresponding to user identifiers in the specific business domain; the historical behavior data, the historical question-and-answer profiles, and the initial corpus include question-and-answer pairs;
[0008] From the initial corpus and the historical behavior data and historical question-and-answer profiles corresponding to the user identifiers, target question-and-answer pairs that meet preset conditions are determined; the preset conditions include that the accuracy of the question-and-answer pairs is higher than a preset accuracy threshold.
[0009] The initial corpus for the specific business domain is updated based on the target question-answer pairs that meet the preset conditions.
[0010] In one embodiment, determining the target question-answer pair that meets preset conditions from the initial corpus and the historical behavior data and historical question-answer profiles corresponding to the user identifier includes:
[0011] The collaborative filtering algorithm determines target question-answer pairs that meet preset conditions from the initial corpus and the historical behavior data and historical question-answer profiles corresponding to the user identifier.
[0012] In one embodiment, determining target question-answer pairs that meet preset conditions from the initial corpus and the historical behavior data and historical question-answer profiles corresponding to the user identifier using a collaborative filtering algorithm includes:
[0013] A first matrix is generated based on the historical behavior data and historical question-and-answer profile corresponding to the user identifier; the first matrix is used to represent the correspondence between the historical question-and-answer pairs in the historical behavior data and historical question-and-answer profile corresponding to the user identifier.
[0014] A second matrix is generated based on the historical question-and-answer profile corresponding to the user identifier and the initial corpus; the second matrix is used to represent the correspondence between the historical question-and-answer pairs in the historical question-and-answer profile and the initial question-and-answer pairs in the initial corpus;
[0015] The collaborative filtering algorithm is used to determine target question-answer pairs that meet preset conditions from the first matrix and the second matrix.
[0016] In one embodiment, the historical behavior data includes historical question-and-answer pairs corresponding to the user identifier and the accuracy of the historical question-and-answer pairs; the historical question-and-answer profile includes historical question-and-answer pairs corresponding to the user identifier and the tags of historical questions in the historical question-and-answer pairs;
[0017] The step of generating a first matrix based on the historical behavior data and historical question-and-answer profile corresponding to the user identifier includes:
[0018] From the historical behavior data and the historical question-and-answer profile, obtain the correspondence between the historical question-and-answer pairs corresponding to the user identifier, the tags of historical questions in the historical question-and-answer pairs, and the accuracy of the historical question-and-answer pairs;
[0019] A first matrix is generated based on the correspondence between the historical question-and-answer pairs corresponding to the user identifier, the tags of the historical questions in the historical question-and-answer pairs, and the accuracy of the historical question-and-answer pairs.
[0020] In one embodiment, generating the second matrix based on the historical question-and-answer profile corresponding to the user identifier and the initial corpus includes:
[0021] Obtain initial question-and-answer pairs from the initial corpus, and obtain the correspondence between the initial question-and-answer pairs and the historical question-and-answer pairs corresponding to the user identifiers in the historical question-and-answer profiles;
[0022] A second matrix is generated based on the correspondence between the initial question-and-answer pairs and the historical question-and-answer pairs corresponding to the user identifiers in the historical question-and-answer profiles.
[0023] In one embodiment, a collaborative filtering algorithm is used to determine target question-answer pairs that meet preset conditions from the first matrix and the second matrix, including:
[0024] Based on the accuracy of the historical question-answer pairs, a collaborative filtering algorithm is used to sort the historical question-answer pairs in the first matrix and the second matrix, as well as the initial question-answer pairs, to generate a sorting result;
[0025] From the sorting results, target question-answer pairs with an accuracy rate higher than the preset accuracy threshold are identified.
[0026] In one embodiment, obtaining historical behavior data corresponding to the user identifier in the specific business domain includes:
[0027] Obtain the historical question-and-answer pairs corresponding to the user identifier from the intelligent question-and-answer system of the specific business domain;
[0028] Obtain the rating data of the user identifier for the historical question-and-answer pairs, and generate the accuracy rate of the historical question-and-answer pairs based on the rating data of the historical question-and-answer pairs;
[0029] Based on the historical question-and-answer pairs corresponding to the user identifier and the accuracy of the historical question-and-answer pairs, historical behavior data corresponding to the user identifier is generated.
[0030] In one embodiment, obtaining the user identifier's rating data for the historical question-answer pairs includes:
[0031] If the user identifier's rating data for the historical question-and-answer pair is not obtained, then the number of times the user identifier asked questions for the question-and-answer pair is obtained from the intelligent question-and-answer system.
[0032] Based on the number of questions asked in the question-answer pair, the historical question-answer pair rating data is generated.
[0033] In one embodiment, obtaining the historical question-and-answer profile corresponding to the user identifier in the specific business domain includes:
[0034] From the intelligent question-answering system of the specific business domain, obtain the historical question-answer pairs corresponding to the user identifier; the historical answers in the historical question-answer pairs are determined by matching the tags of the historical questions with the initial question-answer pairs in the initial corpus;
[0035] Based on the historical question-and-answer pairs corresponding to the user identifier and the tags of the historical questions in the historical question-and-answer pairs, a historical question-and-answer profile corresponding to the user identifier is generated.
[0036] Secondly, this application also provides a corpus updating apparatus. The apparatus includes:
[0037] The data acquisition module is used to acquire an initial corpus for a specific business domain, as well as historical behavior data and historical question-and-answer profiles corresponding to user identifiers in the specific business domain; the historical behavior data, the historical question-and-answer profiles, and the initial corpus include question-and-answer pairs;
[0038] The target question-answer pair determination module is used to determine target question-answer pairs that meet preset conditions from the initial corpus and the historical behavior data and historical question-answer profiles corresponding to the user identifier; the preset conditions include that the accuracy of the question-answer pair is higher than a preset accuracy threshold.
[0039] The initial corpus update module is used to update the initial corpus of the specific business domain based on the target question-answer pairs that meet the preset conditions.
[0040] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method in any of the embodiments of the first aspect described above.
[0041] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the method in any of the embodiments of the first aspect described above.
[0042] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the method in any of the embodiments of the first aspect described above.
[0043] The aforementioned corpus updating method, apparatus, computer equipment, storage medium, and computer program product acquire an initial corpus for a specific business domain, as well as historical behavior data and historical question-and-answer profiles corresponding to user identifiers in that specific business domain; the historical behavior data, historical question-and-answer profiles, and the initial corpus include question-and-answer pairs; from the initial corpus and the historical behavior data and historical question-and-answer profiles corresponding to user identifiers, target question-and-answer pairs that meet preset conditions are determined; the preset conditions include that the accuracy of the question-and-answer pairs is higher than a preset accuracy threshold; and the initial corpus for the specific business domain is updated based on the target question-and-answer pairs that meet the preset conditions. This application identifies target question-answer pairs that meet preset conditions from an initial corpus of a specific business domain, along with historical behavior data and historical question-answer profiles corresponding to user identifiers within that domain. This allows for the automatic updating of the initial corpus based on these target question-answer pairs. The process eliminates the need for domain experts to construct a domain-specific dictionary, avoiding the significant time investment required in traditional methods. This reduces the cost and increases the efficiency of corpus updates. Attached Figure Description
[0044] Figure 1 This is a diagram illustrating the application environment of a corpus update method in one embodiment;
[0045] Figure 2 This is a flowchart illustrating a corpus update method in one embodiment;
[0046] Figure 3 This is a flowchart illustrating the steps for determining a target question-answer pair in one embodiment;
[0047] Figure 4 This is a flowchart illustrating the first matrix generation step in one embodiment;
[0048] Figure 5 This is a flowchart illustrating the second matrix generation step in one embodiment;
[0049] Figure 6 This is a flowchart illustrating the steps for generating a target question-answer pair in one embodiment;
[0050] Figure 7 This is a flowchart illustrating the historical behavior data generation steps in one embodiment;
[0051] Figure 8 This is a flowchart illustrating the scoring data acquisition steps in one embodiment;
[0052] Figure 9 This is a flowchart illustrating the steps of generating historical question-and-answer profiles in one embodiment;
[0053] Figure 10 This is a flowchart illustrating a corpus update method in a specific embodiment.
[0054] Figure 11 This is a flowchart illustrating the intelligent question-answering process in a specific embodiment.
[0055] Figure 12 This is a flowchart illustrating an automatic corpus update method in a specific embodiment.
[0056] Figure 13 This is a structural block diagram of a corpus updating device in one embodiment;
[0057] Figure 14 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0059] Intelligent question-answering systems are an advanced form of information retrieval systems. Users can input questions into the system, which then accesses a corpus to retrieve the answer and outputs it to the user. When users seek business advice in a specific area, intelligent question-answering systems can significantly improve consultation efficiency and reduce labor costs for businesses if they can provide accurate advice.
[0060] Current intelligent question-answering systems mainly include: 1) Task-based question-answering systems, which output question-and-answer information to users through multiple rounds of question-and-answer sessions; 2) Retrieval-based question-answering systems, which continuously train the context model using a large amount of user consultation data based on specific rule sets and self-learning context models to generate a trained model; when a user has a question-and-answer request, the question is input into the trained model, which then retrieves the corresponding question-and-answer information and outputs it to the user; 3) Question-and-answer systems, which assume that the system can communicate seamlessly with users and accurately output question-and-answer information to their questions. However, due to current technological limitations and the scarcity of real-world corpora, the question-and-answer effects presented by question-and-answer systems are basically only rudimentary and rigid; therefore, question-and-answer systems remain an ideal model.
[0061] When users access intelligent question-answering systems, current systems primarily match answers to questions from corpora to provide consultation services. Therefore, corpora are crucial for intelligent question-answering systems.
[0062] However, corpora for specific business domains are highly specialized, and therefore, their corpora are also highly specialized. Using a general-purpose dictionary to build a corpus for a specific business domain cannot meet its question-answering requirements. Therefore, traditional technologies require domain experts to spend a significant amount of time building domain-specific dictionaries to update the corpus. However, this traditional method of updating the corpus by having experts build domain-specific dictionaries is both costly and inefficient.
[0063] The corpus updating method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network, and terminal 102 can send historical behavior data and historical question-and-answer profiles corresponding to user identifiers to server 104 via the network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated on server 104 or placed on the cloud or other network servers. Server 104 obtains an initial corpus for a specific business domain, as well as historical behavior data and historical question-and-answer profiles corresponding to user identifiers in that specific business domain; the historical behavior data, historical question-and-answer profiles, and the initial corpus include question-and-answer pairs; from the initial corpus and the historical behavior data and historical question-and-answer profiles corresponding to user identifiers, it determines target question-and-answer pairs that meet preset conditions; the preset conditions include that the accuracy rate of the question-and-answer pairs is higher than a preset accuracy threshold; based on the target question-and-answer pairs that meet the preset conditions, the initial corpus for the specific business domain is updated. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0064] In one embodiment, such as Figure 2 As shown, a corpus updating method is provided, which is applied to... Figure 1 Taking server 104 as an example, the following steps are included:
[0065] Step 220: Obtain the initial corpus of a specific business domain and the historical behavior data and historical question-and-answer profiles corresponding to user identifiers in the specific business domain; the historical behavior data, historical question-and-answer profiles, and the initial corpus include question-and-answer pairs.
[0066] Specifically, server 104 can obtain an initial corpus for a specific business domain, as well as historical behavior data and historical question-and-answer profiles corresponding to user identifiers within that specific business domain. Optionally, this can be achieved by obtaining the initial corpus for the specific business domain, as well as the historical behavior data and historical question-and-answer profiles corresponding to user identifiers within that specific business domain, from historical datasets. Alternatively, it can be achieved by recording user questions and answers in real time. Of course, this application does not limit this approach. The specific business domain refers to a business domain with high professionalism and where users use a lot of professional terminology during intelligent question-and-answer sessions, such as the financial business domain or the pharmaceutical business domain. The historical behavior data, historical question-and-answer profiles, and initial corpus all include question-and-answer pairs (QAPs), which consist of a question and its corresponding answer.
[0067] Step 240: From the initial corpus and the historical behavior data and historical question-and-answer profiles corresponding to user identifiers, determine the target question-and-answer pairs that meet the preset conditions; the preset conditions include that the accuracy of the question-and-answer pairs is higher than the preset accuracy threshold.
[0068] Specifically, server 104 can determine target question-answer pairs that meet preset conditions from the initial corpus and historical behavior data and historical question-answer profiles corresponding to user identifiers. The preset conditions include that the accuracy of the question-answer pairs is higher than a preset accuracy threshold. Target question-answer pairs that meet the preset conditions include question-answer pairs in the initial corpus and historical behavior data and historical question-answer profiles whose accuracy is higher than the preset accuracy threshold. Optionally, target question-answer pairs that meet the preset conditions can be determined using machine learning methods, such as random forest algorithms, deep forest algorithms, collaborative filtering algorithms, etc. This application does not limit the specific methods used.
[0069] Step 260: Update the initial corpus for a specific business domain based on the target question-answer pairs that meet the preset conditions.
[0070] Specifically, based on target question-answer pairs that meet preset conditions, the selected target question-answer pairs replace the initial question-answer pairs in the initial corpus, and the selected target question-answer pairs are used as new question-answer pairs in the initial corpus to obtain a new corpus, thereby updating the initial corpus for a specific business domain.
[0071] The above corpus update method involves obtaining an initial corpus for a specific business domain, as well as historical behavior data and historical question-and-answer profiles corresponding to user identifiers within that specific business domain; the historical behavior data, historical question-and-answer profiles, and the initial corpus include question-and-answer pairs; from the initial corpus and the historical behavior data and historical question-and-answer profiles corresponding to user identifiers, target question-and-answer pairs that meet preset conditions are identified; the preset conditions include that the accuracy of the question-and-answer pairs is higher than a preset accuracy threshold; and the initial corpus for the specific business domain is updated based on the target question-and-answer pairs that meet the preset conditions. This application embodiment determines target question-answer pairs that meet preset conditions from an initial corpus of a specific business domain, historical behavior data corresponding to user identifiers in that specific business domain, and historical question-answer profiles. This allows for the updating of the initial corpus of the specific business domain based on these target question-answer pairs. The entire process automatically updates the initial corpus based on the target question-answer pairs that meet the preset conditions from the initial corpus of the specific business domain, historical behavior data corresponding to user identifiers in that specific business domain, and historical question-answer profiles. This eliminates the need for experts in that specific business domain to build a dictionary to update the corpus, avoiding the problem of experts spending a significant amount of time building such a dictionary in traditional methods. Therefore, it reduces the cost of corpus updates and improves the efficiency of corpus updates.
[0072] The above embodiments describe how to determine target question-answer pairs that meet preset conditions from an initial corpus, historical behavior data corresponding to user identifiers, and historical question-answer profiles. The specific method is described below. In one embodiment, determining target question-answer pairs that meet preset conditions from an initial corpus, historical behavior data corresponding to user identifiers, and historical question-answer profiles includes:
[0073] The collaborative filtering algorithm identifies target question-answer pairs that meet preset conditions from the initial corpus, historical behavior data corresponding to user identifiers, and historical question-answer profiles.
[0074] Specifically, collaborative filtering algorithms can calculate the priority of question-answer pairs in the initial corpus, historical behavioral data corresponding to user identifiers, and historical question-answer profiles. The priority of a question-answer pair represents its accuracy. Based on the calculated priority, target question-answer pairs that meet preset conditions are selected from the initial corpus, historical behavioral data corresponding to user identifiers, and historical question-answer profiles. That is, question-answer pairs in the initial corpus, historical behavioral data corresponding to user identifiers, and historical question-answer profiles whose accuracy is higher than a preset accuracy threshold are selected. Collaborative filtering is a commonly used recommendation algorithm. The basic idea of collaborative filtering is to recommend items to users based on their previous preferences and the choices of other users with similar interests. Generally, it relies solely on user behavior data (such as ratings, purchases, downloads, etc.) without depending on any additional information (such as item characteristics) or any additional user information (such as age, gender, etc.). Of course, other filtering algorithms or other machine learning algorithms can be used to determine target question-answer pairs that meet preset conditions from the initial corpus and the historical behavior data and historical question-answer profiles corresponding to user identifiers. This application does not limit this.
[0075] In this embodiment, a collaborative filtering algorithm is used to determine target question-answer pairs that meet preset conditions from the initial corpus, historical behavior data corresponding to user identifiers, and historical question-answer profiles. Then, the initial corpus of a specific business domain can be automatically updated based on the target question-answer pairs that meet the preset conditions. This eliminates the need for experts in a specific business domain to build a dictionary for that business domain to update the corpus, avoiding the problem in traditional methods where experts in a specific business domain need to spend a lot of time building a dictionary for that business domain. This reduces the cost of corpus updates and improves the efficiency of corpus updates.
[0076] The above embodiments describe how to determine target question-answer pairs that meet preset conditions from an initial corpus, historical behavior data corresponding to user identifiers, and historical question-answer profiles using a collaborative filtering algorithm. The specific method is described below. In one embodiment, such as... Figure 3 As shown, a collaborative filtering algorithm is used to determine target question-answer pairs that meet preset conditions from the initial corpus, historical behavior data corresponding to user identifiers, and historical question-answer profiles. These include:
[0077] Step 320: Generate a first matrix based on the historical behavior data and historical question-and-answer profile corresponding to the user identifier; the first matrix is used to represent the correspondence between the historical question-and-answer pairs in the historical behavior data and historical question-and-answer profile corresponding to the user identifier.
[0078] Specifically, based on the obtained historical behavior data and historical question-and-answer profiles corresponding to user identifiers, the correspondence between historical question-and-answer pairs in the historical behavior data corresponding to user identifiers and historical question-and-answer pairs in the historical question-and-answer profiles corresponding to user identifiers is found, thereby generating a first matrix. The first matrix is used to represent the correspondence between the historical behavior data corresponding to user identifiers and the historical question-and-answer pairs in the historical question-and-answer profiles.
[0079] Step 340: Generate a second matrix based on the historical question-and-answer profile corresponding to the user identifier and the initial corpus; the second matrix is used to represent the correspondence between the historical question-and-answer pairs in the historical question-and-answer profile and the initial question-and-answer pairs in the initial corpus.
[0080] Specifically, based on the obtained historical question-and-answer profiles corresponding to user identifiers and the initial corpus, the correspondence between historical question-and-answer pairs in the historical question-and-answer profiles corresponding to user identifiers and the initial question-and-answer pairs in the initial corpus is found. Thus, a second matrix is generated based on this correspondence. The second matrix represents the correspondence between historical question-and-answer pairs in the historical question-and-answer profiles and the initial question-and-answer pairs in the initial corpus.
[0081] Step 360: Determine target question-answer pairs that meet preset conditions from the first matrix and the second matrix using a collaborative filtering algorithm.
[0082] Specifically, through a collaborative filtering algorithm, the priorities of all corresponding initial and historical question-and-answer pairs in the initial corpus and the historical behavior data and historical question-and-answer profiles corresponding to user identifiers can be calculated from a first matrix representing the correspondence between historical question-and-answer pairs in the historical behavior data and historical question-and-answer profiles corresponding to user identifiers, and a second matrix representing the correspondence between historical question-and-answer pairs in the historical question-and-answer profiles and initial question-and-answer pairs in the initial corpus and the historical behavior data and historical question-and-answer profiles corresponding to user identifiers. Since the priorities of initial and historical question-and-answer pairs represent the accuracy of the question-and-answer pairs, target question-and-answer pairs that meet preset conditions can be selected from the initial corpus and the historical behavior data and historical question-and-answer profiles corresponding to user identifiers, i.e., question-and-answer pairs in the initial corpus and the historical behavior data and historical question-and-answer profiles corresponding to user identifiers whose accuracy is higher than a preset accuracy threshold. Of course, other filtering algorithms or other machine learning algorithms can also be used to determine target question-and-answer pairs that meet preset conditions from the first and second matrices; this application does not limit this.
[0083] In this embodiment, a first matrix is generated based on the historical behavior data and historical question-and-answer profiles corresponding to user identifiers. The first matrix represents the correspondence between historical question-and-answer pairs in the historical behavior data and historical question-and-answer profiles corresponding to user identifiers. A second matrix is generated based on the historical question-and-answer profiles corresponding to user identifiers and the initial corpus. The second matrix represents the correspondence between historical question-and-answer pairs in the historical question-and-answer profiles and the initial question-and-answer pairs in the initial corpus. A collaborative filtering algorithm is used to determine target question-and-answer pairs that meet preset conditions from the first and second matrices. This embodiment obtains the correspondence between historical behavior data and historical question-and-answer pairs in the historical question-and-answer profiles corresponding to user identifiers using the first matrix, and then obtains the correspondence between historical question-and-answer pairs in the historical question-and-answer profiles and the initial question-and-answer pairs in the initial corpus using the second matrix. Therefore, based on the correspondence in the first and second matrices, a collaborative filtering algorithm is used to determine the correspondence between all question-and-answer pairs, and the accuracy of all question-and-answer pairs is calculated. Thus, target question-and-answer pairs that meet preset conditions can be accurately selected based on the accuracy of all question-and-answer pairs.
[0084] The above embodiments describe how to generate a first matrix based on historical behavior data and historical question-and-answer profiles corresponding to user identifiers. The specific method for this is described below. In one embodiment, such as... Figure 4 As shown, historical behavior data includes historical question-and-answer pairs corresponding to user identifiers and the accuracy of historical question-and-answer pairs; historical question-and-answer profiles include historical question-and-answer pairs corresponding to user identifiers and the tags of historical questions in historical question-and-answer pairs;
[0085] The first matrix is generated based on the user's historical behavior data and historical Q&A profile, including:
[0086] Step 420: Obtain the correspondence between historical question-and-answer pairs corresponding to user identifiers, the tags of historical questions in historical question-and-answer pairs, and the accuracy of historical question-and-answer pairs from historical behavior data and historical question-and-answer profiles.
[0087] Specifically, from the acquired historical behavior data, the historical question-and-answer pairs corresponding to user identifiers and their accuracy rates are obtained. The accuracy rate of the historical question-and-answer pairs can be obtained from user ratings received by the server. From the acquired historical question-and-answer profiles, the historical question-and-answer pairs corresponding to user identifiers and the tags of historical questions within those pairs are obtained. The tags of historical questions within the historical question-and-answer pairs are extracted by the server 104 through word segmentation of the user-input question text as a single document, thereby performing question text analysis. Furthermore, based on the historical behavior data and the corresponding historical question-and-answer pairs in the historical question-and-answer profiles, the correspondence between the historical question-and-answer pairs corresponding to user identifiers, the tags of historical questions within those pairs, and the accuracy rates of the historical question-and-answer pairs can be established.
[0088] Step 440: Generate the first matrix based on the correspondence between the historical question-and-answer pairs corresponding to the user identifier, the tags of historical questions in the historical question-and-answer pairs, and the accuracy of the historical question-and-answer pairs.
[0089] Specifically, since the historical question-and-answer pairs corresponding to user identifiers include the historical questions corresponding to user identifiers and the historical answers corresponding to the historical questions corresponding to user identifiers, the server 104 can obtain the correspondence between the historical questions corresponding to user identifiers, the historical answers corresponding to the historical questions corresponding to user identifiers, the labels of the historical questions in the historical question-and-answer pairs, and the accuracy of the historical question-and-answer pairs based on the correspondence between the historical question-and-answer pairs corresponding to user identifiers, the labels of the historical questions in the historical question-and-answer pairs, and the accuracy of the historical question-and-answer pairs, thereby generating the first matrix.
[0090] In this embodiment, the correspondence between historical question-and-answer pairs corresponding to user identifiers, the tags of historical questions within those pairs, and the accuracy rates of those pairs is obtained from historical behavior data and historical question-and-answer profiles. A first matrix is generated based on this correspondence. This embodiment finds the correspondence between historical question-and-answer pairs corresponding to user identifiers, the tags of historical questions within those pairs, and the accuracy rates of those pairs. This allows for the accurate construction of the first matrix based on these correspondences. Furthermore, it provides a complete set of historical question-and-answer pairs corresponding to user identifiers, the tags of historical questions within those pairs, the accuracy rates of those pairs, and their corresponding relationships. This lays the foundation for subsequently determining target question-and-answer pairs that meet preset conditions from the first and second matrices using a collaborative filtering algorithm.
[0091] The above embodiments describe how to generate a second matrix based on the historical question-and-answer profile corresponding to the user identifier and the initial corpus. The specific method is described below. In one embodiment, such as... Figure 5 As shown, based on the historical question-and-answer profiles corresponding to user identifiers and the initial corpus, a second matrix is generated, including:
[0092] Step 520: Obtain initial question-answer pairs from the initial corpus, and obtain the correspondence between the initial question-answer pairs and the historical question-answer pairs corresponding to the user identifiers in the historical question-answer profiles.
[0093] Step 540: Generate a second matrix based on the correspondence between the initial question-and-answer pairs and the historical question-and-answer pairs corresponding to the user identifiers in the historical question-and-answer profiles.
[0094] Specifically, based on the obtained historical question-and-answer profiles corresponding to user identifiers and the initial corpus, initial question-and-answer pairs are obtained from the initial corpus. The correspondence between historical question-and-answer pairs in the historical question-and-answer profiles corresponding to user identifiers and the initial question-and-answer pairs in the initial corpus is found. Thus, a second matrix is generated based on the correspondence between the initial question-and-answer pairs in the initial corpus and the historical question-and-answer pairs corresponding to user identifiers in the historical question-and-answer profiles. The second matrix represents the correspondence between historical question-and-answer pairs in the historical question-and-answer profiles and the initial question-and-answer pairs in the initial corpus.
[0095] In this embodiment, initial question-answer pairs are obtained from the initial corpus, and the correspondence between the initial question-answer pairs and the historical question-answer pairs corresponding to user identifiers in the historical question-answer profiles is obtained. A second matrix is generated based on this correspondence. This embodiment finds the correspondence between the historical question-answer pairs in the historical question-answer profiles corresponding to user identifiers and the initial question-answer pairs in the initial corpus, thereby accurately constructing the second matrix based on this correspondence. Furthermore, it obtains the complete historical question-answer pairs in the historical question-answer profiles corresponding to user identifiers and the initial question-answer pairs in the initial corpus, along with their corresponding relationships. This lays the foundation for subsequently determining target question-answer pairs that meet preset conditions from the first and second matrices using a collaborative filtering algorithm.
[0096] The above embodiments describe how to determine target question-answer pairs that meet preset conditions from a first matrix and a second matrix using a collaborative filtering algorithm. The specific method is described below. In one embodiment, such as... Figure 6 As shown, a collaborative filtering algorithm is used to determine target question-answer pairs that meet preset conditions from the first and second matrices, including:
[0097] Step 620: Based on the accuracy of the historical question-answer pairs, a collaborative filtering algorithm is used to sort the historical question-answer pairs and the initial question-answer pairs in the first and second matrices to generate a sorting result.
[0098] Specifically, since the first matrix includes historical question-and-answer pairs corresponding to user identifiers, the labels of historical questions within those pairs, the accuracy of each pair, and the correspondence between these pairs, and the second matrix includes initial question-and-answer pairs from the initial corpus and historical question-and-answer pairs corresponding to user identifiers in the historical question-and-answer profiles, as well as the correspondence between initial and historical question-and-answer pairs, a collaborative filtering algorithm can be used to calculate the priorities of all corresponding initial and historical question-and-answer pairs in the initial corpus, historical behavioral data corresponding to user identifiers, and historical question-and-answer profiles, based on their accuracy. The priority of initial and historical question-and-answer pairs represents their accuracy; higher priority indicates higher accuracy. Therefore, based on the calculated priorities, the historical and initial question-and-answer pairs in the first and second matrices are sorted to generate a ranking result.
[0099] Step 640: From the sorting results, identify target question-answer pairs with an accuracy rate higher than a preset accuracy threshold.
[0100] Specifically, based on the ranking results, the accuracy ranking of question-answer pairs and the question-answer pairs corresponding to their accuracy rates are obtained. From the accuracy ranking of question-answer pairs, target question-answer pairs with accuracy rates higher than a preset accuracy threshold are selected from the initial corpus and historical behavioral data and historical question-answer profiles corresponding to user identifiers. The preset accuracy threshold is set according to actual conditions; it can be a specific accuracy value selected as the preset accuracy threshold, or a ranking based on accuracy rates selected as the preset accuracy threshold. This application does not limit this approach.
[0101] In this embodiment, based on the accuracy of historical question-answer pairs, a collaborative filtering algorithm is used to sort the historical question-answer pairs and the initial question-answer pairs in the first and second matrices, generating a sorting result. From the sorting result, target question-answer pairs with an accuracy higher than a preset accuracy threshold are identified. This embodiment sorts the first and second matrices using a label-expanded collaborative filtering algorithm based on the accuracy of historical question-answer pairs, continuously analyzing the correlation between historical question-answer pairs and the initial question-answer pairs, thereby identifying target question-answer pairs with an accuracy higher than a preset accuracy threshold. This allows for automatic updating of the initial corpus based on the target question-answer pairs, reducing the cost of updating the corpus and improving the efficiency of updating the corpus.
[0102] The above embodiments describe how to obtain historical behavior data corresponding to user identifiers in a specific business domain. The specific methods are described below. In one embodiment, such as... Figure 7 As shown, historical behavior data corresponding to user identifiers in a specific business domain is obtained, including:
[0103] Step 720: Obtain the historical question-and-answer pairs corresponding to the user identifier from the intelligent question-and-answer system for the specific business domain.
[0104] Specifically, in a smart question-answering system for a specific business domain, after server 104 receives a user's input of a historical question from the smart question-answering system for that specific business domain, it treats the user's input question text as a single document, performs word segmentation on the question text, analyzes the question text, and extracts tags from the question text. Then, it matches the tags of the question text with initial question-answer pairs in the initial corpus, and uses the answers from the matched initial question-answer pairs in the initial corpus as the answers to the user's input question. Server 104 generates historical question-answer pairs corresponding to the user's identifier based on the user's input question and the answers to the user's input question.
[0105] Step 740: Obtain the rating data of the user identifier for historical question-and-answer pairs, and generate the accuracy of the historical question-and-answer pairs based on the rating data of the historical question-and-answer pairs.
[0106] Specifically, after obtaining the historical question-and-answer pairs corresponding to the user identifier, server 104 displays the answers to the questions to the user. The user can then determine if the received answers are what they want and rate the current question-and-answer process based on the answers, or ask the question again. Server 104 receives the user's rating data and the number of times the user identifier has asked the question-and-answer pairs. Based on the user's rating data and the number of times the user identifier has asked the question-and-answer pairs, server 104 obtains the user identifier's rating data for the historical question-and-answer pairs. Then, based on the rating data of the historical question-and-answer pairs, server 104 obtains the accuracy result of the historical question-and-answer pairs. The higher the user identifier's rating data for the historical question-and-answer pairs, the higher the accuracy of the historical question-and-answer pairs; conversely, the lower the user identifier's rating data for the historical question-and-answer pairs, the lower the accuracy of the historical question-and-answer pairs.
[0107] Step 760: Generate historical behavior data corresponding to the user identifier based on the historical question-and-answer pairs corresponding to the user identifier and the accuracy of the historical question-and-answer pairs.
[0108] Specifically, based on the user's input question and answer, historical question-and-answer pairs corresponding to the user identifier are obtained. Then, based on the rating data of these historical question-and-answer pairs, their accuracy rate is calculated. Thus, historical behavioral data corresponding to the user identifier is generated based on the historical question-and-answer pairs and their accuracy rates. This historical behavioral data includes both the historical question-and-answer pairs and their accuracy rates.
[0109] In this embodiment, historical question-and-answer pairs corresponding to user identifiers are obtained from an intelligent question-and-answer system for a specific business domain; the scoring data of user identifiers for historical question-and-answer pairs is obtained, and the accuracy rate of historical question-and-answer pairs is generated based on the scoring data; historical behavior data corresponding to user identifiers is generated based on the historical question-and-answer pairs corresponding to user identifiers and their accuracy rates. This embodiment matches the tags of the question text with initial question-and-answer pairs in an initial corpus, using the answers of the matched initial question-and-answer pairs as the answers to the user's input question, thereby accurately obtaining the historical question-and-answer pairs corresponding to user identifiers. Subsequently, based on the scoring data of the historical question-and-answer pairs calculated for each question and answer, the accuracy rate of the historical question-and-answer pairs can be accurately obtained. Therefore, based on the historical question-and-answer pairs corresponding to user identifiers and their accuracy rates, historical behavior data corresponding to user identifiers in a specific business domain can be accurately obtained, laying the foundation for subsequent updates to the initial corpus of the specific business domain.
[0110] The above embodiments describe how to obtain rating data for user identifiers in historical question-and-answer pairs. The specific methods are described below. In one embodiment, such as... Figure 8 As shown, the rating data for historical question-and-answer pairs using user identifiers is obtained, including:
[0111] Step 820: If the rating data for the user identifier's historical question-and-answer pairs is not obtained, then obtain the number of times the user identifier asked questions for the question-and-answer pairs from the intelligent question-and-answer system.
[0112] Step 840: Generate historical question-and-answer pair rating data based on the number of questions asked in each pair.
[0113] Specifically, after obtaining the historical question-and-answer pairs corresponding to the user identifier, the server 104 displays the answers to the questions to the user, so that the user can judge whether the obtained answers are the answers they want. If so, the user will complete the question-and-answer session and exit the question-and-answer interface, and the server 104 will receive the "exit question-and-answer interface" information; if not, the user will continue to enter questions to ask questions. Since user tracking points are pre-set in the server 104, the server 104 can use user tracking points to count the number of times the user asks questions for the question-and-answer pairs in this question-and-answer process. In addition, the server 104 also pre-sets a user rating module, which is used to receive the user's rating data for this question-and-answer process. If the user has rated the question, the server 104 will receive the user's rating data; if the user has not rated the question, the server 104 will use a logarithmic function to convert the number of questions asked for the question-and-answer pairs in this question-and-answer process into user ratings within a preset score range based on the number of questions asked for the question-and-answer pairs by the user according to the user tracking point data. The calculation formula for converting the number of questions asked for the question-and-answer pairs by the user identifier into user ratings is shown in the following formula (1):
[0114] R u =10*1 / 1+log(Question_U_Asked) (1)
[0115] Among them, R u This represents the user rating converted from the number of questions asked by the user for the question-answer pair, where Question_U_Asked represents the number of questions asked by the user for the question-answer pair.
[0116] Subsequently, based on user rating data and user ratings converted from the number of questions asked by user identifiers for question-answer pairs, the rating data of user identifiers for historical question-answer pairs is obtained.
[0117] In this embodiment, if the user identifier's rating data for historical question-and-answer pairs is not obtained, the number of times the user identifier asked questions for the question-and-answer pairs is obtained from the intelligent question-and-answer system; based on the number of questions asked for the question-and-answer pairs, the rating data for historical question-and-answer pairs is generated. This embodiment of the application, by converting the number of questions asked by the user identifier for the question-and-answer pairs into user ratings, can accurately obtain the user identifier's rating data for historical question-and-answer pairs. This allows for the accurate generation of the historical question-and-answer pair accuracy rate based on the historical question-and-answer pair rating data, laying the foundation for subsequently generating historical behavior data corresponding to the user identifier.
[0118] The above embodiments describe how to obtain historical question-and-answer profiles corresponding to user identifiers in a specific business domain. The specific methods are described below. In one embodiment, such as... Figure 9 As shown, the historical question-and-answer profiles corresponding to user identifiers in a specific business domain are obtained, including:
[0119] Step 920: Obtain the historical question-and-answer pairs corresponding to the user identifier from the intelligent question-and-answer system for the specific business domain; the historical answers in the historical question-and-answer pairs are determined by matching the labels of the historical questions with the initial question-and-answer pairs in the initial corpus.
[0120] Step 940: Generate a historical question and answer profile corresponding to the user identifier based on the historical question and answer pairs corresponding to the user identifier and the tags of the historical questions in the historical question and answer pairs.
[0121] Specifically, firstly, in the intelligent question-answering system for a specific business domain, after the server 104 receives the user's input of a historical question from the intelligent question-answering system for that specific business domain, the user's input question text is treated as a single document. The question text is segmented to obtain an N-dimensional vector space model (VSM) based on Term Frequency-Inverse Document Frequency (TF-IDF) weights. Then, the question text is analyzed according to the N-dimensional vector space model to extract the tag information from the question text, thus obtaining the tags of the historical questions.
[0122] The N-dimensional vector space model is an algebraic model applied to information filtering, information extraction, indexing, and relevance evaluation. In the N-dimensional vector space model, each user input question can be represented as a text d. j Multiple questions are represented as a set of question texts D, and the tag information in the document set D is represented as tags t. k Multiple labels are represented as a dictionary T. The formula for representing the problem text set D is shown in equation (2), and the formula for representing the dictionary T is shown in equation (3).
[0123] D = {d1, d2, ..., d} N} (2)
[0124] T = {t1, t2, ..., t} N} (3)
[0125] Based on the question text set D and the dictionary T, the weight ω of each question text for each label can be obtained. kj where the weight ω kj For document d j Chinese tag t k The weight. Weight ω kj The formula for representing is shown in equation (4) below.
[0126] d j ={ω 1j ,ω 2j ,...,ω Nj} (4)
[0127] Next, the question's tags are matched against initial question-and-answer pairs in the initial corpus. If a question-and-answer pair corresponding to the user's input question can be found in the initial corpus, the answer to the question in that pair is used as the answer to the user's input question. If no question-and-answer pair can be found in the initial corpus, the user's input question is matched against questions in the initial corpus, and the similarity between the user's input question and questions in the initial corpus is calculated. The answer to the question in the initial corpus with the highest similarity to the user's input question is used as the answer to the user's input question. The similarity between question texts is sim(d). i ,d j The calculation formula for ) is shown in equation (5) below:
[0128]
[0129] Server 104 generates historical question-and-answer pairs corresponding to the user's input question and the answer to the user's input question. Then, based on the generated historical question-and-answer pairs corresponding to the user's identifier, and the tags of the historical questions extracted from the historical question-and-answer pairs when retrieving the answers to the historical questions, a historical question-and-answer profile corresponding to the user's identifier is generated. The historical question-and-answer profile includes the historical question-and-answer pairs corresponding to the user's identifier and the tags of the historical questions in the historical question-and-answer pairs.
[0130] In this embodiment, historical question-and-answer pairs corresponding to user identifiers are obtained from an intelligent question-and-answer system for a specific business domain. The historical answers in these pairs are determined by matching the tags of historical questions with the initial question-and-answer pairs in the initial corpus. Based on the historical question-and-answer pairs corresponding to user identifiers and the tags of historical questions within these pairs, a historical question-and-answer profile corresponding to the user identifier is generated. This embodiment obtains the answer to a question using both retrieval-based and task-based question-and-answer methods after the user inputs the question. When using retrieval-based question-and-answer, the answer is retrieved from the initial corpus based on the question tag, matching the corresponding question-and-answer pair. When using task-based question-and-answer, the answer is continuously optimized through multiple question-and-answer sessions, ultimately outputting the optimal answer to the user. This ensures accurate acquisition of historical question-and-answer pairs corresponding to user identifiers, improving the accuracy of question-and-answer using an intelligent question-and-answer system for a specific business domain, and solving the problems of unclear semantics and lack of professional standardization in user inquiries within specific business domains. Subsequently, based on the historical question-and-answer pairs corresponding to user identifiers and the tags of historical questions in the historical question-and-answer pairs, we can accurately obtain the historical question-and-answer profiles corresponding to user identifiers in a specific business domain, which can lay the foundation for updating the initial corpus of a specific business domain.
[0131] In a specific embodiment, such as Figure 10As shown, a corpus update method is provided, applied to server 104, including:
[0132] Step 1002: Obtain historical question-and-answer pairs corresponding to user identifiers from the intelligent question-and-answer system for a specific business domain; the historical answers in the historical question-and-answer pairs are determined by matching the tags of the historical questions with the initial question-and-answer pairs in the initial corpus.
[0133] Step 1004: Generate a historical question and answer profile corresponding to the user identifier based on the historical question and answer pairs corresponding to the user identifier and the tags of the historical questions in the historical question and answer pairs.
[0134] Step 1006: Obtain the rating data of the user identifier for historical question-and-answer pairs. If the rating data of the user identifier for historical question-and-answer pairs is not obtained, obtain the number of times the user identifier asked questions for the question-and-answer pairs from the intelligent question-and-answer system.
[0135] Step 1008: Generate historical question-and-answer pair rating data based on the number of questions asked in each pair;
[0136] Step 1010: Generate the accuracy of historical question-answer pairs based on the scoring data of historical question-answer pairs;
[0137] Step 1012: Generate historical behavior data corresponding to the user identifier based on the historical question-and-answer pairs corresponding to the user identifier and the accuracy of the historical question-and-answer pairs.
[0138] Step 1014: Obtain the initial corpus for a specific business domain, as well as the historical behavior data and historical question-and-answer profiles corresponding to user identifiers in the specific business domain; the historical behavior data, historical question-and-answer profiles, and the initial corpus include question-and-answer pairs;
[0139] Step 1016: From the initial corpus and the historical behavior data and historical question-and-answer profiles corresponding to user identifiers, determine the target question-and-answer pairs that meet the preset conditions; the preset conditions include that the accuracy of the question-and-answer pairs is higher than the preset accuracy threshold.
[0140] Step 1018: Update the initial corpus for a specific business domain based on the target question-answer pairs that meet the preset conditions;
[0141] Step 1020: Obtain the correspondence between historical question-and-answer pairs corresponding to user identifiers, the tags of historical questions in historical question-and-answer pairs, and the accuracy of historical question-and-answer pairs from historical behavior data and historical question-and-answer profiles.
[0142] Step 1022: Generate a first matrix based on the correspondence between the historical question-and-answer pairs corresponding to the user identifier, the tags of historical questions in the historical question-and-answer pairs, and the accuracy of the historical question-and-answer pairs; the first matrix is used to represent the correspondence between the historical behavioral data corresponding to the user identifier and the historical question-and-answer pairs in the historical question-and-answer profile.
[0143] Step 1024: Obtain initial question-answer pairs from the initial corpus, and obtain the correspondence between the initial question-answer pairs and the historical question-answer pairs corresponding to the user identifiers in the historical question-answer profiles;
[0144] Step 1026: Generate a second matrix based on the correspondence between the initial question-answer pairs and the historical question-answer pairs corresponding to the user identifiers in the historical question-answer profiles; the second matrix is used to represent the correspondence between the historical question-answer pairs in the historical question-answer profiles and the initial question-answer pairs in the initial corpus.
[0145] Step 1028: Based on the accuracy of historical question-answer pairs, a collaborative filtering algorithm is used to sort the historical question-answer pairs in the first and second matrices as well as the initial question-answer pairs, generating a sorting result;
[0146] Step 1030: From the sorting results, identify target question-answer pairs with an accuracy rate higher than a preset accuracy threshold;
[0147] Step 1032: Update the initial corpus for a specific business domain based on the target question-answer pairs that meet the preset conditions.
[0148] Specifically, Figure 11 This is a flowchart illustrating a question-and-answer method using an intelligent question-and-answer system in a specific embodiment. Figure 12 This is a flowchart illustrating a corpus update method using a collaborative filtering algorithm in a specific embodiment. Figure 11 As shown, firstly, the user enters a question about a specific business area on the system interface layer and performs a query. After receiving the user's question, the system interface layer sends the question to the system service layer.
[0149] Second, after receiving a user's inquiry, the system service layer treats the user's inquiry text as a single document, performs word segmentation on the inquiry text, and then performs text analysis on the inquiry, extracts the tags in the inquiry text, sends the corresponding inquiry and tag information to the system data layer, and caches the inquiry and tag information for a period of time in the question-and-answer profile within the system service layer.
[0150] Third, after receiving the question and tags sent by the system service layer, the system data layer matches the question and tags with the initial question-answer pairs in the initial corpus. If a question-answer pair corresponding to the user's input question can be found in the initial corpus, the answer to the question in the question-answer pair is used as the answer to the user's input question. If a question-answer pair corresponding to the user's input question cannot be found in the initial corpus, the user's input question is matched with the questions in the initial corpus, and the similarity between the user's input question and the questions in the initial corpus is calculated. The answer to the question in the initial corpus with the highest similarity to the user's input question is used as the answer to the user's input question and returned to the system service layer. The system service layer also caches the obtained answer to the question in the question-answer profile. At this time, the question-answer profile stores the correspondence between the question, the question's tags, and the question's answer. That is, the question-answer profile includes the historical question-answer pairs corresponding to the user identifier and the tags of historical questions in the historical question-answer pairs. After that, the answer to the question is sent back to the system interface layer. The initial corpus is created by domain experts providing initial question-answer pairs and question tags.
[0151] Fourth, the system interface layer receives the answer sent by the system data layer and displays the answer to the user's question. The user determines whether the received answer is what they want; if so, the question and answer session is complete, and the user exits the interface; otherwise, they continue to enter a question. Figure 12 As shown, by pre-setting user tracking points in the system interface layer, the number of questions asked by a user in the current Q&A session can be statistically analyzed. A user rating module is also included in the system interface layer to receive user ratings for the current Q&A session. Subsequently, the system interface layer sends the question-and-answer pair, the number of questions asked for that pair, and the rating data for that pair to the historical behavior data module in the system service layer. Based on the number of questions asked and the rating data for that pair, the historical behavior data module obtains the user identifier's rating data for historical question-and-answer pairs, thereby generating the historical behavior data corresponding to the user identifier. Finally, the system service layer sends the historical behavior data corresponding to the user identifier and the corresponding Q&A profile to the system data layer.
[0152] Fifth, combine Figure 12As shown, after the system data layer receives the historical behavior data corresponding to the user identifier and the corresponding question-and-answer profile, it obtains the first matrix by establishing the correspondence between the historical behavior data and the question-and-answer profile. It then obtains the second matrix by establishing the correspondence between the initial question-and-answer pairs in the initial corpus and the historical question-and-answer pairs corresponding to the user identifier in the question-and-answer profile. Next, based on the scoring data of the historical question-and-answer pairs (i.e., according to their accuracy), a collaborative filtering algorithm is used to sort the historical question-and-answer pairs in the first and second matrices, as well as the initial question-and-answer pairs, generating a ranking result. From this ranking result, target question-and-answer pairs with an accuracy higher than a preset accuracy threshold are identified. Based on these target question-and-answer pairs with accuracy higher than the preset accuracy threshold, the initial corpus for the specific business domain is updated.
[0153] In this embodiment, an initial corpus for a specific business domain and historical behavior data and historical question-and-answer profiles corresponding to user identifiers in the specific business domain are obtained. The historical behavior data, historical question-and-answer profiles, and the initial corpus include question-and-answer pairs. Target question-and-answer pairs that meet preset conditions are determined from the initial corpus and the historical behavior data and historical question-and-answer profiles corresponding to user identifiers. The preset conditions include that the accuracy of the question-and-answer pairs is higher than a preset accuracy threshold. The initial corpus for the specific business domain is updated based on the target question-and-answer pairs that meet the preset conditions. This application identifies target question-answer pairs that meet preset conditions from an initial corpus of a specific business domain, along with historical behavior data and historical question-answer profiles corresponding to user identifiers within that domain. This allows for the automatic updating of the initial corpus based on these target question-answer pairs. The process eliminates the need for domain experts to construct a domain-specific dictionary, avoiding the significant time investment required in traditional methods. This reduces the cost and increases the efficiency of corpus updates.
[0154] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0155] Based on the same inventive concept, this application also provides a corpus updating apparatus for implementing the corpus updating method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more corpus updating apparatus embodiments provided below can be found in the limitations of the corpus updating method described above, and will not be repeated here.
[0156] In one embodiment, such as Figure 13 As shown, a corpus updating device 1300 is provided, including: a data acquisition module 1320, a target question-answer pair determination module 1340, and an initial corpus updating module 1360, wherein:
[0157] The data acquisition module 1320 is used to acquire the initial corpus of a specific business domain, as well as the historical behavior data and historical question-and-answer profiles corresponding to user identifiers in the specific business domain; the historical behavior data, historical question-and-answer profiles, and the initial corpus include question-and-answer pairs.
[0158] The target question-answer pair determination module 1340 is used to determine target question-answer pairs that meet preset conditions from the initial corpus and historical behavior data and historical question-answer profiles corresponding to user identifiers; the preset conditions include that the accuracy of the question-answer pair is higher than a preset accuracy threshold.
[0159] The initial corpus update module 1360 is used to update the initial corpus of a specific business domain based on target question-answer pairs that meet preset conditions.
[0160] In one embodiment, the target question-answer pair determination module 1340 includes:
[0161] The target question-answer pair determination unit is used to determine target question-answer pairs that meet preset conditions from the initial corpus and the historical behavior data and historical question-answer profiles corresponding to user identifiers through collaborative filtering algorithms.
[0162] In one embodiment, the target question-answer pair determination unit includes:
[0163] The first matrix generation subunit is used to generate a first matrix based on the historical behavior data and historical question-and-answer profile corresponding to the user identifier; the first matrix is used to represent the correspondence between the historical behavior data and historical question-and-answer pairs in the historical question-and-answer profile corresponding to the user identifier.
[0164] The second matrix generation subunit is used to generate a second matrix based on the historical question-and-answer profile corresponding to the user identifier and the initial corpus; the second matrix is used to represent the correspondence between the historical question-and-answer pairs in the historical question-and-answer profile and the initial question-and-answer pairs in the initial corpus.
[0165] The target question-answer pair generation sub-unit is used to determine target question-answer pairs that meet preset conditions from the first matrix and the second matrix using a collaborative filtering algorithm.
[0166] In one embodiment, historical behavior data includes historical question-and-answer pairs corresponding to user identifiers and the accuracy of the historical question-and-answer pairs; historical question-and-answer profiles include historical question-and-answer pairs corresponding to user identifiers and the tags of historical questions in the historical question-and-answer pairs; the first matrix generation unit includes:
[0167] The first correspondence acquisition subunit is used to obtain the correspondence between the historical question-and-answer pairs corresponding to user identifiers, the tags of historical questions in the historical question-and-answer pairs, and the accuracy of the historical question-and-answer pairs from historical behavior data and historical question-and-answer profiles.
[0168] The first matrix obtains sub-units, which are used to generate the first matrix based on the correspondence between the historical question-and-answer pairs corresponding to the user identifier, the tags of historical questions in the historical question-and-answer pairs, and the accuracy of the historical question-and-answer pairs.
[0169] In one embodiment, the second matrix generation unit includes:
[0170] The second correspondence acquisition subunit is used to obtain initial question-answer pairs from the initial corpus and to obtain the correspondence between the initial question-answer pairs and the historical question-answer pairs corresponding to the user identifiers in the historical question-answer profiles;
[0171] The second matrix obtains sub-units, which are used to generate the second matrix based on the correspondence between the initial question-and-answer pairs and the historical question-and-answer pairs corresponding to the user identifiers in the historical question-and-answer profiles.
[0172] In one embodiment, the target question-answer pair generation unit includes:
[0173] The sorting result generation sub-unit is used to sort the historical question-answer pairs in the first and second matrices and the initial question-answer pairs according to the accuracy of the historical question-answer pairs, and generate the sorting result;
[0174] The target question-answer pair determination sub-unit is used to identify target question-answer pairs with an accuracy rate higher than a preset accuracy threshold from the sorting results.
[0175] In one embodiment, the data acquisition module 1320 includes:
[0176] The historical question-and-answer pair acquisition unit is used to acquire historical question-and-answer pairs corresponding to user identifiers from the intelligent question-and-answer system in a specific business domain.
[0177] The rating data acquisition unit is used to acquire rating data for user identifiers on historical question-and-answer pairs, and to generate the accuracy rate of historical question-and-answer pairs based on the rating data of historical question-and-answer pairs.
[0178] The historical behavior data generation unit is used to generate historical behavior data corresponding to a user identifier based on the historical question-and-answer pairs corresponding to the user identifier and the accuracy of the historical question-and-answer pairs.
[0179] In one embodiment, the scoring data acquisition unit includes:
[0180] The question count acquisition subunit is used to obtain the number of questions asked by the user for the question-answer pair from the intelligent question answering system if the rating data of the user identifier for the historical question-answer pair is not obtained.
[0181] The scoring data generation sub-unit is used to generate historical scoring data for question-answer pairs based on the number of times each question-answer pair was asked.
[0182] In one embodiment, the data acquisition module 1320 includes:
[0183] The historical question-answer pair generation unit is used to obtain historical question-answer pairs corresponding to user identifiers from the intelligent question-answering system of a specific business domain; the historical answers in the historical question-answer pairs are determined by matching the tags of the historical questions with the initial question-answer pairs in the initial corpus;
[0184] The historical question and answer profile generation unit is used to generate a historical question and answer profile corresponding to a user identifier based on the historical question and answer pairs corresponding to the user identifier and the tags of the historical questions in the historical question and answer pairs.
[0185] Each module in the aforementioned corpus update device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0186] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 14As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores corpus update data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a corpus update method.
[0187] Those skilled in the art will understand that Figure 14 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0188] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0189] Obtain an initial corpus for a specific business domain, as well as historical behavior data and historical question-and-answer profiles corresponding to user identifiers in that specific business domain; the historical behavior data, historical question-and-answer profiles, and the initial corpus include question-and-answer pairs;
[0190] From the initial corpus and historical behavior data and historical question-and-answer profiles corresponding to user identifiers, target question-and-answer pairs that meet preset conditions are identified; the preset conditions include that the accuracy of the question-and-answer pairs is higher than a preset accuracy threshold.
[0191] The initial corpus for a specific business domain is updated based on the target question-answer pairs that meet the preset conditions.
[0192] In one embodiment, target question-answer pairs that meet preset conditions are determined from the initial corpus and historical behavior data and historical question-answer profiles corresponding to user identifiers. When the processor executes the computer program, it also performs the following steps:
[0193] The collaborative filtering algorithm identifies target question-answer pairs that meet preset conditions from the initial corpus, historical behavior data corresponding to user identifiers, and historical question-answer profiles.
[0194] In one embodiment, a collaborative filtering algorithm is used to determine target question-answer pairs that meet preset conditions from an initial corpus, historical behavior data corresponding to user identifiers, and historical question-answer profiles. When the processor executes the computer program, it also performs the following steps:
[0195] Based on the historical behavior data and historical question-and-answer profiles corresponding to user identifiers, a first matrix is generated; the first matrix is used to represent the correspondence between the historical question-and-answer pairs in the historical behavior data and historical question-and-answer profiles corresponding to user identifiers.
[0196] A second matrix is generated based on the historical question-and-answer profiles corresponding to user identifiers and the initial corpus. The second matrix is used to represent the correspondence between historical question-and-answer pairs in the historical question-and-answer profiles and initial question-and-answer pairs in the initial corpus.
[0197] The collaborative filtering algorithm is used to determine the target question-answer pairs that meet the preset conditions from the first matrix and the second matrix.
[0198] In one embodiment, historical behavior data includes historical question-and-answer pairs corresponding to user identifiers and the accuracy of the historical question-and-answer pairs; historical question-and-answer profiles include historical question-and-answer pairs corresponding to user identifiers and the tags of historical questions in the historical question-and-answer pairs;
[0199] Based on the historical behavior data and historical Q&A profiles corresponding to user identifiers, a first matrix is generated. When the processor executes the computer program, it also performs the following steps:
[0200] From historical behavior data and historical question-and-answer profiles, obtain the correspondence between historical question-and-answer pairs corresponding to user identifiers, the tags of historical questions in historical question-and-answer pairs, and the accuracy of historical question-and-answer pairs;
[0201] The first matrix is generated based on the correspondence between the user identifier and the historical question-and-answer pairs, the tags of historical questions in the historical question-and-answer pairs, and the accuracy of the historical question-and-answer pairs.
[0202] In one embodiment, a second matrix is generated based on the historical question-and-answer profile corresponding to the user identifier and the initial corpus. When the processor executes the computer program, it also performs the following steps:
[0203] Obtain initial question-answer pairs from the initial corpus, and then obtain the correspondence between the initial question-answer pairs and the historical question-answer pairs corresponding to the user identifiers in the historical question-answer profiles;
[0204] A second matrix is generated based on the correspondence between the initial question-and-answer pairs and the historical question-and-answer pairs corresponding to the user identifiers in the historical question-and-answer profiles.
[0205] In one embodiment, a collaborative filtering algorithm is used to determine target question-answer pairs that meet preset conditions from the first matrix and the second matrix. When the processor executes the computer program, it also performs the following steps:
[0206] Based on the accuracy of historical question-answer pairs, a collaborative filtering algorithm is used to sort the historical question-answer pairs in the first and second matrices as well as the initial question-answer pairs, generating a sorting result;
[0207] From the sorting results, identify target question-answer pairs with an accuracy rate higher than a preset accuracy threshold.
[0208] In one embodiment, when acquiring historical behavior data corresponding to user identifiers in a specific business domain, the processor, while executing the computer program, further implements the following steps:
[0209] Obtain historical question-and-answer pairs corresponding to user identifiers from intelligent question-and-answer systems in specific business domains;
[0210] Obtain the rating data of user identifiers for historical question-and-answer pairs, and generate the accuracy rate of historical question-and-answer pairs based on the rating data of historical question-and-answer pairs;
[0211] Based on the historical question-and-answer pairs corresponding to the user identifier and the accuracy of the historical question-and-answer pairs, historical behavior data corresponding to the user identifier is generated.
[0212] In one embodiment, when the processor executes the computer program, it also performs the following steps after obtaining the rating data of user identifiers for historical question-answer pairs:
[0213] If the rating data for the user identifier's historical question-and-answer pairs is not obtained, then the number of times the user identifier asked questions for the question-and-answer pairs is obtained from the intelligent question-and-answer system.
[0214] Based on the number of questions asked in a question-and-answer pair, generate historical scoring data for the question-and-answer pairs.
[0215] In one embodiment, when the processor executes the computer program, it further performs the following steps to obtain the historical question-and-answer profile corresponding to the user identifier in a specific business domain:
[0216] From the intelligent question-answering system in a specific business domain, obtain the historical question-answer pairs corresponding to the user identifier; the historical answers in the historical question-answer pairs are determined by matching the tags of the historical questions with the initial question-answer pairs in the initial corpus;
[0217] Based on the historical question-and-answer pairs corresponding to the user identifier and the tags of the historical questions in the historical question-and-answer pairs, a historical question-and-answer profile corresponding to the user identifier is generated.
[0218] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0219] Obtain an initial corpus for a specific business domain, as well as historical behavior data and historical question-and-answer profiles corresponding to user identifiers in that specific business domain; the historical behavior data, historical question-and-answer profiles, and the initial corpus include question-and-answer pairs;
[0220] From the initial corpus and historical behavior data and historical question-and-answer profiles corresponding to user identifiers, target question-and-answer pairs that meet preset conditions are identified; the preset conditions include that the accuracy of the question-and-answer pairs is higher than a preset accuracy threshold.
[0221] The initial corpus for a specific business domain is updated based on the target question-answer pairs that meet the preset conditions.
[0222] In one embodiment, target question-answer pairs that meet preset conditions are determined from the initial corpus, historical behavior data corresponding to user identifiers, and historical question-answer profiles. When the computer program is executed by the processor, the following steps are also performed:
[0223] The collaborative filtering algorithm identifies target question-answer pairs that meet preset conditions from the initial corpus, historical behavior data corresponding to user identifiers, and historical question-answer profiles.
[0224] In one embodiment, a collaborative filtering algorithm is used to determine target question-answer pairs that meet preset conditions from an initial corpus, historical behavior data corresponding to user identifiers, and historical question-answer profiles. When the computer program is executed by the processor, it also performs the following steps:
[0225] Based on the historical behavior data and historical question-and-answer profiles corresponding to user identifiers, a first matrix is generated; the first matrix is used to represent the correspondence between the historical question-and-answer pairs in the historical behavior data and historical question-and-answer profiles corresponding to user identifiers.
[0226] A second matrix is generated based on the historical question-and-answer profiles corresponding to user identifiers and the initial corpus. The second matrix is used to represent the correspondence between historical question-and-answer pairs in the historical question-and-answer profiles and initial question-and-answer pairs in the initial corpus.
[0227] The collaborative filtering algorithm is used to determine the target question-answer pairs that meet the preset conditions from the first matrix and the second matrix.
[0228] In one embodiment, historical behavior data includes historical question-and-answer pairs corresponding to user identifiers and the accuracy of the historical question-and-answer pairs; historical question-and-answer profiles include historical question-and-answer pairs corresponding to user identifiers and the tags of historical questions in the historical question-and-answer pairs;
[0229] Based on the user's historical behavior data and historical Q&A profile corresponding to the user identifier, a first matrix is generated. When the computer program is executed by the processor, the following steps are also performed:
[0230] From historical behavior data and historical question-and-answer profiles, obtain the correspondence between historical question-and-answer pairs corresponding to user identifiers, the tags of historical questions in historical question-and-answer pairs, and the accuracy of historical question-and-answer pairs;
[0231] The first matrix is generated based on the correspondence between the user identifier and the historical question-and-answer pairs, the tags of historical questions in the historical question-and-answer pairs, and the accuracy of the historical question-and-answer pairs.
[0232] In one embodiment, a second matrix is generated based on the historical question-and-answer profile corresponding to the user identifier and the initial corpus. When the computer program is executed by the processor, the following steps are also performed:
[0233] Obtain initial question-answer pairs from the initial corpus, and then obtain the correspondence between the initial question-answer pairs and the historical question-answer pairs corresponding to the user identifiers in the historical question-answer profiles;
[0234] A second matrix is generated based on the correspondence between the initial question-and-answer pairs and the historical question-and-answer pairs corresponding to the user identifiers in the historical question-and-answer profiles.
[0235] In one embodiment, a collaborative filtering algorithm is used to determine target question-answer pairs that meet preset conditions from the first matrix and the second matrix. When the computer program is executed by the processor, it also performs the following steps:
[0236] Based on the accuracy of historical question-answer pairs, a collaborative filtering algorithm is used to sort the historical question-answer pairs in the first and second matrices as well as the initial question-answer pairs, generating a sorting result;
[0237] From the sorting results, identify target question-answer pairs with an accuracy rate higher than a preset accuracy threshold.
[0238] In one embodiment, historical behavior data corresponding to user identifiers in a specific business domain is obtained, and the computer program, when executed by a processor, further implements the following steps:
[0239] Obtain historical question-and-answer pairs corresponding to user identifiers from intelligent question-and-answer systems in specific business domains;
[0240] Obtain the rating data of user identifiers for historical question-and-answer pairs, and generate the accuracy rate of historical question-and-answer pairs based on the rating data of historical question-and-answer pairs;
[0241] Based on the historical question-and-answer pairs corresponding to the user identifier and the accuracy of the historical question-and-answer pairs, historical behavior data corresponding to the user identifier is generated.
[0242] In one embodiment, the computer program, when executed by a processor, further performs the following steps after obtaining rating data for historical question-and-answer pairs using user identifiers:
[0243] If the rating data for the user identifier's historical question-and-answer pairs is not obtained, then the number of times the user identifier asked questions for the question-and-answer pairs is obtained from the intelligent question-and-answer system.
[0244] Based on the number of questions asked in a question-and-answer pair, generate historical scoring data for the question-and-answer pairs.
[0245] In one embodiment, when a computer program is executed by a processor, it further performs the following steps to obtain the historical question-and-answer profile corresponding to a user identifier in a specific business domain:
[0246] From the intelligent question-answering system in a specific business domain, obtain the historical question-answer pairs corresponding to the user identifier; the historical answers in the historical question-answer pairs are determined by matching the tags of the historical questions with the initial question-answer pairs in the initial corpus;
[0247] Based on the historical question-and-answer pairs corresponding to the user identifier and the tags of the historical questions in the historical question-and-answer pairs, a historical question-and-answer profile corresponding to the user identifier is generated.
[0248] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0249] Obtain an initial corpus for a specific business domain, as well as historical behavior data and historical question-and-answer profiles corresponding to user identifiers in that specific business domain; the historical behavior data, historical question-and-answer profiles, and the initial corpus include question-and-answer pairs;
[0250] From the initial corpus and historical behavior data and historical question-and-answer profiles corresponding to user identifiers, target question-and-answer pairs that meet preset conditions are identified; the preset conditions include that the accuracy of the question-and-answer pairs is higher than a preset accuracy threshold.
[0251] The initial corpus for a specific business domain is updated based on the target question-answer pairs that meet the preset conditions.
[0252] In one embodiment, target question-answer pairs that meet preset conditions are determined from the initial corpus, historical behavior data corresponding to user identifiers, and historical question-answer profiles. When the computer program is executed by the processor, the following steps are also performed:
[0253] The collaborative filtering algorithm identifies target question-answer pairs that meet preset conditions from the initial corpus, historical behavior data corresponding to user identifiers, and historical question-answer profiles.
[0254] In one embodiment, a collaborative filtering algorithm is used to determine target question-answer pairs that meet preset conditions from an initial corpus, historical behavior data corresponding to user identifiers, and historical question-answer profiles. When the computer program is executed by the processor, it also performs the following steps:
[0255] Based on the historical behavior data and historical question-and-answer profiles corresponding to user identifiers, a first matrix is generated; the first matrix is used to represent the correspondence between the historical question-and-answer pairs in the historical behavior data and historical question-and-answer profiles corresponding to user identifiers.
[0256] A second matrix is generated based on the historical question-and-answer profiles corresponding to user identifiers and the initial corpus. The second matrix is used to represent the correspondence between historical question-and-answer pairs in the historical question-and-answer profiles and initial question-and-answer pairs in the initial corpus.
[0257] The collaborative filtering algorithm is used to determine the target question-answer pairs that meet the preset conditions from the first matrix and the second matrix.
[0258] In one embodiment, historical behavior data includes historical question-and-answer pairs corresponding to user identifiers and the accuracy of the historical question-and-answer pairs; historical question-and-answer profiles include historical question-and-answer pairs corresponding to user identifiers and the tags of historical questions in the historical question-and-answer pairs;
[0259] Based on the user's historical behavior data and historical Q&A profile corresponding to the user identifier, a first matrix is generated. When the computer program is executed by the processor, the following steps are also performed:
[0260] From historical behavior data and historical question-and-answer profiles, obtain the correspondence between historical question-and-answer pairs corresponding to user identifiers, the tags of historical questions in historical question-and-answer pairs, and the accuracy of historical question-and-answer pairs;
[0261] The first matrix is generated based on the correspondence between the user identifier and the historical question-and-answer pairs, the tags of historical questions in the historical question-and-answer pairs, and the accuracy of the historical question-and-answer pairs.
[0262] In one embodiment, a second matrix is generated based on the historical question-and-answer profile corresponding to the user identifier and the initial corpus. When the computer program is executed by the processor, the following steps are also performed:
[0263] Obtain initial question-answer pairs from the initial corpus, and then obtain the correspondence between the initial question-answer pairs and the historical question-answer pairs corresponding to the user identifiers in the historical question-answer profiles;
[0264] A second matrix is generated based on the correspondence between the initial question-and-answer pairs and the historical question-and-answer pairs corresponding to the user identifiers in the historical question-and-answer profiles.
[0265] In one embodiment, a collaborative filtering algorithm is used to determine target question-answer pairs that meet preset conditions from the first matrix and the second matrix. When the computer program is executed by the processor, it also performs the following steps:
[0266] Based on the accuracy of historical question-answer pairs, a collaborative filtering algorithm is used to sort the historical question-answer pairs in the first and second matrices as well as the initial question-answer pairs, generating a sorting result;
[0267] From the sorting results, identify target question-answer pairs with an accuracy rate higher than a preset accuracy threshold.
[0268] In one embodiment, historical behavior data corresponding to user identifiers in a specific business domain is obtained, and the computer program, when executed by a processor, further implements the following steps:
[0269] Obtain historical question-and-answer pairs corresponding to user identifiers from intelligent question-and-answer systems in specific business domains;
[0270] Obtain the rating data of user identifiers for historical question-and-answer pairs, and generate the accuracy rate of historical question-and-answer pairs based on the rating data of historical question-and-answer pairs;
[0271] Based on the historical question-and-answer pairs corresponding to the user identifier and the accuracy of the historical question-and-answer pairs, historical behavior data corresponding to the user identifier is generated.
[0272] In one embodiment, the computer program, when executed by a processor, further performs the following steps after obtaining rating data for historical question-and-answer pairs using user identifiers:
[0273] If the rating data for the user identifier's historical question-and-answer pairs is not obtained, then the number of times the user identifier asked questions for the question-and-answer pairs is obtained from the intelligent question-and-answer system.
[0274] Based on the number of questions asked in a question-and-answer pair, generate historical scoring data for the question-and-answer pairs.
[0275] In one embodiment, when a computer program is executed by a processor, it further performs the following steps to obtain the historical question-and-answer profile corresponding to a user identifier in a specific business domain:
[0276] From the intelligent question-answering system in a specific business domain, obtain the historical question-answer pairs corresponding to the user identifier; the historical answers in the historical question-answer pairs are determined by matching the tags of the historical questions with the initial question-answer pairs in the initial corpus;
[0277] Based on the historical question-and-answer pairs corresponding to the user identifier and the tags of the historical questions in the historical question-and-answer pairs, a historical question-and-answer profile corresponding to the user identifier is generated.
[0278] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0279] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0280] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0281] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A corpus updating method, characterized in that, The method includes: Obtain an initial corpus for a specific business domain, as well as historical behavior data and historical question-and-answer profiles corresponding to user identifiers in the specific business domain; the historical behavior data, the historical question-and-answer profiles, and the initial corpus include question-and-answer pairs; From the initial corpus and the historical behavior data and historical question-and-answer profiles corresponding to the user identifiers, target question-and-answer pairs that meet preset conditions are determined; the preset conditions include that the accuracy of the question-and-answer pairs is higher than a preset accuracy threshold. The initial question-answer pairs in the initial corpus are replaced with target question-answer pairs that meet the preset conditions, thereby updating the initial corpus of the specific business domain. Obtaining historical behavior data corresponding to user identifiers in the specific business domain includes: Obtain the historical question-and-answer pairs corresponding to the user identifier from the intelligent question-and-answer system of the specific business domain; The number of questions asked by the question-and-answer pair during this Q&A process is collected through user tracking points. If the user identifier's rating data for the historical question-and-answer pair is not obtained, then the rating data for the historical question-and-answer pair is generated based on the number of times the question-and-answer pair was asked. The accuracy rate of the historical question-and-answer pairs is generated based on the scoring data of the historical question-and-answer pairs. Based on the historical question-and-answer pairs corresponding to the user identifier and the accuracy of the historical question-and-answer pairs, historical behavior data corresponding to the user identifier is generated.
2. The method according to claim 1, characterized in that, The step of determining target question-answer pairs that meet preset conditions from the initial corpus and the historical behavior data and historical question-answer profiles corresponding to the user identifier includes: The collaborative filtering algorithm determines target question-answer pairs that meet preset conditions from the initial corpus and the historical behavior data and historical question-answer profiles corresponding to the user identifier.
3. The method according to claim 2, characterized in that, The step of determining target question-answer pairs that meet preset conditions from the initial corpus and the historical behavior data and historical question-answer profiles corresponding to the user identifier using a collaborative filtering algorithm includes: A first matrix is generated based on the historical behavior data and historical question-and-answer profile corresponding to the user identifier; the first matrix is used to represent the correspondence between the historical question-and-answer pairs in the historical behavior data and historical question-and-answer profile corresponding to the user identifier. A second matrix is generated based on the historical question-and-answer profile corresponding to the user identifier and the initial corpus; the second matrix is used to represent the correspondence between the historical question-and-answer pairs in the historical question-and-answer profile and the initial question-and-answer pairs in the initial corpus; The collaborative filtering algorithm is used to determine target question-answer pairs that meet preset conditions from the first matrix and the second matrix.
4. The method according to claim 3, characterized in that, The historical behavior data includes the historical question-and-answer pairs corresponding to the user identifier and the accuracy of the historical question-and-answer pairs; the historical question-and-answer profile includes the historical question-and-answer pairs corresponding to the user identifier and the tags of the historical questions in the historical question-and-answer pairs; The step of generating a first matrix based on the historical behavior data and historical question-and-answer profile corresponding to the user identifier includes: From the historical behavior data and the historical question-and-answer profile, obtain the correspondence between the historical question-and-answer pairs corresponding to the user identifier, the tags of historical questions in the historical question-and-answer pairs, and the accuracy of the historical question-and-answer pairs; A first matrix is generated based on the correspondence between the historical question-and-answer pairs corresponding to the user identifier, the tags of the historical questions in the historical question-and-answer pairs, and the accuracy of the historical question-and-answer pairs.
5. The method according to claim 4, characterized in that, The step of generating a second matrix based on the historical question-and-answer profile corresponding to the user identifier and the initial corpus includes: Obtain initial question-and-answer pairs from the initial corpus, and obtain the correspondence between the initial question-and-answer pairs and the historical question-and-answer pairs corresponding to the user identifiers in the historical question-and-answer profiles; A second matrix is generated based on the correspondence between the initial question-and-answer pairs and the historical question-and-answer pairs corresponding to the user identifiers in the historical question-and-answer profiles.
6. The method according to any one of claims 3-5, characterized in that, Target question-answer pairs that meet preset conditions are determined from the first matrix and the second matrix using a collaborative filtering algorithm, including: Based on the accuracy of the historical question-answer pairs, a collaborative filtering algorithm is used to sort the historical question-answer pairs in the first matrix and the second matrix, as well as the initial question-answer pairs, to generate a sorting result; From the sorting results, target question-answer pairs with an accuracy rate higher than the preset accuracy threshold are identified.
7. The method according to claim 4, characterized in that, The step of obtaining the historical question-and-answer profile corresponding to the user identifier in the specific business domain includes: From the intelligent question-answering system of the specific business domain, obtain the historical question-answer pairs corresponding to the user identifier; the historical answers in the historical question-answer pairs are determined by matching the tags of the historical questions with the initial question-answer pairs in the initial corpus; Based on the historical question-and-answer pairs corresponding to the user identifier and the tags of the historical questions in the historical question-and-answer pairs, a historical question-and-answer profile corresponding to the user identifier is generated.
8. A corpus updating device, characterized in that, The device includes: The data acquisition module is used to acquire an initial corpus for a specific business domain, as well as historical behavior data and historical question-and-answer profiles corresponding to user identifiers in the specific business domain; the historical behavior data, the historical question-and-answer profiles, and the initial corpus include question-and-answer pairs; The target question-answer pair determination module is used to determine target question-answer pairs that meet preset conditions from the initial corpus and the historical behavior data and historical question-answer profiles corresponding to the user identifier; the preset conditions include that the accuracy of the question-answer pair is higher than a preset accuracy threshold. The initial corpus update module is used to replace the initial question-answer pairs in the initial corpus with the target question-answer pairs that meet the preset conditions, thereby updating the initial corpus of the specific business domain. The data acquisition module is specifically used to obtain historical question-and-answer pairs corresponding to the user identifier from the intelligent question-and-answer system of the specific business domain; collect the number of times the user asked the question-and-answer pairs in the current question-and-answer process through user tracking points; if the user identifier's rating data for the historical question-and-answer pairs is not obtained, generate the rating data for the historical question-and-answer pairs based on the number of times the question-and-answer pairs were asked; generate the accuracy rate of the historical question-and-answer pairs based on the rating data; and generate historical behavior data corresponding to the user identifier based on the historical question-and-answer pairs corresponding to the user identifier and the accuracy rate of the historical question-and-answer pairs.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Correlating corpus / corpora value from answered questions
CN105378731A