Replay recommendation method and device, electronic equipment, storage medium and program product
By obtaining the above-mentioned questions, dialogue and searching information, searching based on the historical session pairs of the target database, and generating personalized recommendation replies, solving the problem of insufficient accuracy and adaptability of reply recommendations in the existing technology, and achieving more efficient reply recommendation effects.
Patent Information
- Application Number
- CN202510167920.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-06-06
AI Technical Summary
The prior art is difficult to ensure accuracy when recommending replies, especially in the adaptability and personalized processing between different replies objects.
By obtaining the above-mentioned questions, conversations and searching information, searching based on the target database, generating rich recommendation responses. The target database is established based on the historical session pairs of each reply object and contains related information related to the question.
Improve the accuracy and personalized adaptability of recommended responses to ensure that the responses can effectively respond to user questions.
Smart Images

Figure CN120104740A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of information recommendation technology, large model technology, and large language model technology, and specifically to a reply recommendation method, device, electronic device, storage medium, and program product. Background Art
[0002] With the rapid development of technology and the Internet, online customer service systems have become an indispensable part of most companies. Their efficiency and quality directly affect the business conversion and customer satisfaction of enterprises. In order to improve the efficiency of manual customer service responses, the response content is generally recommended, and the manual response to the corresponding question is given based on the recommended response content. Therefore, it involves the issue of accurately recommending the response content. Summary of the invention
[0003] In view of this, the present disclosure provides a reply recommendation method, device, electronic device, storage medium and program product to solve the problem of accuracy of recommended replies.
[0004] In a first aspect, the present disclosure provides a reply recommendation method, the method comprising:
[0005] Obtaining a first question and a conversation context of the first question;
[0006] Obtaining first search information for the first question;
[0007] Based on the first question and the first search information, a search is performed in a target database to obtain related information corresponding to the first question, wherein the target database is obtained based on first historical conversation pairs corresponding to each reply object;
[0008] A recommended response to the first question is generated based on first information and the associated information, wherein the first information includes the first question, the conversation context, and the first search information.
[0009] In a second aspect, the present disclosure provides a reply recommendation device, the device comprising:
[0010] A first acquisition module, used to acquire a first question and a conversation context of the first question;
[0011] A second acquisition module, used to acquire first search information for the first question;
[0012] a retrieval module, configured to search a target database based on the first question and the first search information to obtain associated information corresponding to the first question, wherein the target database is obtained based on first historical conversation pairs corresponding to each reply object;
[0013] A recommendation module is used to generate a recommended response to the first question based on the first information and the related information, wherein the first information includes the first question, the conversation context and the first search information.
[0014] In a third aspect, the present disclosure provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the reply recommendation method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0015] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the reply recommendation method of the first aspect or any corresponding embodiment thereof.
[0016] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, which are used to enable a computer to execute the reply recommendation method of the above-mentioned first aspect or any corresponding embodiment thereof.
[0017] The reply recommendation method provided by the disclosed embodiment obtains a first question, a conversation context of the first question, and first search information for the first question, and then searches a target database based on the first question and the first search information to obtain related information corresponding to the first question, wherein the target database is obtained based on the first historical conversation pair corresponding to each reply object; and generates a recommended reply for the first question based on the first information and the related information. The recommended reply generated in this method relies on relatively rich information, the conversation context of the first question helps to understand the preceding content of the entire conversation, the first search information of the first question helps to understand the preparation information for the reply to the first question, and the related information represents the information related to the first question obtained from the first historical conversation pair. By using this information related to the first question as the basis for generating the recommended reply, the accuracy of the recommended reply can be guaranteed.
[0018] For the beneficial effects of the reply recommendation device, electronic device, storage medium, and computer program product provided by the embodiments of the present disclosure, please refer to the description of the corresponding beneficial effects of the reply recommendation method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 is a schematic diagram of an optional application scenario according to an embodiment of the present disclosure;
[0021] Figure 2 is a flowchart of a reply recommendation method according to an embodiment of the present disclosure;
[0022] Figure 3 is a flowchart of another reply recommendation method according to an embodiment of the present disclosure;
[0023] Figure 4 is a schematic diagram of a reply recommendation according to an embodiment of the present disclosure;
[0024] Figure 5 is a structural block diagram of a reply recommendation device according to an embodiment of the present disclosure;
[0025] Figure 6 It is a schematic diagram of the hardware structure of the electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0027] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0028] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0029] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0030] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0031] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0032] In the related art, based on preset business rules and scenario templates, the reply object (agent) is given a corresponding recommended reply. In this way, due to the fixed scenario template, the replies given by different reply objects are relatively consistent, which makes it difficult to adapt to different reply objects. In addition, in a broad business scenario, different reply objects have personalized processing ideas. Therefore, it is necessary to provide a reply recommendation method to provide recommended replies adapted to each reply object.
[0033] As an optional application scenario of the embodiment of the present disclosure, Figure 1 As shown, a communication application is installed in the terminal 100, and the reply object realizes a dialogue with the question object by interacting with the communication application of the terminal 100. The question raised by the question object is displayed on the interface of the communication application. The terminal 100 obtains the recommended reply generated by the server 200 through the communication connection with the server 200, and displays it on the interface of the question object. Accordingly, the reply object edits or directly adopts the recommended reply, etc., and uses it as a reply to the question raised, and replies through the communication application. Among them, the server 200 generates the recommended reply by executing the reply recommendation method provided in the embodiment of the present disclosure.
[0034] According to an embodiment of the present disclosure, an embodiment of a reply recommendation method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0035] In this embodiment, a reply recommendation method is provided, which can be used in the above-mentioned electronic device, such as a server. Figure 2 is a flowchart of a reply recommendation method according to an embodiment of the present disclosure. Figure 2 As shown, the process includes the following steps:
[0036] Step S201, obtaining the first question and the conversation context of the first question.
[0037] The two parties in this round of dialogue include the reply object and the question object, and information is exchanged through the communication application. For example, in the communication application, the reply object has a corresponding identifier 1, and the question object has a corresponding identifier 2. On the interface of the communication application, the corresponding dialogue content is displayed after each corresponding identifier.
[0038] The questioner and the respondent may ask and respond to multiple questions in this round of dialogue. The question currently being consulted is called the first question. In addition, multiple questions and responses have been asked before the first question, that is, question 1-response 1, question 2-response 2, question 3-response 3, current question-?, where the current question given by the questioner is the first question, and question 1-response 1, question 2-response 2, and question 3-response 3 are called the dialogue context of the first question.
[0039] Step S202: Obtain first search information for the first question.
[0040] The first question is displayed on the interface of the communication application. In order to give an accurate reply to the first question, the reply object may interact with the terminal and query relevant information for the first question. Accordingly, the first search information for the first question can be obtained. For example, the first question is about the product warranty. For this question, the warranty period, warranty conditions, etc. can be queried first to obtain the first search information.
[0041] Furthermore, the first search information can also be understood as preparation information for a reply to the first question, and the reply given subsequently is related to the preparation information.
[0042] The first search information may be obtained by obtaining corresponding interactive information based on the identifier of the reply object, or by performing image analysis on the search page. Of course, other methods may also be used to obtain the information, which is not limited here.
[0043] Step S203: searching in the target database based on the first question and the first search information to obtain related information corresponding to the first question.
[0044] The target database is obtained based on the first historical conversation pairs corresponding to each reply object.
[0045] In the reply scenario, there may be multiple reply objects, and each reply object has a conversation with at least one question object. Then, the historical conversation between each reply object and the corresponding question object is called the first historical conversation pair, that is, question-reply. Based on these first historical conversation pairs, relevant information can be extracted to obtain the target database. For example, the questions in the first historical conversation pairs can be classified to obtain the reply strategy for the same type of questions; or the replies of each reply object can be analyzed to determine the personalized reply information corresponding to each reply object, including but not limited to the use of modal particles, sentence order, etc.
[0046] The target database may be stored according to the type of question, or according to the identifier of the reply object, or the target database may also include processing strategies for unsolvable problems, etc. There is no limitation on the data stored in the target database, and it can be set according to actual needs.
[0047] After obtaining the first question and the first search information, the target database can be searched based on the two to obtain the related information corresponding to the first question. Since the first question is usually relatively broad, the search scope can be narrowed by combining the first search information. Accordingly, the target database can be searched to obtain the related information corresponding to the first question and accurate.
[0048] The associated information includes, but is not limited to, a processing strategy for similar questions to the first question, personalized information corresponding to the identifier of the current reply object corresponding to the first question, etc. It may also be other information related to the first question, which is not limited here.
[0049] Step S204: Generate a recommended response to the first question based on the first information and the associated information.
[0050] The first information includes the first question, the conversation context and the first search information.
[0051] Generate a recommended reply based on the first question, the conversation context, the first search information, and the related information obtained in the above steps S201-S203. For example, the recommended reply can be obtained by a reply generation model constructed based on a language model, the input of the reply generation model includes the first information, the related information, and the prompt word, and the output includes a recommended reply for the first question.
[0052] For example, prompt words can be obtained based on a prompt template, which includes fixed descriptions and variables. The fixed descriptions are used to indicate the role played by the response generation model and the things that need to be completed. The variables include first information and associated information, that is, variable names are set in corresponding positions of the prompt template. In different scenarios, the same variable name corresponds to different values. Therefore, prompt words corresponding to different scenarios can be generated through the prompt template.
[0053] The input of the response generation model may also include other information, for example, information of upstream objects or downstream objects related to the question object in the first question. If the question object is a commodity, the upstream object may be information of the manufacturer that produces the commodity, and the downstream object may be logistics information of the commodity, etc. There is no limitation on the content included in the input of the response generation model, and it can be set according to actual needs.
[0054] The reply recommendation method provided in this embodiment relies on relatively rich information to generate recommended replies. The conversation context of the first question helps to understand the preceding content of the entire conversation. The first search information of the first question helps to understand the preparation information for the reply to the first question. The associated information represents the information related to the first question obtained from the first historical conversation pair. By using this information related to the first question as the basis for generating recommended replies, the accuracy of the recommended replies can be guaranteed.
[0055] In this embodiment, a reply recommendation method is provided, which can be used in the above-mentioned electronic device, such as a server. Figure 3 is a flowchart of a reply recommendation method according to an embodiment of the present disclosure. Figure 3 As shown, the process includes the following steps:
[0056] Step S301, obtain the first question and the conversation context of the first question. Figure 2 Step S201 of the illustrated embodiment will not be described in detail here.
[0057] Step S302: Obtain first search information for the first question. Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.
[0058] Step S303: search in the target database based on the first question and the first search information to obtain related information corresponding to the first question.
[0059] The target database is obtained based on the first historical conversation pairs corresponding to each reply object. Specifically, the target database includes a first database and a second database, the first database is used to store the second historical conversation pairs and the historical search information corresponding to the second historical conversation pairs, the second historical conversation pairs are used to represent the conversation pairs that meet the preset conditions in the first historical conversation; the second database is used to store the summary information obtained based on the first historical conversation pairs, and the summary information corresponds to the reply object.
[0060] The first database is obtained based on the second historical conversation pairs. In the first historical conversation pairs, there may be some replies that can solve related problems, and there may also be replies that cannot solve related problems, etc. Therefore, it is necessary to screen the first historical conversation pairs to obtain conversation pairs that meet the preset conditions, namely, the second historical conversation pairs.
[0061] The historical search information corresponding to the second historical conversation pair is used to represent the information obtained by searching before replying to the historical question in the second historical conversation pair, that is, the preparation information for replying to the historical question in the second historical conversation pair. After associating the second historical conversation pair with the corresponding historical search information, the information is stored in the database, thus obtaining the first database.
[0062] The second database stores summary information obtained based on the first historical conversation pairs, and the first historical conversation pairs are related to each reply object, that is, according to the identifier of each reply object, the corresponding first historical conversation pairs are stored, and the first historical conversation pairs are summarized to obtain summary information corresponding to the identifier of each reply object. That is, the summary information corresponding to the reply object one by one is stored in the second database.
[0063] Optionally, the summary information may be obtained based on a summary model, and the summary model may be obtained based on a language model. The input of the summary model includes the first historical conversation pair and the prompt word, and the output includes the corresponding summary information. The generation method of the prompt word is shown above and will not be repeated here.
[0064] The target database includes a first database and a second database. The first database stores conversation pairs that meet preset conditions. Since the first historical conversation pairs are screened before storage, the amount of stored data is reduced while ensuring storage requirements. The second database stores summary information corresponding to the reply object, which enables subsequent recommended replies to be related to the style of the reply object.
[0065] Specifically, the above step S303 includes:
[0066] Step S3031: Based on the first question and the first search information, query the first database to obtain the first conversation content.
[0067] The first question and the first search information can be used as search keywords to search in the first database to obtain corresponding query results, that is, the first conversation content.
[0068] The first conversation content includes but is not limited to the processing strategy in the queried second historical conversation pair, the subsequent processing method for the unprocessable problem, and the like.
[0069] In some optional implementations, the above step S3031 includes:
[0070] Step a1, obtaining a first query key based on the first question and the first search information.
[0071] Step a2: query the first database based on the first query key to obtain the first conversation content.
[0072] The first question and the first search information can be firstly concatenated and then preprocessed to obtain a standard question corresponding to the first question, that is, to obtain a first query key. The preprocessing can be to first match the content after the text concatenation in the standard question library to obtain the corresponding standard question, and then obtain the first query key based on the standard question. Alternatively, the first query key can be obtained directly based on the result of the text concatenation. After obtaining the first query key, a query is performed in the first database to obtain the first conversation content.
[0073] The first query key is generated by using the first question and the first search information, and a variety of query keys can be used to search in the first database, so as to accurately locate the corresponding first conversation content.
[0074] Step S3032: Based on the identifier of the current reply object, query the second database to obtain first summary information.
[0075] The associated information includes the first conversation content and the first summary information.
[0076] As described above, the second database is used to store summary information corresponding to the identifiers of the reply objects. Based on this, the identifier of the current reply object corresponding to the first question is used to query the second database to obtain the first summary information.
[0077] like Figure 4As shown, the historical conversation pairs and other relevant information of each reply object are stored in the form of logs to obtain historical logs. The first historical log is processed by the first database processing module and the second database processing module (which can be the summary model described above) to obtain the corresponding first database and second database. In an actual application scenario, the first database is queried through the first question and the first search information, and the first conversation content is obtained at the first recall layer; the second database is queried through the identifier of the current reply object, and the summary information of the current reply object is obtained at the second recall layer. Combined with the conversation context, the first question, the first search information, the first conversation content and the summary information of the current reply object, the recommended reply is obtained through the recommended reply generation module (which can be the reply generation model described above).
[0078] Step S304: Generate a recommended response to the first question based on the first information and the associated information.
[0079] The first information includes the first question, the previous conversation and the first search information. Figure 2 The description of step S204 of the illustrated embodiment will not be repeated here.
[0080] The reply recommendation method provided in this embodiment searches the first database according to the first question and the first search information to obtain the first conversation content, which represents the historical processing strategy related to the first question; searches the second database using the identifier of the current reply object to obtain the processing style of the current reply object. Using the historical processing strategy and processing style as related information, it is possible to quickly and accurately generate recommended replies.
[0081] In some optional implementations, the above reply recommendation method includes:
[0082] Step b1, obtaining a first historical conversation pair and feedback information for the first historical conversation pair.
[0083] Step b2: analyzing the first historical conversation pair to determine a processing strategy for the first historical problem in the first historical conversation pair.
[0084] Step b3: based on the processing strategy and the feedback information, the first historical conversation pair is screened to obtain a second historical conversation pair.
[0085] After each conversation ends, feedback interaction information can be provided on the interface of the communication application to obtain feedback information for the first historical conversation pair, wherein the feedback information includes but is not limited to the score or comment information of the questioner for this conversation.
[0086] Since the first historical conversation pair is conducted for the first historical question, whether the first historical conversation pair can solve the first historical question represents the effect of this conversation. That is, the first historical conversation pair is analyzed to determine the processing strategy for the first historical question. The processing strategy includes but is not limited to whether the corresponding historical question is solved in one seat, whether the reply object is transferred, and the corresponding processing method if the transfer does not occur.
[0087] After obtaining the processing strategy and feedback information, the weights of the two can be combined to obtain the score of the first historical conversation pair. Alternatively, the preset condition can include multiple screening sub-conditions, and the processing strategy and feedback information can be compared with the corresponding screening sub-conditions to obtain the historical conversation pair that meets the preset condition, that is, the second historical conversation pair.
[0088] The feedback information of the first historical conversation pair represents the evaluation of whether the replies in the first historical conversation pair solve the corresponding problem. The processing strategy for the first historical problem can represent whether the first historical problem can be solved at one time, etc. Combining the processing strategy and the feedback information can represent whether the first historical conversation pair is an excellent case for screening to obtain the second historical conversation pair.
[0089] In some optional implementations, the above reply recommendation method includes:
[0090] Step c1, obtaining a second historical question in a second historical conversation pair and second search information for the second historical question.
[0091] Step c2, forming a second query key based on the second historical question and the second search information.
[0092] Step c3: establishing an association relationship between the second query key and the second historical conversation pair to obtain the first database.
[0093] Combination Figure 4 As shown, in the first database processing module, the first historical conversation pair in the historical log is first screened to obtain the second historical conversation pair, and then the second historical conversation pair is processed to obtain the first database. Specifically, the second historical question in the second historical conversation pair and the second search information generate the second query key, and the association relationship between the second query key and the second historical conversation pair is established to obtain the first database. That is, the data in the first database is stored in the form of key-value pairs.
[0094] The first database is stored in the form of key-value pairs, and the second query key in the first database is formed based on the second historical question and the second search information, and has rich query information.
[0095] In some optional implementations, the above-mentioned reply recommendation method includes:
[0096] Step d1, obtaining the first historical conversation pair corresponding to each reply object.
[0097] Step d2: obtaining historical feedback of responses to the historical recommendations involved in the first historical session.
[0098] Step d3: performing a conversation summary based on the first historical conversation pair and the historical feedback to obtain second summary information.
[0099] Step d4, establishing an association relationship between the identifier of each reply object and the corresponding second summary information to obtain a second database.
[0100] The second database may be established offline, for example, in an idle time period, by combining historical logs to generate or update the generated second database. As described above, the second database represents a one-to-one correspondence between the identifier of the reply object and the summary information.
[0101] Specifically, for the first historical conversation pair of each reply object, since the reply in the first historical conversation pair is also given based on the corresponding historical recommended reply, the difference between the actual reply in the first historical conversation pair and the historical recommended reply is used to characterize the historical feedback of the historical recommended reply. For example, the actual reply is the same as the historical recommended reply, or the actual reply is modified based on the historical recommended reply, or the actual reply is completely different from the historical recommended reply, etc. That is, these historical feedbacks are used to characterize the historical recommended replies and accuracy.
[0102] Combination Figure 4 As shown, based on the second data block processing module, the first historical conversation pair and the historical feedback are summarized to obtain second summary information, and then an association relationship between the identifier of the corresponding reply object and the second summary information is established to obtain a second database.
[0103] The historical feedback of the historical recommendation replies involved in the first historical conversation represents the adoption of the historical recommendation replies by the reply objects, and represents the accuracy of the automatically generated historical recommendation replies. The second summary information is then obtained by summarizing the conversation in combination with the first historical conversation, thereby ensuring that the processing style and other content of each reply object can be stored in the second database.
[0104] In some optional implementations, the above-mentioned reply recommendation method includes:
[0105] Step e1, obtaining the latest historical conversation pairs corresponding to each reply object and feedback on the recommended reply.
[0106] Step e2: based on the latest historical conversation pairs and feedback on the recommended responses, the target database is updated to obtain an updated target database.
[0107] The generated first database and second database can be updated regularly or according to preset requirements. Specifically, for the latest historical conversation pairs corresponding to each reply object and the feedback for the recommended reply, the historical log can be updated, and the earliest historical conversation pairs and corresponding feedback in the historical log can be deleted to obtain an updated historical log. Then, according to the method shown above, the corresponding database is updated in combination with the updated historical log to obtain an updated target database.
[0108] Timely updates are carried out for the target database to ensure that the automatically generated recommendation responses meet the latest business specifications and actual needs.
[0109] As a specific application embodiment of the disclosed embodiment, in a shopping scenario, a user (questioning object) and a human agent (replying object) conduct a conversation through a corresponding conversation application. After the user gives a consulting question, it is displayed on the interface of the conversation application. Based on the consulting question, the human agent can first query the relevant information to obtain search information, and then query the related information in combination with the established first database and the second database. Finally, a recommended reply to the consulting question is generated in combination with the consulting question, the conversation context of the consulting question, and related information. The recommended reply can be displayed on an interface visible to the human agents of both parties in the conversation. Depending on the actual scenario, the human agent can directly use the recommended reply to feedback to the user, or can modify the recommended reply and reply, etc. After the reply is given, the reply to the consulting question is displayed on the interface of the conversation application, and the reply is visible to both the human agent and the user.
[0110] In this embodiment, a reply recommendation device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0111] This embodiment provides a reply recommendation device, such as Figure 5 As shown, including:
[0112] The first acquisition module 501 is used to acquire the first question and the conversation context of the first question.
[0113] The second acquisition module 502 is used to acquire first search information for the first question.
[0114] The retrieval module 503 is used to search in the target database based on the first question and the first search information to obtain the associated information corresponding to the first question. The target database is obtained based on the first historical conversation pairs corresponding to each reply object.
[0115] The recommendation module 504 is used to generate a recommended response to the first question based on the first information and the associated information, where the first information includes the first question, the previous conversation context, and the first search information.
[0116] In some optional implementations, the target database includes a first database and a second database;
[0117] The first database is used to store the second historical conversation pairs and the historical search information corresponding to the second historical conversation pairs, the second historical conversation pairs are used to characterize the conversation pairs that meet the preset conditions in the first historical conversations; the second database is used to store the summary information obtained based on the first historical conversation pairs, and the summary information corresponds to the reply object.
[0118] In some optional implementations, the retrieval module 503 includes:
[0119] The first query unit is used to query the first database based on the first question and the first search information to obtain the first conversation content.
[0120] The second query unit is used to query the second database based on the identifier of the current reply object to obtain the first summary information, where the associated information includes the first conversation content and the first summary information.
[0121] In some optional implementations, the first query unit includes:
[0122] The first query key subunit is used to obtain a first query key based on the first question and the first search information.
[0123] The first query subunit is configured to query the first database based on the first query key to obtain the first conversation content.
[0124] In some optional implementations, the reply recommendation device further includes:
[0125] The second acquisition module is used to acquire the first historical conversation pair and feedback information for the first historical conversation pair.
[0126] The analysis module is used to analyze the first historical conversation pair and determine a processing strategy for the first historical problem in the first historical conversation pair.
[0127] The screening module is used to screen the first historical conversation pair based on the processing strategy and the feedback information to obtain the second historical conversation pair.
[0128] In some optional implementations, the reply recommendation device further includes:
[0129] The third acquisition module is used to acquire the second historical question in the second historical conversation pair and the second search information for the second historical question.
[0130] The second query key module is used to form a second query key based on the second historical question and the second search information.
[0131] The first establishing module is used to establish an association relationship between the second query key and the second historical conversation pair to obtain a first database.
[0132] In some optional implementations, the reply recommendation device further includes:
[0133] The fourth acquisition module is used to acquire the first historical conversation pair corresponding to each reply object.
[0134] The fifth acquisition module is used to acquire historical feedback of the historical recommendation replies involved in the first historical conversation.
[0135] The summarizing module is used to perform a conversation summary based on the first historical conversation pair and the historical feedback to obtain second summary information.
[0136] The second establishing module is used to establish an association relationship between the identifier of each reply object and the corresponding second summary information to obtain a second database.
[0137] In some optional implementations, the reply recommendation device further includes:
[0138] The fifth acquisition module is used to obtain the latest historical conversation pairs corresponding to each reply object and feedback on the recommended reply.
[0139] The updating module is used to update the target database based on the latest historical conversation pairs and the feedback on the recommended replies to obtain an updated target database.
[0140] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0141] The reply recommendation device in this embodiment is presented in the form of a functional unit, where the unit may refer to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0142] The present disclosure also provides an electronic device having the above Figure 5 The reply recommendation device shown.
[0143] See also Figure 6 , Figure 6 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present disclosure, such as Figure 6 As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0144] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0145] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0146] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0147] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0148] The electronic device further comprises a communication interface 30 for the electronic device to communicate with other devices or a communication network.
[0149] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0150] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0151] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A reply recommendation method, characterized in that: The method comprises: Obtaining a first question and a conversation context of the first question; Obtaining first search information for the first question; Based on the first question and the first search information, a search is performed in a target database to obtain related information corresponding to the first question, wherein the target database is obtained based on first historical conversation pairs corresponding to each reply object; A recommended response to the first question is generated based on first information and the associated information, wherein the first information includes the first question, the conversation context, and the first search information.
2. The method according to claim 1, characterized in that The target database includes a first database and a second database; The first database is used to store second historical conversation pairs and historical search information corresponding to the second historical conversation pairs, wherein the second historical conversation pairs are used to represent conversation pairs in the first historical conversations that meet a preset condition; The second database is used to store summary information obtained based on the first historical conversation pair, and the summary information corresponds to the reply object.
3. The method according to claim 2, characterized in that The searching in the target database based on the first question and the first search information to obtain the associated information corresponding to the first question includes: Based on the first question and the first search information, query the first database to obtain first conversation content; Based on the identifier of the current reply object, the second database is queried to obtain first summary information, where the associated information includes the first conversation content and the first summary information.
4. The method according to claim 3, characterized in that The querying the first database based on the first question and the first search information to obtain the first conversation content includes: Based on the first question and the first search information, obtain a first query key; A query is performed in the first database based on the first query key to obtain the first conversation content.
5. The method according to claim 2, characterized in that: The method further comprises: Acquire a first historical conversation pair and feedback information for the first historical conversation pair; Analyze the first historical conversation pair to determine a processing strategy for the first historical problem in the first historical conversation pair; Based on the processing strategy and the feedback information, the first historical conversation pairs are screened to obtain the second historical conversation pairs.
6. The method according to claim 5, characterized in that The method further comprises: Acquire a second historical question in the second historical conversation pair and second search information for the second historical question; forming a second query key based on the second historical question and the second search information; An association relationship between the second query key and the second historical conversation pair is established to obtain the first database.
7. The method according to claim 2, characterized in that The method further comprises: Obtaining the first historical conversation pair corresponding to each of the reply objects; Obtaining historical feedback on the historical recommendation responses involved in the first historical conversation; Performing a conversation summary based on the first historical conversation pair and the historical feedback to obtain second summary information; An association relationship between the identifier of each reply object and the corresponding second summary information is established to obtain the second database.
8. The method according to claim 1, characterized in that The method further comprises: Obtain the latest historical conversation pairs corresponding to each reply object and feedback on the recommended reply; Based on the latest historical conversation pair and the feedback for the recommended reply, the target database is updated to obtain an updated target database.
9. A reply recommendation device, characterized in that: The device comprises: A first acquisition module, used to acquire a first question and a conversation context of the first question; A second acquisition module, used to acquire first search information for the first question; a retrieval module, configured to search a target database based on the first question and the first search information to obtain associated information corresponding to the first question, wherein the target database is obtained based on first historical conversation pairs corresponding to each reply object; A recommendation module is used to generate a recommended response to the first question based on the first information and the related information, wherein the first information includes the first question, the conversation context and the first search information.
10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the reply recommendation method according to any one of claims 1 to 8 by executing the computer instructions.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the reply recommendation method according to any one of claims 1 to 8.
12. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the reply recommendation method according to any one of claims 1 to 8.