Question and answer processing method and device and related equipment

By extracting the summary characteristics of the user's question content, finding similar historical summary, and combining with the question-and-answer model to process it, the problem that the question-and-answer model in the existing technology is unable to accurately answer new content, and the adaptability and development of information iteration is achieved. accuracy.

CN119090014APending Publication Date: 2024-12-06SHANGHAI JIKE INTELLIGENT TECH GRP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411173693.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing question-and-answer processing technology cannot exhaust all the conversation contents of the training sample set, which makes the model unable to accurately answer the user's question content during use. Especially in the era of rapid information iteration, the user's question content often exceeds the scope of the training sample set, resulting in The model response is inaccurate.

Method used

By determining the current summary of the user's current question content, performing feature extraction processing, finding a target historical summary similar to the current question content, and using the question-and-answer model to reply with the historical question content and historical summary, realizing the emergence of professional terms or common sayings Adapt and avoid retraining.

Benefits of technology

It improves the generalization ability of the question-and-answer model, can adapt to the era of rapid development of information iteration without retraining, saves resources, and improves the accuracy and adaptability of the reply content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090014A_ABST
    Figure CN119090014A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of question and answer processing, in particular to a question and answer processing method and device and related equipment. The method comprises the steps of determining a current abstract of current question content of a user; performing feature extraction processing on the current abstract to obtain current abstract features; determining a target historical abstract corresponding to the current question content in a plurality of historical abstracts according to the current abstract characteristics; wherein the historical abstract is determined according to the historical question content; according to the current question content and the target historical abstract, determining current reply content through a question and answer model; according to the invention, the question and answer model is prompted through the target historical abstract similar to the current abstract of the current question content, so that the question and answer model can'learn 'new professional terms or commonly known languages in the society or in the professional field; therefore, the question and answer model can adapt to the current age in which information iteration develops more and more quickly without being trained, so that a large amount of resources can be saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of question and answer processing, and in particular to a question and answer processing method, apparatus and related equipment. Background Art

[0002] In existing question-and-answer processing technical solutions, deep learning models trained based on historical question-and-answer content are usually used to respond to user questions.

[0003] In practical applications, since the training sample set used by the deep learning model during the training process cannot cover all question and answer content, the trained model often fails to accurately answer the user's questions during use.

[0004] In addition, even if we assume that the training sample set can cover all conversation content during training, in today's era of increasingly rapid information iteration, users' questions will inevitably include questions that do not appear in the training sample set, which will also cause the model to be unable to accurately answer users' questions. Summary of the invention

[0005] In view of this, the purpose of this application is to provide a question-and-answer processing method, apparatus and related equipment to solve the technical problem that existing question-and-answer processing solutions may not be able to accurately answer the user's questions.

[0006] In a first aspect, the present application provides a question-answering processing method, the method comprising:

[0007] Determine the current summary of the user's current question;

[0008] Performing feature extraction processing on the current abstract to obtain current abstract features;

[0009] Determining a target historical summary corresponding to the current question content from a plurality of historical summaries according to the current summary feature;

[0010] Wherein, the historical summary is determined according to the content of the historical questions;

[0011] According to the current question content and the target history summary, the current reply content is determined through the question-answering model.

[0012] Preferably, determining the current summary of the current question of the user includes:

[0013] Obtaining the current question content input by the user;

[0014] According to the current question content, the current question content is processed by a first model to obtain the current summary;

[0015] The first model is obtained by fine-tuning a pre-trained model according to the historical question content and the historical summary.

[0016] Preferably, the extracting feature from the current abstract to obtain the current abstract feature includes:

[0017] According to the current summary, performing feature extraction processing on the current summary by using a second model to obtain a current summary feature vector;

[0018] The number of characters in the current summary meets a preset standard.

[0019] Preferably, a plurality of the historical summaries are stored in a second database; and determining a target historical summary corresponding to the current question content from the plurality of historical summaries according to the current summary feature comprises:

[0020] According to the current summary feature vector, determining, in the first database, a target history summary feature vector having the greatest similarity to the current summary feature vector by using a third model, and according to the target history summary feature vector, determining, in the second database, the target history summary corresponding to the target history summary feature vector;

