[go: up one dir, main page]

CN115033672A - Method, device, equipment, medium and product for generating answer - Google Patents

Method, device, equipment, medium and product for generating answer Download PDF

Info

Publication number
CN115033672A
CN115033672A CN202210681215.9A CN202210681215A CN115033672A CN 115033672 A CN115033672 A CN 115033672A CN 202210681215 A CN202210681215 A CN 202210681215A CN 115033672 A CN115033672 A CN 115033672A
Authority
CN
China
Prior art keywords
answer
response
target
data
generating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210681215.9A
Other languages
Chinese (zh)
Other versions
CN115033672B (en
Inventor
张智慧
邹波
宋双永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202210681215.9A priority Critical patent/CN115033672B/en
Publication of CN115033672A publication Critical patent/CN115033672A/en
Application granted granted Critical
Publication of CN115033672B publication Critical patent/CN115033672B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Telephonic Communication Services (AREA)
  • Machine Translation (AREA)

Abstract

The present disclosure provides a method, apparatus, device, medium and product for generating answer-to-talk, the method comprising: acquiring input response data; extracting first keywords in the response data, and determining the index number corresponding to each first keyword in the conversational index table; acquiring a corresponding response dialog of each index number in a dialog table; and generating a preset number of target response words based on the acquired response words. The method and the device are used for solving the defects of low efficiency and low accuracy caused by the fact that response contents need to be manually printed by customer service in the prior art, and realizing quick and accurate response speech providing assistance for the customer service.

Description

Method, device, equipment, medium and product for generating answer
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, a medium, and a product for generating answer-to-talk.
Background
In the present society, whether the e-commerce industry or the traditional industry, the service provided by the customer or the product is often required to provide related remote services, which are called customer service for this kind of practitioners. In the case of customer service, when remote service is required for a customer, an utterance which the customer wants to express needs to be edited into a text and transmitted to the customer.
In the text conversation process between the customer service and the customer, the customer service needs to manually print the content and send the content to the customer, and when the customer meets similar customers and needs to send the similar content, the customer service still needs to manually print and send the content.
Disclosure of Invention
The present disclosure provides a method, an apparatus, a device, a medium, and a product for generating a response technology, so as to solve the defects of low efficiency and low accuracy caused by manually typing out response content by a customer service in the prior art, and achieve a quick and accurate response technology for providing assistance to the customer service.
The present disclosure provides a method for generating a response utterance, including:
acquiring input response data;
extracting first keywords in the response data, and determining a corresponding index number of each first keyword in a conversational index table;
acquiring a corresponding answer dialog of each index number in a dialog table, wherein the index number of the dialog table is used for representing a dialog identifier of the dialog table, and the dialog identifier is in one-to-one correspondence with the answer dialog;
and generating a preset number of target response words based on the acquired response words.
According to the method for generating the answer, the generating of the preset number of target answers based on the obtained answers comprises:
determining the number of the answering techniques;
when the number of the dialogs is smaller than the preset number, acquiring standard dialogs with supplementary numbers, and taking the standard dialogs and the answering dialogs as the target answering dialogs, wherein the supplementary numbers are the difference values of the preset number and the number of the dialogs, and the standard dialogs are preset general dialogs;
taking the answer as the target answer under the condition that the number of the answers is equal to the preset number;
and under the condition that the number of the conversations is larger than the preset number, extracting the preset number of answer conversations from the answer conversations as the target answer based on the answer data.
According to a method for generating answer words provided by the present disclosure, the extracting a preset number of answer words from the answer words as the target answer words based on the answer data includes:
inputting the response data and the answer into a score evaluation model to obtain the target answer output by the score evaluation model;
the score evaluation model is obtained by training based on response data samples, response speech samples and target response speech samples, the number of first samples of the response speech samples is larger than the preset number, and the number of second samples of the target response speech samples is equal to the preset number;
the score evaluation model is used for determining the target answer through the representation characteristics obtained by extracting the characteristics of the answer data samples based on the answer data samples.
According to the method for generating a response to a word provided by the present disclosure, the step of inputting the response data and the response to a score evaluation model to obtain the target response output by the score evaluation model includes:
inputting the response data and the answers into a score evaluation model, and performing the following characteristic extraction operation on the response data and each answer:
determining a longest public sequence corresponding to the answer data and the answer; calculating a ratio of a first length of the longest common sequence to a second length of the answer, the longest common sequence being the longest continuous data of the same continuous data of the answer data and the answer;
sequencing each group according to the magnitude relation of the ratio obtained based on the response data and the response words to obtain a target value sequence;
and taking the answer words corresponding to the front preset number items in the target value sequence as the target answer words.
According to the method for generating answer words provided by the present disclosure, after the preset number of target answer words are generated, the method further includes:
and determining the display priority of each target answer, wherein the display priority is used for representing the sequence of the target answers during display.
According to a method for generating answer conversations provided by the present disclosure, the determining a display priority of each of the target answer conversations includes:
in a case where the target answer is the standard answer, a display priority of the answer is greater than the standard answer;
under the condition that the target answer does not include the standard answer, calculating the sum of the word number of the first keyword and the occurrence frequency of the first keyword in each answer to obtain a summation result; and determining the display priority of the answer based on the summation result.
According to the method for generating the answer dialog, before determining the corresponding index number of each first keyword in the dialog index table, the method further comprises the following steps:
and acquiring the dialect index table and the dialect table corresponding to the customer service identification of the customer service.
According to the method for generating the answer dialog provided by the present disclosure, before the obtaining of the input answer data, the method further includes:
acquiring input problem data;
extracting a second keyword in the question data;
matching the second keyword with a high-frequency vocabulary in a preset high-frequency word bank;
executing the step of acquiring the input response data when the matching of the second keyword and the high-frequency vocabulary fails;
and when the second keyword and the high-frequency vocabulary are successfully matched and an input instruction is received, executing the step of acquiring the input response data, wherein the input instruction indicates that the response data is input.
The present disclosure also provides a device for generating answer words, including:
the first acquisition module is used for acquiring input response data;
the determining module is used for extracting first keywords in the response data and determining the corresponding index number of each first keyword in the conversational index table;
the second acquisition module is used for acquiring the corresponding response dialect of each index number in the dialect table;
the generation module is used for generating preset number of target answer questions based on the obtained answer questions, wherein the index numbers of the answer index table are used for representing the answer identifiers of the answer table, and the answer identifiers correspond to the answer questions one to one.
The present disclosure also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the method for generating a reply dialog as described in any of the above.
The present disclosure also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of generating an answer-to-talk as described in any one of the above.
The present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements a method of generating an answer-to-talk as defined in any one of the above.
According to the method, the device, the equipment, the medium and the product for generating the answer, when the customer service inputs the answer data, the input answer data is acquired in real time; extracting a first keyword in the response data to obtain a target answer; specifically, the corresponding index number of each first keyword in the conversation index table is determined; acquiring a corresponding response dialog of each index number in a dialog table; based on the answer of acquireing, generate the target answer of presetting the number, it is thus clear that this open real-time analysis customer service input's answer data provides the target answer that corresponds with it for the customer service, and the accuracy is high for the customer service can select the target answer based on the needs of self, with replying customer, need not to export whole content through the mode of manual typing, and whole process is quick, convenient, has improved customer service reply efficiency and accuracy.
Drawings
In order to more clearly illustrate the technical solutions of the present disclosure or the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is one of the flow diagrams of a method of generating answer-to-speech provided by the present disclosure;
fig. 2 is a second flowchart of the method for generating answer-to-talk provided by the present disclosure;
fig. 3 is a third flowchart of a method for generating answer words provided by the present disclosure;
FIG. 4 is a schematic diagram of a device for generating an answer-to-speech provided by the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device provided by the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments, which can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present disclosure, belong to the protection scope of the embodiments of the present disclosure.
A method of generating a response to an embodiment of the present disclosure is described below with reference to fig. 1 to 3.
The method provides the customer service with an auxiliary response mode, so that the customer service can quickly and accurately reply the information of the customer. In the prior art, an auxiliary response mode does not exist for providing services for customer service, and the typing efficiency is increased only by means of next word recommendation of an input method.
Because the prior art does not provide auxiliary response service for the customer service, the customer service is required to manually input all the sessions each time, the input time is long, the efficiency is low, the condition of wrongly written characters exists, and the user experience is poor.
In addition, due to different departments, the customer service has different modules in charge, such as pre-sale customer service and after-sale customer service. Even if auxiliary response exists in the prior art, the method is a standard dialect fixed in advance, and corresponding dialect recommendation cannot be carried out aiming at different customer services.
In order to solve the above various problems, embodiments of the present disclosure provide a method for generating an answer dialog, which may be applied to an intelligent terminal, such as a mobile phone, a computer, a tablet, or the like, and may also be applied to a server. The method is applied to a server as an example, but the method is only described as an example and is not intended to limit the scope of the present disclosure. Some other descriptions in the embodiments of the present disclosure are also for illustration and are not intended to limit the scope of the present disclosure, and will not be described any more.
The method is specifically implemented as shown in fig. 1:
step 101, acquiring input response data.
Specifically, the customer service acquires the response data in the input box of the display when replying the response data to the customer based on the display.
The acquisition process can be real-time acquisition, namely, the customer service acquires the whole response data after inputting one character; or after the customer service inputs a character, acquiring the response data, and combining the previously acquired response data to obtain the overall response data.
The obtaining process may also be to obtain the response data based on a preset data obtaining policy, for example, when it is determined that the customer service enters a preset number of characters, obtain the overall response data, specifically, for example, when it is determined that the customer service enters 3, 4, or 5 characters, obtain the overall response data; or acquiring the response data corresponding to the number of the current preset characters, and combining the response data acquired before to obtain the overall response data.
In one embodiment, in order to provide accurate and effective target answering for the customer service, before acquiring the answering data input by the customer service, analysis and judgment are performed on the question data input by the customer and the actual operation of the customer service to determine a specific auxiliary manner, as shown in fig. 2:
step 201, obtaining input question data.
Specifically, when the customer sends the question data to the customer service based on the display, the question data displayed on the display is acquired.
Step 202, extracting a second keyword in the question data.
Specifically, the problem data is subjected to word segmentation processing to obtain word segmentation results of the problem data, and second keywords are extracted from the word segmentation results of the problem data. The second keywords are words for representing customer requirements.
And step 203, matching the second keyword with a high-frequency vocabulary in a preset high-frequency word bank.
Specifically, a high-frequency word bank is created in advance, and the high-frequency word bank is obtained based on the historical problem data of the customer. The high-frequency word bank comprises: high frequency vocabulary and answer words corresponding to the high frequency vocabulary. Answering in the high frequency thesaurus is also used to provide supplementary answering services for customer services.
And step 204, under the condition that the matching of the second keyword and the high-frequency vocabulary fails, executing the step of acquiring the input response data.
Specifically, since the answer may not be obtained through the high-frequency lexicon, the customer service person is required to manually input the response data, and at this time, the step of acquiring the input response data is executed.
And step 205, when the second keyword and the high-frequency vocabulary are successfully matched and the input instruction is received, executing the step of acquiring the input response data.
Wherein the input instruction indicates that the response data is input.
Specifically, after the answer is obtained through the high-frequency lexicon, auxiliary recommendation is performed on the customer service, but for any reason, the customer service does not select the answer to be selected based on the high-frequency lexicon recommendation mode, but manually inputs the answer data, and at the moment, the input instruction is received, so that the step of acquiring the input answer data is executed.
The response auxiliary mode can automatically determine the answer based on the question data of the customer and recommend the answer to the customer service, and also can automatically determine the answer based on the response data input by the customer service and recommend the answer to the customer service without manually inputting the reply content completely by the customer service, thereby saving the time, improving the efficiency and improving the user experience.
Wherein the reply content is greater than or equal to the reply data.
Specifically, before the response data is obtained, the customer service is required to manually turn on the auxiliary function, and certainly, the auxiliary function may be in an on state all the time, and the customer service may also be turned off according to the needs of the customer service. Wherein the auxiliary function is used for characterizing the provision of auxiliary response service for the customer service.
Specifically, after the response data is obtained, preprocessing is performed on the response data, including: judgment of sensitive words, conversion between simplified and unsimplified words, text correction and the like.
Firstly, judging the sensitive words, if the response data comprises the sensitive words, the response service of the customer service to the customer is ended, namely, the response data is not subjected to auxiliary response recommendation, and the response data cannot be sent to the customer. The judgment of the sensitive words is carried out through a preset sensitive word bank, and the sensitive word bank can be updated at any time.
After determining that the response data does not comprise the sensitive words, performing simplified and traditional Chinese character conversion by using a simplified and traditional Chinese character conversion tool; and searching and replacing the wrong characters by using the wrong character library to correct the text.
Specifically, the preprocessed response data is used as new response data.
The method and the device for preprocessing the response data have the advantages that the response data are preprocessed in advance, accuracy of the response data is guaranteed, and efficiency of subsequently acquiring the answer is improved.
Step 102, extracting first keywords in the response data, and determining a corresponding index number of each first keyword in the conversational index table.
Specifically, the present disclosure requires the creation of a dialog index table and a dialog table in advance. The creation of the conversational index table and conversational tables is based on historical response data. The present disclosure creates different tactical index tables and tactical tables for different customer services. The division can be specifically carried out by a department where customer service is located, for example, pre-sale and post-sale, namely, a speech index table and a speech table corresponding to the pre-sale, and a speech index table and a speech table corresponding to the post-sale; the division can also be performed through products in charge of customer service, for example, the division of the household in charge is classified into one type and the division of the electric in charge is classified into one type, namely, a speech index table and a speech table corresponding to the household and a speech index table and a speech table corresponding to the electric; or configuring a corresponding speech index table and a speech table for each customer service; and the like.
The personalized response speech library is established according to the historical response data of the customer service, and in the process of customer service wiring input, personalized response assistance corresponding to the customer service is provided for the customer service motor to reply, so that the wiring efficiency of the customer service is greatly improved, the waiting time of customers is shortened, and the user experience is improved. Wherein, answer words art storehouse includes: a phonetics index table and a phonetics table.
In the following, a description is given by taking as an example that each customer service is configured with a speech index table and a speech table corresponding to itself, and specifically, a description is given by taking one customer service as an example:
first, all historical response data of the customer service is obtained.
And secondly, removing stop words from each sentence in the historical response data to obtain target historical response data. Wherein the stop words include: please, your, etc. are extensible words.
And thirdly, performing word segmentation processing on the target historical response data to obtain a word dictionary, wherein the word dictionary is a character string set formed by all words appearing in the target historical response data.
Fourth, a linguistic index table is created through the word dictionary, as shown in table 1.
Figure BDA0003696316850000091
Figure BDA0003696316850000101
TABLE 1 phonetics index Table
Wherein, in the field of the dialog index number in the dialog index table, the first number in each parenthesis represents the index number, namely the second number in the dialog table, namely the corresponding answer dialog, and the second number represents the frequency of the keyword appearing in the answer dialog.
And according to the flow steps, creating a speech index table and a speech table for each customer service.
Wherein, the dialect table, as shown in table 2, is a commonly used dialect document of the customer service in actual operation:
second number Answering operation
1 You good asking what can help you?
2 You can give feedback to you in a day
3 You, ask what question do you want to consult?
4 Ask you a little bit for your query.
5 Is you a question to consult the order?
TABLE 2 telephone operation table
In a specific embodiment, after the response data is obtained, a speech index table and a speech table corresponding to the customer service identifier of the customer service corresponding to the response data are obtained, preprocessing operation is performed on the response data, then a first keyword in the response data is extracted, and the first keyword is matched with the keyword in the speech index table to obtain an index number in the speech index table.
Specifically, when the tactical index table and the tactical 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 tactical index table and the tactical table corresponding to the department are obtained; when the tactical index table and the tactical table are divided based on the product in charge of customer service, determining the product corresponding to the customer service identification, and acquiring the tactical index table and the tactical table corresponding to the product; and when the word operation index table and the word operation show that the words operation index table and the word operation table are divided based on the customer service, determining the word operation index table and the word operation table corresponding to the customer service identification. Of course, the corresponding relationship between the speech index table and the speech table may be pre-established, the speech index table corresponding to the customer service identifier may be directly obtained, and the speech table may be obtained based on the corresponding relationship.
This openly adopts two tables cooperation uses of speech index table and speech table to respond to supplementary, can improve the acquisition efficiency of answering the speech.
And 103, acquiring a corresponding response dialog of each index number in the dialog table.
Wherein, the index number of the dialect index table is used for representing the dialect identification of the dialect table, and the dialect identification corresponds to the answering dialect one by one.
Wherein the verbal identification is the second number.
Specifically, a specific example is described of how to obtain the answer through the utterance index table and the utterance table:
for example, when customer service inputs a request, i help you, look up the index numbers of words as (1:1) and (3:1) in the words index table, and obtain the index numbers as 1 and 3, as follows:
asking questions (1:1)(3:1)
Help you (1:1)
The answer utterances in the utterance table are the second number 1 and the second number 3, as follows:
1 you good asking what can help you?
3 You good asking what question you want to consult?
Here, it should be simply explained that since the number of the keywords of the second number 1 answer is 2 and the number of the keywords of the second number 3 answer is 1, the display priority of the second number 1 answer is higher than that of the second number 3 answer.
And 104, generating a preset number of target response words based on the acquired response words.
In a specific embodiment, since the number of recommended entries that can be displayed on the display screen is fixed, a preset number of target answer words need to be determined based on the obtained answer words, and the specific implementation is as follows: determining the number of the answering techniques; under the condition that the number of the dialogs is smaller than the preset number, acquiring standard dialogs of the supplement number, taking the standard dialogs and the response dialogs as target response dialogs, wherein the supplement number is a difference value between the preset number and the number of the dialogs, and the standard dialogs are preset general dialogs; taking the answering as a target answering under the condition that the number of the dialogs is equal to the preset number; and under the condition that the number of the conversations is larger than the preset number, extracting the preset number of answer conversations from the answer conversations as the target answer conversations based on the answer data.
Among them, the standard dialogues are, for example: thank you, goodbye, etc.
In the following, a specific example is described to obtain a preset number of target utterances based on the response utterance:
the preset number is 5 for explanation:
judging whether the number of the searched answer words is more than 5;
if the number is equal to 5, returning directly, because the capacity of the response auxiliary frame is 5;
if the number of the Chinese patent medicines is less than 5, supplementing standard dialectic art to wrap the bottom;
if the number of the answer words is more than 5, the answer words of the first 5 are screened out by a sentence similarity method. However, since the customer service usually expects to acquire a response auxiliary conversation technique in characters or key characters with less data, the sentences are directly screened by a common frequency method. Specifically, the response data and the searched response words are segmented according to words respectively, and then the number of the intersecting words is calculated. Or after the words are segmented respectively, the cosine similarity distance of the sentence codes is calculated according to the word2vector, and screening is carried out according to the distance value. And finally, displaying the corresponding 5-item label response data for customer service to click.
In a specific embodiment, since the number of recommended entries that can be displayed on the display screen is fixed, when the number of dialogs is greater than the preset number, the preset number of answer dialogs needs to be determined from the answer dialogs, which is specifically implemented as follows:
inputting the response data and the answer into the score evaluation model to obtain a target answer output by the score evaluation model;
the score evaluation model is obtained by training based on response data samples, response speech samples and target response speech samples, the number of first samples of the response speech samples is larger than the preset number, and the number of second samples of the target response speech samples is equal to the preset number;
the score evaluation model is used for determining the target answer through the representation characteristics obtained by carrying out characteristic extraction on the answer samples corresponding to the answer data samples.
In one embodiment, the specific implementation of obtaining the target answer based on the score evaluation model is as follows:
inputting the response data and the answers into a score evaluation model, and performing the following characteristic extraction operations on the response data and each answer:
determining a longest common sequence of response data corresponding to the response utterance; calculating a ratio of a first length of a longest common sequence to a second length of the answer utterance, the longest common sequence being the longest continuous data of the same continuous data of the answer data and the answer utterance;
sequencing each group of ratios obtained based on the response data and the response to obtain a target value sequence according to the size relationship;
and taking the response words corresponding to the front preset number items in the target value sequence as target response words.
Specifically, the following feature extraction operations may be performed on the response data and each response utterance:
determining an editing distance corresponding to the response data and the response telephone operation; and calculating a second ratio of the editing distance to the second length, wherein the editing distance is the length of the data which needs to be modified when the response data is modified into the answer, and the length of the data which needs to be modified is the length of the data which is added and deleted when the response data is modified into the answer.
On the basis of the above feature extraction operation, a specific implementation of the target answer is generated as follows:
for each piece of response data, calculating the sum of the first ratio and the second ratio to obtain a first summation result;
sorting according to the magnitude relation of the first summation result to obtain a second target sequence value;
and taking the response words corresponding to the front preset number items in the second target value sequence as target response words.
Wherein the first ratio is a ratio of a first length of the longest common sequence to a second length of the answer dialog.
Specifically, the following feature extraction operations may be performed on the response data and each response utterance:
determining the editing distance of the keywords corresponding to the response data and the response telephone operation; and calculating a third ratio of the editing distance of the keywords to the second length, wherein the key editing distance is the length of the data which needs to be modified by modifying the first keywords in the response data into the keywords in the answer, and the length of the data which needs to be modified is the length of the data which is increased and deleted when the first keywords in the response data are modified into the keywords in the answer.
On the basis of the above feature extraction operation, a specific implementation of the target answer is generated as follows:
for each piece of response data, calculating the sum of the first ratio, the second ratio and the third ratio to obtain a second summation result;
sorting according to the magnitude relation of the second summation result to obtain a third target sequence value;
and taking the answer words corresponding to the front preset number items in the third target value sequence as target answer words.
Specifically, the following feature extraction operations may be performed on the response data and each response utterance:
a fourth ratio of the number of first keywords in the response data to the total number of all keywords in the conversational index table is determined.
On the basis of the above feature extraction operation, a specific implementation of the target answer is generated as follows:
for each piece of response data, calculating the sum of the first ratio, the second ratio, the third ratio and the fourth ratio to obtain a third summation result;
sequencing according to the magnitude relation of the third summation result to obtain a fourth target sequence value;
and taking the response words corresponding to the front preset number items in the fourth target value sequence as target response words.
According to the method and the device, each answer is scored by using the score evaluation model so as to obtain the target answer which best meets the customer service requirement, so that the accuracy of customer response is improved, and the user experience is improved.
In a specific embodiment, after a preset number of target responses are generated, the display priority of each target response is determined, and the display priority is used for representing the sequence of the target responses when displayed on the screen.
In one embodiment, the specific implementation of determining the display priority of each target answer is as follows:
in the case that the target answer utterance includes a standard utterance, a display priority of the answer utterance is greater than the standard utterance; under the condition that the target answer does not include the standard answer, calculating the sum of the word number of the first keyword and the occurrence frequency of the first keyword in each answer to obtain a summation result; and determining the display priority of the target answer based on the summation result.
Wherein, the frequency of the first keyword can be obtained by a conversational index table.
Specifically, the display priority of the answer utterances is greater than that of the standard utterances, and the display priority among the answer utterances is determined based on the number of words of the first keyword included in the answer utterances and the frequency of occurrence of the first keyword. The standard technique is determined randomly without considering the display priority.
The method and the device for displaying the target answering configuration display priority can better provide accurate answering assistance for customer service and improve the accuracy rate of customer service answering.
The embodiments of the present disclosure are specifically described below with reference to fig. 3:
step 301, obtaining response data input by the customer service.
Step 302, determining whether the response data includes a sensitive word, if yes, executing step 303, otherwise, executing step 304.
Step 303, end the process.
And step 304, performing simplified and simplified body conversion on the answer data by using a simplified and simplified body conversion tool.
And 305, searching and replacing the wrong characters in the response data by using the wrongly written character library to correct the text, so as to obtain new response data.
Step 306, extracting a first keyword in the response data.
Step 307, judging whether the first keyword can be successfully matched with the response high-frequency vocabulary in the response high-frequency vocabulary bank, if so, executing step 308, otherwise, executing step 309.
And step 308, acquiring a response dialect corresponding to the successfully matched response high-frequency vocabulary.
Step 309, determining the index number corresponding to each first keyword in the utterance index table, and the response utterance of the index number in the utterance table.
In step 310, it is determined whether the number of the answers is greater than or equal to the preset number, if yes, step 311 is executed, otherwise, step 312 is executed.
Step 311, determining a preset number of answer conversations from the answer conversations as a target answer by using the score evaluation model under the condition that the number of the answers of the answer conversations is larger than the preset number; and under the condition that the number of the answering conversations is equal to the preset number, the answering conversations are the target answering conversations.
Step 312, obtaining the standard dialogs with the supplementary number, and taking the answering and the standard dialogs as the target answering.
And 313, displaying the result of the priority processing of the target answer.
According to the method for generating the answer, when the customer service inputs the answer data, the input answer data is acquired in real time; extracting a first keyword in the response data to obtain a target response; specifically, the corresponding index number of each first keyword in the conversational index table is determined; acquiring a corresponding response dialog of each index number in a dialog table; based on the answer of acquireing, generate the target answer of presetting the number, it is thus clear that this disclose real-time analysis customer service input's answer data provides the target answer who corresponds with it for the customer service, and the accuracy is high, makes the customer service can select the target answer based on the needs of self to reply customer, need not to export whole content through the mode of manual typewriting, and whole process is quick, convenient, has improved customer service reply efficiency and accuracy.
The following describes the apparatus for generating answer words provided in the embodiment of the present disclosure, where the apparatus for generating answer words described below and the method for generating answer words described above may be referred to correspondingly, and the repeated parts are not described again, as shown in fig. 4, the apparatus includes:
a first obtaining module 401, configured to obtain input response data;
a determining module 402, configured to extract first keywords in the response data, and determine a corresponding index number of each first keyword in the conversational index table;
a second obtaining module 403, configured to obtain a corresponding answer dialog of each index number in the dialog table, where the index number of the dialog index table is used to represent a dialog identifier of the dialog table, and the dialog identifier corresponds to the answer dialog one to one;
a generating module 404, configured to generate a preset number of target answer utterances based on the obtained answer utterances.
In an embodiment, the generating module 404 is specifically configured to determine the number of the answering dialogues; under the condition that the number of the dialogs is smaller than the preset number, acquiring standard dialogs of the supplement number, taking the standard dialogs and the response dialogs as target response dialogs, wherein the supplement number is a difference value between the preset number and the number of the dialogs, and the standard dialogs are preset general dialogs; taking the answering as a target answering under the condition that the number of the dialogs is equal to the preset number; and under the condition that the number of the conversations is larger than the preset number, extracting the preset number of answer conversations from the answer conversations as the target answer conversations based on the answer data.
In a specific embodiment, the generating module 404 is specifically configured to input the response data and the answer into the score evaluation model to obtain a target answer output by the score evaluation model; the score evaluation model is obtained by training based on response data samples, response speech samples and target response speech samples, the number of first samples of the response speech samples is larger than the preset number, and the number of second samples of the target response speech samples is equal to the preset number; the score evaluation model is used for determining the target answer through the representation characteristics obtained by carrying out characteristic extraction on the answer samples corresponding to the answer data samples.
In one embodiment, the generating module 404 is specifically configured to input the response data and the responses into the score evaluation model, and perform the following feature extraction operations on the response data and each response: determining a longest common sequence of response data corresponding to the response utterance; calculating a ratio of a first length of a longest public sequence to a second length of a response utterance, the longest public sequence being the longest continuous data among the response data and the same continuous data that the response utterance has; sequencing each group of ratios obtained based on the response data and the response to obtain a target value sequence according to the size relationship; and taking the response words corresponding to the front preset number items in the target value sequence as target response words.
In a specific embodiment, the generating module 404 is further configured to determine a display priority of each target answer, where the display priority is used to characterize a sequence of the target answers when being displayed.
In one embodiment, the generating module 404 is further configured to, in a case that the target answer is a standard answer, display priority of the answer is greater than the standard answer; under the condition that the target answer does not include the standard answer, calculating the sum of the word number of the first keyword and the occurrence frequency of the first keyword in each answer to obtain a summation result; and determining the display priority of the answer based on the summation result.
In an embodiment, the determining module 402 is further configured to obtain a vocabularies index table and a vocabularies table corresponding to the customer service identifier of the customer service.
In a specific embodiment, the first obtaining module 401 is further configured to obtain input question data; extracting a second keyword in the question data; matching the second keyword with a high-frequency vocabulary in a preset high-frequency lexicon; executing a step of acquiring input response data in the case that the matching of the second keyword and the high-frequency vocabulary fails; and under the condition that the second keyword and the high-frequency vocabulary are successfully matched and an input instruction is received, executing the step of acquiring the input response data, wherein the input instruction indicates that the response data is input.
Fig. 5 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 5: a processor (processor)501, a communication Interface (Communications Interface)502, a memory (memory)503, and a communication bus 504, wherein the processor 501, the communication Interface 502, and the memory 503 are configured to communicate with each other via the communication bus 504. The processor 501 may call logic instructions in the memory 503 to perform a method of generating a response to a question, the method comprising: acquiring input response data; extracting first keywords in the response data, and determining a corresponding index number of each first keyword in a conversation index table; acquiring a corresponding response dialog of each index number in a dialog table; and generating a preset number of target response words based on the acquired response words.
In addition, the logic instructions in the memory 503 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present disclosure also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which when executed by a computer, enable the computer to perform the method for generating a response dialog provided by the above methods, the method comprising: acquiring input response data; extracting first keywords in the response data, and determining the index number corresponding to each first keyword in the conversational index table; acquiring a corresponding response dialog of each index number in a dialog table; and generating a preset number of target response words based on the acquired response words.
In yet another aspect, the present disclosure also provides a non-transitory computer-readable storage medium having stored thereon a computer program, which when executed by a processor, implements a method for generating a response to the above-mentioned items, the method including: acquiring input response data; extracting first keywords in the response data, and determining the index number corresponding to each first keyword in the conversational index table; acquiring a corresponding response dialog of each index number in a dialog table; and generating a preset number of target response words based on the acquired response words.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solutions of the present disclosure, not to limit them; although the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present disclosure.

Claims (12)

1. A method for generating answer words, comprising:
acquiring input response data;
extracting first keywords in the response data, and determining a corresponding index number of each first keyword in a conversational index table;
acquiring a response dialog corresponding to each index number in a dialog table, wherein the index number of the dialog index table is used for representing a dialog identifier of the dialog table, and the dialog identifier corresponds to the response dialog one by one;
and generating a preset number of target response words based on the acquired response words.
2. The method for generating answer utterances according to claim 1, wherein the generating a preset number of target answer utterances based on the obtained answer utterances includes:
determining the number of the answering techniques;
when the number of the dialogs is smaller than the preset number, acquiring standard dialogs with supplementary numbers, and taking the standard dialogs and the answering dialogs as the target answering dialogs, wherein the supplementary numbers are the difference values of the preset number and the number of the dialogs, and the standard dialogs are preset general dialogs;
taking the answer as the target answer under the condition that the number of the answers is equal to the preset number;
and under the condition that the number of the conversations is larger than the preset number, extracting the preset number of answer conversations from the answer conversations as the target answer based on the answer data.
3. The method for generating a response sentence according to claim 2, wherein the extracting a preset number of response sentences from the response sentences as the target response sentences based on the response data includes:
inputting the response data and the answer into a score evaluation model to obtain the target answer output by the score evaluation model;
the score evaluation model is obtained by training based on response data samples, response speech samples and target response speech samples, the number of first samples of the response speech samples is larger than the preset number, and the number of second samples of the target response speech samples is equal to the preset number;
the score evaluation model is used for determining the target answer through the representation characteristics obtained by extracting the characteristics of the answer data samples based on the answer data samples.
4. The method of claim 3, wherein the inputting the response data and the response into a score evaluation model to obtain the target response output by the score evaluation model comprises:
inputting the response data and the answers into a score evaluation model, and performing the following characteristic extraction operation on the response data and each answer:
determining a longest public sequence corresponding to the answer data and the answer; calculating a ratio of a first length of the longest common sequence to a second length of the answer, the longest common sequence being the longest continuous data of the same continuous data of the answer data and the answer;
sequencing each group according to the magnitude relation of the ratio obtained based on the response data and the response words to obtain a target value sequence;
and taking the answer words corresponding to the front preset number items in the target value sequence as the target answer words.
5. The method for generating answer words according to claim 2, wherein after generating a preset number of target answer words, the method further comprises:
and determining the display priority of each target answer, wherein the display priority is used for representing the sequence of the target answers during display.
6. The method of claim 5, wherein the determining the display priority of each of the target answers comprises:
in a case where the target answer is the standard answer, a display priority of the answer is greater than the standard answer;
under the condition that the target answer does not comprise the standard answer, calculating the sum of the word number of the first keyword and the occurrence frequency of the first keyword in each answer to obtain a summation result; determining a display priority of the answer based on the summation result.
7. The method for generating answer dialog according to any one of claims 1-6, wherein said determining each of said first keywords before the corresponding index number in the dialog index table further comprises:
and acquiring the dialect index table and the dialect table corresponding to the customer service identification of the customer service.
8. The method for generating answer-phone skills according to any one of claims 1 to 6, further comprising, before said obtaining input answer data:
acquiring input problem data;
extracting a second keyword in the question data;
matching the second keyword with a high-frequency vocabulary in a preset high-frequency word bank;
executing the step of acquiring the input response data when the matching of the second keyword and the high-frequency vocabulary fails;
and when the second keyword and the high-frequency vocabulary are successfully matched and an input instruction is received, executing the step of acquiring the input response data, wherein the input instruction indicates that the response data is input.
9. An answer-to-speech generation apparatus, comprising:
the first acquisition module is used for acquiring input response data;
the determining module is used for extracting first keywords in the response data and determining the corresponding index number of each first keyword in the conversational index table;
a second obtaining module, configured to obtain a response utterance corresponding to each index number in an utterance table, where the index number of the utterance index table is used to represent an utterance identifier of the utterance table, and the utterance identifier and the response utterance are in one-to-one correspondence;
and the generating module is used for generating preset number of target answer questions based on the acquired answer questions.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of generating an answerphone as claimed in any one of claims 1 to 8 when executing the program.
11. A non-transitory computer-readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing a method for generating an answer word according to any one of claims 1 to 8.
12. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method of generating answerphone of any of claims 1 to 8.
CN202210681215.9A 2022-06-15 2022-06-15 Methods, devices, equipment, media, and products for generating response scripts Active CN115033672B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210681215.9A CN115033672B (en) 2022-06-15 2022-06-15 Methods, devices, equipment, media, and products for generating response scripts

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210681215.9A CN115033672B (en) 2022-06-15 2022-06-15 Methods, devices, equipment, media, and products for generating response scripts

Publications (2)

Publication Number Publication Date
CN115033672A true CN115033672A (en) 2022-09-09
CN115033672B CN115033672B (en) 2025-11-18

Family

ID=83124058

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210681215.9A Active CN115033672B (en) 2022-06-15 2022-06-15 Methods, devices, equipment, media, and products for generating response scripts

Country Status (1)

Country Link
CN (1) CN115033672B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10275522B1 (en) * 2015-06-11 2019-04-30 State Farm Mutual Automobile Insurance Company Speech recognition for providing assistance during customer interaction
WO2019242090A1 (en) * 2018-06-19 2019-12-26 平安科技(深圳)有限公司 Intelligent customer service response method, device, and apparatus, and storage medium
CN110765244A (en) * 2019-09-18 2020-02-07 平安科技(深圳)有限公司 Method and device for acquiring answering, computer equipment and storage medium
CN111611356A (en) * 2019-02-25 2020-09-01 北京嘀嘀无限科技发展有限公司 Information searching method and device, electronic equipment and readable storage medium
CN111858897A (en) * 2020-07-30 2020-10-30 北京首汽智行科技有限公司 Customer service staff speech guiding method and system
US20210191988A1 (en) * 2019-12-19 2021-06-24 Oracle International Corporation Summarized logical forms for controlled question answering
US20210365500A1 (en) * 2020-05-19 2021-11-25 Miso Technologies Inc. System and method for question-based content answering
WO2022110637A1 (en) * 2020-11-27 2022-06-02 平安科技(深圳)有限公司 Question and answer dialog evaluation method and apparatus, device, and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10275522B1 (en) * 2015-06-11 2019-04-30 State Farm Mutual Automobile Insurance Company Speech recognition for providing assistance during customer interaction
WO2019242090A1 (en) * 2018-06-19 2019-12-26 平安科技(深圳)有限公司 Intelligent customer service response method, device, and apparatus, and storage medium
CN111611356A (en) * 2019-02-25 2020-09-01 北京嘀嘀无限科技发展有限公司 Information searching method and device, electronic equipment and readable storage medium
CN110765244A (en) * 2019-09-18 2020-02-07 平安科技(深圳)有限公司 Method and device for acquiring answering, computer equipment and storage medium
US20210191988A1 (en) * 2019-12-19 2021-06-24 Oracle International Corporation Summarized logical forms for controlled question answering
US20210365500A1 (en) * 2020-05-19 2021-11-25 Miso Technologies Inc. System and method for question-based content answering
CN111858897A (en) * 2020-07-30 2020-10-30 北京首汽智行科技有限公司 Customer service staff speech guiding method and system
WO2022110637A1 (en) * 2020-11-27 2022-06-02 平安科技(深圳)有限公司 Question and answer dialog evaluation method and apparatus, device, and storage medium

Also Published As

Publication number Publication date
CN115033672B (en) 2025-11-18

Similar Documents

Publication Publication Date Title
CN108847241B (en) Method for recognizing conference voice as text, electronic device and storage medium
CN112966081B (en) Methods, devices, equipment and storage media for processing question and answer information
CN110310663A (en) Method, device, equipment, and computer-readable storage medium for detecting illegal speech
CN111858854B (en) A question and answer matching method and related devices based on historical dialogue information
CN109977204A (en) A kind of intelligent Answer System and method in knowledge based library
CN111429157A (en) Method, device and equipment for evaluating and processing complaint work order and storage medium
CN114528851B (en) Reply sentence determination method, reply sentence determination device, electronic equipment and storage medium
CN117828057A (en) Knowledge question-answering method, device, equipment and storage medium
CN110852075A (en) Voice transcription method and device for automatically adding punctuation marks and readable storage medium
CN114818649A (en) Service consultation processing method and device based on intelligent voice interaction technology
CN114817507A (en) Reply recommendation method, device, device and storage medium based on intent recognition
CN110727764A (en) Phone operation generation method and device and phone operation generation equipment
CN113886553A (en) A text generation method, apparatus, device and storage medium
CN116108152A (en) Speech recommendation method, device, terminal equipment and medium
CN115292461A (en) Man-machine interaction learning method and system based on voice recognition
CN113889149A (en) Speech emotion recognition method and device
CN111046151A (en) Message processing method and device
CN114708047B (en) Outbound strategy operation method and system based on knowledge graph
CN113822029A (en) Customer service assistance method, device and system
CN114866648A (en) Customer service staff talk assisting method, device, equipment and readable storage medium
CN115688769A (en) Long text-based intention identification method, device, equipment and storage medium
CN111062211A (en) Information extraction method, device, electronic device and storage medium
CN111723559B (en) Real-time information extraction method and device
CN115033672A (en) Method, device, equipment, medium and product for generating answer
EP3908941A1 (en) Artificial intelligence system for business processes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant