Question and answer service method and device based on historical session information

By using historical conversation information in the Q&A service to mine target Q&A pairs from global and local dimensions, constructing Q&A mapping information and training models, it solves the problem of inaccurate responses in traditional Q&A services, improves service efficiency and user experience, and alleviates customer service problems. pressure.

CN118733734APending Publication Date: 2024-10-01ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410875326.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Traditional Q&A services are difficult to provide accurate and clear answers when users interact with customer service, resulting in poor user experience and high work pressure for customer service staff.

Method used

By obtaining historical conversation information, we mine target question and answer pairs from global and local dimensions, build question and answer mapping information, train question and answer models, optimize automated retrieval, and provide more accurate question and answer services.

Benefits of technology

It improves the efficiency and accuracy of Q&A services, reduces the work pressure of customer service staff, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733734A_ABST
    Figure CN118733734A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide a question and answer service method and device based on historical session information. In the question and answer service method, first historical session information in a first interaction scene is acquired, at least one global target question and answer pair can be acquired from a global dimension according to the first historical session information, and at least one local target question and answer pair associated with each global target question and answer pair can be acquired from a local dimension; and then, according to each global target question and answer pair and at least one local target question and answer pair associated with the global target question and answer pair, constructing question and answer mapping information corresponding to the first interaction scene, and according to the question and answer mapping information, providing question and answer service in the first interaction scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of artificial intelligence technology, and more particularly, to a question-and-answer service method and device based on historical conversation information. Background Art

[0002] For online service products, in order to provide users with better services and technical support, a question-and-answer service is usually configured. If users encounter problems while using the service products, they can ask for solutions through the question-and-answer service.

[0003] Traditional Q&A services usually use the "search + transfer to manual" method to provide users with Q&A services. This method not only has a long consultation process, but also makes it difficult to ensure that the answers provided match the questions asked by users, which affects the user experience. With the development of artificial intelligence, large language models (LLMs) are gradually being applied to Q&A services. Large models can search for answers with higher matching degrees from a knowledge base built based on a large amount of training data and provide them to users.

[0004] However, in actual application scenarios, there are a lot of manual conversations between users and customer service in the question-and-answer content. After multiple rounds of conversations, the conversation information is complex and lengthy. It is difficult to retrieve accurate and clear answers directly based on the conversation content in the knowledge base. Summary of the invention

[0005] One or more embodiments of the present specification provide a question-and-answer service method and device based on historical conversation information, so as to improve the efficiency and accuracy of automatic retrieval of question-and-answer results in the corresponding interactive scenario of the question-and-answer service and reduce the work pressure of customer service personnel.

[0006] In a first aspect, one or more embodiments of the present specification provide a question-and-answer service method based on historical conversation information, comprising: obtaining first historical conversation information in a first interaction scenario; obtaining at least one global target question-and-answer pair from a global dimension and at least one local target question-and-answer pair associated with each global target question-and-answer pair from a local dimension based on the first historical conversation information; constructing question-and-answer mapping information corresponding to the first interaction scenario based on each global target question-and-answer pair and at least one local target question-and-answer pair associated with it; and providing a question-and-answer service in the first interaction scenario based on the question-and-answer mapping information.

[0007] In an optional embodiment, according to the first historical conversation information, at least one global target question-answer pair is obtained from the global dimension, and at least one local target question-answer pair associated with each global target question-answer pair is obtained from the local dimension, including: obtaining training samples for model training, the training samples including at least one global first historical question-answer pair corresponding to the first interaction scenario, and at least one local first historical question-answer pair associated with each global first historical question-answer pair; performing model training based on the training samples to obtain a question-answer model adapted to the first interaction scenario, the question-answer model being used to mine corresponding target question-answer pairs from the global dimension and the local dimension for the input conversation information respectively; inputting the first historical conversation information into the question-answer model; and obtaining at least one global target question-answer pair mined by the question-answer model from the global dimension, and at least one local target question-answer pair associated with each global target question-answer pair mined from the local dimension.

[0008] In an optional embodiment, obtaining training samples for model training includes: obtaining second historical session information; the second historical session information includes historical session information in the first interaction scenario; and obtaining training samples for model training based on the second historical session information.

[0009] In an optional embodiment, based on the second historical session information, obtaining training samples for model training includes: inputting the second historical session information into a preset first mining model, the first mining model being used to mine corresponding first historical question-answer pairs for the input session information from global dimensions and local dimensions respectively; obtaining at least one global first historical question-answer pair mined by the first mining model from the global dimension, and at least one local first historical question-answer pair associated with each global first historical question-answer pair mined from the local dimension, as training samples for model training.

[0010] In an optional embodiment, based on the second historical session information, obtaining training samples for model training includes: inputting the second historical session information into a preset second mining model, the second mining model being used to mine corresponding second historical question-answer pairs for the input session information from global dimensions and local dimensions respectively; obtaining at least one global second historical question-answer pair mined by the second mining model from the global dimension, and at least one local second historical question-answer pair associated with each global second historical question-answer pair mined from the local dimension; based on the at least one global second historical question-answer pair and the at least one local second historical question-answer pair associated with each global second historical question-answer pair, obtaining at least one global first historical question-answer pair and at least one local first historical question-answer pair associated with each global first historical question-answer pair through a marking operation as training samples for model training.

[0011] In an optional embodiment, before obtaining training samples for model training based on the second historical session information, the method further includes: identifying and removing redundant historical session information and preset machine reply information in the second historical session information.

[0012] In an optional embodiment, model training is performed based on the training samples to obtain a question-answering model adapted to the first interaction scenario, including: extracting at least one global question-answering feature from a global dimension and extracting at least one local question-answering feature associated with each global question-answering feature from a local dimension according to the training samples; and performing model training based on the at least one global question-answering feature and at least one local question-answering feature associated with each global question-answering feature to obtain a question-answering model adapted to the first interaction scenario.

[0013] In an optional embodiment, model training is performed based on the at least one global question and answer feature and at least one local question and answer feature associated with each global question and answer feature to obtain a question and answer model adapted to the first interaction scenario, including: performing model training based on the at least one global question and answer feature to obtain a corresponding global question and answer sub-model; and performing model training based on at least one local question and answer feature associated with each global question and answer feature to obtain a corresponding local question and answer sub-model; and generating a question and answer model adapted to the first interaction scenario based on the global question and answer sub-model and the local question and answer sub-model.

[0014] In an optional embodiment, question and answer mapping information corresponding to the first interaction scenario is constructed based on each global target question and answer pair and at least one local target question and answer pair associated with it, including: establishing a mapping relationship between the first interaction scenario and each global target question and answer pair and at least one local target question and answer pair associated with it; and inputting the mapping relationship as question and answer mapping information into a preset question and answer knowledge base.

[0015] In an optional embodiment, based on the question-answer mapping information, a question-answer service is provided in the first interaction scenario, including: obtaining a target question input for the first interaction scenario, the target question including questions raised from a global dimension and / or a local dimension; based on the target question, retrieving adapted global target question-answer pairs and / or local target question-answer pairs from the question-answer knowledge base; based on the retrieved global target question-answer pairs and / or local target question-answer pairs, outputting target response information adapted to the target question.

[0016] In a second aspect, one or more embodiments of the present specification provide a question-and-answer service device based on historical conversation information, including: a first acquisition module, used to acquire first historical conversation information in a first interaction scenario; a second acquisition module, used to acquire at least one global target question-and-answer pair from a global dimension and at least one local target question-and-answer pair associated with each global target question-and-answer pair from a local dimension based on the first historical conversation information; a first processing module, used to construct question-and-answer mapping information corresponding to the first interaction scenario based on each global target question-and-answer pair and at least one local target question-and-answer pair associated with it; and a second processing module, used to provide question-and-answer service in the first interaction scenario based on the question-and-answer mapping information.

[0017] In an optional embodiment, the second acquisition module acquires at least one global target question-answer pair from a global dimension and at least one local target question-answer pair associated with each global target question-answer pair from a local dimension based on the first historical conversation information, and is used to: acquire training samples for model training, the training samples comprising at least one global first historical question-answer pair corresponding to the first interaction scenario and at least one local first historical question-answer pair associated with each global first historical question-answer pair; perform model training based on the training samples to obtain a question-answer model adapted to the first interaction scenario, the question-answer model being used to mine corresponding target question-answer pairs from global and local dimensions for the input conversation information respectively; input the first historical conversation information into the question-answer model; and acquire at least one global target question-answer pair mined by the question-answer model from a global dimension and at least one local target question-answer pair associated with each global target question-answer pair mined from a local dimension.

[0018] In an optional embodiment, the second acquisition module acquires training samples for model training, and is used to: acquire second historical session information; the second historical session information includes historical session information in the first interaction scenario; based on the second historical session information, acquire training samples for model training.

[0019] In an optional embodiment, the second acquisition module acquires training samples for model training based on the second historical session information, and is used to: input the second historical session information into a preset first mining model, the first mining model being used to mine corresponding first historical question-answer pairs for the input session information from global dimensions and local dimensions respectively; acquire at least one global first historical question-answer pair mined from the global dimension by the first mining model, and at least one local first historical question-answer pair associated with each global first historical question-answer pair mined from the local dimension, as training samples for model training.

[0020] In an optional embodiment, the second acquisition module acquires training samples for model training based on the second historical session information, and is used to: input the second historical session information into a preset second mining model, the second mining model being used to mine corresponding second historical question-answer pairs for the input session information from global dimensions and local dimensions respectively; acquire at least one global second historical question-answer pair mined from the global dimension by the second mining model, and at least one local second historical question-answer pair associated with each global second historical question-answer pair mined from the local dimension; based on the at least one global second historical question-answer pair and the at least one local second historical question-answer pair associated with each global second historical question-answer pair, acquire at least one global first historical question-answer pair and at least one local first historical question-answer pair associated with each global first historical question-answer pair through a marking operation as training samples for model training.

[0021] In an optional embodiment, before acquiring training samples for model training based on the second historical session information, the second acquisition module is further used to: identify and remove redundant historical session information and preset machine reply information in the second historical session information.

[0022] In an optional embodiment, the second acquisition module performs model training based on the training samples to obtain a question-answering model adapted to the first interaction scenario, and is used to: extract at least one global question-answering feature from a global dimension and at least one local question-answering feature associated with each global question-answering feature from a local dimension according to the training samples; perform model training based on the at least one global question-answering feature and the at least one local question-answering feature associated with each global question-answering feature to obtain a question-answering model adapted to the first interaction scenario.

[0023] In an optional embodiment, the second acquisition module performs model training based on the at least one global question and answer feature and at least one local question and answer feature associated with each global question and answer feature to obtain a question and answer model adapted to the first interaction scenario, and is used to: perform model training based on the at least one global question and answer feature to obtain a corresponding global question and answer sub-model; and perform model training based on at least one local question and answer feature associated with each global question and answer feature to obtain a corresponding local question and answer sub-model; and generate a question and answer model adapted to the first interaction scenario based on the global question and answer sub-model and the local question and answer sub-model.

[0024] In an optional embodiment, the first processing module constructs question and answer mapping information corresponding to the first interaction scenario based on each global target question and answer pair and at least one local target question and answer pair associated therewith, and is used to: establish a mapping relationship between the first interaction scenario and each global target question and answer pair and at least one local target question and answer pair associated therewith; and input the mapping relationship as question and answer mapping information into a preset question and answer knowledge base.

[0025] In an optional embodiment, the second processing module provides a question-and-answer service in the first interaction scenario based on the question-and-answer mapping information, and is used to: obtain a target question input for the first interaction scenario, the target question including questions raised from a global dimension and / or a local dimension; retrieve adapted global target question-and-answer pairs and / or local target question-and-answer pairs from the question-and-answer knowledge base based on the target question; and output target response information adapted to the target question based on the retrieved global target question-and-answer pairs and / or local target question-and-answer pairs.

[0026] In a third aspect, one or more embodiments of the present specification further provide an electronic device comprising a memory and a processor; the memory is used to store a computer program product; the processor is used to execute the computer program product stored in the memory, and when the computer program product is executed, the question-and-answer service method of the first aspect described above is implemented.

[0027] In a fourth aspect, one or more embodiments of the present specification further provide a computer-readable storage medium, wherein the computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed, the question-and-answer service method of the first aspect described above is implemented.

[0028] To summarize, in one or more implementations of the present specification, based on the historical conversation information of the corresponding interaction scenario, historical question and answer pairs of the global dimension and historical question and answer pairs of the local dimension can be mined therefrom; further, based on the mined historical question and answer pairs, a question and answer model with question and answer pair mining capability can be trained, and the required target question and answer pairs can be mined from the global dimension and the local dimension from the historical conversation information of the specified interaction scenario; based on this, the mined target question and answer pairs are input into the question and answer knowledge base, and question and answer services can be provided to users in the specified interaction scenario, which helps to improve the efficiency and accuracy of automated retrieval and reduce the workload of customer service personnel. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0030] Figure 1 A flowchart of a question-and-answer service method provided for one or more embodiments of this specification;

[0031] Figure 2 A flowchart of another question-and-answer service method provided for one or more embodiments of this specification;

[0032] Figure 3 A structural block diagram of a question-answering service device provided for one or more embodiments of this specification;

[0033] Figure 4 A structural block diagram of an electronic device provided for one or more embodiments of this specification. DETAILED DESCRIPTION

[0034] One or more embodiments of the present invention are further described in detail below through the accompanying drawings and examples. Through these descriptions, the features and advantages of one or more embodiments of the present invention will become clearer and more specific.

[0035] The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. Although various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise noted.

[0036] In addition, the technical features involved in different implementations of one or more embodiments of this specification described below can be combined with each other as long as they do not conflict with each other.

[0037] To facilitate understanding, the application scenarios of the technical solutions provided by one or more embodiments of this specification are first described below.

[0038] When using the question-and-answer service provided by online service products, users can use the two functions of automatic reply and manual reply. Usually, before the user selects the manual reply function, the automatic reply function can retrieve the reply information that matches the user's question based on the preset question-and-answer knowledge base, so as to reduce the work pressure of customer service personnel and improve work efficiency to a certain extent. However, in actual application scenarios, the preset question-and-answer knowledge base has a large amount of content, and much of the content is common sense knowledge. In addition, the content input by users is mostly spoken manual conversations. It is difficult to guarantee the probability and accuracy of successful matching by directly searching the question-and-answer knowledge base based on the content input by users. In this case, users have to choose the manual reply function to provide targeted question-and-answer services through customer service personnel.

[0039] In actual applications, since the questions raised by users in the process of using the Q&A service are usually common questions related to the corresponding service product, even if different users use the same service product, the session information generated in the process of using the corresponding Q&A service may include the same or similar question information and reply information, which results in a lot of repeated Q&A information in the historical session information of the Q&A service corresponding to the same service product. Therefore, for any service product, if the historical session information of the corresponding Q&A service is used as the content of the Q&A knowledge base to provide users with Q&A services during the process of using the corresponding Q&A service, it can not only narrow the search scope and improve the efficiency and accuracy of the search results, but also reduce the work pressure of customer service personnel.

[0040] To this end, one or more embodiments of the present specification provide a question-and-answer service method and device based on historical conversation information, so as to optimize the automatic reply function in the question-and-answer service, improve the efficiency and accuracy of the automatic retrieval results, and reduce the work pressure of customer service personnel.

[0041] For ease of description, in one or more embodiments of the present specification, any service product used by a user is referred to as a target service product, and the process in which a user uses the question-and-answer service provided by the target service product is referred to as the corresponding first interaction scenario.

[0042] The following describes a question-and-answer service method based on historical conversation information provided by one or more embodiments of this specification in conjunction with the accompanying drawings.

[0043] Figure 1 A flowchart of a question-and-answer service method provided in one or more embodiments of this specification, such as Figure 1 As shown, the method includes:

[0044] S102: Acquire first historical session information in a first interaction scenario;

[0045] S104. Acquire at least one global target question-answer pair from a global dimension according to the first historical session information, and acquire at least one local target question-answer pair associated with each global target question-answer pair from a local dimension;