[0021] The third model is obtained by fine-tuning the pre-trained model according to the historical summary vector features and the historical summary.

[0022] Preferably, after performing feature extraction processing on the current abstract by the second model to obtain a current abstract feature vector, the method further includes:

[0023] Determine the current summary as the newly added historical summary, and determine the current summary feature vector as the newly added historical summary feature vector;

[0024] The newly added historical summary is stored in the first database, and the newly added historical summary feature vector is stored in the second database.

[0025] Preferably, the question-answering model is obtained by fine-tuning a pre-trained model based on the historical question content, the historical summary and the historical answer content.

[0026] In a second aspect, the present application provides a question-answer processing device, the device comprising: a summary determination module, a feature extraction module, a summary retrieval module, and a reply determination module;

[0027] The summary determination module is used to determine the current summary of the user's current question content;

[0028] The feature extraction module is used to perform feature extraction processing on the current abstract to obtain current abstract features;

[0029] The summary retrieval module is used to determine a target historical summary corresponding to the current question content from a plurality of historical summaries according to the current summary feature;

[0030] Wherein, the historical summary is determined according to the content of the historical questions;

[0031] The reply determination module is used to determine the current reply content through a question-answering model based on the current question content and the target history summary.

[0032] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory is used to store software programs, and the processor runs or executes the software programs stored in the memory so that the electronic device implements the above-mentioned question and answer processing method.

[0033] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program codes executed by a processor, wherein the program codes include codes for implementing the above-mentioned question and answer processing method.

[0034] In a fifth aspect, the present application provides a computer program product, including a program code, which enables a computer to execute the above-mentioned question and answer processing method when the computer runs the computer program product.

[0035] Beneficial effects:

[0036] The present application provides a question-answering processing method, the method comprising: determining a current summary of a user's current question content; performing feature extraction processing on the current summary to obtain current summary features; determining a target historical summary corresponding to the current question content from multiple historical summaries according to the current summary features; wherein the historical summary is determined according to historical question content; determining a current reply content through a question-answering model according to the current question content and the target historical summary;

[0037] In summary, the present application prompts the question-answering model with a target historical summary that is similar to the current summary of the current question content, so that the question-answering model can "learn" new professional terms or slang that have emerged in society or professional fields, so that the question-answering model can adapt to the current era of increasingly rapid information iteration even if it is no longer trained, thus saving a lot of resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. The following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 A schematic diagram of the structure of the question-answering processing system provided in an embodiment of the present application;

[0040] Figure 2 A flowchart of a question-and-answer processing method provided in an embodiment of the present application;

[0041] Figure 3 A schematic diagram of the structure of a question and answer processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] In current life and production, some places are equipped with question-and-answer devices for answering users' questions. The question-and-answer devices can respond to more common questions, saving human resources and improving service efficiency.

[0043] Question-and-answer devices usually determine the response content corresponding to the user's question content through the deep learning model set within them; in actual applications, since the training sample set used by the deep learning model during the training process cannot cover all conversation content, the trained model often fails to accurately respond to the user's speech content during use, further resulting in a significant decrease in the user experience of question-and-answer processing.

[0044] In addition, even if we assume that the training sample set can cover all conversation content during training, in today's era of increasingly rapid information iteration, the user's speech content will inevitably include conversation content that does not appear in the training sample set, which will also lead to a significant decline in the user experience of question and answer processing.

[0045] In order to solve the above problems, this application proposes a question-answering processing solution, which is implemented based on a question-answering processing system. Figure 1 As shown, Figure 1 A structural diagram of a question and answer processing system provided in an embodiment of the present application, wherein the question and answer processing system includes: a terminal device 100, a first service 200, a second server 300 and a third server 400; wherein the terminal device 100 is used for user interaction; the first server 200 is used to control the execution of a question and answer processing method; the second server 300 and the third server 400 are controlled by the first server 200 to provide data required in the process of executing the question and answer processing method.

[0046] Compared with the prior art, the difference of the question-answering processing solution provided in the embodiment of the present application includes at least the following contents:

[0047] 1) The question-answering processing scheme provided in the embodiment of the present application uses multiple machine learning models including deep learning models and AI (Artificial Intelligence) large models to determine the answer content for the user's question content. Compared with the application of a single deep learning model in the prior art, such as a recurrent neural network model, the multiple machine learning models provided in the embodiment of the present application can specialize in their respective functions, so the accuracy of the obtained answer content is higher;

