Session method, nonvolatile readable storage medium and electronic equipment

By obtaining the candidate reply content of the historical session content and the preset recall model, combining the text vector and constraint vector characteristics, more accurate candidate reply content is recommended, which solves the problem of low accuracy of candidate reply content in customer service scenarios and improves the conversation quality and customer satisfaction.

CN119106108APending Publication Date: 2024-12-10GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310632550.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

In customer service scenarios, the candidate reply content recommended by Lenovo Technology is not very accurate, especially when the conversation starts, the response content of polite greetings and customer concerns is easily placed at the back of the conversation, resulting in the recommended model The candidate response content is not accurate and reliable enough.

Method used

By obtaining the historical session content and the candidate reply content of the preset recall model, determine the text vector features and constraint vector features, fuse the two to generate the session vector features, and use the preset scoring model to recommend the candidate reply content, thereby improving the scoring of the candidate reply content. Accuracy and reliability.

Benefits of technology

Improve the recommendation quality and conversation quality of candidate response content, ensure accurate response to customer needs, and improve customer satisfaction and service quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119106108A_ABST
    Figure CN119106108A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of natural language processing, and discloses a session method, a nonvolatile readable storage medium and electronic equipment. The method comprises the steps of obtaining historical session content and a plurality of candidate reply contents recalled by a preset recall model, determining a text vector feature corresponding to each candidate reply content according to the historical session content and each candidate reply content, determining a constraint vector feature according to the historical session content, fusing the text vector feature and the constraint vector feature, and obtaining a candidate reply content model; and obtaining session vector features, and recommending each candidate reply content according to the session vector features and a preset scoring model. According to the embodiment, the score of each candidate reply content can be adjusted in a multi-feature manner by combining the session vector feature and the constraint vector feature, so that the accuracy and reliability of the score of each candidate reply content can be improved, and the recommendation quality and session quality of each candidate reply content are further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of natural language processing, and in particular to a conversation method, a non-volatile readable storage medium, and an electronic device. Background Art

[0002] In customer service scenarios, the speech association technology can help agents intelligently recommend more appropriate and professional replies to agents during chats with customers based on the real-time chat content and the content the agents are typing. The speech association technology includes the recall stage and the fine ranking stage. In the recall stage, the recall model performs preliminary screening based on the context and keywords of the real-time chat, and uses information retrieval technology to quickly recall a batch of candidate replies related to the current problem from the huge reply library. In the fine ranking stage, the fine ranking model ranks and optimizes the candidate replies output by the recall model, and selects replies that meet the actual needs of the agents.

[0003] The content and methods of chat are quite diverse. For example, at the beginning of a conversation, the agent will politely greet the customer, "Hello, how can I help you?" However, the responses to the customer's questions are often placed at the end of the conversation, which can easily lead to the candidate responses recommended by the ranking model being inaccurate and unreliable. Summary of the invention

[0004] One purpose of the embodiments of the present disclosure is to provide a conversation method, a non-volatile readable storage medium, and an electronic device, aiming to solve the technical problem that the accuracy of the candidate reply content recommended by the related technology is not high.

[0005] In a first aspect, an embodiment of the present disclosure provides a conversation method, including:

[0006] Obtain historical conversation content and multiple candidate reply contents recalled by a preset recall model;

[0007] Determine, according to the historical conversation content and each of the candidate reply contents, a text vector feature corresponding to each of the candidate reply contents;

[0008] Determine a constraint vector feature according to the historical conversation content, wherein the constraint vector feature is used to characterize factors that affect the score of each candidate reply content during the conversation;

[0009] The text vector feature and the constraint vector feature are integrated to obtain a conversation vector feature;

[0010] The candidate reply contents are recommended according to the conversation vector features and a preset scoring model.

[0011] Optionally, obtaining historical conversation content includes:

[0012] Obtaining a session log, wherein the session log includes the most recent session content of a specified round;

[0013] If the most recent conversation content of the specified round includes a multimedia file, determining multimedia content corresponding to the multimedia file;

[0014] Replacing the multimedia file with the multimedia content to obtain historical session content;

[0015] If the latest conversation content of the specified round does not include a multimedia file, the latest conversation content of the specified round is determined to be a historical conversation content.

[0016] Optionally, determining the multimedia content corresponding to the multimedia file includes:

[0017] determining at least one reference tag corresponding to the multimedia file;

[0018] Multimedia content is determined based on at least one of the reference tags.

[0019] Optionally, determining multimedia content according to at least one of the reference tags includes:

[0020] Determine a score for each of the reference labels according to a preset multi-label classification model;

[0021] Select a specified number of reference labels with the highest scores as target labels;

[0022] The multimedia content is determined according to the tag content of each of the target tags.

[0023] Optionally, determining the text vector feature corresponding to each candidate reply content according to the historical conversation content and each candidate reply content includes:

[0024] Splicing the historical conversation content with each of the candidate reply contents to obtain a conversation sample;

[0025] A text vector feature corresponding to each of the candidate reply contents is determined according to each of the conversation samples.

[0026] Optionally, the constraint vector feature includes a conversation turn feature, and determining the constraint vector feature according to the historical conversation content includes:

[0027] Determine the current round of the current reply content according to the historical conversation content;

[0028] A conversation turn feature is generated according to the current turn.

[0029] Optionally, the constraint vector feature includes a reply time interval feature, and determining the constraint vector feature according to the historical conversation content includes:

[0030] Determine the last session time of the user according to the historical session content;

[0031] Calculate the time interval between the last session time and the current time;

[0032] A reply time interval feature is generated according to the time interval.

[0033] Optionally, the fusing the text vector feature with the constraint vector feature to obtain the conversation vector feature includes:

[0034] Inputting the constraint vector feature into a preset neural network to obtain a continuous vector feature consistent with the dimension of the text vector feature;

[0035] The text vector feature and the continuous vector feature are fused to obtain a conversation vector feature.

[0036] In a second aspect, an embodiment of the present disclosure provides a non-volatile readable storage medium, characterized in that computer executable instructions are stored therein, and the computer executable instructions are used to enable an electronic device to execute the above-mentioned conversation method.

[0037] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:

[0038] at least one processor; and,

[0039] a memory communicatively connected to the at least one processor; wherein,

[0040] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned conversation method.

[0041] In the conversation method provided by the embodiment of the present disclosure, first, the embodiment obtains historical conversation content and multiple candidate reply contents recalled by a preset recall model, and determines the text vector features corresponding to each candidate reply content based on the historical conversation content and each candidate reply content, thereby constructing the text vector features of each candidate reply content, which is conducive to the subsequent scoring of each candidate reply content in a quantitative manner. Secondly, the embodiment determines the constraint vector features based on the historical conversation content, and the constraint vector features are used to characterize the factors that affect the scoring of each candidate reply content during the conversation. The text vector features and the constraint vector features are integrated to obtain the conversation vector features, and the candidate reply contents are recommended based on the conversation vector features and the preset scoring model. Therefore, the embodiment can adjust the scores of each candidate reply content with multiple features by combining the conversation vector features and the constraint vector features, thereby improving the accuracy and reliability of the scores of each candidate reply content, and further improving the recommendation quality and conversation quality of each candidate reply content. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0043] Figure 1 A flowchart of a conversation method provided by an embodiment of the present disclosure;

[0044] Figure 2 A schematic diagram of a first conversation scenario provided in an embodiment of the present disclosure;

[0045] Figure 3 A schematic diagram of a second conversation scenario provided in an embodiment of the present disclosure;

[0046] Figure 4 A schematic diagram of the structure of a conversation device provided by an embodiment of the present disclosure;

[0047] Figure 5 A schematic diagram of a circuit structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not intended to limit the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0049] It should be noted that, if there is no conflict, the various features in the embodiments of the present disclosure can be combined with each other, all within the scope of protection of the present disclosure. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in the present disclosure do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0050] During a conversation between an agent and a customer, the agent will usually greet the customer with the following reply content out of politeness. For example, at the beginning of the conversation, the agent habitually greets the customer with the following reply content, such as reply content 1: Hello, how can I help you? Reply content 2: Dear, I have kept you waiting for a long time. For another example, when the conversation is about to end, the agent habitually greets the customer with the following reply content, such as reply content 3: I wish you a happy life. Reply content 4: Do you have any other questions that need to be answered?

[0051] Since the relevant technology recommends candidate reply contents in combination with historical reply contents, the above-mentioned polite expressions may also be used as part of the historical reply contents. The existence of the above-mentioned polite expressions is likely to affect the accuracy of the recommendation of the candidate reply contents.

[0052] In addition, the inventors also found in the process of implementing the present disclosure that the time interval between the current moment and the last conversation time of the customer also affects the agent's reply content. Since a long interval time is likely to affect the customer's experience, the agent will have corresponding reply skills to soothe the customer's mood, such as "I'm very sorry, I kept you waiting..." etc. The above reply content can also be used as part of the historical reply content, and the existence of such reply content is likely to affect the recommendation accuracy of the candidate reply content.

[0053] In order to at least overcome the technical problems given above, the embodiments of the present disclosure provide a conversation method, which adopts constraint vector features to characterize the factors affecting the recommendation accuracy of the candidate reply content, and by combining the conversation vector features and the constraint vector features, it is possible to adjust the score of each candidate reply content with multiple features, thereby improving the accuracy and reliability of the score of each candidate reply content, and further improving the recommendation quality and conversation quality of each candidate reply content.

[0054] Specifically, see Figure 1 , the session method includes the following steps:

[0055] S11: Obtain historical conversation content and multiple candidate reply contents recalled by a preset recall model.

