Response speech generation method and device, equipment, medium and product

By acquiring response data and matching index numbers in the script index table to generate target response scripts, the problem of low efficiency in manual input by customer service representatives is solved, and efficient and accurate personalized response services are achieved.

CN115033672BActive Publication Date: 2025-11-18JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210681215.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-15
Publication Date
2025-11-18
Estimated Expiration
2042-06-15

AI Technical Summary

Technical Problem

Customer service representatives need to manually type out responses when providing remote services, which leads to low efficiency, low accuracy, and the possibility of typos. It also makes it impossible to provide personalized response scripts for different customer service representatives.

Method used

By acquiring the input response data, extracting keywords and matching index numbers in the script index table, obtaining response scripts, generating a preset number of target response scripts, and using a score evaluation model for filtering and priority processing, personalized response assistance is provided.

Benefits of technology

It improved the efficiency and accuracy of customer service responses, reduced the time spent on manual input, enhanced the user experience, and provided personalized response services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115033672B_ABST
    Figure CN115033672B_ABST
Patent Text Reader

Abstract

The present disclosure provides a response script generation method, device, equipment, medium and product, the method comprising: obtaining input response data; extracting first keywords in the response data and determining the corresponding index number of each first keyword in the script index table; obtaining the corresponding response script of each index number in the script table; and generating a preset number of target response scripts based on the obtained response scripts. The present disclosure is used to solve the defects of low efficiency and low accuracy caused by the need for customer service to manually type response content in the prior art, and to quickly and accurately provide the customer service with auxiliary response scripts.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, and particularly relates to a generation method and device of response dialogue, equipment, medium and product. BACKGROUND

[0002] In today's society, whether it is the e-commerce industry or the traditional industry, it is often necessary to provide remote services related to the services or products provided by customers. For such practitioners, we call them customer service. When providing remote services to customers, the customer service needs to edit the words they want to express into text and send it to the customer.

[0003] In the process of text dialogue between customer service and customers, the customer service needs to manually type and send the content to the customer. When encountering similar customers and needing to send similar content, the customer service still needs to manually type and send the content. Due to long time typing, the work efficiency is reduced, and there is a possibility of typing wrong characters, which reduces the customer's consultation experience. SUMMARY

[0004] The present disclosure provides a generation method and device of response dialogue, equipment, medium and product, to solve the defects of low efficiency and low accuracy caused by the need for customer service to manually type response content in the prior art, and to realize fast and accurate provision of auxiliary response dialogue for customer service.

[0005] The present disclosure provides a generation method of response dialogue, comprising:

[0006] obtaining input response data;

[0007] extracting first keywords in the response data, and determining the corresponding index number of each first keyword in a dialogue index table;

[0008] obtaining the corresponding response dialogue of each index number in a dialogue table, wherein the index number of the dialogue index table is used to represent the dialogue identifier of the dialogue table, and the dialogue identifier and the response dialogue are one-to-one corresponding;

[0009] generating a preset number of target response dialogues based on the obtained response dialogues.

[0010] According to the generation method of response dialogue provided by the present disclosure, the preset number of target response dialogues are generated based on the obtained response dialogues, comprising:

[0011] determining the number of dialogues of the response dialogue;

[0012] In a case where the number of dialogues is less than the preset number, a standard dialogue of a supplementary number is obtained, the standard dialogue and the response dialogue are taken as the target response dialogue, the supplementary number is a difference between the preset number and the number of dialogues, and the standard dialogue is a pre-set general dialogue.

[0013] In a case where the number of dialogues is equal to the preset number, the response dialogue is taken as the target response dialogue.

[0014] In a case where the number of dialogues is greater than the preset number, a preset number of response dialogues are extracted from the response dialogue based on the response data as the target response dialogue.

[0015] According to the method for generating a response dialogue provided in the present disclosure, the target response dialogue is extracted from the response dialogue based on the response data, and the method comprises the following steps:

[0016] The response data and the response dialogue are input into a score evaluation model to obtain the target response dialogue output by the score evaluation model.

[0017] The score evaluation model is trained based on a response data sample, a response dialogue sample and a target response dialogue sample, a first sample number of the response dialogue sample is greater than the preset number, and a second sample number of the target response dialogue sample is equal to the preset number.

[0018] The score evaluation model is used to determine the target response dialogue by using the representation features obtained by performing feature extraction on the response dialogue sample based on the response data sample.

[0019] According to the method for generating a response dialogue provided in the present disclosure, the response data and the response dialogue are input into a score evaluation model to obtain the target response dialogue output by the score evaluation model, and the method comprises the following steps:

[0020] The response data and the response dialogue are input into a score evaluation model, and the following feature extraction operations are performed on the response data and each response dialogue:

[0021] A longest common sequence corresponding to the response data and the response dialogue is determined, and a ratio of a first length of the longest common sequence to a second length of the response dialogue is calculated, the longest common sequence being the longest continuous data in the same continuous data possessed by the response data and the response dialogue.

[0022] Each group of ratios obtained based on the response data and the response dialogue is sorted according to a size relationship to obtain a target value sequence.

[0023] The response dialogue corresponding to the first preset number of items in the target value sequence is taken as the target response dialogue.

[0024] The method for generating a response dialogue according to the present disclosure further comprises the following steps after generating the target response dialogue:

[0025] The display priority of each target response dialogue is determined, and the display priority is used to represent the order of displaying the target response dialogue.

[0026] The method for generating a response dialogue according to the present disclosure comprises the following steps in the step of determining the display priority of each target response dialogue:

[0027] In the case that the target response dialogue comprises the standard dialogue, the display priority of the response dialogue is greater than that of the standard dialogue.

[0028] In the case that the target response dialogue does not comprise the standard dialogue, the sum of the number of words of the first keyword and the frequency of the first keyword in each response dialogue is calculated to obtain a sum result, and the display priority of the response dialogue is determined based on the sum result.

[0029] The method for generating a response dialogue according to the present disclosure further comprises the following steps before the step of determining the index number corresponding to each first keyword in the dialogue index table:

[0030] The dialogue index table and the dialogue table corresponding to the customer identification of the customer service are obtained.

[0031] The method for generating a response dialogue according to the present disclosure further comprises the following steps before the step of obtaining the input response data:

[0032] The input question data is obtained.

[0033] The second keyword in the question data is extracted.

[0034] The second keyword is matched with the high-frequency words in the preset high-frequency word library.

[0035] In the case that the second keyword fails to match with the high-frequency words, the step of obtaining the input response data is performed.

[0036] In the case that the second keyword matches with the high-frequency words and an input instruction is received, the step of obtaining the input response data is performed, wherein the input instruction indicates that the response data is input.

[0037] The present disclosure further provides a device for generating a response dialogue, comprising:

[0038] The first obtaining module is configured to obtain inputted response data;

[0039] The determining module is configured to extract first keywords in the response data and determine corresponding index numbers of each of the first keywords in a script index table;

[0040] The second obtaining module is configured to obtain corresponding response scripts of each of the index numbers in a script table;

[0041] The generating module is configured to generate a preset number of target response scripts based on the obtained response scripts, wherein the index numbers of the script index table are used to represent script identifiers of the script table, and the script identifiers and the response scripts are in one-to-one correspondence.

[0042] The present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the response script generation method of any of the above when executing the program.

[0043] The present disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the response script generation method of any of the above.

[0044] The present disclosure also provides a computer program product, including a computer program, and the computer program is executed by a processor to implement the response script generation method of any of the above.

[0045] The present disclosure provides a response script generation method, device, equipment, medium and product, which obtains inputted response data in real time when a customer service inputs the response data, extracts first keywords in the response data to obtain target response scripts, specifically determines corresponding index numbers of each of the first keywords in a script index table, obtains corresponding response scripts of each of the index numbers in a script table, and generates a preset number of target response scripts based on the obtained response scripts. It can be seen that the present disclosure analyzes the response data inputted by the customer service in real time, provides corresponding target response scripts for the customer service, has high accuracy, and enables the customer service to select the target response scripts based on its own needs to reply to customers, without manually typing all the contents. The whole process is fast and convenient, and improves the customer service reply efficiency and accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the present disclosure or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present disclosure, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0047] Figure 1 is one of flow diagrams of the method for generating the response script provided by the present disclosure;

[0048] Figure 2 is one of flow diagrams of the method for generating the response script provided by the present disclosure;

[0049] Figure 3 is one of flow diagrams of the method for generating the response script provided by the present disclosure;

[0050] Figure 4 is a structural diagram of the device for generating the response script provided by the present disclosure;

[0051] Figure 5 is a structural diagram of the electronic device provided by the present disclosure. DETAILED DESCRIPTION

[0052] To make the objectives, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described below in a clear and complete manner with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only some of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the embodiments of the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present disclosure.

[0053] The method for generating the response script provided by the embodiments of the present disclosure will be described below. Figures 1-3

[0054] The present disclosure provides a way for the customer service to provide auxiliary response, so that the customer service can quickly and accurately reply to the information of the customer. In the prior art, there is no way for the customer service to provide auxiliary response, and only the next word recommendation of the input method is used to increase the typing efficiency.

[0055] Since there is no auxiliary response service for the customer service in the prior art, the customer service needs to manually input all the conversations every time, which takes a long time and is low in efficiency, and there is a situation of misspelling, which is not good for the user experience.