[0048] 2) The question-answer processing solution provided in the embodiment of the present application is executed based on the question-answer processing system. Since the question-answer processing system includes multiple servers to share different functions, the question-answer processing solution provided in the embodiment of the present application can handle a large amount of question content;

[0049] 3) The question-answering processing scheme provided in the embodiment of the present application can "learn" new professional terms or colloquialisms that appear in society or in professional fields, so that the question-answering processing scheme provided in the present application can adapt to the current era of increasingly rapid information iteration without retraining, thereby saving a lot of resources;

[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0051] First, the embodiment of the present application provides a question-answering processing method, such as Figure 2 As shown, Figure 2 The following is a flow chart of a question-answering processing method provided in an embodiment of the present application. The method includes: S110 to S140, and the details are as follows:

[0052] S110: Determine a current summary of the user's current question content.

[0053] Specifically, the form in which the user outputs the current question content can be determined according to actual needs, such as through voice, through text typing by the user, etc.

[0054] After obtaining the current question content of the user, the current summary of the current question content is determined; in actual implementation, the summary is usually determined in the form of keywords.

[0055] In one implementation, S110 includes: Step (1) to Step (2), the details of which are as follows:

[0056] Step (1): Get the current question content input by the user.

[0057] Specifically, the terminal device 100 receives the current question content input by the user, and transmits the current question content to the first server 200 .

[0058] Step (2): Based on the current question content, the current question content is processed by the first model to obtain the current summary;

[0059] Among them, the first model is obtained by fine-tuning the pre-trained model based on the historical question content and historical summary.

[0060] Specifically, after receiving the current question content transmitted by the terminal device 100, the first server 200 transmits the current question content to the third server 400, and the third server 400 processes the current question content through the first model set therein to obtain the current summary of the current question content.

[0061] The first model is the AI ​​big model, which is obtained by fine-tuning the open source pre-trained model based on historical question content and historical summaries.

[0062] The third server 400 transmits the current summary to the first server 200 .

[0063] S120: performing feature extraction processing on the current abstract to obtain current abstract features.

[0064] Specifically, after the current abstract is determined, it is necessary to perform feature extraction on the current abstract to determine the features of the current abstract.

[0065] In one implementation, S120 includes: step (3), the details of which are as follows:

[0066] Step (3): according to the current summary, a feature extraction process is performed on the current summary by using a second model to obtain a feature vector of the current summary;

[0067] Among them, the number of characters of the current summary meets the preset standard.

[0068] Specifically, the first server 200 transmits the current summary to the second server 300, and the second server 300 performs feature extraction processing on the current summary through the second model set therein to obtain the current summary feature vector; the second model is a deep learning model, and since the function of the second model is to extract the feature vector of the current summary, any deep learning model that can perform this function can be used as the second model.

[0069] The preset standard is determined according to the length of the input data of the second model.

[0070] After obtaining the current summary feature vector, the second server 300 transmits the current summary feature vector to the first server 200 .

[0071] S130: Determine a target historical summary corresponding to the current question content from a plurality of historical summaries according to the current summary feature;

[0072] Among them, the historical summary is determined based on the content of historical questions.

[0073] Specifically, after the features of the current summary are determined, a target historical summary that is most similar to the features of the current summary can be determined from among multiple historical summaries based on the principle of feature similarity.

[0074] In one implementation, a plurality of historical summaries are stored in a second database; S130 includes: step (4), the details of which are as follows:

[0075] Step (4): according to the current summary feature vector, determine the target history summary feature vector having the greatest similarity with the current summary feature vector in the first database through the third model, and according to the target history summary feature vector, determine the target history summary corresponding to the target history summary feature vector in the second database;

[0076] Among them, the third model is obtained by fine-tuning the pre-trained model based on the historical summary vector features and historical summaries.

[0077] Specifically, the first database is a vector database for storing vectors; the second database is a text database for storing texts.

[0078] The first server 200 transmits the current summary feature vector to the third server 400, and the third server 400 determines the historical summary feature vector having the greatest similarity with the current summary feature vector in the first database through the third model set therein, and determines the target historical summary corresponding to the target historical summary feature vector in the second database.

