Automatic reply method and device under message semantic analysis

文档序号:1889917 发布日期:2021-11-26 浏览:4次 中文

阅读说明:本技术 一种留言语义分析下的自动回复方法和装置 (Automatic reply method and device under message semantic analysis ) 是由 韩剑 李祎 冯伟 于 2021-07-22 设计创作,主要内容包括:本申请公开了一种留言语义分析下的自动回复方法和装置,该方法包括:获取客户的语音留言,其中,客户的语音留言是客户进行语音通信后通过自动应答留下的语音文件;将语音留言转换成文本信息;根据文本信息的内容对文本信息进行分类得到文本信息对应的第一类别;根据第一类别确定第一类别对应的话术模板,其中,话术包括至少一个语句;根据客户的联系方式与客户进行通信,在通信过程中播放话术模板。通过本申请解决了现有技术中客户留言需要人工坐席在空闲时回复所导致的成本高以及时效性不好的问题,从而降低了成本,能够在一定程度上提高对客户需求的响应速度,提高了客户的体验。(The application discloses an automatic reply method and a device under message semantic analysis, wherein the method comprises the following steps: acquiring a voice message of a client, wherein the voice message of the client is a voice file left by the client through automatic response after voice communication; converting the voice message into text information; classifying the text information according to the content of the text information to obtain a first category corresponding to the text information; determining a dialect template corresponding to the first category according to the first category, wherein the dialect comprises at least one statement; and communicating with the client according to the contact way of the client, and playing the conversation template in the communication process. Through the method and the device, the problems of high cost and poor timeliness caused by the fact that the customer leaves a message and needs to reply by a manual seat in an idle state in the prior art are solved, so that the cost is reduced, the response speed to customer demands can be improved to a certain extent, and the customer experience is improved.)

1. An automatic reply method under the analysis of leave word semantics is characterized by comprising the following steps:

acquiring a voice message of a client, wherein the voice message of the client is a voice file left by the client through automatic response after voice communication;

converting the voice message into text information;

classifying the text information according to the content of the text information to obtain a first category corresponding to the text information, wherein a plurality of categories are configured in advance, and the first category of the text information is at least one of the categories;

determining a dialect template corresponding to the first category according to the first category, wherein the dialect comprises at least one statement;

and communicating with the client according to the contact way of the client, and playing the conversation template in the communication process.

2. The method of claim 1, wherein, in the case that the first category includes a plurality of categories, determining, from the first category, a conversational template to which the first category corresponds comprises:

acquiring a dialect template corresponding to each of a plurality of categories included in the first category;

and sequencing the acquired dialect templates corresponding to each category to obtain the sequence for playing the dialect templates.

3. The method of claim 2, wherein playing the dialoging template during the communication comprises:

acquiring introduction voice of a dialect template corresponding to each category, wherein the introduction voice is used for introducing the content of the dialect template;

broadcasting the introduction voice of the dialect template corresponding to each category to the client;

receiving a dialog template selected by the client;

the dialogue template selected by the client is played first in the communication process.

4. The method of claim 3, wherein after the first playing of the client-selected conversational template during the communication, the method further comprises:

and judging whether the client finishes the communication process, and broadcasting other speech templates except the speech template selected by the client according to the sequence under the condition that the client does not finish the communication process.

5. The method of any of claims 1-4, wherein after playing the verbal template during the communication, the method further comprises:

and judging whether the client finishes the communication process, if not, converting the client into an artificial seat, and adjusting the priority of the client to be the highest.

6. An automatic reply device under the analysis of left message semantics is characterized by comprising:

the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a voice message of a client, and the voice message of the client is a voice file left by the client through automatic response after voice communication;

the conversion module is used for converting the voice message into text information;

the classification module is used for classifying the text information according to the content of the text information to obtain a first category corresponding to the text information, wherein a plurality of categories are configured in advance, and the first category of the text information is at least one of the categories;

the determining module is used for determining a dialect template corresponding to the first category according to the first category, wherein the dialect comprises at least one statement;