[0046] S106: construct question-answer mapping information corresponding to the first interaction scenario according to each global target question-answer pair and at least one local target question-answer pair associated therewith;

[0047] S108. Provide a question-and-answer service in the first interaction scenario according to the question-and-answer mapping information.

[0048] In one or more embodiments of this specification, the above-mentioned question-and-answer service method can be applied to the server where the target service product runs. If the user encounters a problem and needs customer service help during the use of the target service product, the question-and-answer service provided by the target service product can be used to solve the problem. There is no limitation on the specific application scenario of the target service product. Optionally, the application scenario can be any scenario such as finance, medical care, entertainment, e-commerce, social network, online education, Internet of Things, intelligent manufacturing, safe city, etc. Of course, the above-mentioned scenario types are only exemplary and are not limited to this in actual application.

[0049] Furthermore, there is no limitation on the specific type of the target service product. Optionally, the target service product can be a management system or auxiliary tool for internal staff of the enterprise, or a service platform or application product for external customers. For example, the target service product is an auxiliary tool for technical personnel within the enterprise. If the technical personnel encounter technical problems during the process of developing products and testing product functions, they can solve the corresponding problems through the question-and-answer service provided by the corresponding auxiliary tool. For another example, the target service product is a shopping service platform provided by the enterprise to external customers. If customers encounter problems during shopping through the corresponding platform, they can solve the corresponding problems through the question-and-answer service provided by the platform.

[0050] In one or more embodiments of the present specification, the target service product is an auxiliary tool for use by technical personnel within the enterprise. The purpose is only to illustrate the implementation principle of the above-mentioned question and answer service method. In actual applications, all service products applicable to the above-mentioned question and answer service method and their specific application scenarios are within the protection scope of one or more embodiments of the present specification.

[0051] Based on this, in order to provide question-and-answer services to users based on historical session information, the server may first obtain the first historical session information in the first interaction scenario, so as to construct question-and-answer mapping information according to the first historical session information, and then provide question-and-answer services to users in the first interaction scenario according to the corresponding question-and-answer mapping information. The first historical session information refers to the session information generated by historical users in the process of using the target service product and solving various problems by using the question-and-answer services provided by the target service product, including at least one pair of question information and reply information involved in each question during the session between the historical user and the automatic reply robot or customer service personnel.

[0052] For ease of explanation, in one or more embodiments of the present specification, each pair of question information and reply information is referred to as a question-answer pair, and for each question raised by a user, the question-answer pairs involved include global question-answer pairs and / or local question-answer pairs; wherein, the global question-answer pairs and the local question-answer pairs are associated with each other, the global question-answer pair refers to the question information and reply information directly corresponding to the corresponding question, and the local question-answer pair refers to the question information and reply information directly corresponding to the sub-question associated with the corresponding question.

[0053] For example, for the problem "Function A cannot be used normally", if the user enters the question information "Function A cannot be used normally, what should I do?" when asking customer service for help, it will be regarded as the question information of the problem "Function A cannot be used normally" in the global dimension; accordingly, if the automatic reply robot or customer service staff outputs the reply information "Please check whether parameter M is set normally", it will be regarded as the reply information of the problem "Function A cannot be used normally" in the global dimension. Based on this, "Function A cannot be used normally, what should I do?" and "Please check whether parameter M is set normally" are the global question and answer pairs directly corresponding to the problem "Function A cannot be used normally".

[0054] Furthermore, if the user encounters more detailed sub-problems that need to be solved in the process of setting parameter M, he can continue to ask customer service for help. Assuming that the user does not know how to set parameter M of function A, and enters the question information "What should be the setting range of parameter M?", it will be regarded as the question information of the local dimension for the problem "Function A cannot be used normally"; accordingly, if the automatic reply robot or customer service staff outputs the reply information "The setting range of parameter M should be selected from 10% to 90%", it will be regarded as the reply information of the sub-problem "What should be the setting range of parameter M?" of the problem "Function A cannot be used normally" in the local dimension. Based on this, "What should be the setting range of parameter M?" and "The setting range of parameter M should be selected from 10% to 90%" are the global question-answer pair directly corresponding to the sub-problem "What should be the setting range of parameter M?", that is, a local question-answer pair associated with the problem "Function A cannot be used normally".

[0055] In actual applications, since users may encounter multiple problems in the process of using service products, and each problem may be associated with one or more sub-problems, after obtaining the first historical session information in the first interactive scenario, the server can obtain at least one global target question-answer pair from the global dimension and obtain at least one local target question-answer pair associated with each global target question-answer pair from the local dimension based on the first historical session information. Among them, a global target question-answer pair can be understood as a global question-answer pair generated by a historical user using the target service product by using the question-answer service provided by the target service product to solve a problem; accordingly, a local target question-answer pair associated with a global target question-answer pair can be understood as a local question-answer pair generated by a historical user using the question-answer service provided by the target service product to solve a sub-problem associated with the corresponding problem.

[0056] Based on this, according to each global target question-answer pair and at least one local target question-answer pair associated with it, question-answer mapping information corresponding to the first interaction scenario can be constructed to provide question-answer services to users in the first interaction scenario. That is, the constructed question-answer mapping information includes at least one global target question-answer pair involved in different types of questions, and at least one local target question-answer pair associated with each global target question-answer.

[0057] The implementation process of each step of the above question-and-answer service method is described in detail below through a specific embodiment.

[0058] In one or more embodiments of the present specification, there is no limitation on the first historical period for generating the first historical session information. Optionally, the first historical period may be the past day, week, or month, etc., which may be determined according to actual needs. Accordingly, there is no limitation on the time for obtaining the first historical session information. Optionally, the server may periodically obtain the first historical session information generated in the first historical period according to a preset period. For example, for a first interaction scenario with a high frequency of use, the preset period for obtaining the first historical session information may be one day, that is, the server may obtain the first historical session information generated within the past 24 hours at a specified time every day; for another example, for a first interaction scenario with a low frequency of use, the preset period for obtaining the first historical session information may be one week, that is, the server may obtain the first historical session information generated within the past week at a specified time every week; for another example, for a first interaction scenario that is rarely used, the preset period for obtaining the first historical session information may be one month, that is, the server may obtain the first historical session information generated within the past month at a specified time every month. The specific acquisition time may be selected according to actual needs.

[0059] In one or more embodiments of the present specification, the specific manner in which the server obtains at least one global target question-answer pair from the global dimension and obtains at least one local target question-answer pair associated with each global target question-answer pair from the local dimension based on the first historical session information is not limited. In an optional embodiment, after obtaining the first historical session information in the first interaction scenario, the server can directly perform text and semantic recognition on the first historical session information to identify at least one global target question-answer pair from the global dimension and at least one local target question-answer pair associated with each global target question-answer pair from the local dimension.

[0060] In another optional embodiment, the server may first obtain training samples for model training; wherein the training samples include at least one global first historical question-answer pair corresponding to the first interaction scenario, and at least one local first historical question-answer pair associated with each global first historical question-answer pair. Further, by performing model training based on the acquired training samples, a question-answer model adapted to the first interaction scenario can be obtained, that is, the question-answer model trained using the corresponding training samples can be used to mine corresponding target question-answer pairs from the global dimension and the local dimension for the input session information. Based on this, the acquired first historical session information is input into the question-answer model, and at least one global target question-answer pair mined from the global dimension by the question-answer model, as well as at least one local target question-answer pair mined from the local dimension and associated with each global target question-answer pair, can be obtained.

[0061] The following describes a process of obtaining global question-answer pairs and local question-answer pairs corresponding to the first historical session information through model training.

[0062] In this embodiment, the specific method for the server to obtain training samples is not limited. In an optional method, at least one corresponding global first historical question and answer pair and at least one local first historical question and answer pair associated with each global first historical question and answer pair can be set as training samples according to various issues involved in the first interaction scenario. Based on this, before training the question and answer model adapted to the first interaction scenario, the server can directly obtain the training samples corresponding to the first interaction scenario. In another optional method, the server can first obtain the second historical session information, and obtain the training samples for model training based on the second historical session information, wherein the second historical session information includes the historical session information in the first interaction scenario. Based on this, by training the model with the training samples obtained from the second historical session information, a question and answer model capable of identifying the first historical session information can be obtained.