[0079] The similarity between the current summary feature vector and the historical summary feature vector may be determined by calculating the Euclidean distance between the two vectors.

[0080] In actual implementation, although the steps of the third model to determine the historical summary are divided into two processes, the first process is "confirming the historical summary feature vector" and the second process is "confirming the historical summary", it is usually only necessary to make a request to the third model once. For example, you can input "output the historical summary that is most similar to the current summary feature vector" into the third model to obtain the historical summary.

[0081] The third server 400 transmits the target history summary to the first server 200 .

[0082] In one implementation, the method further includes: Step (5) to Step (6), the details of which are as follows:

[0083] Step (5): determine the current summary as a newly added historical summary, and determine the current summary feature vector as a newly added historical summary feature vector.

[0084] Step (6): Store the newly added historical summary in the first database, and store the newly added historical summary feature vector in the second database.

[0085] Specifically, after determining the current summary and current summary feature vector of the current question content, the first server 200 determines the current summary as a newly added target historical summary, stores the newly added target historical summary in the first database, and determines the current summary feature vector as a newly added target historical summary feature vector, and stores the newly added target historical summary feature vector in the second database. The historical summary and historical summary feature vector are used to provide a reference for the next reply.

[0086] S140: Determine the current answer content through the question-answering model based on the current question content and the target history summary.

[0087] Specifically, after the target historical summary is determined, the current reply content can be determined based on the current question content and the target historical summary. The target historical summary is used as a prompt to indicate the connection between the current question content and the historical question content, so that the current reply content can "learn" new professional terms or idioms that have emerged in society or professional fields.

[0088] In one implementation, the question-answering model is obtained by fine-tuning a pre-trained model based on historical question content, target historical summaries, and historical answer content.

[0089] Specifically, after receiving the target historical summary, the first server 200 arranges and integrates the current question content and the target historical summary according to the specified format to obtain an integrated text. The first server 200 transmits the integrated text to the third server 400. The third server 400 infers the current reply content based on the integrated text through the question-answering model set therein.

[0090] In actual implementation, the target history summary can provide sufficient prompts for the inference process of the question-answering model, improve the question-answering model's ability to handle unfamiliar questions, and improve the generalization ability of the question-answering model.

[0091] In actual implementation, the first model, the second model and the question-answering model can be set up in different servers. The functions of the first model, the second model and the question-answering model can also be implemented by a large AI model, and only the corresponding fine-tuning samples need to be added to the fine-tuning sample set. The pre-trained model can be an open source BRET (Bidirectional Encoder Representations from Transformers) model.

[0092] Second, the embodiment of the present application provides a question-answer processing device, such as Figure 3 As shown, Figure 3 A schematic diagram of the structure of a question-answer processing device provided in an embodiment of the present application, the device comprising: a summary determination module 310, a feature extraction module 320, a summary retrieval module 330 and a reply determination module 340;

[0093] Summary determination module 310, used to determine the current summary of the current question of the user;

[0094] A feature extraction module 320 is used to perform feature extraction processing on the current abstract to obtain current abstract features;

[0095] A summary retrieval module 330 is used to determine a target historical summary corresponding to the current question content from a plurality of historical summaries according to the current summary feature;

[0096] Among them, the historical summary is determined based on the content of the historical questions;

[0097] The reply determination module 340 is used to determine the current reply content through the question-answering model according to the current question content and the target history summary.

[0098] In one implementation, the summary determination module 310 is further configured to obtain the current question content output by the user;

[0099] The summary determination module 310 is further used to process the current question content through the first model to obtain a current summary according to the current question content;

[0100] Among them, the first model is obtained by fine-tuning the pre-trained model based on the historical question content and historical summary.

[0101] In one implementation, the feature extraction module 320 is further configured to perform feature extraction processing on the current abstract through the second model to obtain a current abstract feature vector;

[0102] Among them, the number of characters of the current summary meets the preset standard.

[0103] In one implementation, a plurality of historical summaries are stored in the second database; the summary retrieval module 330 is further configured to determine, based on the current summary feature vector, a target historical summary feature vector having the greatest similarity to the current summary feature vector in the first database through a third model, and to determine, based on the target historical summary feature vector, a target historical summary corresponding to the target historical summary feature vector in the second database;