[0056] In this step, the historical conversation content is the most recent conversation content of the designated rounds between the agent and the customer. The designated rounds can be customized by the designer according to the business, such as 6 rounds or 8 rounds.

[0057] The preset recall model is a recall model that is constructed in advance by the designer according to the recall algorithm, wherein the recall algorithm includes a single-tower recall algorithm or a dual-tower recall algorithm.

[0058] The candidate reply content is the reply content recalled by the preset recall model. In some embodiments, the preset recall model splices the historical conversation content with the target reply content input by the agent to obtain the spliced ​​content, and recalls multiple candidate reply contents based on the spliced ​​content. For example, the preset recall model recalls 30 candidate reply contents.

[0059] In the process of training the recall model, this embodiment constructs training samples, wherein the real reply content of the agent is used as a positive sample, and the reply content whose Jaccard distance with the positive sample is less than a preset threshold is randomly selected from all the reply contents of the agent as a negative sample. The preset threshold can be customized by the designer according to business needs. For example, the preset threshold is 0.6. The positive samples and negative samples are input into the recall model for training to obtain the preset recall model.

[0060] The preset recall model searches the inverted index library according to the spliced ​​content to recall multiple candidate reply contents. Among them, this embodiment builds an inverted index library based on the open source tool ElasticSearch. Among them, this embodiment cuts a conversation log of a complete conversation into multiple historical chat contents and historical reply contents. ElasticSearch builds an inverted index library for the historical chat contents and the historical reply contents respectively. Among them, the maximum length of the historical chat contents is the conversation contents of the most recent 6 rounds, and the historical reply contents are the real replies of the agents.

[0061] Obtaining historical session content includes the following steps: obtaining a session log, the session log including the most recent session content of a specified round; if the most recent session content of the specified round includes a multimedia file, determining the multimedia content corresponding to the multimedia file, replacing the multimedia file with the multimedia content, and obtaining the historical session content; if the most recent session content of the specified round does not include a multimedia file, determining the most recent session content of the specified round as the historical session content.

[0062] Multimedia files include voice files, video files, image files, etc. Multimedia content is used to represent the content of multimedia files, and the latest conversation content of a specified round is the conversation of the specified round most recent to the current time. Each reply or question is a round of reply or question.

[0063] For example, see Figure 2, the conversation scenario provided in this embodiment is as follows:

[0064] Agent A: What’s the problem?

[0065] Customer B: Unable to identify

[0066] Customer B: "Provide Figure 2 The barcode image shown"

[0067] Customer B: I changed the cable but it’s still the same.

[0068] Seat A: OK

[0069] Agent A: Could you please provide the contact name, phone number and detailed contact address so that we can help you with the warranty processing?

[0070] In the above conversation scenario, this embodiment determines that the multimedia content of the picture provided by the third round of conversation is [content XXXX]. Then, the historical conversation content is: What is the fault? [Content XXXX] cannot be recognized. The line is still the same. OK, please provide the name, phone number and detailed contact address of the contact person, and we will help you report the problem.

[0071] For example,

[0072] The session scenarios provided in this embodiment are as follows:

[0073] Agent A: What’s the problem?

[0074] Customer B: Unable to identify

[0075] Customer B: I don’t know what’s going on.

[0076] Customer B: I changed the cable but it’s still the same.

[0077] Seat A: OK

[0078] Agent A: Could you please provide the contact name, phone number and detailed contact address so that we can help you with the warranty processing?

[0079] In the above conversation scenario, the historical conversation content is: What is the fault? I can't identify it. I don't know what happened. I changed the line but it's still the same. OK, please provide the contact person's name, phone number and detailed contact address, and we will help you report the problem.

[0080] Determining multimedia content corresponding to a multimedia file includes the following steps: determining at least one reference tag corresponding to the multimedia file, and determining the multimedia content according to a score of the at least one reference tag. The reference tag is a tag corresponding to the multimedia file.

[0081] Determining at least one reference tag corresponding to the multimedia file includes: determining at least one reference tag corresponding to the multimedia file according to a preset multi-tag classification model.

[0082] It is understandable that the preset multi-label classification model can be a deep learning model, wherein the deep learning model can be any form of neural network model. For example, during the training process, this embodiment constructs a CNN neural network model, and the loss function adopts the BCE loss function. 2000 training samples and image labels are selected to train the multi-label classification model, wherein the labels include black screen, blue screen, no signal, unable to download, etc. In some embodiments, this embodiment can also match synonymous labels to the labels of the images, which is conducive to improving the accuracy of recall and fine sorting, such as the synonymous label of the label "unable to download" is "cannot download".

[0083] During the training process, this embodiment obtains the text that is a preset number of rounds away from the round where the picture is located, and detects whether the specified word appears in the text. If the specified word appears, the specified word is used as the label of the picture. If not, the designer customizes the label of the picture. The preset number of rounds is 2 rounds. This embodiment can select the previous text that is 2 rounds away from the round where the picture is located and the following text that is 2 rounds away from the round where the picture is located to combine into text. This embodiment adopts this training method to meet the requirement of filtering and obtaining effective training data even when the training data is noisy.