[0063] In the second implementation, there is no limitation on the second historical period for generating the second historical conversation information. Optionally, in order to expand the recognition scope of the question-answering model, the second historical period can be a longer historical period, for example, the past month, three months or half a year, etc. In this way, the training samples obtained according to the second historical conversation information are richer, and the recognition accuracy of the trained question-answering model is also higher. For the convenience of distinction, this embodiment refers to the interaction scene corresponding to the second historical conversation information as the second interaction scene. Optionally, the second interaction scene can be one or more. It can be understood that when the second interaction scene is one, the second interaction scene can be the first interaction scene or the upper-level scene of the first interaction scene. When the second interaction scene is multiple, the second interaction scene includes the first interaction scene and other interaction scenes. Further, optionally, other interaction scenes can be similar interaction scenes of the same level as the first interaction scene.

[0064] For example, in order to ensure the accuracy of the training samples in the training samples, the second historical conversation information is only the historical conversation information under the first interaction scenario. In this way, the training samples obtained according to the second historical conversation information are more compatible with the first interaction scenario, and the question-answering model trained with the training samples can more accurately identify the target question-answer pairs under the first interaction scenario. For another example, the second interaction scenario is an interaction scenario corresponding to a first-level function of a service product, and the first interaction scenario is an interaction scenario corresponding to a sub-function under the first-level function. In this way, the training samples obtained according to the second historical conversation information have a wider range, and the question-answering model trained with the training samples can not only adapt to the first interaction scenario, but also adapt to other sub-interaction scenarios under the second interaction scenario, and has better versatility.

[0065] Of course, the above is only an exemplary description. The relationship between the second interaction scene corresponding to the second historical session information and the first interaction scene is not limited to this in actual applications. For example, the second interaction scene can also be an interaction scene of the same type that has a very high similarity to the first interaction scene, and the specific form can be selected according to actual needs.

[0066] In actual applications, when users use the question-and-answer service provided by the service product, the reply information output to users through the automatic reply function is usually a preset formatted machine reply information, and the user and the customer service staff usually use spoken manual dialogue, which results in a large amount of content in the generated session information that is not suitable for direct use as training samples. Therefore, before obtaining training samples based on the second historical session information, the server can also identify and remove redundant historical session information and preset machine reply information in the second historical session information to improve the accuracy of the training samples.

[0067] There is no limitation on the specific method of removing redundant historical session information. Optionally, the server can only perform text recognition on the second historical session information and determine the historical session information with exactly the same content as redundant historical session information; or the server can also perform semantic recognition on the second historical session information and determine the historical session information with the same or similar semantics as redundant historical session information; then, through deduplication processing, only one copy of the corresponding historical session information is retained as a training sample. Accordingly, there is no limitation on the specific method of removing the preset machine reply information. Optionally, a corresponding machine identifier can be set for the preset machine reply information. Based on this, when removing the preset machine reply information, the server can identify the second historical session information, determine the reply information with the corresponding machine identifier as the preset machine reply information and delete it.

[0068] Based on the above, the server can obtain training samples for model training from the processed second historical session information. Two obtaining methods are used as examples for exemplary description below.

[0069] In an optional manner, a first mining model is pre-set, and the first mining model is used to mine the corresponding first historical question-answer pairs from the global dimension and the local dimension for the input session information. Based on this, the server can first input the second historical session information into the preset first mining model, and then obtain at least one global first historical question-answer pair mined from the global dimension by the first mining model, and at least one local first historical question-answer pair associated with each global first historical question-answer pair mined from the local dimension as training samples for model training. It can be understood that each global first historical question-answer pair mined from the second historical session information by the first mining model, and at least one local first historical question-answer pair associated with each global first historical question-answer pair, can be directly used as training samples for model training.

[0070] In another optional manner, a second mining model is pre-set, and the second mining model is used to mine the corresponding second historical question-answer pairs from the global dimension and the local dimension for the input session information. Based on this, the server can input the second historical session information into the preset second mining model, and obtain at least one global second historical question-answer pair mined by the second mining model from the global dimension, and at least one local second historical question-answer pair associated with each global second historical question-answer pair mined from the local dimension; further, based on at least one global second historical question-answer pair and at least one local second historical question-answer pair associated with each global second historical question-answer pair, at least one global first historical question-answer pair and at least one local first historical question-answer pair associated with each global first historical question-answer pair can be obtained through a marking operation as training samples for model training. It can be understood that each global second historical question-answer pair mined from the second historical session information by the second mining model, and at least one local second historical question-answer pair associated with each global second historical question-answer pair, are not suitable for being directly used as training samples for model training. After the user's marking operation, training samples suitable for being directly used as model training are screened out.

[0071] In the above example, the specific forms of the first mining model and the second mining model are not limited. Optionally, a machine learning model independently developed by the enterprise can be used, or an open source large model (Large Language Model, LLM) can be used. Among them, the specific types of the first mining model and the second mining model are also limited. According to different actual usage requirements, the selected model type can also be different. For example, taking the use of an open source large model as an example, the Qwen-7b-Chat large model can be selected as the first mining model and the second mining model. Of course, this is only an exemplary description and is not limited to this.

[0072] It should be noted that no matter which model is used as the first mining model or the second mining model, the models used have text and semantic recognition capabilities. Based on this, after the second historical session information is input, the corresponding model can identify whether the customer service staff has solved the questions raised by the historical users based on the semantics of the text, so as to output the question information and reply information corresponding to the solved questions as the question-answer pairs that need to be mined.

[0073] Optionally, when mining the corresponding question-answer pairs using the first mining model or the second mining model, the corresponding question-answer pairs may be obtained by using a multi-step prompting method. For example, when mining the global first historical question-answer pairs and their associated local first historical question-answer pairs from the second historical session information using the first mining model, a preset first global prompt word may be input into the first mining model, so that the first mining model mines the corresponding global first historical question-answer pairs from the second historical session information according to the first global prompt word; correspondingly, at least one preset first local prompt word associated with the first global prompt word may be input into the first mining model in sequence, so that the first mining model mines the corresponding local first historical question-answer pairs from the second historical session information according to each first local prompt word. For another example, when using the second mining model to mine global second historical question-answer pairs and their associated local second historical question-answer pairs from the second historical conversation information, a preset second global prompt word can be input into the second mining model so that the second mining model can mine the corresponding global second historical question-answer pairs from the second historical conversation information based on the second global prompt word; accordingly, at least one preset second local prompt word associated with the second global prompt word can be input into the second mining model in sequence so that the second mining model can mine the corresponding local second historical question-answer pairs from the second historical conversation information based on each second local prompt word.

[0074] Taking the interaction scenario corresponding to the use of the question-and-answer service by internal technical personnel of an enterprise as an example, the process of mining the global first historical question-and-answer pair and its associated local first historical question-and-answer pair from the historical conversation information in the corresponding interaction scenario by the first mining model is exemplified below.

[0075] Assume that the historical conversation information between the technician and the customer service staff includes the following contents:

[0076] Technician: (Initiating a Q&A service for a log corresponding to function G) Hello, this log asynchronous chemical order has been configured with JDK8 related parameters before. I see that the newly scanned parameter is for JDK11, but G application is still JDK8. I understand that there is no need to process it again (the technician inputs a picture showing the parameters, the link is xxx);

[0077] Customer Service: Wait a moment, let me check.

[0078] Technician: OK, thank you.

[0079] Customer Service: Hello, does this risk have any impact on you? If not, do not do anything yet. The network is blocked today, and the H department will release a solution tomorrow.

[0080] Technician: I want to pre-send the product for acceptance, but now I am stuck here and cannot move forward.

[0081] Customer service staff: You can first click [Emergency Release] (customer service staff enter the access link yyy for the emergency release);

[0082] Technical staff: Okay, I understand. This rule will be optimized later, right?

[0083] Customer service staff: Yes;

[0084] Technician: OK, that's all right for me, thank you.