[0056] In addition, the customer service is different in department affiliation and responsible module, for example, pre-sale customer service and after-sale customer service. Even if there is an auxiliary response in the prior art, it is a fixed standard script in advance, and it is impossible to recommend corresponding scripts for different customer services.

[0057] ​To solve the above various problems, the embodiment of the disclosure provides a generation method of a response dialogue. The method can be applied in a smart terminal, such as a mobile phone, a computer, a tablet, etc., or in a server. Hereinafter, the method applied in the server is taken as an example for illustration, but it should be noted that the example is only for illustration and does not limit the protection scope of the disclosure. Some other descriptions in the embodiment of the disclosure are also examples and do not limit the protection scope of the disclosure, and the following will not be described one by one.

[0058] The specific implementation of the method is shown in Figure 1

[0059] Step 101, obtaining input response data.

[0060] Specifically, when the customer service replies to the response data based on the display, the response data in the input box of the display is obtained.

[0061] The acquisition process can be real-time acquisition, that is, the entire response data is obtained after the customer service inputs a character; or the response data can be obtained after the customer service inputs a character, and the previously obtained response data is merged to obtain the entire response data.

[0062] The acquisition process can also be based on a pre-set data acquisition strategy to acquire the response data, for example, the entire response data is obtained when it is determined that the customer service inputs a preset number of characters, for example, the entire response data is obtained when it is determined that the customer service inputs 3, 4 or 5 characters; or the response data corresponding to the current preset number of characters is obtained, and the previously obtained response data is merged to obtain the entire response data.

[0063] In one specific embodiment, in order to provide accurate and effective target response dialogue for the customer service, the input response data of the customer service is obtained before the input question data of the customer and the actual operation of the customer service are analyzed and determined to determine the specific assistance mode, as shown in Figure 2

[0064] Step 201, obtaining input question data.

[0065] Specifically, when the customer sends the question data to the customer service based on the display, the question data displayed by the display is obtained.

[0066] Step 202, extracting a second keyword in the question data.

[0067] Specifically, the question data is processed by word segmentation to obtain a word segmentation result of the question data, and the second keyword is extracted from the word segmentation result of the question data. The second keyword is a word used to represent the demand of the customer. ​​

[0068] Step 203, match the second keyword and the high-frequency words in the preset high-frequency word library.

[0069] Specifically, the high-frequency word library is created in advance, which is based on the customer historical question data. The high-frequency word library includes high-frequency words and corresponding response scripts of the high-frequency words. The response scripts in the high-frequency word library are also used to provide auxiliary response services for the customer service.

[0070] Step 204, in the case that the second keyword and the high-frequency words fail to match, the step of obtaining the input response data is performed.

[0071] Specifically, since the response script cannot be obtained through the high-frequency word library, the customer service needs to manually input the response data, at this time, the step of obtaining the input response data is performed.

[0072] Step 205, in the case that the second keyword and the high-frequency words match successfully and the input instruction is received, the step of obtaining the input response data is performed.

[0073] The input instruction indicates that the response data is input.

[0074] Specifically, after obtaining the response script through the high-frequency word library, the customer service is assisted to make recommendations, but regardless of the reason, the customer service does not choose the response script recommended based on the high-frequency word library, but manually inputs the response data, at this time, since the input instruction is received, the step of obtaining the input response data is performed.

[0075] The response assistance mode of the present disclosure can automatically determine the response script and recommend it to the customer service based on the customer question data, or automatically determine the response script and recommend it to the customer service based on the response data input by the customer service, without the customer service needing to manually input the reply content completely, saving time, improving efficiency, and improving user experience.

[0076] The reply content is greater than or equal to the response data.

[0077] Specifically, before obtaining the response data, the customer service needs to manually turn on the auxiliary function, of course, the auxiliary function can also be in an always-on state, and the customer service can also turn it off according to his own needs. The auxiliary function is used to represent the auxiliary response service provided for the customer service.

[0078] Specifically, after obtaining the response data, the response data is preprocessed, including judgment of sensitive words, conversion between simplified and traditional Chinese, text correction, etc.

[0079] First, the sensitive word judgment is carried out. If the response data includes sensitive words, the customer service of the customer ends, that is, the auxiliary response recommendation is not carried out on the response data, and the response data cannot be sent to the customer. Among them, the sensitive word judgment is carried out through the preset sensitive word library, and the sensitive word library can be updated at any time.

[0080] After determining that the response data does not include sensitive words, the traditional-simplified Chinese conversion tool is used for traditional-simplified Chinese conversion; the wrong word library is used to find and replace the wrong words to correct the text.

[0081] Specifically, the preprocessed response data is taken as new response data.