and the playing module is used for communicating with the client according to the contact way of the client and playing the dialect template in the communication process.

7. The apparatus of claim 6, wherein the determining module is configured to:

acquiring a dialect template corresponding to each of a plurality of categories included in the first category;

and sequencing the acquired dialect templates corresponding to each category to obtain the sequence of the dialect templates.

8. The apparatus of claim 7, wherein the playback module is configured to:

acquiring introduction voice of a dialect template corresponding to each category, wherein the introduction voice is used for introducing the content of the dialect template;

broadcasting the introduction voice of the dialect template corresponding to each category to the client;

receiving a dialog template selected by the client;

the dialogue template selected by the client is played first in the communication process.

9. The apparatus of claim 8,

the playing module is further configured to determine whether the client ends the communication process, and play other conversational templates other than the conversational template selected by the client according to the sequence when the client does not end the communication process.

10. The apparatus of any one of claims 5 to 9, further comprising:

and the switching module is used for judging whether the client finishes the communication process after the dialect template is played in the communication process, converting the client into an artificial seat if the client does not finish the communication process, and adjusting the priority of the client to be the highest.

Technical Field

The application relates to the field of language analysis, in particular to an automatic reply method and device under leave word semantic analysis.

Background

With the popularization of the automatic answering machine, many merchants answer the telephone of the customer by the automatic answering machine at present, and if the problem of the customer can be solved according to the flow set by the automatic answering machine, the labor cost can be saved. If the problem proposed by the customer can not be solved through the flow set by the automatic answering machine, the problem is generally processed by switching to manual operation.

If the switching is carried out manually, if the manual seats are not busy, the requirements of customers can be met quickly; if the human agent is busy, the method of waiting for the customer can be adopted, or the customer can be asked to leave a message later. For the condition that the customer leaves a message, a manual reply mode is also adopted, and when the manual seat is idle, the customer can be allocated to manually answer the question of the customer. On one hand, the processing mode has higher cost, on the other hand, the timeliness of answering the customer questions is not good, and the customer experience is reduced.

Disclosure of Invention

The embodiment of the application provides an automatic reply method and device under message semantic analysis, which are used for at least solving the problems of high cost and poor timeliness caused by the fact that a client message needs to be replied by a manual agent in an idle state in the prior art.

According to one aspect of the application, an automatic reply method under leave word semantic analysis is provided, which comprises the following steps: acquiring a voice message of a client, wherein the voice message of the client is a voice file left by the client through automatic response after voice communication; converting the voice message into text information; classifying the text information according to the content of the text information to obtain a first category corresponding to the text information, wherein a plurality of categories are configured in advance, and the first category of the text information is at least one of the categories; determining a dialect template corresponding to the first category according to the first category, wherein the dialect comprises at least one statement; and communicating with the client according to the contact way of the client, and playing the conversation template in the communication process.

Further, in a case that the first category includes a plurality of categories, determining, according to the first category, a dialogistic template corresponding to the first category includes: acquiring a dialect template corresponding to each of a plurality of categories included in the first category; and sequencing the acquired dialect templates corresponding to each category to obtain the sequence of playing the dialect templates by the automatic answering machine.

Further, playing the dialoging template during the communication process includes: acquiring introduction voice of a dialect template corresponding to each category, wherein the introduction voice is used for introducing the content of the dialect template; broadcasting the introduction voice of the dialect template corresponding to each category to the client; receiving a dialog template selected by the client; the dialogue template selected by the client is played first in the communication process.

Further, after the first playing of the dialect template selected by the client in the communication process, the method further includes: and judging whether the client finishes the communication process, and broadcasting other speech templates except the speech template selected by the client according to the sequence under the condition that the client does not finish the communication process.

Further, after the playing of the dialect template in the communication process, the method further includes: and judging whether the client finishes the communication process, if not, converting the client into an artificial seat, and adjusting the priority of the client to be the highest.