[0085] Customer Service: That's it for now. Thank you for your feedback! If you have any questions, please feel free to contact us. Please rate my service later. Thank you very much for your cooperation. I wish you a happy work.

[0086] Based on the above, after the corresponding historical conversation information is input into the first mining model, a first global prompt word is input into the first mining model in a step-by-step prompting manner: "Please mine the question-answer pairs involved in the above conversation information from a global dimension."

[0087] Based on this, the first mining model can mine the global first historical question-answer pair corresponding to the above historical conversation information from a global dimension according to the first global prompt word.

[0088] Assume that the global first historical question-answer pair output after mining is as follows:

[0089] Question: Why are the newly scanned parameters of function G JDK11, while the currently applied parameters are still JDK8?

[0090] Reply message: The network is currently blocked. You can click [Emergency Release] first and the H department will handle it later.

[0091] Furthermore, with respect to the above historical conversation information, a first local prompt word is input into the first mining model: "Please mine the question-answer pairs involved in the above conversation information from a local dimension."

[0092] Based on this, the first mining model can mine at least one local first historical question-answer pair associated with the above-mentioned global first historical question-answer pair from a local dimension according to the first local prompt word.

[0093] Assume that the multiple local first historical question-answer pairs output after mining are as follows:

[0094] Local First History Question and Answer 1:

[0095] Question: The parameters applied by function G are inconsistent with the parameters scanned. Is there any solution?

[0096] Reply message: The network is currently blocked, so please do nothing for now. Department H will handle it later.

[0097] Part 1 History Question and Answer 2:

[0098] Question: I want to pre-send the acceptance, but now I can’t proceed. What should I do?

[0099] Reply to the message: first click [Urgent Release]: access link yyy.

[0100] Part 1 History Question and Answer 3:

[0101] Question: Will the processing rules for inconsistencies between the parameters applied by function G and the parameters scanned be optimized?

[0102] Reply message: Will optimize.

[0103] Based on this, the mined global first historical question and answer pair and its associated local first historical question and answer pair 1, local first historical question and answer pair 2 and local first historical question and answer pair 3 are used together as training samples in the training samples. After model training, a question and answer model adapted to the above-mentioned interaction scenario can be obtained.

[0104] It should be noted that in the above example, only part of the historical conversation information in an interactive scenario is taken as an example to illustrate the process of mining the global first historical question and answer pair and the local first historical question and answer pair by the first mining model. However, in actual applications, the second historical conversation information obtained may include historical conversation information generated by multiple users using the question and answer service, and the questions involved and the corresponding question information and reply information may also be more complex. However, the process of mining the global first historical question and answer pair and the local first historical question and answer pair based on the corresponding historical conversation information, or mining the global second historical question and answer pair and the local second historical question and answer pair has the same implementation principle as the above example. Please refer to the above example for details, and will not be repeated here.

[0105] Based on the above, after obtaining the training samples for model training, model training can be performed according to the training samples to obtain a question-answering model adapted to the first interaction scenario. Among them, one or more embodiments of this specification do not limit the type of algorithm used for model training. Optionally, the type of algorithm used includes but is not limited to traditional machine learning algorithms or various algorithms applicable to neural network models. The specific algorithm to be used can be selected based on the characteristics of the training samples. Based on this, after determining the appropriate algorithm, the training samples can be trained by the corresponding algorithm to generate a question-answering model adapted to the first interaction scenario.

[0106] In one or more embodiments of the present specification, the specific method of generating the question-answering model adapted to the first interaction scenario is not limited. In an optional method, at least one global question-answering feature can be extracted from the global dimension according to the training sample, and at least one local question-answering feature associated with each global question-answering feature can be extracted from the local dimension. Then, based on the at least one global question-answering feature and at least one local question-answering feature associated with each global question-answering feature, model training is performed to obtain a question-answering model adapted to the first interaction scenario. In another optional method, based on the training sample, at least one global question-answering feature can be extracted from the global dimension, and at least one local question-answering feature associated with each global question-answering feature can be extracted from the local dimension. Then, based on the at least one global question-answering feature, model training is performed to obtain a corresponding global question-answering sub-model, and based on the at least one local question-answering feature associated with each global question-answering feature, model training is performed to obtain a corresponding local question-answering sub-model. Further, based on the global question-answering sub-model and the local question-answering sub-model, a question-answering model adapted to the first interaction scenario is generated.

[0107] Based on the above, after generating a question-and-answer model adapted to the first interactive scenario, the first historical session information obtained is input into the question-and-answer model, and the question-and-answer model can be used to mine at least one global target question-and-answer pair from the first historical session information, as well as at least one local target question-and-answer pair associated with each global target question-and-answer pair mined from the first historical session information. Further, by establishing a mapping relationship between the first interactive scenario and each global target question-and-answer pair and at least one local target question-and-answer pair associated with it, and inputting the question-and-answer mapping information corresponding to the corresponding mapping relationship into a preset question-and-answer knowledge base, it is used to provide question-and-answer services to users in the first interactive scenario.

[0108] Further optionally, before establishing a mapping relationship between the first interaction scenario and each global target question-answer pair and at least one local target question-answer pair associated with it, a quality assessment can be performed on each mined global target question-answer pair and at least one local target question-answer pair associated with it, so as to screen out the global target question-answer pair and at least one local target question-answer pair associated with it that has a higher degree of match with the corresponding question. Based on this, a mapping relationship with the first interaction scenario is established according to each global target question-answer pair and at least one local target question-answer pair associated with it after screening, and then the question-answer mapping information corresponding to the corresponding mapping relationship is input into a preset question-answer knowledge base, which can improve the accuracy of the question-answer pairs in the question-answer knowledge base, and help improve the retrieval efficiency and the accuracy of the retrieval results when providing question-answer services to users.

[0109] Optionally, any user who needs to use the question-and-answer service under the target service product can trigger the question-and-answer service and input the target question to be solved in the first interactive scenario. Based on this, the server can obtain the target question input by the user in response to the question-and-answer service being triggered. Optionally, the target question input by the user can be a question raised from a global dimension, or a question raised from a local dimension, or a question raised from a global dimension and a corresponding sub-question raised from a local dimension. The specific question can be determined based on actual conditions and is not limited here. Based on this, according to the acquired target question, an adapted global target question-and-answer pair and / or a local target question-and-answer pair can be retrieved from the question-and-answer knowledge base, and then, according to the retrieved global target question-and-answer pair and / or the local target question-and-answer pair, the target response information adapted to the target question is output.

[0110] It can be understood that the question-and-answer service method provided in one or more embodiments of this specification can mine historical question-and-answer pairs of global dimensions and historical question-and-answer pairs of local dimensions from a large amount of historical session information of the corresponding interaction scene (for example, the second historical session information in the above embodiment) through a preset mining model (for example, the first mining model or the second mining model in the above embodiment). Based on this, the mined historical question-and-answer pairs are used as training samples for model training, and a question-and-answer model with the ability to mine global question-and-answer pairs from a global dimension and local question-and-answer pairs from a local dimension can be trained. Further, by fine-tuning the question-and-answer model with historical session information in a specified interaction scene (for example, the first historical session information in the first interaction scene in the above embodiment), the accuracy of the question-and-answer model in mining global target question-and-answer pairs and local target question-and-answer pairs in the corresponding interaction scene can be improved. Furthermore, by constructing a question-and-answer knowledge base using the mined global target question-and-answer pairs and local target question-and-answer pairs, an automated question-and-answer service can be provided to users in the corresponding interaction scene.

[0111] It should be noted that, in the above-mentioned embodiment, the process of mining training samples from the second historical conversation information by means of the preset first mining model or the second mining model can be applied to a variety of scenarios in addition to being applied to the specified interaction scenario, that is, the second historical conversation information can be historical conversation information including corresponding to a variety of interaction scenarios. Based on this, by training the model with the mined training samples, a general question-and-answer model that is adapted to a variety of interaction scenarios can be trained. In this way, according to the specific application requirements, the general question-and-answer model can be fine-tuned using the historical conversation information in any target interaction scenario, without the need to train the question-and-answer model separately for the corresponding target interaction scenario, which helps to improve the processing efficiency of constructing a question-and-answer knowledge base.