[0084] In some embodiments, according to a preset multi-label classification model, determining at least one reference tag corresponding to a multimedia file includes: determining whether the multimedia file is a voice file; if it is a voice file, converting the multimedia file into text content according to a voice recognition algorithm, and the text content is multimedia content; if it is not a voice file, determining whether the multimedia file is a video file; if it is a video file, extracting key frame images from the video file according to a key frame extraction algorithm, taking the key frame images as target images, and determining at least one reference tag corresponding to the target image according to the preset multi-label classification model; if it is not a video file, that is, the multimedia file is the target image, determining at least one reference tag corresponding to the target image according to the preset multi-label classification model.

[0085] Determining multimedia content based on at least one reference tag includes the following steps: determining a score for each reference tag based on a preset multi-tag classification model, selecting a specified number of reference tags with the highest scores as target tags, and determining multimedia content based on the tag content of each target tag.

[0086] For example, please combine Figure 2, the multimedia file is input into the multi-label classification type, and the multi-label classification type gives the scores of multiple reference labels that match the multimedia file. Next, this embodiment selects the five reference labels with the highest scores from the multiple reference labels as the target labels. For example, the arrangement order of the five reference labels with the highest scores is "serial number" label 1, "fault" label 2, "unrecognizable" label 3, "PC no signal" label 4 and "warranty processing" label 5, wherein the label content of label 1 is the serial number, the label content of label 2 is fault, the label content of label 3 is unrecognizable, the label content of label 4 is PC no signal, and the label content of label 5 is warranty processing. Finally, this embodiment combines the label contents of labels 1 to 5 to obtain the multimedia content of "serial number, fault, unrecognizable, PC no signal, repair processing".

[0087] In some embodiments, determining multimedia content according to the tag content of each target tag includes: extracting picture content from the multimedia file according to an image analysis algorithm, and combining the picture content with the tag content of each target tag to obtain the multimedia content.

[0088] For example, this embodiment uses an image analysis algorithm to analyze Figure 2 The picture shown in the figure obtains the picture content of the barcode "SN41***0", and then "SN41***0" is combined with "serial number, fault, cannot be identified, pc has no signal, and needs repair processing" to obtain the multimedia content "SN41***0, serial number, fault, cannot be identified, pc has no signal, and needs repair processing".

[0089] Therefore, based on the multimedia content determined in the above embodiment, the historical conversation content may be: What is the fault? Unable to identify [serial number, fault, unable to identify, pc no signal, repair processing], and the multimedia content obtained is "SN41***0, serial number, fault, unable to identify, pc no signal, repair processing], and the line is still the same. OK, please provide the contact person's name, phone number and detailed contact address, and we will help you report the repair.

[0090] In general, when the historical conversation content contains multimedia files, that is, the historical conversation content contains multimedia files as noise, the present embodiment can label the multimedia files, match the multimedia files with the corresponding multimedia content, and combine the multimedia content with the remaining conversation content to obtain complete, accurate and comprehensive historical conversation content. Therefore, the present embodiment can be compatible with historical conversation content of multiple modalities, and can express historical conversation content of multiple modalities in a complete, accurate and comprehensive manner in text, which is conducive to improving the accuracy and reliability of the recommended candidate reply content.

[0091] S12: Determine the text vector feature corresponding to each candidate reply content based on the historical conversation content and each candidate reply content.

[0092] In this step, this embodiment concatenates the historical conversation content with each candidate reply content to obtain a conversation sample, and determines the text vector feature corresponding to each candidate reply content according to each conversation sample. The text vector feature is used to characterize each conversation sample. As mentioned above, when the number of candidate reply contents is 30, the number of conversation samples is also 30.

[0093] Determining the text vector features corresponding to each candidate reply content according to each conversation sample includes: performing vector representation on each conversation sample according to a pre-trained BERT model to obtain text vector features, wherein the full name of the BERT model is Bidirectional Encoder Representations from Transformers. In this embodiment, each conversation sample is represented by a vector using the BERT model, and the obtained text vector features can participate in the scoring calculation, which is conducive to recommending more reliable candidate reply content.

[0094] For example, please combine Figure 2 , one of the 30 candidate replies is: OK, please provide the name, phone number and detailed contact address of the contact person, and we will help you report the problem. Therefore, the conversation sample is: [CLS][worker] What is the fault? [EOS][user] Cannot be recognized, [SN41***0, serial number, fault, cannot be recognized, pc has no signal, report the problem], the line is changed and it is still the same. [EOS][SEP] OK, please provide the name, phone number and detailed contact address of the contact person, and we will help you report the problem [EOS][SEP]. Among them, "[CLS]", "[SEP]" and "[EOS]" are symbols that come with the pre-trained BERT model, representing "the beginning of the overall input", "the segmentation of the front and back two paragraphs" and "the end of the sentence in the paragraph" respectively. "[worker]" and "[user]" represent the two roles of "agent" and "customer" respectively. Next, this embodiment uses the BERT model to vectorize the above conversation samples and obtains a 768-dimensional text vector feature.