[0104] Among them, the third model is obtained by fine-tuning the pre-trained model based on the historical summary vector features and historical summaries.

[0105] In one implementation, the summary retrieval module 330 is further configured to determine the current summary as a newly added historical summary, and determine the current summary feature vector as a newly added historical summary feature vector;

[0106] The summary retrieval module 330 is further used to store the newly added historical summary in the first database, and store the newly added historical summary feature vector in the second database.

[0107] In one implementation, the question-answering model is obtained by fine-tuning a pre-trained model based on historical question content, historical summaries, and historical answer content.

[0108] Third, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, steps S110 to S140 provided in the above embodiment are implemented.

[0109] Fourth, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, steps S110 to S140 of the above embodiment are executed.

[0110] Fifth, the computer program product provided in the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the previous method embodiment. The specific implementation can refer to steps S110 to S140 of the method embodiment, which will not be repeated here.

[0111] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

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

[0113] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0114] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM) random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0115] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0116] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A question-answering processing method, It is characterized in that The method comprises: Determine the current summary of the user's current question; Performing feature extraction processing on the current abstract to obtain current abstract features; Determining a target historical summary corresponding to the current question content from a plurality of historical summaries according to the current summary feature; Wherein, the historical summary is determined according to the content of the historical questions; According to the current question content and the target history summary, the current reply content is determined through the question-answering model.

2. The method according to claim 1, It is characterized in that The determining of the current summary of the current question of the user includes: Obtaining the current question content input by the user; According to the current question content, the current question content is processed by a first model to obtain the current summary; The first model is obtained by fine-tuning a pre-trained model according to the historical question content and the historical summary.

3. The method according to claim 2, It is characterized in that The extracting feature of the current abstract to obtain the feature of the current abstract includes: According to the current summary, performing feature extraction processing on the current summary by using a second model to obtain a current summary feature vector; The number of characters in the current summary meets a preset standard.

4. The method according to claim 3, It is characterized in that The plurality of historical summaries are stored in a second database; and the target historical summaries corresponding to the current question content are determined from the plurality of historical summaries according to the current summary feature, including: According to the current summary feature vector, determining, in the first database, a target history summary feature vector having the greatest similarity to the current summary feature vector by using a third model, and according to the target history summary feature vector, determining, in the second database, the target history summary corresponding to the target history summary feature vector; The third model is obtained by fine-tuning the pre-trained model according to the historical summary vector features and the historical summary.

5. The method according to claim 4, It is characterized in that After performing feature extraction processing on the current abstract by the second model to obtain a current abstract feature vector, the method further includes: Determine the current summary as the newly added historical summary, and determine the current summary feature vector as the newly added historical summary feature vector; The newly added historical summary is stored in the first database, and the newly added historical summary feature vector is stored in the second database.

6. The method according to claim 1, It is characterized in that The question-answering model is obtained by fine-tuning the pre-trained model based on the historical question content, the historical summary and the historical answer content.

7. A question-answering processing device, It is characterized in that The device comprises: a summary determination module, a feature extraction module, a summary retrieval module and a reply determination module; The summary determination module is used to determine the current summary of the user's current question content; The feature extraction module is used to perform feature extraction processing on the current abstract to obtain current abstract features; The summary retrieval module is used to determine a target historical summary corresponding to the current question content from a plurality of historical summaries according to the current summary feature; Wherein, the historical summary is determined according to the content of the historical questions; The reply determination module is used to determine the current reply content through a question-answering model based on the current question content and the target history summary.

8. An electronic device, It is characterized in that The electronic device includes a processor and a memory, the memory is used to store software programs, and the processor runs or executes the software programs stored in the memory so that the electronic device implements the question and answer processing method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium is used to store program codes executed by a processor, wherein the program codes include code for implementing the question-and-answer processing method according to any one of claims 1 to 6.

10. A computer program product, It is characterized in that The computer program product comprises program codes, and when a computer runs the computer program product, the computer executes the question-answering processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Large model question and answer method and system based on historical dialogue record optimization and storage medium

    CN118070908A