[0112] The overall process of the question-and-answer service method based on historical conversation information provided by the above embodiment is briefly described below in conjunction with the accompanying drawings.

[0113] Figure 2 A flowchart of another question-and-answer service method based on historical session information provided in an embodiment of this specification, such as Figure 2 As shown, in this embodiment, before providing question and answer service to the user in the first interaction scenario, the global target question and answer pairs applicable to the first interaction scenario and their associated local target question and answer pairs can be input into the question and answer knowledge base by constructing a question and answer knowledge base process; further, by providing a question and answer service process, matching target question and answer pairs can be retrieved from the question and answer knowledge base, and corresponding reply information can be returned to the user.

[0114] like Figure 2 As shown, when constructing the question-and-answer knowledge base, the server can first obtain the second historical session information corresponding to the second interaction scenario, and then mine the global second historical question-and-answer pairs and their associated local second historical question-and-answer pairs from the second historical session information through a preset mining model; based on this, the mined global second historical question-and-answer pairs and their associated local second historical question-and-answer pairs are used as training samples and model training is performed, so as to obtain a question-and-answer model capable of mining question-and-answer pairs from global and local dimensions; further, by obtaining the first historical session information corresponding to the first interaction scenario and using the first historical session information to fine-tune the question-and-answer model, the global target question-and-answer pairs and their associated local target question-and-answer pairs adapted to the first interaction scenario can be mined through the question-and-answer model; finally, the mined global target question-and-answer pairs and their associated local target question-and-answer pairs are input into the question-and-answer knowledge base, so as to provide question-and-answer services to users in the first interaction scenario.

[0115] Based on the above, if Figure 2As shown, after the user triggers the question-and-answer service and inputs the target question in the corresponding first interaction scenario, the server can respond to the question-and-answer service triggered by the user and obtain the target question input by the user in the first interaction scenario; further, according to the target question, a matching target question-and-answer pair is retrieved in the question-and-answer knowledge base, and the reply information matching the target question can be determined and output to the user for viewing. Optionally, the reply information output to the user can be the reply information in the retrieved target question-and-answer pair, or it can be the reply information obtained after simple processing based on the reply information, and the specific form is not limited.

[0116] It should be noted that Figure 2 The process shown is only one implementation method of the question-and-answer service method provided in the embodiment of this specification, wherein the steps shown are only the core steps of the implementation method, and other method steps, such as processing the second historical session information, labeling the training samples, and quality assessment of the mined target question-and-answer pairs, are not shown here.

[0117] It should be further explained that, in this example, in order to understand the overall process of the above-mentioned question-and-answer service method as a whole, only an overview description is given. For the specific implementation details of each method step and the explanation of each object therein, please refer to the description of the corresponding part of the above-mentioned embodiment, which will not be repeated here.

[0118] In one or more implementations of the present specification, based on the historical conversation information of the corresponding interaction scenario, historical question and answer pairs of the global dimension and historical question and answer pairs of the local dimension can be mined therefrom; further, based on the mined historical question and answer pairs, a question and answer model with question and answer pair mining capability can be trained, and the required target question and answer pairs can be mined from the global dimension and the local dimension from the historical conversation information of the specified interaction scenario; based on this, the mined target question and answer pairs are input into the question and answer knowledge base, and question and answer services can be provided to users in the specified interaction scenario, which helps to improve the efficiency and accuracy of automated retrieval and reduce the workload of customer service personnel.

[0119] It can be understood that the above embodiments are only examples and can be modified in actual implementation. Those skilled in the art can understand that the modification methods of the above embodiments without creative labor fall within the protection scope of one or more embodiments of this specification and will not be repeated in the embodiments.

[0120] Based on the same inventive concept, one or more embodiments of this specification further provide a question-and-answer service device. Since the principle of solving the problem by the question-and-answer service device is similar to that of the aforementioned question-and-answer service method, the implementation of the question-and-answer service device can refer to the implementation of the aforementioned question-and-answer service method, and the repeated parts will not be repeated.

[0121] See also Figure 3 , Figure 3This is a structural block diagram of a question-answering service device provided in one or more embodiments of this specification. Figure 3 As shown, the question-answering service device 300 may include: a first acquisition module 301, a second acquisition module 302, a first processing module 303, and a second processing module 304.

[0122] The first acquisition module 301 is used to acquire the first historical session information in the first interaction scenario; the second acquisition module 302 is used to acquire at least one global target question and answer pair from the global dimension and at least one local target question and answer pair associated with each global target question and answer pair from the local dimension based on the first historical session information; the first processing module 303 is used to construct question and answer mapping information corresponding to the first interaction scenario based on each global target question and answer pair and at least one local target question and answer pair associated with it; the second processing module 304 is used to provide question and answer service in the first interaction scenario based on the question and answer mapping information.

[0123] In an optional embodiment, the second acquisition module 302 acquires at least one global target question-answer pair from a global dimension and at least one local target question-answer pair associated with each global target question-answer pair from a local dimension based on the first historical conversation information, and is used to: acquire training samples for model training, the training samples including at least one global first historical question-answer pair corresponding to the first interaction scenario and at least one local first historical question-answer pair associated with each global first historical question-answer pair; perform model training based on the training samples to obtain a question-answer model adapted to the first interaction scenario, the question-answer model being used to mine corresponding target question-answer pairs from global and local dimensions for the input conversation information; input the first historical conversation information into the question-answer model; and acquire at least one global target question-answer pair mined by the question-answer model from the global dimension and at least one local target question-answer pair associated with each global target question-answer pair mined from the local dimension.

[0124] In an optional embodiment, the second acquisition module 302 acquires training samples for model training, and is used to: acquire second historical session information; the second historical session information includes historical session information in the first interaction scenario; based on the second historical session information, acquire training samples for model training.

[0125] In an optional embodiment, the second acquisition module 302 acquires training samples for model training based on the second historical session information, and is used to: input the second historical session information into a preset first mining model, the first mining model being used to mine corresponding first historical question-answer pairs for the input session information from global dimensions and local dimensions respectively; acquire at least one global first historical question-answer pair mined by the first mining model from the global dimension, and at least one local first historical question-answer pair associated with each global first historical question-answer pair mined from the local dimension, as training samples for model training.

[0126] In an optional embodiment, the second acquisition module 302 acquires training samples for model training based on the second historical session information, and is used to: input the second historical session information into a preset second mining model, the second mining model being used to mine corresponding second historical question-answer pairs for the input session information from global dimensions and local dimensions respectively; acquire at least one global second historical question-answer pair mined by the second mining model from the global dimension, and at least one local second historical question-answer pair associated with each global second historical question-answer pair mined from the local dimension; based on at least one global second historical question-answer pair and at least one local second historical question-answer pair associated with each global second historical question-answer pair, acquire at least one global first historical question-answer pair and at least one local first historical question-answer pair associated with each global first historical question-answer pair through a marking operation as training samples for model training.

[0127] In an optional embodiment, before acquiring training samples for model training based on the second historical session information, the second acquisition module 302 is further used to: identify and remove redundant historical session information and preset machine reply information in the second historical session information.

[0128] In an optional embodiment, the second acquisition module 302 performs model training based on the training samples to obtain a question-answering model adapted to the first interaction scenario, and is used to: extract at least one global question-answering feature from the global dimension and at least one local question-answering feature associated with each global question-answering feature from the local dimension according to the training samples; perform model training based on at least one global question-answering feature and at least one local question-answering feature associated with each global question-answering feature to obtain a question-answering model adapted to the first interaction scenario.

[0129] In an optional embodiment, the second acquisition module 302 performs model training based on at least one global question and answer feature and at least one local question and answer feature associated with each global question and answer feature to obtain a question and answer model adapted to the first interaction scenario, and is used to: perform model training based on at least one global question and answer feature to obtain a corresponding global question and answer sub-model; and perform model training based on at least one local question and answer feature associated with each global question and answer feature to obtain a corresponding local question and answer sub-model; generate a question and answer model adapted to the first interaction scenario based on the global question and answer sub-model and the local question and answer sub-model.