[0095] S13: Determine constraint vector features according to the historical conversation content, where the constraint vector features are used to characterize factors that affect the scoring of each candidate reply content during the conversation.

[0096] In this step, this embodiment can select factors that can affect the score of each candidate reply content as influencing factors according to the historical conversation content, and generate constraint vector features according to the influencing factors. When the influencing factor can be expressed by the constraint vector feature, the constraint vector feature can be added to the training process later to reduce the influence of the influencing factor on the score of the candidate reply content.

[0097] S14: Fuse the text vector features with the constraint vector features to obtain the conversation vector features.

[0098] In this step, the conversation vector feature is a vector feature obtained by fusing the text vector feature and the constraint vector feature. It can be understood that any fusion method can be used in this embodiment to fuse the text vector feature and the constraint vector feature. Since the conversation vector feature has both the characteristics of the text vector feature and the constraint vector feature, the conversation vector feature can not only reflect the characteristics of the historical conversation content and the candidate reply content given by the recall model, but also reflect the characteristics of the influencing factors, which is conducive to the subsequent recommendation of more accurate and reliable candidate reply content based on the conversation vector feature.

[0099] In some embodiments, the present embodiment inputs the text vector feature and the constraint vector feature into the gate structure fuser for fusion to obtain the conversation vector feature. For example, the expression of the gate structure fuser is as follows:

[0100] D'=tanh(W d ·D+b d )

[0101] O'=tanh(W O ·O+b O )

[0102] f=σ(W f ·[D',O']+b f )

[0103] M=f*D'+(1-f)*O'

[0104] Among them, W d , W O , W f are the corresponding weight matrices, b d 、b O 、b f is the corresponding bias matrix, D is the text vector feature, O is the constraint vector feature, σ is the sigmoid function, f is the output value of the sigmoid function, and M is the session vector feature.

[0105] In some embodiments, fusing text vector features with constraint vector features to obtain conversation vector features includes the following steps: inputting the constraint vector features into a preset neural network to obtain a continuous vector feature consistent with the dimension of the text vector features, and fusing the text vector features with the continuous vector features to obtain the conversation vector feature. This embodiment makes it easy to quickly fuse the dimension of the constraint vector feature and the dimension of the text vector feature consistent. In addition, this embodiment can quickly make the dimension of the constraint vector feature consistent with the dimension of the text vector feature through the preset neural network, without the need for complex conversion, which is conducive to improving conversion efficiency and can also ensure the accuracy of information.

[0106] For example, the preset neural network is an MLP (Multi-Layer Perceptron) neural network. In this embodiment, the constraint vector feature is used as the input of the MLP neural network. The MLP neural network can output a continuous vector feature that is consistent with the dimension of the text vector feature. The continuous vector feature and the text vector feature are then input into the gate structure fuser for fusion to obtain the conversation vector feature.

[0107] S15: Recommend candidate reply contents according to the conversation vector features and the preset scoring model.

[0108] In this step, the preset scoring model is a model used to score each session vector feature, wherein the preset scoring model is constructed and generated in advance by the designer. It is understandable that the preset scoring model can be constructed and generated using any suitable algorithm, such as a deep learning algorithm. In training the preset scoring model, this embodiment uses the BCE loss function in the training phase and the sigmoid function in the inference phase, wherein the result output by the sigmoid function is the score of the corresponding session vector feature. The evaluation indicators of the preset scoring model provided in this embodiment are shown in Table 1:

[0109] Table 1

[0110] MAP MRR P@1 R1 R2 R5 0.980 0.980 0.963 0.963 0.992 0.998

[0111] Among them, the MAP indicator is the average accuracy. This embodiment calculates the evaluation accuracy based on the candidate reply contents ranked in the top 10 by score. The MRR indicator is the average value of the reciprocal of the ranking of the correct results. The P@1 indicator is the accuracy of the top 1 structure. The R1 indicator is the recall rate of the top 1 result. The R2 indicator is the recall rate of the top 2 results. The R5 indicator is the recall rate of the top 5 results.

[0112] Recommending each candidate reply content according to the conversation vector feature and the preset scoring model includes: determining the score corresponding to each candidate reply content according to the preset scoring model, and selecting a preset number of candidate reply contents with the highest scores for recommendation. The preset number is customized by the designer according to business needs, for example, the preset number is 3 or 5, etc., and the present embodiment can recommend the 3 candidate reply contents with the highest scores.

[0113] In general, this embodiment constructs the text vector features of each candidate reply content, which is conducive to the subsequent scoring of each candidate reply content in a quantitative manner. In addition, this embodiment can adjust the score of each candidate reply content in a multi-feature manner by combining the conversation vector features and the constraint vector features, thereby improving the accuracy and reliability of the score of each candidate reply content, thereby improving the recommendation quality and conversation quality of each candidate reply content.

[0114] In some embodiments, the constraint vector feature includes a conversation turn feature, and the conversation turn feature is used to characterize the conversation turn. This embodiment adopts a first preset dimension to construct a vector for expressing the conversation turn feature, wherein the vector expression of the conversation turn feature adopts a one-hot vector expression. For example, this embodiment selects the maximum conversation turn as 30 rounds, so the first preset dimension is set to 30 dimensions. For the first round of conversation, its conversation turn feature is [1,0,0,...,0], wherein the conversation turn feature contains 29 zeros. For the second round of conversation, its conversation turn feature is [0,1,0,...,0], wherein the conversation turn feature contains 29 zeros, and so on.

[0115] During data analysis, we found that for similar contexts, the current conversation is in different rounds, which will affect the agent's response content. At the beginning of the conversation, the agent will politely greet the customer, "Hello, how can I help you?", and the response to the customer's concerns is likely to be placed at the end of the conversation, which can easily lead to the candidate response content recommended by the refined ranking model being inaccurate and unreliable.

[0116] Based on this, in some embodiments, determining the constraint vector feature according to the historical conversation content includes: determining the current round of the current reply content according to the historical conversation content, and generating a conversation round feature according to the current round. Generating the conversation round feature according to the current round includes: expressing the current round as a conversation round feature according to a one-hot vector expression.

[0117] This embodiment inputs the conversation turn feature into a preset neural network to obtain a first continuous vector feature with the same dimension as the text vector feature, fuses the text vector feature with the first continuous vector feature to obtain a first conversation vector feature, and recommends each candidate reply content based on the first conversation vector feature and a preset scoring model. Since this embodiment incorporates the conversation turn feature, it is also possible to reduce the impact of invalid conversation content in scenarios with a lot of invalid conversation content, thereby improving the accuracy of recommending candidate reply content.

[0118] In some embodiments, the constraint vector feature includes a reply time interval feature, and the reply time interval feature is used to represent the time interval between the last session time of the user and the current time.

[0119] In the process of realizing the disclosure, the author also found that the time interval between the current moment and the last sentence of the customer's conversation will affect the agent's reply content. Usually, in search-based associative speech products, the above interval time is too long. In order to improve the customer experience, the agent will have corresponding reply skills to soothe the customer's mood, such as "I am very sorry, I kept you waiting..." etc. Since the recall model is a candidate reply content that is recalled or finely ranked in combination with the historical conversation content, the reply content used to soothe the customer's mood will affect the accuracy of the candidate reply content that is recalled or finely ranked.

[0120] Based on this, in some embodiments, determining the constraint vector feature according to the historical conversation content includes: determining the user's last conversation time according to the historical conversation content, calculating the time interval between the last conversation time and the current time, and generating a reply time interval feature according to the time interval.

[0121] Generating a response time interval feature according to the time interval includes: determining a time quantity according to the time interval and a preset time step, and generating a response time interval feature according to the time quantity.

[0122] Determining the time quantity according to the time interval and the preset time step includes: dividing the time interval by the preset time step to obtain a division result, and further processing the division result to obtain the time quantity.

[0123] The preset time step is customized by the designer according to business needs. For example, if the preset time step is 3 seconds, when the time interval between the user's last session time and the current time is 6 seconds, the division result is 2, and the time quantity is 2. When the time interval between the user's last session time and the current time is 7 seconds, the quotient of the division result is 2, and the remainder is 1. According to the incremental method, the time quantity is 3.

[0124] Generating a response time interval feature according to the time quantity includes: when the time interval is less than the maximum interval, expressing the time quantity as a response time interval feature according to the one-hot vector expression; when the time interval is greater than the maximum interval, expressing the maximum interval as a response time interval feature according to the one-hot vector expression.

[0125] For example, the maximum interval is 3 minutes, and the preset time step is 3 seconds. Therefore, in order to express the reply time interval feature, this embodiment selects a vector with a dimension of 60 to express the reply time interval feature. For example, when the time interval is 3 seconds, its reply time interval feature is [1,0,0,...,0], where the conversation turn feature contains 59 zeros. When the time interval is 5 seconds, its reply time interval feature is [0,1,0,...,0], where the conversation turn feature contains 59 zeros. When the time interval is 9 seconds, its reply time interval feature is [0,0,1,...,0], where the conversation turn feature contains 59 zeros. When the time interval is 4 minutes, its reply time interval feature is [0,0,0,...,1], where the conversation turn feature contains 59 zeros.