[0082] The present disclosure pre-processes the response data to ensure the accuracy of the response data and improves the efficiency of subsequent response tactics acquisition.

[0083] Step 102, extracting the first keyword in the response data, and determining the corresponding index number of each first keyword in the tactic index table.

[0084] Specifically, the present disclosure needs to pre-create a tactic index table and a tactic table. The creation of the tactic index table and the tactic table is based on historical response data. The present disclosure creates different tactic index tables and tactic tables for different customer services. Specifically, it can be divided by the department of the customer service, for example, pre-sale and after-sale, that is, the tactic index table and the tactic table corresponding to the pre-sale, and the tactic index table and the tactic table corresponding to the after-sale; it can also be divided by the product responsible by the customer service, for example, dividing the home into one category and dividing the electrical into one category, that is, the tactic index table and the tactic table corresponding to the home, and the tactic index table and the tactic table corresponding to the electrical; it can also configure the tactic index table and the tactic table corresponding to itself for each customer service; etc.

[0085] The present disclosure establishes a personalized response tactic library according to the historical response data of the customer service. In the process of customer service input, the corresponding personalized response assistance is provided for the customer service to reply, which greatly improves the efficiency of the customer service, shortens the waiting time of the customer, and improves the user experience. Among them, the response tactic library includes: a tactic index table and a tactic table.

[0086] Next, taking the configuration of the tactic index table and the tactic table corresponding to itself for each customer service as an example, a customer service is taken as an example for illustration:

[0087] First, obtain all historical response data of the customer service.

[0088] Second, remove the stop words in each sentence in the historical response data to obtain the target historical response data. Among them, the stop words include: please, of, hello, and other expandable words.

[0089] In the third step, the target historical response data is subjected to word segmentation processing to obtain a word dictionary, wherein the word dictionary is a string set composed of all words appearing in the target historical response data.

[0090] In the fourth step, a script index table is created based on the word dictionary, as shown in Table 1.

[0091]

[0092]

[0093] Table 1 Script index table

[0094] In the field of the script index number in the script index table, the first number in each bracket represents the index number, i.e., the second number in the script table, i.e., the corresponding response script, and the second number represents the frequency of the keyword appearing in the response script.

[0095] According to the above process steps, the script index table and the script table for each customer service can be created.

[0096] The script table is shown in Table 2, which is the commonly used script document of the customer service in actual operation:

[0097] Second number Response tactics 1 Hello, what can I do for you? 2 Hello, your feedback will be given back to you within a day 3 Hello, what problem do you want to consult? 4 I'm checking for you, please wait a moment. 5 Are you going to consult the problem of this order?

[0098] Table 2 Script table

[0099] In one specific embodiment, after obtaining the response data, the script index table and the script table corresponding to the customer service identifier of the response data are obtained, the response data is preprocessed, then the first keyword in the response data is extracted, the first keyword is matched with the keywords in the script index table, and the index number in the script index table is obtained.

[0100] Specifically, when the script index table and the script table are divided based on the department where the customer service is located, the department corresponding to the customer service identifier is determined, and the script index table and the script table corresponding to the department are obtained; when the script index table and the script table are divided based on the product responsible by the customer service, the product corresponding to the customer service identifier is determined, and the script index table and the script table corresponding to the product are obtained; when the script index table and the script table are divided based on the customer service itself, the script index table and the script table corresponding to the customer service identifier are determined. Of course, the corresponding relationship between the script index table and the script table can be established in advance, and the script index table corresponding to the customer service identifier can be directly obtained, and the script table can be obtained based on the above corresponding relationship.

[0101] The present disclosure uses the script index table and the script table to assist in response, which can improve the efficiency of obtaining response scripts.

[0102] Step 103, obtaining the corresponding response dialogue in the dialogue table for each index number.

[0103] Wherein, the index number of the dialogue index table is used to represent the dialogue identifier of the dialogue table, and the dialogue identifier and the response dialogue are one-to-one.

[0104] Wherein, the dialogue identifier is the second number.

[0105] Specifically, a specific example is given to illustrate how to obtain the response dialogue through the dialogue index table and the dialogue table:

[0106] For example, when the customer service inputs Please ask, I will help you, the dialogue index number is found to be (1:1) and (3:1) in the dialogue index table, and the index numbers 1 and 3 can be obtained, as shown below:

[0107] Please (1:1)(3:1) Help you (1:1)

[0108] The response dialogue in the dialogue table can be obtained as the response dialogue with the second number 1 and the response dialogue with the second number 3, as shown below:

[0109] 1 Hello, what can I do for you? 3 Hello, what problem do you want to consult?