According to an aspect of the present application, there is provided an automatic reply device under leave word semantic analysis, including: the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a voice message of a client, and the voice message of the client is a voice file left by the client through automatic response after voice communication; the conversion module is used for converting the voice message into text information; the classification module is used for classifying the text information according to the content of the text information to obtain a first category corresponding to the text information, wherein a plurality of categories are configured in advance, and the first category of the text information is at least one of the categories; the determining module is used for determining a dialect template corresponding to the first category according to the first category, wherein the dialect comprises at least one statement; and the playing module is used for communicating with the client according to the contact way of the client and playing the dialect template in the communication process.

Further, the determination module is to: acquiring a dialect template corresponding to each of a plurality of categories included in the first category; and sequencing the acquired dialect templates corresponding to each category to obtain the sequence of playing the dialect templates by the automatic answering machine.

Further, the playing module is configured to: acquiring introduction voice of a dialect template corresponding to each category, wherein the introduction voice is used for introducing the content of the dialect template; broadcasting the introduction voice of the dialect template corresponding to each category to the client; receiving a dialog template selected by the client; the dialogue template selected by the client is played first in the communication process.

Further, the playing module is further configured to determine whether the client ends the communication process, and play other conversational templates other than the conversational template selected by the client according to the sequence when the client does not end the communication process.

Further, still include: and the switching module is used for judging whether the client finishes the communication process after the dialect template is played in the communication process, converting the client into an artificial seat if the client does not finish the communication process, and adjusting the priority of the client to be the highest.

In the embodiment of the application, a voice message of a client is obtained, wherein the voice message of the client is a voice file left by the client through automatic response after voice communication; converting the voice message into text information; classifying the text information according to the content of the text information to obtain a first category corresponding to the text information, wherein a plurality of categories are configured in advance, and the first category of the text information is at least one of the categories; determining a dialect template corresponding to the first category according to the first category, wherein the dialect comprises at least one statement; and communicating with the client according to the contact way of the client, and playing the conversation template in the communication process. Through the method and the device, the problems of high cost and poor timeliness caused by the fact that the customer leaves a message and needs to reply by a manual seat in an idle state in the prior art are solved, so that the cost is reduced, the response speed to customer demands can be improved to a certain extent, and the customer experience is improved.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:

fig. 1 is a flowchart of an automatic reply method under leave word semantic analysis according to an embodiment of the present application.

Detailed Description

It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.

It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.

In this embodiment, an automatic reply method under leave word semantic analysis is provided, and fig. 1 is a flowchart of an automatic reply method under leave word semantic analysis according to an embodiment of the present application, as shown in fig. 1, the flowchart includes the following steps:

step S102, obtaining a voice message of a client, wherein the voice message of the client is a voice file left by the client through automatic response after voice communication;

step S104, converting the voice message into text information;

step S106, classifying the text information according to the content of the text information to obtain a first category corresponding to the text information, wherein a plurality of categories are configured in advance, and the first category of the text information is at least one of the categories;

there are many classification methods, and as an implementation method that can be selectively added, each category is configured with a plurality of corresponding keywords in advance, and the matching is performed in the text information by using the plurality of keywords, and the number of times of matching the same word in the text is recorded. And recording the occurrence times of the keywords corresponding to each category in the text information for each category, and taking the category with the maximum occurrence times as the first category of the text information.

As another alternative embodiment, the classification may be performed by machine learning. The machine learning model may be trained using a plurality of sets of training data, where each set of training data in the plurality of sets of training data includes text information and a label corresponding to the text information, and the label is used to indicate a category to which the text information belongs. The trained model can be used, text information is used as information and input into the model, and the label output by the model is the type of the input text information.