[0126] This embodiment inputs the reply time interval feature into a preset neural network to obtain a second continuous vector feature with the same dimension as the text vector feature, fuses the text vector feature with the second continuous vector feature to obtain a second conversation vector feature, and recommends each candidate reply content based on the second conversation vector feature and a preset scoring model. Since this embodiment incorporates the reply time interval feature, it is also possible to reduce the impact of invalid conversation content in scenarios where the time interval is long and some invalid conversation content is generated, thereby improving the accuracy of recommending candidate reply content.

[0127] It is understandable that in this embodiment, the conversation turn feature and the reply time interval feature can also be input into the preset neural network together to obtain a continuous vector feature with the same dimension as the text vector feature, and the continuous vector feature is merged with the text vector feature to obtain the conversation vector feature, and the candidate reply content is recommended according to the conversation vector feature and the preset scoring model. Therefore, this embodiment incorporates both the conversation turn feature and the reply time interval feature, so that the candidate reply content can be recommended more reliably and accurately.

[0128] The present disclosure provides Figure 3 The technical effects of the conversation method provided by the embodiment of the present disclosure are described as follows:

[0129] See also Figure 3, when the agent enters the target reply content "photo" in the text input area 32 of the interactive page 31, this embodiment adopts the conversation method provided by this embodiment to recommend multiple candidate reply contents. For example, one of the candidate reply contents is "Hello, welcome to consult the Seewo Customer Service Center. How can I serve you? Please provide the fault recruitment or video. We will help you to look at [handshake]", and the agent can select the corresponding candidate reply content to reply, so as to provide customers with accurate and appropriate information and suggestions. Experiments have shown that the system corresponding to the conversation method provided by this embodiment can achieve excellent performance in both MAP and P@1 indicators, which are 0.98 and 0.96 respectively, which fully demonstrates the effectiveness of this system in practical applications. By introducing the speech association technology, agents can respond to customer needs more quickly, improve customer satisfaction, and thus improve the overall service quality.

[0130] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present disclosure, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.

[0131] As another aspect of the embodiments of the present disclosure, the embodiments of the present disclosure provide a conversation device, wherein the conversation device may be a software module, the software module includes a number of instructions stored in a memory, and a processor may access the memory and call the instructions for execution to complete the conversation method described in each of the above embodiments.

[0132] In some implementations, the conversation device may also be constructed of hardware devices, for example, the conversation device may be constructed of one or more chips, and the chips may work in coordination with each other to complete the conversation methods described in the above implementations. For another example, the conversation device may also be constructed of various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components.

[0133] See also Figure 4 The conversation device 400 includes a content acquisition module 41, a text vector determination module 42, a constraint vector determination module 43, a vector fusion module 44 and a content recommendation module 45.

[0134] The content acquisition module 41 is used to obtain historical conversation content and multiple candidate reply contents recalled by a preset recall model. The text vector determination module 42 is used to determine the text vector features corresponding to each candidate reply content based on the historical conversation content and each candidate reply content. The constraint vector determination module 43 is used to determine the constraint vector features based on the historical conversation content, and the constraint vector features are used to characterize the factors that affect the scoring of each candidate reply content during the conversation. The vector fusion module 44 is used to fuse the text vector features with the constraint vector features to obtain the conversation vector features. The content recommendation module 45 is used to recommend each candidate reply content based on the conversation vector features and the preset scoring model.

[0135] This embodiment combines conversation vector features and constraint vector features to adjust the score of each candidate reply content with multiple features, thereby improving the accuracy and reliability of the score of each candidate reply content, and further improving the recommendation quality and conversation quality of each candidate reply content.

[0136] In some embodiments, the content acquisition module 41 is specifically used to: obtain a session log, the session log includes the most recent session content of a specified round; if the most recent session content of the specified round includes a multimedia file, then determine the multimedia content corresponding to the multimedia file, replace the multimedia file with the multimedia content, and obtain the historical session content; if the most recent session content of the specified round does not include a multimedia file, then determine that the most recent session content of the specified round is the historical session content.

[0137] In some embodiments, the content acquisition module 41 is further specifically configured to: determine at least one reference tag corresponding to the multimedia file, and determine the multimedia content according to the at least one reference tag.

[0138] In some embodiments, the content acquisition module 41 is further specifically used to: determine the score of each reference tag according to a preset multi-tag classification model, select a specified number of reference tags with the highest scores as target tags, and determine the multimedia content according to the tag content of each target tag.

[0139] In some embodiments, the text vector determination module 42 is specifically used to: concatenate the historical conversation content with each candidate reply content to obtain a conversation sample, and determine the text vector features corresponding to each candidate reply content according to each conversation sample.

[0140] In some embodiments, the constraint vector feature includes a conversation turn feature, and the constraint vector determination module 43 is specifically used to: determine the current turn of the current reply content according to the historical conversation content, and generate the conversation turn feature according to the current turn.