[0130] In an optional embodiment, the first processing module 303 constructs question and answer mapping information corresponding to the first interaction scenario based on each global target question and answer pair and at least one local target question and answer pair associated therewith, and is used to: establish a mapping relationship between the first interaction scenario and each global target question and answer pair and at least one local target question and answer pair associated therewith; and input the mapping relationship as question and answer mapping information into a preset question and answer knowledge base.

[0131] In an optional embodiment, the second processing module 304 provides a question-and-answer service in the first interaction scenario based on the question-and-answer mapping information, and is used to: obtain a target question input for the first interaction scenario, the target question including questions raised from a global dimension and / or a local dimension; retrieve adapted global target question-and-answer pairs and / or local target question-and-answer pairs from a question-and-answer knowledge base based on the target question; and output target response information adapted to the target question based on the retrieved global target question-and-answer pairs and / or local target question-and-answer pairs.

[0132] It should be noted that the functional principles of each module in the above question-and-answer service device are the same as the implementation principles of the corresponding steps in the above question-and-answer service method. For details, please refer to the description of the corresponding parts in the above method embodiment, which will not be repeated here.

[0133] See also Figure 4 , Figure 4 This is a structural block diagram of an electronic device provided in one or more embodiments of this specification. Figure 4 As shown, the electronic device 400 may include a processor 401 and a memory 402; the memory 402 may be coupled to the processor 401. It is worth noting that the Figure 4 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0134] In a possible implementation, the functions of the question-answering service device 300 may be integrated into the processor 401. The processor 401 may be configured to perform the following operations:

[0135] Acquire first historical session information in a first interaction scenario;

[0136] According to the first historical session information, obtaining at least one global target question-answer pair from a global dimension, and obtaining at least one local target question-answer pair associated with each global target question-answer pair from a local dimension;

[0137] Constructing question-answer mapping information corresponding to the first interaction scenario according to each global target question-answer pair and at least one local target question-answer pair associated therewith;

[0138] According to the question-answer mapping information, a question-answer service is provided to the user in a first interaction scenario.

[0139] In another possible implementation, the question-answering service device 300 may be configured separately from the processor 401 . For example, the question-answering service device 300 may be configured as a chip connected to the processor 401 , and the question-answering service with the user may be implemented and provided to the user under the control of the processor 401 .

[0140] In addition, in some optional implementations, the electronic device 400 may also include: a communication module, an input unit, an audio processor, a display, a power supply, etc. It is worth noting that the electronic device 400 does not necessarily include Figure 4 In addition, the electronic device 400 may also include Figure 4 For components not shown, reference may be made to the prior art.

[0141] In some optional implementations, the processor 401 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device, which receives input and controls the operation of various components of the electronic device 400.

[0142] The memory 402 may be, for example, a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The memory 402 may store the information related to the question-answering service device 300, and may also store a program for executing the related information. The processor 401 may execute the program stored in the memory 402 to implement information storage or processing.

[0143] The input unit can provide input to the processor 401. The input unit is, for example, a key or a touch input device. The power supply can be used to provide power to the electronic device 400. The display can be used to display display objects such as images and text. The display can be, for example, an LCD display, but is not limited thereto.

[0144] The memory 402 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 402 may also be some other type of device. The memory 402 includes a buffer memory (sometimes referred to as a buffer). The memory 402 may include an application / function storage unit for storing application programs and function programs or processes for executing the operation of the electronic device 400 by the processor 401.

[0145] The memory 402 may also include a data storage unit for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit of the memory 402 may include various drivers for the communication function of the computer device and / or for executing other functions of the computer device (such as a messaging application, a contact book application, etc.).

[0146] The communication module is a transmitter / receiver that sends and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor 401 to provide input signals and receive output signals, which may be the same as in a conventional mobile communication terminal.

[0147] Based on different communication technologies, multiple communication modules may be provided in the same computer device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module (transmitter / receiver) is also coupled to a speaker and a microphone via an audio processor to provide an audio output via the speaker and receive an audio input from the microphone, thereby realizing a common telecommunication function. The audio processor may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor is also coupled to the processor 401, so that recording can be performed on the machine through the microphone, and the sound stored on the machine can be played through the speaker.

[0148] One or more embodiments of this specification also provide a computer-readable storage medium capable of implementing all the steps in the question-answering service method in the above embodiment. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all the steps in the question-answering service method in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0149] Acquire first historical session information in a first interaction scenario;

[0150] According to the first historical session information, obtaining at least one global target question-answer pair from a global dimension, and obtaining at least one local target question-answer pair associated with each global target question-answer pair from a local dimension;

[0151] Constructing question-answer mapping information corresponding to the first interaction scenario according to each global target question-answer pair and at least one local target question-answer pair associated therewith;

[0152] According to the question-answer mapping information, a question-answer service is provided to the user in a first interaction scenario.

[0153] Although one or more embodiments of this specification provide method operation steps such as embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative work. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).

[0154] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, devices (systems) or computer program products. Therefore, the embodiments of this specification may take the form of complete hardware embodiments, complete software embodiments or embodiments combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0155] One or more embodiments of the present specification are described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to one or more embodiments of the present specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0156] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0158] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0159] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. For those of ordinary skill in the art, the specific meaning of the above terms in one or more embodiments of this specification can be understood according to the specific circumstances.

[0160] It should be noted that, in the absence of conflict, one or more embodiments of this specification and the features in the embodiments may be combined with each other. One or more embodiments of this specification are not limited to any single aspect, nor to any single embodiment, nor to any combination and / or replacement of these aspects and / or embodiments. Moreover, each aspect and / or embodiment of one or more embodiments of this specification may be used alone or in combination with one or more other aspects and / or embodiments thereof.