As another classification method for machine learning, a plurality of sample sentences may be preprocessed to obtain word vector information of each sample sentence, where the word vector information includes a word vector of each word in each sample sentence, a word vector of a partial word in a first sample sentence in the plurality of sample sentences is modified, and each sample sentence corresponds to a target classification result. Classifying each sample statement based on the statement classification model and the word vector information of each sample statement to obtain a prediction classification result of each sample statement. Based on the predicted classification result and the target classification result, a first loss value is obtained. Based on the first loss value, model parameters of the sentence classification model are adjusted. The method can adjust parameters of the machine learning module, on one hand, when the word vector information corresponding to the sample sentence is obtained, the word vectors of partial words in the sample sentence are changed, and the changed word vector information is used as the basis for classifying the sample sentence, so that the sentence classification model can still accurately classify the changed sample sentence, the adaptability and the resistance of the sentence classification model to the sentence with indefinite change are enhanced, and the robustness of the sentence classification model is improved. On the other hand, the attention points of the sentence classification model can be changed by changing the word vectors of the partial words in the sample sentence, and the word vectors of the partial words in the sample sentence are changed, so that the sentence classification model can accurately classify the sentence, the sentence classification model focuses on global features, accurate classification is performed from the global aspect, local features are not focused excessively, if the local features are focused excessively, the features of the changed parts can be acquired, and accurate classification cannot be completed. Therefore, the condition of overfitting can be avoided, and the prediction accuracy of the sentence classification model is improved.

Step S108, determining a dialect template corresponding to the first category according to the first category, wherein the dialect comprises at least one statement;

as an alternative embodiment, the statement included in the conversational template may be a question statement or a statement. Logic processes can be further arranged in the language template and are used for identifying the answer content of the client after the question sentence, playing the sentence corresponding to the condition including the first keyword if the answer content includes the first keyword, and playing the preset sentence not including the condition corresponding to the first keyword if the answer content does not include the first keyword.

As another optional implementation, in the communication process, a tone of the client may also be obtained, the emotion of the client is determined according to the keyword in the voice of the client and the tone, and when the emotion of the client includes an unsatisfied emotion, the client is changed to an artificial seat, and the priority of the client is adjusted to be the highest.

There are many ways to determine the mood of a customer, for example, by collecting a voice sample. Extracting text information in the voice recording sample, preprocessing the text information, inputting a pre-established semantic emotion anger degree detection model, and outputting a semantic anger probability evaluation parameter; and acquiring corresponding evaluation parameters of the angry probability of the voice according to the voice spectrum information in the voice recording sample. And superposing the semantic angry probability evaluation parameter and the tone angry probability evaluation parameter through a Gaussian mixture model to obtain the comprehensive angry degree score of the voice. As a preferred scheme, the obtaining of the evaluation parameter of the semantic anger probability specifically comprises the following steps: dividing words of the collected text content. Secondly, the emotional tendency is divided into three categories of positive, negative and neutral, and the judgment of the polarity of the voice in the data is initialized by utilizing a universal voice tendency dictionary in the traditional method. ③ based on the word segmentation result of (r), using the latest model such as BERT or ERNIE2 (provided by google or baidu) to carry out sentence vectorization. And extracting semantic features to form a specific dialogue sentence vector. Fourthly, word embedding vectorization is carried out on the whole sentence by utilizing the embedding function in the BERT model. That is, a particular word is translated into a vector of N elements. The basic operation of word embedding vectorization is: the specific method is to obtain 12 or more layers of converter tokens by using a bidirectional encoder model of Google, then add vectorized words obtained from the last 3-4 layers, and finally obtain vectorized representation of the words. For example: "why do you let me wait so long? "such a word can be transformed into a matrix after the vectorized change, so as to enter the next machine learning. And fifthly, training the matrix obtained by the step (iv) and the training set obtained by the step (iv) by using the deep neural network DNN.

Step S110, communicating with the client according to the contact way of the client, and playing the dialect template in the communication process.

As another optional added embodiment, during the playing of the dialect template, a recording may be performed on the answer of the customer to the dialect template, then the recording is converted into a text, the text is subjected to semantic analysis, whether the customer obtains the expected answer is determined, and a label is printed, wherein the label is used for indicating whether the customer obtains the expected answer. If the marked labels are used for indicating that the customer obtains the expected answer, the occupation ratio of the labels without obtaining the expected answer is counted, if the occupation ratio exceeds 50%, the dialect template is sent to an administrator, and the fact that the dialect module needs to be modified is prompted. And for the client with the label not obtaining the expected answer, the recorded sound is pushed to a salesperson corresponding to the client, the salesperson judges whether the label is correct or not, if so, the salesperson follows up the client, and if not, the salesperson modifies the label into the expected answer.