[0141] In some embodiments, the constraint vector feature includes a reply time interval feature, and the constraint vector determination module 43 is specifically used to: determine the user's last session time based on historical session content, calculate the time interval between the last session time and the current time, and generate a reply time interval feature based on the time interval.

[0142] In some embodiments, the vector fusion module 44 is specifically used to: input the constraint vector feature into a preset neural network to obtain a continuous vector feature with the same dimension as the text vector feature, and fuse the text vector feature with the continuous vector feature to obtain a conversation vector feature.

[0143] It should be noted that the above conversation device can execute the conversation method provided in the embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in the conversation device embodiment, please refer to the conversation method provided in the embodiment of the present disclosure.

[0144] See also Figure 5 , Figure 5 The following is a schematic diagram of a circuit structure of an electronic device provided by an embodiment of the present disclosure. Figure 5 As shown, the electronic device 500 includes one or more processors 51 and a memory 52. Figure 5 A processor 51 is taken as an example.

[0145] The processor 51 and the memory 52 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0146] The memory 52 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the conversation method in the embodiment of the present disclosure. The processor 51 executes various functional applications and data processing of the conversation device by running the non-volatile software programs, instructions and modules stored in the memory 52, that is, realizes the conversation method provided in the above method embodiment and the functions of each module or unit in the above device embodiment.

[0147] The memory 52 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 52 may optionally include a memory remotely arranged relative to the processor 51, and these remote memories may be connected to the processor 51 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.

[0148] The program instructions / modules are stored in the memory 52, and when executed by the one or more processors 51, the session method in any of the above method embodiments is executed.

[0149] The present disclosure also provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors, such as Figure 5 A processor 51 in the embodiment may enable the one or more processors to execute the conversation method in any of the above method embodiments.

[0150] The embodiment of the present disclosure also provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by an electronic device, the electronic device executes any one of the conversation methods.

[0151] The above described device or equipment embodiments are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as module units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0152] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Under the concept of the present disclosure, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present disclosure as described above, which are not provided in detail for the sake of simplicity. Although the present disclosure has 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 of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present disclosure.

Claims

1. A conversation method, characterized in that: include: Obtain historical conversation content and multiple candidate reply contents recalled by a preset recall model; Determine, according to the historical conversation content and each of the candidate reply contents, a text vector feature corresponding to each of the candidate reply contents; Determine a constraint vector feature according to the historical conversation content, wherein the constraint vector feature is used to characterize factors that affect the score of each candidate reply content during the conversation; The text vector feature and the constraint vector feature are integrated to obtain a conversation vector feature; The candidate reply contents are recommended according to the conversation vector features and a preset scoring model.

2. The method according to claim 1, characterized in that: The acquisition of historical session content includes: Obtaining a session log, wherein the session log includes the most recent session content of a specified round; If the most recent conversation content of the specified round includes a multimedia file, determining multimedia content corresponding to the multimedia file; Replacing the multimedia file with the multimedia content to obtain historical session content; If the latest conversation content of the specified round does not include a multimedia file, the latest conversation content of the specified round is determined to be a historical conversation content.

3. The method according to claim 2, characterized in that The determining of the multimedia content corresponding to the multimedia file comprises: determining at least one reference tag corresponding to the multimedia file; Multimedia content is determined based on at least one of the reference tags.

4. The method according to claim 3, characterized in that Determining multimedia content according to at least one of the reference tags comprises: Determine a score for each of the reference labels according to a preset multi-label classification model; Select a specified number of reference labels with the highest scores as target labels; The multimedia content is determined according to the tag content of each of the target tags.

5. The method according to claim 1, characterized in that The determining, based on the historical conversation content and each of the candidate reply contents, a text vector feature corresponding to each of the candidate reply contents comprises: Splicing the historical conversation content with each of the candidate reply contents to obtain a conversation sample; A text vector feature corresponding to each of the candidate reply contents is determined according to each of the conversation samples.

6. The method according to claim 1, characterized in that The constraint vector feature includes a conversation turn feature, and determining the constraint vector feature according to the historical conversation content includes: Determine the current round of the current reply content according to the historical conversation content; A conversation turn feature is generated according to the current turn.

7. The method according to claim 1, characterized in that The constraint vector feature includes a reply time interval feature, and determining the constraint vector feature according to the historical conversation content includes: Determine the last session time of the user according to the historical session content; Calculate the time interval between the last session time and the current time; A reply time interval feature is generated according to the time interval.

8. The method according to any one of claims 1 to 7, characterized in that: The fusing of the text vector feature and the constraint vector feature to obtain the conversation vector feature includes: Inputting the constraint vector feature into a preset neural network to obtain a continuous vector feature consistent with the dimension of the text vector feature; The text vector feature and the continuous vector feature are fused to obtain a conversation vector feature.

9. A non-volatile readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to enable the electronic device to execute the conversation method as described in any one of claims 1 to 8.

10. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the conversation method according to any one of claims 1 to 8.