[0110] Here, it needs to be simply explained that since the keyword of the response dialogue with the second number 1 is 2 and the keyword of the response dialogue with the second number 3 is 1, the display priority of the response dialogue with the second number 1 is greater than that of the response dialogue with the second number 3.

[0111] Step 104, generating a preset number of target response dialogues based on the obtained response dialogues.

[0112] In one specific embodiment, since the number of recommendations that can be displayed on the display screen is certain, it is necessary to determine a preset number of target response dialogues based on the obtained response dialogues, which is implemented as follows: determining the number of dialogue of the response dialogue; in the case that the number of dialogue is less than the preset number, obtaining a supplementary number of standard dialogues, taking the standard dialogues and the response dialogues as the target response dialogues, the supplementary number being the difference between the preset number and the number of dialogue, and the standard dialogue being a pre-set general dialogue; in the case that the number of dialogue is equal to the preset number, taking the response dialogue as the target response dialogue; in the case that the number of dialogue is greater than the preset number, extracting a preset number of response dialogues from the response dialogues based on the response data as the target response dialogues.

[0113] Wherein, the standard dialogue is, for example, Thank you, Goodbye, etc.

[0114] Next, a specific example is given to illustrate how to obtain a preset number of target dialogues based on the response dialogues:

[0115] wherein, taking 5 as an example for illustration:

[0116] determine whether the found response dialogue is greater than 5;

[0117] if equal to 5, then directly return, because the capacity of the response auxiliary box is 5;

[0118] if less than 5, then supplement the standard dialogue;

[0119] if greater than 5, then filter out the first 5 response dialogues through the sentence similarity method. There are many methods for calculating sentence similarity, but because the customer service often expects to obtain response auxiliary dialogues in less data or key characters, this place directly selects the public number of times to filter the sentences. Specifically, the response data and the found response dialogue are cut by words respectively, and then the intersection word number is calculated. Alternatively, after cutting by words respectively, the cosine similarity distance of the sentence encoding is calculated according to word2vector, and the distance value is filtered. Finally, the corresponding 5 target response data are displayed for the customer service to click.

[0120] In one specific embodiment, because the recommended number of display screens is certain, in the case where the number of dialogues is greater than the preset number, the preset number of response dialogues needs to be determined from the response dialogues, and the specific implementation is as follows:

[0121] input the response data and the response dialogue into the score evaluation model to obtain the target response dialogue output by the score evaluation model;

[0122] wherein, the score evaluation model is trained based on the response data sample, the response dialogue sample and the target response dialogue sample, the first sample number of the response dialogue sample is greater than the preset number, and the second sample number of the target response dialogue sample is equal to the preset number;

[0123] wherein, the score evaluation model is used to determine the target response dialogue by the representation feature obtained by feature extraction based on the response data sample on the response dialogue sample.

[0124] In one specific embodiment, the specific implementation of obtaining the target response dialogue based on the score evaluation model is as follows:

[0125] input the response data and the response dialogue into the score evaluation model, and perform the following feature extraction operations on the response data and each response dialogue:

[0126] determine the longest common sequence corresponding to the response data and the response dialogue; calculate the ratio of the first length of the longest common sequence to the second length of the response dialogue, and the longest common sequence is the longest continuous data in the same continuous data possessed by the response data and the response dialogue;

[0127] The ratio values obtained based on the response data and the response scripts of each group are sorted according to the size relationship to obtain a target value sequence.

[0128] The response script corresponding to the first preset number of items in the target value sequence is taken as the target response script.

[0129] Specifically, the feature extraction operation performed on the response data and each response script can further include:

[0130] determining an edit distance corresponding to the response data and the response script; and calculating a second ratio of the edit distance and the second length, the edit distance being a data length that needs to be modified to modify the response data into the response script, wherein the data length that needs to be modified is a length of data that is added and deleted when the response data is modified into the response script.

[0131] On the basis of the above feature extraction operation, the specific implementation of generating the target response script is as follows:

[0132] For each piece of response data, the sum of the first ratio and the second ratio is calculated to obtain a first summation result.

[0133] The first summation result is sorted according to the size relationship to obtain a second target sequence value.

[0134] The response script corresponding to the first preset number of items in the second target value sequence is taken as the target response script.

[0135] The first ratio is a ratio of the first length of the longest common sequence and the second length of the response script.

[0136] Specifically, the feature extraction operation performed on the response data and each response script can further include:

[0137] determining a keyword edit distance corresponding to the response data and the response script; and calculating a third ratio of the keyword edit distance and the second length, the keyword edit distance being a data length that needs to be modified to modify a first keyword in the response data into a keyword in the response script, the data length that needs to be modified being a length of data that is added and deleted when the first keyword in the response data is modified into the keyword in the response script.