Through the steps, the problems of high cost and poor timeliness caused by the fact that the customer leaves a message and needs to reply by a manual seat in an idle state in the prior art are solved, so that the cost is reduced, the response speed to the customer requirements can be improved to a certain extent, and the customer experience is improved.

In the foregoing step, the first category may include multiple categories, and in a case that the first category includes multiple categories, a dialect template corresponding to each of the multiple categories included in the first category may be obtained; and sequencing the acquired dialect templates corresponding to each category to obtain the sequence of playing the dialect templates by the automatic answering machine.

When the method includes a plurality of categories, an introduction voice of a dialect template corresponding to each category may be obtained first, where the introduction voice is used to introduce the content of the dialect template; broadcasting the introduction voice of the dialect template corresponding to each category to the client; receiving a dialog template selected by the client; the dialogue template selected by the client is played first in the communication process.

After the language template selected by the client is played first in the communication process, if the client requirement is met, the client ends the communication process, so that whether the client ends the communication process can be judged, and if the client does not end the communication process, other language templates except the language template selected by the client are played in the sequence. Further, after the dialog template is played in the communication process, whether the client ends the communication process is judged, if the client does not end the communication process, the client is converted into an artificial seat, and the priority of the client is adjusted to be the highest.

In this embodiment, an electronic device is provided, comprising a memory in which a computer program is stored and a processor configured to run the computer program to perform the method in the above embodiments.

The programs described above may be run on a processor or may also be stored in memory (or referred to as computer-readable media), which includes both non-transitory and non-transitory, removable and non-removable media, that implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.

These computer programs may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks, and corresponding steps may be implemented by different modules. In this embodiment, there is provided an apparatus called an automatic reply apparatus under leave word semantic analysis, including: the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a voice message of a client, and the voice message of the client is a voice file left by the client through automatic response after voice communication; the conversion module is used for converting the voice message into text information; the classification module is used for classifying the text information according to the content of the text information to obtain a first category corresponding to the text information, wherein a plurality of categories are configured in advance, and the first category of the text information is at least one of the categories; the determining module is used for determining a dialect template corresponding to the first category according to the first category, wherein the dialect comprises at least one statement; and the playing module is used for communicating with the client according to the contact way of the client and playing the dialect template in the communication process.

The modules in the device correspond to the steps in the method, which have already been described in the method and are not described again here.

For example, the determination module is configured to: acquiring a dialect template corresponding to each of a plurality of categories included in the first category; and sequencing the acquired dialect templates corresponding to each category to obtain the sequence of playing the dialect templates by the automatic answering machine.

For another example, the playback module is configured to: acquiring introduction voice of a dialect template corresponding to each category, wherein the introduction voice is used for introducing the content of the dialect template; broadcasting the introduction voice of the dialect template corresponding to each category to the client; receiving a dialog template selected by the client; the dialogue template selected by the client is played first in the communication process. Optionally, the playing module is further configured to determine whether the client ends the communication process, and play other conversational templates except the conversational template selected by the client according to the sequence when the client does not end the communication process. Optionally, the apparatus may further include: and the switching module is used for judging whether the client finishes the communication process after the dialect template is played in the communication process, converting the client into an artificial seat if the client does not finish the communication process, and adjusting the priority of the client to be the highest.

This embodiment may be used in the following scenarios: the method comprises the steps of taking customer information through marketing means, actively externally connecting the customer information to the customer, and collecting voice messages of the customer through automatic question answering. Then, different matching corresponding tactical templates are set according to the voice message scene, for example, if the prize of the lottery is not picked up, the matched prize is the picked-up tactical template.

The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:预训练语言模型的生成方法、装置、电子设备和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!