[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of one or more embodiments of this specification, rather than to limit them. Although one or more embodiments of this specification have been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features may be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of one or more embodiments of this specification, and they should all be included in the scope of the claims and the specification of one or more embodiments of this specification.

[0162] One or more embodiments of this specification are described above in conjunction with optional implementation methods, but these implementation methods are only exemplary and serve only as an illustration. On this basis, multiple replacements and improvements can be made to one or more embodiments of this specification, all of which fall within the scope of protection of one or more embodiments of this specification.

Claims

1. A question-answering service method based on historical conversation information, characterized in that: include: Acquire first historical session information in a first interaction scenario; According to the first historical session information, obtaining at least one global target question-answer pair from a global dimension, and obtaining at least one local target question-answer pair associated with each global target question-answer pair from a local dimension; Constructing question-answer mapping information corresponding to the first interaction scenario according to each global target question-answer pair and at least one local target question-answer pair associated with it; A question and answer service in the first interaction scenario is provided according to the question and answer mapping information.

2. The method according to claim 1, characterized in that According to the first historical session information, obtaining at least one global target question-answer pair from a global dimension, and obtaining at least one local target question-answer pair associated with each global target question-answer pair from a local dimension, including: Acquire training samples for model training, wherein the training samples include at least one global first history question-answer pair corresponding to the first interaction scenario, and at least one local first history question-answer pair associated with each global first history question-answer pair; Performing model training based on the training samples to obtain a question-answering model adapted to the first interaction scenario, wherein the question-answering model is used to mine corresponding target question-answer pairs from a global dimension and a local dimension for the input session information; inputting the first historical conversation information into the question-answering model; and Obtain at least one global target question-answer pair mined from the global dimension by the question-answer model, and at least one local target question-answer pair mined from the local dimension and associated with each global target question-answer pair.

3. The method according to claim 2, characterized in that Get training samples for model training, including: Acquire second historical session information; the second historical session information includes historical session information in the first interaction scenario; Based on the second historical session information, training samples for model training are obtained.

4. The method according to claim 3, characterized in that Acquiring a training sample for model training based on the second historical session information includes: Inputting the second historical conversation information into a preset first mining model, wherein the first mining model is used to mine corresponding first historical question-answer pairs from a global dimension and a local dimension for the input conversation information; At least one global first historical question-answer pair mined from the global dimension by the first mining model, and at least one local first historical question-answer pair associated with each global first historical question-answer pair mined from the local dimension, are obtained as training samples for model training.

5. The method according to claim 3, characterized in that: Acquiring a training sample for model training based on the second historical session information includes: Inputting the second historical conversation information into a preset second mining model, where the second mining model is used to mine corresponding second historical question-answer pairs from a global dimension and a local dimension for the input conversation information; Acquire at least one global second historical question-answer pair mined by the second mining model from the global dimension, and at least one local second historical question-answer pair mined from the local dimension and associated with each global second historical question-answer pair; Based on the at least one global second historical question-answer pair, and the at least one local second historical question-answer pair associated with each global second historical question-answer pair, at least one global first historical question-answer pair and at least one local first historical question-answer pair associated with each global first historical question-answer pair are obtained through a marking operation as training samples for model training.

6. The method according to claim 3, characterized in that Before acquiring a training sample for model training based on the second historical session information, the method further includes: Redundant historical session information and preset machine reply information in the second historical session information are identified and removed.

7. The method according to claim 2, characterized in that Performing model training based on the training samples to obtain a question-answering model adapted to the first interaction scenario includes: Extracting at least one global question-answering feature from a global dimension according to the training sample, and extracting at least one local question-answering feature associated with each global question-answering feature from a local dimension; Model training is performed based on the at least one global question and answer feature and at least one local question and answer feature associated with each global question and answer feature to obtain a question and answer model adapted to the first interaction scenario.

8. The method according to claim 7, characterized in that Model training is performed based on the at least one global question-and-answer feature and at least one local question-and-answer feature associated with each global question-and-answer feature to obtain a question-and-answer model adapted to the first interaction scenario, including: Performing model training based on the at least one global question-answering feature to obtain a corresponding global question-answering sub-model; and Perform model training based on at least one local question-answering feature associated with each global question-answering feature to obtain a corresponding local question-answering sub-model; A question-answering model adapted to the first interaction scenario is generated based on the global question-answering sub-model and the local question-answering sub-model.

9. The method according to any one of claims 1 to 8, characterized in that: Constructing question-answer mapping information corresponding to the first interaction scenario according to each global target question-answer pair and at least one local target question-answer pair associated therewith, including: Establishing a mapping relationship between the first interaction scenario and each global target question-answer pair and at least one local target question-answer pair associated therewith; and The mapping relationship is input into a preset question-answer knowledge base as question-answer mapping information.

10. The method according to claim 9, characterized in that Providing a question-and-answer service in the first interaction scenario according to the question-and-answer mapping information includes: Obtaining a target question input for the first interaction scenario, wherein the target question includes a question raised from a global dimension and / or a local dimension; According to the target question, retrieving adapted global target question-answer pairs and / or local target question-answer pairs from the question-answer knowledge base; Based on the retrieved global target question-answer pairs and / or local target question-answer pairs, target response information adapted to the target question is output.

11. A question-answering service device based on historical conversation information, characterized in that: include: A first acquisition module, used to acquire first historical session information in a first interaction scenario; A second acquisition module, configured to acquire at least one global target question-answer pair from a global dimension and at least one local target question-answer pair associated with each global target question-answer pair from a local dimension according to the first historical session information; A first processing module, configured to construct question-answer mapping information corresponding to the first interaction scenario according to each global target question-answer pair and at least one local target question-answer pair associated therewith; The second processing module is used to provide a question and answer service in the first interaction scenario according to the question and answer mapping information.

12. The device according to claim 11, characterized in that The second acquisition module acquires at least one global target question-answer pair from a global dimension and acquires at least one local target question-answer pair associated with each global target question-answer pair from a local dimension according to the first historical session information, for: Acquire training samples for model training, wherein the training samples include at least one global first history question-answer pair corresponding to the first interaction scenario, and at least one local first history question-answer pair associated with each global first history question-answer pair; Performing model training based on the training samples to obtain a question-answering model adapted to the first interaction scenario, wherein the question-answering model is used to mine corresponding target question-answer pairs from a global dimension and a local dimension for the input session information; inputting the first historical conversation information into the question-answering model; and Obtain at least one global target question-answer pair mined from the global dimension by the question-answer model, and at least one local target question-answer pair mined from the local dimension and associated with each global target question-answer pair.

13. The device according to claim 12, characterized in that The second acquisition module acquires training samples for model training, and is used to: Acquire second historical session information; the second historical session information includes historical session information in the first interaction scenario; Based on the second historical session information, training samples for model training are obtained.

14. The device according to claim 13, characterized in that The second acquisition module acquires training samples for model training based on the second historical session information, and is used to: Inputting the second historical conversation information into a preset first mining model, wherein the first mining model is used to mine corresponding first historical question-answer pairs from a global dimension and a local dimension for the input conversation information; At least one global first historical question-answer pair mined from the global dimension by the first mining model, and at least one local first historical question-answer pair associated with each global first historical question-answer pair mined from the local dimension, are obtained as training samples for model training.

15. The device according to claim 13, characterized in that The second acquisition module acquires training samples for model training based on the second historical session information, and is used to: Inputting the second historical conversation information into a preset second mining model, where the second mining model is used to mine corresponding second historical question-answer pairs from a global dimension and a local dimension for the input conversation information; Acquire at least one global second historical question-answer pair mined by the second mining model from the global dimension, and at least one local second historical question-answer pair mined from the local dimension and associated with each global second historical question-answer pair; Based on the at least one global second historical question-answer pair, and the at least one local second historical question-answer pair associated with each global second historical question-answer pair, at least one global first historical question-answer pair and at least one local first historical question-answer pair associated with each global first historical question-answer pair are obtained through a marking operation as training samples for model training.

16. The device according to claim 13, characterized in that Before acquiring the training samples for model training based on the second historical session information, the second acquisition module is further used to: Redundant historical session information and preset machine reply information in the second historical session information are identified and removed.

17. The device according to claim 12, characterized in that The second acquisition module performs model training based on the training samples to obtain a question-answering model adapted to the first interaction scenario, and is used to: Extracting at least one global question-answering feature from a global dimension according to the training sample, and extracting at least one local question-answering feature associated with each global question-answering feature from a local dimension; Model training is performed based on the at least one global question and answer feature and at least one local question and answer feature associated with each global question and answer feature to obtain a question and answer model adapted to the first interaction scenario.

18. The device according to claim 17, characterized in that The second acquisition module performs model training based on the at least one global question-and-answer feature and at least one local question-and-answer feature associated with each global question-and-answer feature to obtain a question-and-answer model adapted to the first interaction scenario, for: Performing model training based on the at least one global question-answering feature to obtain a corresponding global question-answering sub-model; and Perform model training based on at least one local question-answering feature associated with each global question-answering feature to obtain a corresponding local question-answering sub-model; A question-answering model adapted to the first interaction scenario is generated based on the global question-answering sub-model and the local question-answering sub-model.

19. The device according to any one of claims 11 to 18, characterized in that: The first processing module constructs question-answer mapping information corresponding to the first interaction scenario according to each global target question-answer pair and at least one local target question-answer pair associated therewith, for: Establishing a mapping relationship between the first interaction scenario and each global target question-answer pair and at least one local target question-answer pair associated therewith; and The mapping relationship is input into a preset question-answer knowledge base as question-answer mapping information.

20. The device according to claim 19, characterized in that The second processing module provides a question-and-answer service in the first interaction scenario according to the question-and-answer mapping information, for: Obtaining a target question input for the first interaction scenario, wherein the target question includes a question raised from a global dimension and / or a local dimension; According to the target question, retrieving adapted global target question-answer pairs and / or local target question-answer pairs from the question-answer knowledge base; Based on the retrieved global target question-answer pairs and / or local target question-answer pairs, target response information adapted to the target question is output.

21. An electronic device, characterized in that: The electronic device comprises: A memory for storing a computer program product; A processor is used to execute the computer program product stored in the memory, and when the computer program product is executed, the method described in any one of claims 1 to 10 is implemented.

22. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, which, when executed, implement the method described in any one of claims 1 to 10.

Citation Information

Cited By

  • Question and answer search method and device and storage medium

    CN116361638A

  • Question and answer search method and device, and storage medium

    CN116361638B