[0138] On the basis of the above feature extraction operation, the specific implementation of generating the target response script is as follows:

[0139] For each piece of response data, the sum of the first ratio, the second ratio and the third ratio is calculated to obtain a second summation result.

[0140] The second summation result is sorted according to the size relationship to obtain a third target sequence value.

[0141] The response dialogue corresponding to the first preset number of items in the third target value sequence is taken as the target response dialogue.

[0142] Specifically, the following feature extraction operations are performed on the response data and each response dialogue, which can further include:

[0143] A fourth ratio of the number of the first keywords in the response data to the total number of all keywords in the dialogue index table is determined.

[0144] On the basis of the above feature extraction operations, the specific implementation of generating the target response dialogue is as follows:

[0145] For each piece of response data, the sum of the first ratio, the second ratio, the third ratio and the fourth ratio is calculated to obtain a third summation result.

[0146] The third summation result is sorted according to the size relationship to obtain a fourth target sequence value.

[0147] The response dialogue corresponding to the first preset number of items in the fourth target value sequence is taken as the target response dialogue.

[0148] The present disclosure scores each response dialogue by using the score evaluation model to obtain the target response dialogue that best meets the requirements of the customer service, thereby improving the accuracy of customer replies and improving the user experience.

[0149] In one specific embodiment, after generating the preset number of target response dialogues, the display priority of each target response dialogue is determined, and the display priority is used to represent the order of the target response dialogue when displayed on the screen.

[0150] In one specific embodiment, the specific implementation of determining the display priority of each target response dialogue is as follows:

[0151] In the case where the target response dialogue includes a standard dialogue, the display priority of the response dialogue is greater than that of the standard dialogue; in the case where the target response dialogue does not include a standard dialogue, the sum of the number of first keywords included in each response dialogue and the frequency of the first keywords is calculated to obtain a summation result; and the display priority of the target response dialogue is determined based on the summation result.

[0152] The frequency of the first keyword can be obtained through the dialogue index table.

[0153] Specifically, the display priority of the response dialogue is greater than that of the standard dialogue, and the display priority between each response dialogue is determined based on the number of first keywords included in the response dialogue and the frequency of the first keywords. The standard dialogue does not consider the display priority and can be randomly determined.

[0154] This disclosure configures a display priority for each target response script, which can better provide customer service with accurate response assistance and improve the accuracy of customer service replies.

[0155] Below, through Figure 3 The embodiments of this disclosure are described in detail below:

[0156] Step 301: Obtain the response data entered by the customer service representative.

[0157] Step 302: Determine whether the response data contains sensitive words. If yes, proceed to step 303; otherwise, proceed to step 304.

[0158] Step 303, end the process.

[0159] Step 304: Use a simplified / traditional Chinese conversion tool to convert the response data to simplified / traditional Chinese.

[0160] Step 305: Use a misspelling database to find and replace erroneous characters in the response data to correct the text and obtain new response data.

[0161] Step 306: Extract the first keyword from the response data.

[0162] Step 307: Determine whether the first keyword can be successfully matched with the high-frequency response words in the response high-frequency word library. If yes, proceed to step 308; otherwise, proceed to step 309.

[0163] Step 308: Obtain the response scripts corresponding to the high-frequency words of the successfully matched responses.

[0164] Step 309: Determine the index number corresponding to each first keyword in the script index table, and the response script for that index number in the script table.

[0165] Step 310: Determine whether the number of response scripts is greater than or equal to the preset number. If yes, proceed to step 311; otherwise, proceed to step 312.

[0166] Step 311: If the number of response scripts is greater than the preset number, the preset number of response scripts are determined from the response scripts using the score evaluation model as the target response scripts; if the number of response scripts is equal to the preset number, the response script is the target response script.

[0167] Step 312: Obtain the standard scripts for the additional number of responses, and use the response scripts and standard scripts as the target response scripts.

[0168] Step 313: Display the results after prioritizing the target response script.

[0169] The response script generation method disclosed herein acquires the input response data in real time when the customer service representative enters the response data; extracts the first keyword from the response data to obtain the target response script; specifically, it determines the index number corresponding to each first keyword in the script index table; acquires the response script corresponding to each index number in the script table; and generates a preset number of target response scripts based on the acquired response scripts. It is evident that this disclosure analyzes the response data input by the customer service representative in real time and provides the customer service representative with corresponding target response scripts with high accuracy. This allows customer service representatives to select target response scripts according to their needs to reply to customers without having to manually type all the content. The entire process is fast and convenient, improving the efficiency and accuracy of customer service responses.

[0170] The response script generation apparatus provided in the embodiments of this disclosure will be described below. The response script generation apparatus described below can be referred to in correspondence with the response script generation method described above. Repeated parts will not be repeated. Figure 4 As shown, the device includes:

[0171] The first acquisition module 401 is used to acquire the input response data;

[0172] The determination module 402 is used to extract the first keyword from the response data and determine the index number corresponding to each first keyword in the speech index table;

[0173] The second acquisition module 403 is used to acquire the response script corresponding to each index number in the script table. The index number of the script index table is used to represent the script identifier of the script table, and the script identifier and the response script correspond one-to-one.

[0174] The generation module 404 is used to generate a preset number of target response scripts based on the acquired response scripts.

[0175] In one specific embodiment, the generation module 404 is specifically used to determine the number of response scripts; if the number of scripts is less than a preset number, it obtains a supplementary number of standard scripts, and uses the standard scripts and response scripts as target response scripts, where the supplementary number is the difference between the preset number and the number of scripts, and the standard scripts are pre-set general scripts; if the number of scripts is equal to the preset number, it uses the response scripts as target response scripts; if the number of scripts is greater than the preset number, it extracts a preset number of response scripts from the response scripts as target response scripts based on the response data.

[0176] In one specific embodiment, the generation module 404 is specifically used to input response data and response scripts into a score evaluation model to obtain the target response script output by the score evaluation model; wherein, the score evaluation model is trained based on response data samples, response script samples, and target response script samples, the number of first samples of response script samples is greater than a preset number, and the number of second samples of target response script samples is equal to the preset number; wherein, the score evaluation model is used to determine the target response script by using representation features obtained by feature extraction of response script samples based on response data samples.

[0177] In one specific embodiment, the generation module 404 is specifically used to input response data and response scripts into a score evaluation model, and perform the following feature extraction operations on the response data and each response script: determine the longest common sequence corresponding to the response data and response scripts; calculate the ratio of the first length of the longest common sequence to the second length of the response script, wherein the longest common sequence is the longest continuous data among the same continuous data of the response data and response scripts; sort each set of ratios obtained based on the response data and response scripts according to their size relationship to obtain a target value sequence; and take the response scripts corresponding to the first preset number of items in the target value sequence as the target response scripts.

[0178] In one specific embodiment, the generation module 404 is further configured to determine the display priority of each target response script, wherein the display priority is used to characterize the order in which the target response scripts are displayed.

[0179] In one specific embodiment, the generation module 404 is further configured to: when the target response script includes the standard script, the display priority of the response script is greater than that of the standard script; when the target response script does not include the standard script, calculate the sum of the number of words of the first keyword included in each response script and the frequency of the first keyword, and obtain a summation result; and determine the display priority of the response script based on the summation result.

[0180] In one specific embodiment, the determining module 402 is further configured to obtain the script index table and script table corresponding to the customer service identifier of the customer service representative.

[0181] In one specific embodiment, the first acquisition module 401 is further configured to acquire input question data; extract a second keyword from the question data; match the second keyword with high-frequency words in a preset high-frequency word library; if the second keyword and high-frequency words fail to match, execute the step of acquiring input response data; if the second keyword and high-frequency words match successfully and an input instruction is received, execute the step of acquiring input response data, wherein the input instruction indicates the input response data.

[0182] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as...Figure 5 As shown, the electronic device may include a processor 501, a communications interface 502, a memory 503, and a communication bus 504. The processor 501, communications interface 502, and memory 503 communicate with each other via the communication bus 504. The processor 501 can call logical instructions in the memory 503 to execute a method for generating response scripts. This method includes: acquiring input response data; extracting a first keyword from the response data and determining the index number corresponding to each first keyword in a script index table; acquiring the response script corresponding to each index number in the script table; and generating a preset number of target response scripts based on the acquired response scripts.

[0183] Furthermore, the logical instructions in the aforementioned memory 503 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this disclosure, essentially, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0184] On the other hand, this disclosure also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can execute the response script generation method provided by the above methods. The method includes: acquiring input response data; extracting a first keyword from the response data and determining the index number corresponding to each first keyword in a script index table; acquiring the response script corresponding to each index number in the script table; and generating a preset number of target response scripts based on the acquired response scripts.

[0185] In another aspect, this disclosure also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described methods for generating response scripts. The method includes: acquiring input response data; extracting a first keyword from the response data and determining the index number corresponding to each first keyword in a script index table; acquiring the response script corresponding to each index number in the script table; and generating a preset number of target response scripts based on the acquired response scripts.

[0186] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0187] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0188] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit them. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure.

Claims

1. A method for generating response scripts, characterized in that, include: Obtain the input response data; The response data is an incomplete reply entered by customer service; Extract the first keyword from the response data and determine the corresponding script index number for each first keyword in the script index table; the first keyword is a word other than a stop word; the script index number includes the index number and the frequency of the first keyword appearing in the response script corresponding to the index number; Extract the index number from the script index number, and obtain the corresponding response script for each index number in the script table based on the extracted index number. The index number is used to represent the script identifier of the script table, and the script identifier and the response script correspond one-to-one. Based on the acquired response scripts, a preset number of target response scripts are generated; the target response scripts are used by customer service representatives to select target response scripts based on their own needs. If the target response script does not include the standard script, calculate the sum of the number of words containing the first keyword in each response script and the frequency of the first keyword, and obtain a summation result; determine the display priority of the response script based on the summation result.

2. The method for generating response scripts according to claim 1, characterized in that, The step of generating a preset number of target response scripts based on the acquired response scripts includes: Determine the number of responses in the response script; If the number of scripts is less than the preset number, a supplementary number of standard scripts is obtained, and the standard scripts and the response scripts are used as the target response scripts. The supplementary number is the difference between the preset number and the number of scripts, and the standard scripts are pre-set general scripts. If the number of responses is equal to the preset number, the response response will be used as the target response response. If the number of dialogues is greater than the preset number, a preset number of response dialogues are extracted from the response dialogues based on the response data as the target response dialogues.

3. The method for generating response scripts according to claim 2, characterized in that, The step of extracting a preset number of response phrases from the response phrases based on the response data as the target response phrases includes: The response data and the response script are input into the score evaluation model to obtain the target response script output by the score evaluation model; The score evaluation model is trained based on response data samples, response script samples, and target response script samples. The number of first samples of the response script samples is greater than the preset number, and the number of second samples of the target response script samples is equal to the preset number. The score evaluation model is used to determine the target response script by extracting representation features from the response script samples based on the response data samples.

4. The method for generating response scripts according to claim 3, characterized in that, The step of inputting the response data and the response script into a score evaluation model to obtain the target response script output by the score evaluation model includes: Input the response data and the response scripts into a score evaluation model, and perform the following feature extraction operations on the response data and each response script: Determine the longest common sequence corresponding to the response data and the response script; calculate the ratio of the first length of the longest common sequence to the second length of the response script, wherein the longest common sequence is the longest consecutive data among the same consecutive data in the response data and the response script; For each group of ratios obtained based on the response data and the response script, sort them according to their magnitude to obtain a target value sequence; The response scripts corresponding to the first preset number of items in the target value sequence are taken as the target response scripts.

5. The method for generating response scripts according to claim 2, characterized in that, After generating a preset number of target response scripts, the method further includes: The display priority of each target response script is determined, and the display priority is used to characterize the order in which the target response scripts are displayed.

6. The method for generating response scripts according to claim 5, characterized in that, Determining the display priority of each target response script includes: When the target response script includes the standard script, the display priority of the response script is higher than that of the standard script.

7. The method for generating response scripts according to any one of claims 1-6, characterized in that, Before determining the index number corresponding to each of the first keywords in the speech index table, the method further includes: Obtain the dialogue index table and the dialogue table corresponding to the customer service identifier of the customer service representative.

8. The method for generating response scripts according to any one of claims 1-6, characterized in that, Before obtaining the input response data, the process also includes: Obtain the input question data; Extract the second keyword from the problem data; The second keyword is matched with high-frequency words in a preset high-frequency word library; If the second keyword and the high-frequency words fail to match, the step of obtaining the input response data is executed; If the second keyword and the high-frequency words are successfully matched, and an input instruction is received, the step of obtaining the input response data is executed, wherein the input instruction instructs the input of the response data.

9. A device for generating response scripts, characterized in that, include: The first acquisition module is used to acquire the input response data; The response data is an incomplete reply entered by customer service; The determination module is used to extract the first keyword from the response data and determine the corresponding script index number of each first keyword in the script index table; the first keyword is a word other than a stop word; the script index number includes the index number and the frequency of the first keyword appearing in the response script corresponding to the index number; The second acquisition module is used to extract the index number from the script index number, and obtain the response script corresponding to each index number in the script table according to the extracted index number, wherein the index number is used to represent the script identifier of the script table, and the script identifier and the response script correspond one-to-one; The generation module is used to generate a preset number of target response scripts based on the acquired response scripts; the target response scripts are used by customer service representatives to select target response scripts according to their own needs; when the target response scripts do not include standard scripts, the sum of the number of words of the first keyword included in each response script and the frequency of the first keyword is calculated to obtain a summation result; the display priority of the response scripts is determined based on the summation result.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for generating response scripts as described in any one of claims 1 to 8.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the method for generating response scripts as described in any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for generating response scripts as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for obtaining response verbal skill, computer equipment and storage medium

    CN110765244A