CN112735407B - Dialogue processing method and device - Google Patents

Dialogue processing method and device Download PDF

Info

Publication number
CN112735407B
CN112735407B CN202011551191.2A CN202011551191A CN112735407B CN 112735407 B CN112735407 B CN 112735407B CN 202011551191 A CN202011551191 A CN 202011551191A CN 112735407 B CN112735407 B CN 112735407B
Authority
CN
China
Prior art keywords
voice data
user
determining
session
features
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.)
Active
Application number
CN202011551191.2A
Other languages
Chinese (zh)
Other versions
CN112735407A (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.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online 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 Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202011551191.2A priority Critical patent/CN112735407B/en
Publication of CN112735407A publication Critical patent/CN112735407A/en
Application granted granted Critical
Publication of CN112735407B publication Critical patent/CN112735407B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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 or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/02Feature extraction for speech recognition; Selection of recognition unit
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/26Speech to text systems
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • G10L2015/225Feedback of the input speech
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The specification discloses a dialogue processing method and device, which can firstly receive voice data to be processed of a user. Next, a first session feature is determined based on the voice data exchanged during the current session. And determining an aggregation characteristic according to the voice data to be processed, the adopted session policy and the portrait information of the user. And then, inputting the first session feature and the aggregation feature into a strategy selection model to determine a target strategy. And inputting the first session feature, the aggregation feature and a plurality of reply sentences corresponding to the target strategy into a sentence selection model to determine a target sentence. And finally, sending the reply voice data corresponding to the target sentence to the terminal. Based on the first session features and the aggregation features of the fused user portraits, determining an adopted target strategy through a strategy selection model, and further determining a replied target sentence through a sentence selection model, so that the replied target sentence is more in line with the needs of the user, and a better service effect is achieved.

Description

Dialogue processing method and device
Technical Field
The present disclosure relates to the field of information processing technologies, and in particular, to a method and an apparatus for processing a session.
Background
Currently, some service platforms generally provide advanced service to users by intelligent voice customer service. When the intelligent voice customer service is set in the service platform, the scene states of various conversations and reply sentences corresponding to the scene states can be set in advance by a developer based on experience and configured in a finite state machine. And then when the intelligent voice customer service provides service for the user, judging which scene state is currently in according to the session information of the user through a finite state machine so as to further determine the corresponding reply sentence.
However, the above-mentioned various scene states and reply sentences set based on human experience cannot provide personalized business services for each user, and the service effect is poor.
Disclosure of Invention
The embodiment of the specification provides a dialogue processing method and device, which are used for partially solving the problems existing in the prior art.
The embodiment of the specification adopts the following technical scheme:
the dialogue processing method provided by the specification comprises the following steps:
receiving voice data to be processed sent by a user through a terminal;
according to other voice data of the user and reply voice data sent to the user in the current session process, determining a corresponding voice session text through voice recognition processing, extracting features of the determined voice session text, and determining first session features;
Respectively extracting features according to the voice data to be processed, the session strategy corresponding to the reply voice data and the portrait information of the user, and carrying out feature fusion on the extracted features to determine the fused aggregate features;
inputting the first session features and the aggregation features as inputs, inputting a pre-trained strategy selection model, and determining a target strategy output by the strategy selection model;
taking the first session feature, the aggregation feature and a plurality of reply sentences corresponding to the target strategy as input, inputting a pre-trained sentence selection model, and determining a target sentence output by the sentence selection model;
and sending the reply voice data corresponding to the determined target statement to the terminal, so that the terminal plays the reply voice data.
Optionally, according to other voice data of the user and reply voice data sent to the user in the current session process, determining a corresponding voice session text through voice recognition processing, extracting features of the determined voice session text, and determining a first session feature, including:
according to other voice data of the user in the current conversation process, determining a corresponding voice conversation text through voice recognition processing, extracting features of the determined voice conversation text, and determining other conversation features;
According to the reply voice data sent to the user, determining a corresponding voice conversation text through voice recognition processing, extracting features of the determined voice conversation text, and determining reply conversation features;
and carrying out feature fusion according to the determined other session features and the reply session features, and determining the fused first session features.
Optionally, before determining the corresponding voice session text through voice recognition processing according to other voice data of the user and reply voice data sent to the user in the current session process, the method further includes:
and determining at least one piece of other voice data and corresponding reply voice data thereof from other voice data of the user and the reply voice data sent to the user in the current session process according to the time sequence of the session.
Optionally, feature extraction is performed according to the voice data to be processed, the session policy corresponding to the reply voice data, and the portrait information of the user, and feature fusion is performed on each extracted feature, so as to determine the fused aggregate feature, which specifically includes:
according to the voice data to be processed, determining a corresponding voice conversation text through voice recognition processing, extracting features according to the determined voice conversation text, and determining second conversation features;
Determining a session policy corresponding to the reply voice data, extracting characteristics of the session policy, and determining policy reply characteristics;
extracting features according to the portrait information of the user, and determining portrait features of the user;
and carrying out feature fusion according to the determined second session features, policy reply features and the image features of the user, and determining the fused aggregation features.
Optionally, the first training sample set for training the policy selection model is determined using the following method, wherein:
acquiring a voice data segment which is successful in service execution during a historical manual session, wherein the voice data segment comprises voice data of each user and reply voice data sent to the user;
for each user with successful service execution, determining a piece of voice data of the user as voice data to be processed according to a voice data segment corresponding to the user, and determining reply voice data corresponding to the voice data to be processed as annotation voice data;
according to the voice data segment corresponding to the user, other voice data of the user and reply voice data sent to the user are determined, wherein the conversation time of the other voice data and the conversation time of the reply voice data are earlier than the conversation time of the voice data to be processed;
According to the determined other voice data of the user and the reply voice data sent to the user, determining a corresponding voice conversation text through voice recognition processing, extracting features of the determined voice conversation text, and determining first conversation features;
respectively extracting features according to the determined voice data to be processed, the session strategy corresponding to the reply voice data and the portrait information of the user, and carrying out feature fusion on the extracted features to determine the fused aggregate features;
and determining a first training sample set according to the determined first session characteristics of each user and the aggregation characteristics of each user, wherein the first training sample set is used for training a strategy selection model.
Optionally, the strategy selection model is trained using the following method, wherein:
labeling each first training sample in the first training sample set according to the labeled voice data corresponding to the first training sample;
taking first session features and aggregation features contained in the first training sample as input, inputting a strategy selection model to be trained, and determining a target strategy output by the strategy selection model;
And adjusting model parameters in the strategy selection model by taking the difference between the label of the first training sample and the target strategy output by the strategy selection model as a target.
Optionally, the sentence selection model is trained using the following method, wherein:
for each first training sample, taking first session features and aggregation features contained in the first training sample as input, inputting a pre-trained strategy selection model, and determining a target strategy output by the strategy selection model;
determining a plurality of reply sentences corresponding to the preset target strategy;
determining a second training sample set according to first session features contained in each first training sample, aggregation features contained in each first training sample and a plurality of reply sentences of a target strategy corresponding to each first training sample, and labeling each second training sample contained in the second training sample set according to labeling voice data corresponding to each first training sample;
aiming at each second training sample, taking a first conversation feature, an aggregation feature and a plurality of reply sentences corresponding to a target strategy contained in the second training sample as input, inputting a sentence selection model to be trained, and determining a target sentence output by the sentence selection model;
And adjusting model parameters in the sentence selection model by taking the difference between the label of the second training sample and the target sentence output by the sentence selection model as a target.
Optionally, feature extraction is performed on the determined voice conversation text, and the first conversation feature determination specifically includes:
inputting the determined voice conversation text as input, inputting a pre-trained first feature extraction model, and determining a first conversation feature output by the first feature extraction model;
respectively extracting features according to the voice data to be processed, the session strategy corresponding to the reply voice data and the portrait information of the user, and carrying out feature fusion on each extracted feature to determine the fused aggregate features, wherein the method specifically comprises the following steps:
performing voice recognition processing on the voice data to be processed, and determining a corresponding voice conversation text;
and inputting a second feature extraction model trained in advance by taking the voice conversation text corresponding to the voice data to be processed, the conversation strategy corresponding to the reply voice data and the portrait information of the user as inputs, and determining the aggregation features output by the second feature extraction model.
Optionally, feature extraction is performed on the determined voice conversation text, and the first conversation feature determination specifically includes:
taking the determined voice conversation text as input, inputting a first feature extraction model to be trained, and determining a first conversation feature output by the first feature extraction model;
respectively extracting features according to the determined voice data to be processed, the session strategy corresponding to the reply voice data and the portrait information of the user, and carrying out feature fusion on the extracted features to determine the fused aggregate features, wherein the method specifically comprises the following steps:
performing voice recognition processing on the voice data to be processed, and determining a corresponding voice conversation text;
and taking a voice conversation text corresponding to the voice data to be processed, a conversation strategy corresponding to the reply voice data and portrait information of the user as inputs, inputting a second feature extraction model to be trained, and determining an aggregation feature output by the second feature extraction model.
Optionally, the process of training the model specifically includes:
labeling each first training sample in the first training sample set according to the labeled voice data corresponding to the first training sample;
Taking first session features and aggregation features contained in the first training sample as input, inputting a strategy selection model to be trained, and determining a target strategy output by the strategy selection model;
determining a plurality of reply sentences corresponding to the preset target strategy;
taking the first session features, the aggregation features and the determined reply sentences contained in the first training sample as input, inputting a sentence selection model to be trained, and determining target sentences output by the sentence selection model;
and adjusting model parameters in the first feature extraction model, the second feature extraction model, the strategy selection model and the sentence selection model by taking the difference between the label of the first training sample and the target sentence output by the sentence selection model as a target.
The present specification provides a dialogue processing apparatus including:
the receiving module is used for receiving voice data to be processed, which is sent by a user through the terminal;
the first determining module is used for determining a corresponding voice conversation text through voice recognition processing according to other voice data of the user and reply voice data sent to the user in the current conversation process, extracting features of the determined voice conversation text and determining first conversation features;
The second determining module is used for respectively extracting the characteristics according to the voice data to be processed, the conversation strategy corresponding to the reply voice data and the portrait information of the user, carrying out characteristic fusion on the extracted characteristics, and determining the fused aggregate characteristics;
the third determining module takes the first session features and the aggregation features as input, inputs a pre-trained strategy selection model and determines a target strategy output by the strategy selection model;
a fourth determining module, taking the first session feature, the aggregation feature and a plurality of reply sentences corresponding to the target strategy as input, inputting a sentence selection model trained in advance, and determining a target sentence output by the sentence selection model;
and the sending module is used for sending the reply voice data corresponding to the determined target statement to the terminal, so that the terminal plays the reply voice data.
A computer-readable storage medium is provided in the present specification, the storage medium storing a computer program which, when executed by a processor, implements the above-described dialog processing method.
The electronic device provided by the specification comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the conversation processing method when executing the program.
The above-mentioned at least one technical scheme that this description embodiment adopted can reach following beneficial effect:
in this specification, the voice data to be processed, which is sent by the user through the terminal, may be received first. And secondly, according to other voice data of the user and reply voice data sent to the user in the current session process, determining a corresponding voice session text through voice recognition processing, extracting features of the determined voice session text, and determining first session features. And then, respectively extracting the characteristics according to the voice data to be processed, the session strategy corresponding to the reply voice data and the portrait information of the user, and carrying out characteristic fusion on the extracted characteristics to determine the fused aggregate characteristics. Then, the first session feature and the aggregate feature are used as inputs to a pre-trained strategy selection model, and a target strategy output by the strategy selection model is determined. And finally, taking the first session feature, the aggregation feature and a plurality of reply sentences corresponding to the target strategy as input, inputting a pre-trained sentence selection model, and determining a target sentence output by the sentence selection model. And sending the reply voice data corresponding to the determined target sentence to the terminal, so that the terminal plays the reply voice data. Based on the first session features and the aggregation features of the fused user portraits, determining an adopted target strategy through a strategy selection model, and further determining a replied target sentence through a sentence selection model, so that the replied target sentence is more in line with the needs of the user, and a better service effect is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and 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 do not constitute an undue limitation to the application. In the drawings:
fig. 1 is a flow chart of a dialogue processing method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a voice conversation interface according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a dialogue processing procedure according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a dialogue processing device according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of an electronic device for implementing a dialogue processing method according to an embodiment of the present disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present specification more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the disclosure, are intended to be within the scope of the present application based on the embodiments described herein.
In order to save human resources and improve service efficiency, some service platforms currently use intelligent voice customer service to provide advanced service for users, for example, after-sales service of an e-commerce platform, collect service of a financial platform, and the like.
In the prior art, when the service platform sets the intelligent voice customer service, a finite state machine (Finite State Machine, FSM) can be configured in the intelligent voice customer service, so that when the intelligent voice customer service receives the session information of the user, the scene state of the current session can be judged according to the session information of the user, and a statement corresponding to the current scene state can be returned to the user. Wherein, the FSM prestores a plurality of scene states and reply sentences corresponding to the scene states which are set by a developer according to the requirements of business services. For example, when the user inquires about the delivery time, the user can be replied to the process of waiting for the user to be pleased with the heart in the current delivery process through the intelligent voice customer service.
However, the current scheme of performing scene state jump based on the finite state machine often depends on setting each scene state and corresponding reply sentences according to experience, personalized service cannot be provided for each user, and accurate replies cannot be given to session information of the user, so that the service effect of intelligent voice customer service is poor.
Based on the above-mentioned problems, the present specification provides a dialogue processing method and apparatus, by extracting a first dialogue feature of exchanged voice data in a current dialogue process of a user, and performing feature extraction and feature fusion according to the currently exchanged voice data, portrait information of the user, and a replied dialogue policy, to determine an aggregate feature. And then, according to the first session features and the aggregation features, determining a target sentence to reply through a pre-trained strategy selection model and a sentence selection model. In the specification, the target sentence of the replying user is determined based on the portrait information of the user, so that the personalized requirements of the user are met. And the target sentence is generated by the strategy selection model and the sentence selection model aiming at the session information to be replied (namely, the voice data to be processed of the user), so that the user can be accurately replied, and the user experience is further improved.
The following describes in detail the technical solutions provided by the embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a flow chart of a dialogue processing method provided in the embodiment of the present disclosure, which specifically includes the following steps:
s100: and receiving the voice data to be processed sent by the user through the terminal.
The dialogue processing method provided by the specification is a method for determining the dialogue content of a replying user by processing the dialogue after the intelligent voice customer service receives the dialogue sent by the user. The intelligent voice customer service can be applied to various business fields such as an e-commerce platform, a financial platform and the like.
In this specification, the session processing method may be executed by a server providing a service of intelligent voice customer service, and the server may be a single server or a system composed of a plurality of servers, for example, a distributed server, which is not limited in this specification and may be set as required.
Specifically, when performing the dialogue processing, the server may first receive the voice data to be processed sent by the user through the terminal. The voice data to be processed refers to a user session which is received recently but not replied yet, and may be voice data sent by a user during a voice call, or may be voice data sent by the user through an application (app) in a terminal, which may be specifically set according to service requirements.
Taking the example of a session based on the app sending voice data, fig. 2 is a schematic diagram of a session interface where a user communicates with an intelligent customer service through the app. In fig. 2, the voice a, b, c, d is a voice session that the user and the customer service have exchanged, the voice e is session information currently sent by the user, and the customer service has not yet replied to the voice e, so in this specification, the voice e may be used as voice data to be processed, so as to determine the session content replied by the customer service through the session processing method in this specification.
S102: and determining a corresponding voice conversation text through voice recognition processing according to other voice data of the user and reply voice data sent to the user in the current conversation process, extracting features of the determined voice conversation text, and determining a first conversation feature.
When determining to reply to the session content of the user in the present specification, the server may further determine, through subsequent steps, a reply to the voice data to be processed in combination with session information already exchanged in the current session process.
Specifically, the server may determine, from the stored voice data, other voice data that has been exchanged during the current session of the user and reply voice data that has been sent to the user, according to the user identification of the user. As shown in the session process of fig. 2, voice a and voice c are other voice data that the user has exchanged, and voice b and voice d are reply voice data that are sent to the user.
Thereafter, a corresponding voice conversation text is determined by voice recognition (Automatic Speech Recognition, ASR) processing, and feature extraction is performed on the determined voice conversation text to determine a first conversation feature.
Further, when extracting the first session feature, the server may determine, according to other voice data of the user in the current session process, a corresponding voice session text through ASR processing, and perform feature extraction on the determined voice session text to determine other session features. And determining a corresponding voice conversation text through ASR processing according to the reply voice data sent to the user, extracting the characteristics of the determined voice conversation text, and determining the reply conversation characteristics. And then, carrying out feature fusion according to the determined other session features and the reply session features, and determining the fused first session features. In the feature fusion, the features may be fused by various methods such as feature fusion or deep neural network (Deep Neural Networks, DNN), which is not limited in this specification and may be set as needed.
S104: and respectively extracting features according to the voice data to be processed, the session strategy corresponding to the reply voice data and the portrait information of the user, and carrying out feature fusion on the extracted features to determine the fused aggregate features.
When determining the session content replied to the user in the present specification, the server may determine, according to the session information sent by the user, that is, the voice data to be processed, the session policy adopted by the user and the user portrait of the user, by using subsequent steps, a personalized reply corresponding to the user.
Specifically, the server may determine, according to the voice data to be processed received in step S100, a corresponding voice conversation text through ASR processing, and perform feature extraction according to the determined voice conversation text, to determine a second conversation feature.
And secondly, the server can also determine the session strategy corresponding to the reply voice data from preset session strategies according to the reply voice data which is sent to the user in the current session process, and perform feature extraction on the determined session strategy to determine the strategy reply feature. Wherein, each session strategy is preset according to the service requirement. Taking the collect-urging business in the financial platform as an example, different session strategies can be set in advance according to the arrearage time and arrearage amount of the user. Alternatively, different session policies may be set according to user information, such as age of the user, etc.
Then, the server can also determine the portrait information of the user in the service platform according to the user identification of the user, and perform feature extraction on the portrait information of the user to determine the portrait features of the user.
And finally, the server can perform feature fusion according to the determined second session feature, the determined strategy reply feature and the determined image feature of the user, and determine the fused aggregate feature. When the features are fused, the features can be fused in various modes such as feature stitching or DNN fusion, and the description is not limited to the features and can be set according to requirements.
It should be noted that, the present specification does not limit the order of determining the second session feature, the policy reply feature, and the portrait feature of the user, and may be specifically set according to needs.
S106: and taking the first session feature and the aggregation feature as inputs, inputting a pre-trained strategy selection model, and determining a target strategy output by the strategy selection model.
In the present specification, after determining the first session feature of the exchanged session information in step S102 and determining the fused aggregate feature in step S104, the target policy adopted by the replying user at this time may be selected through a pre-trained policy selection model.
Specifically, the server may input the determined first session feature and the aggregate feature into a pre-trained policy selection model, and determine a target policy output by the policy selection model.
The process of training the strategy selection model is as follows:
a0: a first training sample set for model training is obtained.
Specifically, the server may first obtain a voice data segment that is successful in service execution during the manual session, where the voice data segment includes voice data of each user and reply voice data sent to each user.
Secondly, aiming at each user with successful service execution, determining a piece of voice data of the user from the voice data according to the voice data segment corresponding to the user as voice data to be processed, and determining reply voice data corresponding to the voice data to be processed as annotation voice data.
And then, according to the voice data segment corresponding to the user, determining other voice data of the user and reply voice data sent to the user, wherein the conversation time of the other voice data and the conversation time of the reply voice data are earlier than the conversation time of the voice data to be processed.
And then, according to the determined other voice data of the user and the reply voice data sent to the user, determining a corresponding voice conversation text through voice recognition processing, extracting the characteristics of the determined voice conversation text, and determining a first conversation characteristic. And respectively extracting features according to the determined voice data to be processed, the session strategy corresponding to the reply voice data and the portrait information of the user, and carrying out feature fusion on the extracted features to determine the fused aggregate features.
And finally, determining a first training sample set according to the determined first session characteristics of each user and the aggregation characteristics of each user, so as to be used for training a strategy selection model.
A2: and labeling each first training sample in the first training sample set according to the labeled voice data corresponding to the first training sample.
After each first training sample for model training is determined, each first training sample can be marked, and model training is carried out according to the marked training targets.
Specifically, the server may determine, for each first training sample in the first training sample set, labeling voice data corresponding to the first training sample. And then, according to the marked voice data and the preset session strategies, determining the session strategy to which the marked voice data belongs. And finally, labeling the first training sample according to the session strategy corresponding to the labeled voice data.
A4: and taking the first session features and the aggregation features contained in the first training sample as input, inputting a strategy selection model to be trained, and determining a target strategy output by the strategy selection model.
A6: and adjusting model parameters in the strategy selection model by taking the difference between the label of the first training sample and the target strategy output by the strategy selection model as a target.
After each first training sample for model training is determined and marked, model training can be performed.
Specifically, for each first training sample, the server may input, with the first session feature and the aggregate feature included in the first training sample as input, a policy selection model to be trained, and determine a target policy output by the policy selection model.
And then, taking the difference between the label of the first training sample and the target strategy output by the strategy selection model as loss, and adjusting model parameters in the strategy selection model with the aim of minimizing the loss.
S108: and taking the first session feature, the aggregation feature and a plurality of reply sentences corresponding to the target strategy as input, inputting a pre-trained sentence selection model, and determining a target sentence output by the sentence selection model.
S110: and sending the reply voice data corresponding to the determined target statement to the terminal, so that the terminal plays the reply voice data.
In the embodiment of the present disclosure, after determining, through the policy selection model, that a target policy is adopted for reply, a target sentence sent to a user may be further determined according to a plurality of reply sentences corresponding to the target policy.
Specifically, the server may determine a plurality of reply sentences corresponding to the target policy according to each preset session policy and a plurality of reply sentences corresponding to the session policy. Wherein, each session policy corresponds to a plurality of reply sentences. For example, when the a-session policy is to determine that the traffic system is busy and requires user waiting, then the corresponding a-policy may set statement 1: the current business system is busy, please feel confident waiting-! Statement 2: the current business system is busy, please dial other customer service telephones with the telephone number XXXX. To select a corresponding reply sentence therefrom.
And then, taking the first session feature, the aggregation feature and a plurality of reply sentences corresponding to the determined target strategy as input, inputting a pre-trained sentence selection model, and determining a target sentence output by the sentence selection model.
And finally, the server can determine corresponding reply voice data according to the determined target statement, and send the determined reply voice data to the terminal so that the terminal plays the reply voice data.
The model training process of the sentence selection model is as follows:
first, a second set of training samples for training the sentence selection model may be determined. Specifically, for each first training sample adopted by the training policy selection model, the first session features and the aggregate features contained in the first training sample are taken as input, the trained policy selection model is input, and the target policy output by the policy selection model is determined. And determining a second training sample set according to the first session features contained in each first training sample, the aggregation features contained in each first training sample and a plurality of reply sentences of the corresponding target strategies of each first training sample.
And then, aiming at each second training sample contained in the second training sample set, determining a reply sentence of the marked voice data according to the marked voice data of the first training sample corresponding to the second training sample, and marking the second training sample according to the reply sentence.
Then, the server can take the first session feature, the aggregation feature and a plurality of reply sentences corresponding to the target strategy contained in the second training sample as input, input a sentence selection model to be trained, and determine a target sentence output by the sentence selection model.
And finally, taking the difference between the label of the second training sample and the target sentence output by the sentence selection model as loss, and adjusting model parameters in the sentence selection model with the aim of minimizing the loss.
In summary, in an embodiment of the present disclosure, a flow chart of a dialogue processing method is shown in fig. 3, and when performing dialogue processing, the server may perform feature extraction to determine other dialogue features according to other voice data of the user in the current dialogue process, perform feature extraction to determine the reply dialogue features according to the reply voice data sent to the user in the current dialogue process, and perform feature fusion between the other dialogue features and the reply dialogue features to determine the first dialogue feature.
The server can also perform feature extraction to determine a second session feature according to the received audio data to be processed, perform feature extraction to determine a policy reply feature according to a session policy corresponding to the sent reply voice data, perform feature extraction to determine an portrait feature according to portrait information of the user, and perform feature fusion on the second session feature, the policy reply feature and the portrait feature to determine an aggregate feature.
And then, inputting the determined first session features and the determined aggregation features into a strategy selection model, outputting the selected target strategy, inputting a plurality of reply sentences corresponding to the first session features, the determined aggregation features and the target strategy into a sentence selection model, and outputting the target sentences.
Based on the dialogue processing method shown in fig. 1, the to-be-processed voice data sent by the user through the terminal can be received first. And secondly, according to other voice data of the user and reply voice data sent to the user in the current session process, determining a corresponding voice session text through voice recognition processing, extracting features of the determined voice session text, and determining first session features. And then, respectively extracting the characteristics according to the voice data to be processed, the session strategy corresponding to the reply voice data and the portrait information of the user, and carrying out characteristic fusion on the extracted characteristics to determine the fused aggregate characteristics. Then, the first session feature and the aggregate feature are used as inputs to a pre-trained strategy selection model, and a target strategy output by the strategy selection model is determined. And finally, taking the first session feature, the aggregation feature and a plurality of reply sentences corresponding to the target strategy as input, inputting a pre-trained sentence selection model, and determining a target sentence output by the sentence selection model. And sending the reply voice data corresponding to the determined target sentence to the terminal, so that the terminal plays the reply voice data. Based on the first session features and the aggregation features of the fused user portraits, determining an adopted target strategy through a strategy selection model, and further determining a replied target sentence through a sentence selection model, so that the replied target sentence is more in line with the needs of the user, and a better service effect is achieved.
In step S102 of the present specification, before performing ASR processing, the server may also determine at least one piece of other voice data and corresponding reply voice data thereof from other voice data of the user and reply voice data sent to the user during the current session according to the time sequence of the session. Such as determining the most recent one piece of other voice data and its corresponding reply voice data, or determining the most recent five pieces of other voice data and its corresponding reply voice data, etc. So as to more accurately determine the session content of the replied user according to the session information recently exchanged by the user.
Then, when the first session feature in the first training sample in step S106 corresponds to the first session feature, at least one piece of other voice data and corresponding reply voice data thereof may also be determined from other voice data of the user and reply voice data sent to the user according to the time sequence of the session. And then, determining a corresponding voice conversation text through voice recognition processing, extracting features of the determined voice conversation text, and determining first conversation features.
In one or more embodiments of the present disclosure, when determining the first session feature, the server may also directly input the determined voice session text into a pre-trained first feature extraction model to determine the first session feature output by the first feature extraction model.
In one or more embodiments of the present disclosure, when determining the fused aggregate feature, the server may also perform a voice recognition process on the to-be-processed voice data first to determine a corresponding voice session text. And then, inputting a voice conversation text corresponding to the voice data to be processed, a conversation strategy corresponding to the reply voice data and portrait information of the user as inputs, inputting a pre-trained second feature extraction model, and determining an aggregation feature output by the second feature extraction model.
The first feature extraction model and the second feature extraction model are both models for extracting features of a text, and the models may be various natural language processing models such as a text weighted model (Term Frequency-Inverse Document Frequency, TF-IDF) and a word bag model, or a combination of the models, which is not limited in this aspect, and may be specifically set according to needs.
The specific process is as follows when the models are correspondingly combined to train:
b0: a first training sample set for model training is obtained.
Specifically, the server may first obtain a voice data segment that is successful in service execution during the manual session, where the voice data segment includes voice data of each user and reply voice data sent to each user.
Secondly, aiming at each user with successful service execution, determining a piece of voice data of the user from the voice data according to the voice data segment corresponding to the user as voice data to be processed, and determining reply voice data corresponding to the voice data to be processed as annotation voice data.
And then, according to the voice data segment corresponding to the user, determining other voice data of the user and reply voice data sent to the user, wherein the conversation time of the other voice data and the conversation time of the reply voice data are earlier than the conversation time of the voice data to be processed.
And then, determining the corresponding voice conversation text by ASR processing on the determined other voice data of the user and the reply voice data sent to the user, inputting the voice conversation text as input into a first feature extraction model to be trained, and determining the first conversation feature output by the first feature extraction model.
And performing ASR processing on the voice data to be processed, determining a corresponding voice conversation text, taking the voice conversation text, a conversation strategy corresponding to the reply voice data and portrait information of the user as inputs, inputting a second feature extraction model to be trained, and determining an aggregation feature output by the second feature extraction model.
B2: and labeling each first training sample in the first training sample set according to the labeled voice data corresponding to the first training sample.
After each first training sample is determined through the above B0, each first training sample can be marked, so that each model is jointly trained according to the marked learning target.
Specifically, for each first training sample, labeling voice data corresponding to the first training sample is determined, and the first training sample is labeled according to a reply sentence of the labeling voice data.
B4: and taking the first session features and the aggregation features contained in the first training sample as input, inputting a strategy selection model to be trained, and determining a target strategy output by the strategy selection model.
B6: and taking the first session features, the aggregation features and a plurality of reply sentences corresponding to the target strategies contained in the first training sample as input, inputting a sentence selection model to be trained, and determining target sentences output by the sentence selection model.
B8: and adjusting model parameters in the first feature extraction model, the second feature extraction model, the strategy selection model and the sentence selection model by taking the difference between the label of the first training sample and the target sentence output by the sentence selection model as a target.
After each first training sample and the labels thereof are determined, the first session features and the aggregation features contained in the first training sample can be input into a strategy selection model to be trained for each first training sample, and a target strategy is output.
And then, determining a plurality of reply sentences corresponding to the target strategy according to the preset session strategies and the corresponding reply sentences. And inputting the first session features, the aggregation features and a plurality of reply sentences corresponding to the target strategies contained in the first training sample into a sentence selection model to be trained, and determining the output target sentences.
Finally, taking the difference between the label of the first training sample and the target sentence output by the sentence selection model as a loss, and adjusting model parameters in the first feature extraction model, the second feature extraction model, the strategy selection model and the sentence selection model with the aim of minimizing the loss.
In the present specification, before feature extraction is performed on the voice conversation text by using the first feature extraction model or the second feature extraction model, the input voice conversation text needs to be preprocessed, so that the preprocessed voice conversation text is input into the feature extraction model to perform feature extraction. The preprocessing operation may include removing a word of a mood in the voice conversation text, performing word segmentation processing on the voice conversation text, extracting key data information in the voice conversation text, and the like, which may be specifically set according to needs.
When determining the conversation strategy corresponding to the labeling voice data of the first training sample in the specification, corresponding voice conversation texts can be determined in advance through ASR processing according to the reply voice data of the historical manual conversation. And determining a plurality of session strategies through a clustering algorithm or a heuristic algorithm according to the voice session text of each manual session, so that each first training sample can be marked according to the session strategy to which the marked voice data belong in the subsequent step.
The dialogue processing method provided by the specification can be applied to various service scenes such as after-sales service of an e-commerce platform, and collect urging service of a financial platform. When the method is applied to the collection service of the financial platform, the intelligent voice customer service can determine a target sentence for reply based on the current voice data to be processed of the user through the dialogue processing method of the steps S100-S110, and reply the reply voice data corresponding to the target sentence to the user.
The dialogue processing method provided in the present specification may be processing not only a voice session but also a text session. When the user communicates with the intelligent customer service through the text conversation, ASR processing is not needed in the steps, and the corresponding replied target sentence is determined through the subsequent steps directly based on the conversation text.
Based on the dialogue processing method shown in fig. 1, the embodiment of the present disclosure also correspondingly provides a schematic structural diagram of a dialogue processing device, as shown in fig. 4.
Fig. 4 is a schematic structural diagram of a dialogue processing device according to an embodiment of the present disclosure, where the device includes:
the receiving module 200 receives voice data to be processed sent by a user through a terminal;
the first determining module 202 determines a corresponding voice conversation text through voice recognition processing according to other voice data of the user and reply voice data sent to the user in the current conversation process, and performs feature extraction on the determined voice conversation text to determine a first conversation feature;
the second determining module 204 is used for respectively extracting features according to the voice data to be processed, the session strategy corresponding to the reply voice data and the portrait information of the user, and carrying out feature fusion on the extracted features to determine the fused aggregate features;
a third determining module 206, taking the first session feature and the aggregate feature as input, inputting a pre-trained policy selection model, and determining a target policy output by the policy selection model;
A fourth determining module 208, taking the first session feature, the aggregate feature and a plurality of reply sentences corresponding to the target policy as input, inputting a pre-trained sentence selection model, and determining a target sentence output by the sentence selection model;
and the sending module 210 sends the reply voice data corresponding to the determined target sentence to the terminal, so that the terminal plays the reply voice data.
Optionally, the first determining module 202 is specifically configured to determine, according to other voice data of the user in the current session, a corresponding voice session text through voice recognition processing, perform feature extraction on the determined voice session text, determine other session features, determine, according to reply voice data sent to the user, a corresponding voice session text through voice recognition processing, perform feature extraction on the determined voice session text, determine reply session features, perform feature fusion according to the determined other session features and the reply session features, and determine the first session feature after fusion.
Optionally, the first determining module 202 is further configured to determine, according to a time sequence of the session, at least one piece of other voice data and corresponding reply voice data thereof from other voice data of the user and reply voice data sent to the user during the current session.
Optionally, the second determining module 204 is specifically configured to determine, according to the to-be-processed voice data, a corresponding voice session text through voice recognition processing, perform feature extraction according to the determined voice session text, determine a second session feature, determine a session policy corresponding to the reply voice data, perform feature extraction on the session policy, determine a policy reply feature, perform feature extraction according to the portrait information of the user, determine a portrait feature of the user, perform feature fusion according to the determined second session feature, the policy reply feature and the portrait feature of the user, and determine a converged aggregation feature.
Optionally, the dialogue processing device further includes a model training module 212, where the model training module 212 is specifically configured to obtain a voice data segment that is successful in service execution during a manual session, where the voice data segment includes voice data of each user and reply voice data sent to the user, determine, for each user that is successful in service execution, a piece of voice data of the user according to a voice data segment corresponding to the user, as voice data to be processed, determine reply voice data corresponding to the voice data to be processed, as labeling voice data, determine, according to a voice data segment corresponding to the user, other voice data of the user and reply voice data sent to the user, where a session time of the other voice data and a session time of the reply voice data are earlier than a session time of the voice data to be processed, determine, by voice recognition processing, a corresponding voice session text, perform feature extraction on the determined voice session text, determine, aggregate features of the determined voice data to be processed, aggregate, the corresponding to the user, and the feature set of the user, determine a training feature set, aggregate the feature set, and aggregate the feature set of the feature set is determined according to the determined, and the feature set of the first feature is determined.
Optionally, the model training module 212 is specifically configured to, for each first training sample in the first training sample set, label the first training sample according to labeled voice data corresponding to the first training sample, input a policy selection model to be trained by using a first session feature and an aggregate feature included in the first training sample as input, determine a target policy output by the policy selection model, and adjust model parameters in the policy selection model with a goal of minimizing a difference between the labeling of the first training sample and the target policy output by the policy selection model.
Optionally, the model training module 212 is specifically configured to, for each first training sample, input a first session feature and an aggregate feature included in the first training sample as input, input a pre-trained policy selection model, determine a target policy output by the policy selection model, determine a plurality of reply sentences corresponding to the target policy, determine a second training sample set according to the first session feature included in each first training sample, the aggregate feature included in each first training sample, and the plurality of reply sentences corresponding to the target policy corresponding to each first training sample, and label each second training sample included in the second training sample set according to labeled voice data corresponding to each first training sample, input a sentence selection model to be tested for the first session feature included in the second training sample, the aggregate feature, and the plurality of reply sentences corresponding to the target policy, determine a target sentence output by the sentence selection model, and adjust a labeling parameter in the target sentence selection model by minimizing a difference between the second training sample and the target sentence output by the sentence selection model.
Optionally, the first determining module 202 is specifically configured to input the determined voice conversation text as input, input a first feature extraction model trained in advance, determine a first conversation feature output by the first feature extraction model, and the second determining module 204 is specifically configured to perform voice recognition processing on the voice data to be processed, determine a corresponding voice conversation text, input a voice conversation text corresponding to the voice data to be processed, a conversation policy corresponding to the reply voice data, and portrait information of the user, input a second feature extraction model trained in advance, and determine an aggregate feature output by the second feature extraction model.
Optionally, the model training module 212 is specifically configured to input the determined voice conversation text as input, input a first feature extraction model to be trained, determine a first conversation feature output by the first feature extraction model, and the model training module 212 is specifically configured to perform voice recognition processing on the voice data to be processed, determine a corresponding voice conversation text, input a voice conversation text corresponding to the voice data to be processed, a conversation policy corresponding to the reply voice data, and portrait information of the user, input a second feature extraction model to be trained, and determine an aggregate feature output by the second feature extraction model.
Optionally, the model training module 212 is specifically configured to, for each first training sample in the first training sample set, label the first training sample according to labeled voice data corresponding to the first training sample, input a policy selection model to be trained including a first session feature and an aggregate feature included in the first training sample as input, determine a target policy output by the policy selection model, determine a plurality of reply sentences corresponding to a preset target policy, input the sentence selection model to be trained including the first session feature, the aggregate feature and the determined reply sentences included in the first training sample as input, determine a target sentence output by the sentence selection model, and adjust model parameters in the first feature extraction model, the second feature extraction model, the policy selection model and the sentence selection model with a difference between the label of the first training sample and the target sentence output by the sentence selection model as a target.
The embodiments of the present specification also provide a computer-readable storage medium storing a computer program operable to execute the above-described dialog processing method provided in fig. 1.
Based on the dialogue processing method shown in fig. 1, the embodiment of the present specification also proposes a schematic structural diagram of the electronic device shown in fig. 5. At the hardware level, as in fig. 5, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile storage, although it may include hardware required for other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to implement the session processing method shown in fig. 1.
Of course, other implementations, such as logic devices or combinations of hardware and software, are not excluded from the present description, that is, the execution subject of the following processing flows is not limited to each logic unit, but may be hardware or logic devices.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions 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.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may 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 storage media for a computer 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, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present description.

Claims (13)

1. A conversation processing method, comprising:
receiving voice data to be processed sent by a user through a terminal;
according to other voice data of the user and reply voice data sent to the user in the current session process, determining a corresponding voice session text through voice recognition processing, extracting features of the determined voice session text, and determining first session features;
Respectively extracting features according to the voice data to be processed, the session strategy corresponding to the reply voice data and the portrait information of the user, and carrying out feature fusion on the extracted features to determine the fused aggregate features;
inputting the first session features and the aggregation features as inputs, inputting a pre-trained strategy selection model, and determining a target strategy output by the strategy selection model;
taking the first session feature, the aggregation feature and a plurality of reply sentences corresponding to the target strategy as input, inputting a pre-trained sentence selection model, and determining a target sentence output by the sentence selection model;
and sending the reply voice data corresponding to the determined target statement to the terminal, so that the terminal plays the reply voice data.
2. The method of claim 1, wherein determining the corresponding voice conversation text by a voice recognition process based on other voice data of the user and the reply voice data sent to the user during the current conversation, and performing feature extraction on the determined voice conversation text, and determining the first conversation feature, comprises:
According to other voice data of the user in the current conversation process, determining a corresponding voice conversation text through voice recognition processing, extracting features of the determined voice conversation text, and determining other conversation features;
according to the reply voice data sent to the user, determining a corresponding voice conversation text through voice recognition processing, extracting features of the determined voice conversation text, and determining reply conversation features;
and carrying out feature fusion according to the determined other session features and the reply session features, and determining the fused first session features.
3. The method of claim 1, wherein before determining the corresponding voice conversation text by a voice recognition process based on other voice data of the user and reply voice data sent to the user during the current conversation, the method further comprises:
and determining at least one piece of other voice data and corresponding reply voice data thereof from other voice data of the user and the reply voice data sent to the user in the current session process according to the time sequence of the session.
4. The method of claim 1, wherein the feature extraction is performed according to the voice data to be processed, the session policy corresponding to the reply voice data, and the portrait information of the user, and the feature fusion is performed on each extracted feature, so as to determine the fused aggregate feature, which specifically includes:
According to the voice data to be processed, determining a corresponding voice conversation text through voice recognition processing, extracting features according to the determined voice conversation text, and determining second conversation features;
determining a session policy corresponding to the reply voice data, extracting characteristics of the session policy, and determining policy reply characteristics;
extracting features according to the portrait information of the user, and determining portrait features of the user;
and carrying out feature fusion according to the determined second session features, policy reply features and the image features of the user, and determining the fused aggregation features.
5. The method of claim 1, wherein the first training sample set for training the policy selection model is determined using the method wherein:
acquiring a voice data segment which is successful in service execution during a historical manual session, wherein the voice data segment comprises voice data of each user and reply voice data sent to the user;
for each user with successful service execution, determining a piece of voice data of the user as voice data to be processed according to a voice data segment corresponding to the user, and determining reply voice data corresponding to the voice data to be processed as annotation voice data;
According to the voice data segment corresponding to the user, other voice data of the user and reply voice data sent to the user are determined, wherein the conversation time of the other voice data and the conversation time of the reply voice data are earlier than the conversation time of the voice data to be processed;
according to the determined other voice data of the user and the reply voice data sent to the user, determining a corresponding voice conversation text through voice recognition processing, extracting features of the determined voice conversation text, and determining first conversation features;
respectively extracting features according to the determined voice data to be processed, the session strategy corresponding to the reply voice data and the portrait information of the user, and carrying out feature fusion on the extracted features to determine the fused aggregate features;
and determining a first training sample set according to the determined first session characteristics of each user and the aggregation characteristics of each user, wherein the first training sample set is used for training a strategy selection model.
6. The method of claim 5, wherein the policy selection model is trained using a method wherein:
Labeling each first training sample in the first training sample set according to the labeled voice data corresponding to the first training sample;
taking first session features and aggregation features contained in the first training sample as input, inputting a strategy selection model to be trained, and determining a target strategy output by the strategy selection model;
and adjusting model parameters in the strategy selection model by taking the difference between the label of the first training sample and the target strategy output by the strategy selection model as a target.
7. The method of claim 6, wherein the sentence selection model is trained using a method wherein:
for each first training sample, taking first session features and aggregation features contained in the first training sample as input, inputting a pre-trained strategy selection model, and determining a target strategy output by the strategy selection model;
determining a plurality of reply sentences corresponding to the preset target strategy;
determining a second training sample set according to first session features contained in each first training sample, aggregation features contained in each first training sample and a plurality of reply sentences of a target strategy corresponding to each first training sample, and labeling each second training sample contained in the second training sample set according to labeling voice data corresponding to each first training sample;
Aiming at each second training sample, taking a first conversation feature, an aggregation feature and a plurality of reply sentences corresponding to a target strategy contained in the second training sample as input, inputting a sentence selection model to be trained, and determining a target sentence output by the sentence selection model;
and adjusting model parameters in the sentence selection model by taking the difference between the label of the second training sample and the target sentence output by the sentence selection model as a target.
8. The method of claim 1, wherein feature extraction is performed on the determined voice conversation text to determine the first conversation feature, comprising:
inputting the determined voice conversation text as input, inputting a pre-trained first feature extraction model, and determining a first conversation feature output by the first feature extraction model;
respectively extracting features according to the voice data to be processed, the session strategy corresponding to the reply voice data and the portrait information of the user, and carrying out feature fusion on each extracted feature to determine the fused aggregate features, wherein the method specifically comprises the following steps:
performing voice recognition processing on the voice data to be processed, and determining a corresponding voice conversation text;
And inputting a second feature extraction model trained in advance by taking the voice conversation text corresponding to the voice data to be processed, the conversation strategy corresponding to the reply voice data and the portrait information of the user as inputs, and determining the aggregation features output by the second feature extraction model.
9. The method of claim 5, wherein feature extraction is performed on the determined voice conversation text to determine the first conversation feature, comprising:
taking the determined voice conversation text as input, inputting a first feature extraction model to be trained, and determining a first conversation feature output by the first feature extraction model;
respectively extracting features according to the determined voice data to be processed, the session strategy corresponding to the reply voice data and the portrait information of the user, and carrying out feature fusion on the extracted features to determine the fused aggregate features, wherein the method specifically comprises the following steps:
performing voice recognition processing on the voice data to be processed, and determining a corresponding voice conversation text;
and taking a voice conversation text corresponding to the voice data to be processed, a conversation strategy corresponding to the reply voice data and portrait information of the user as inputs, inputting a second feature extraction model to be trained, and determining an aggregation feature output by the second feature extraction model.
10. The method of claim 9, wherein the process of training the model comprises:
labeling each first training sample in the first training sample set according to the labeled voice data corresponding to the first training sample;
taking first session features and aggregation features contained in the first training sample as input, inputting a strategy selection model to be trained, and determining a target strategy output by the strategy selection model;
determining a plurality of reply sentences corresponding to the preset target strategy;
taking the first session features, the aggregation features and the determined reply sentences contained in the first training sample as input, inputting a sentence selection model to be trained, and determining target sentences output by the sentence selection model;
and adjusting model parameters in the first feature extraction model, the second feature extraction model, the strategy selection model and the sentence selection model by taking the difference between the label of the first training sample and the target sentence output by the sentence selection model as a target.
11. A dialog processing device, comprising:
The receiving module is used for receiving voice data to be processed, which is sent by a user through the terminal;
the first determining module is used for determining a corresponding voice conversation text through voice recognition processing according to other voice data of the user and reply voice data sent to the user in the current conversation process, extracting features of the determined voice conversation text and determining first conversation features;
the second determining module is used for respectively extracting the characteristics according to the voice data to be processed, the conversation strategy corresponding to the reply voice data and the portrait information of the user, carrying out characteristic fusion on the extracted characteristics, and determining the fused aggregate characteristics;
the third determining module takes the first session features and the aggregation features as input, inputs a pre-trained strategy selection model and determines a target strategy output by the strategy selection model;
a fourth determining module, taking the first session feature, the aggregation feature and a plurality of reply sentences corresponding to the target strategy as input, inputting a sentence selection model trained in advance, and determining a target sentence output by the sentence selection model;
and the sending module is used for sending the reply voice data corresponding to the determined target statement to the terminal, so that the terminal plays the reply voice data.
12. A computer readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1-10.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of the preceding claims 1-10 when executing the program.
CN202011551191.2A 2020-12-24 2020-12-24 Dialogue processing method and device Active CN112735407B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011551191.2A CN112735407B (en) 2020-12-24 2020-12-24 Dialogue processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011551191.2A CN112735407B (en) 2020-12-24 2020-12-24 Dialogue processing method and device

Publications (2)

Publication Number Publication Date
CN112735407A CN112735407A (en) 2021-04-30
CN112735407B true CN112735407B (en) 2023-07-21

Family

ID=75615316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011551191.2A Active CN112735407B (en) 2020-12-24 2020-12-24 Dialogue processing method and device

Country Status (1)

Country Link
CN (1) CN112735407B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116501852B (en) * 2023-06-29 2023-09-01 之江实验室 Controllable dialogue model training method and device, storage medium and electronic equipment
CN116976821B (en) * 2023-08-03 2024-02-13 广东企企通科技有限公司 Enterprise problem feedback information processing method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010048980A (en) * 2008-08-20 2010-03-04 Universal Entertainment Corp Automatic conversation system and conversation scenario editing device
CN107766559A (en) * 2017-11-06 2018-03-06 第四范式(北京)技术有限公司 Training method, trainer, dialogue method and the conversational system of dialog model
CN110489519A (en) * 2019-07-05 2019-11-22 深圳追一科技有限公司 The session method and Related product of dialogue-based prediction model
CN110692048A (en) * 2017-03-20 2020-01-14 电子湾有限公司 Detection of task changes in a session

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200143115A1 (en) * 2015-01-23 2020-05-07 Conversica, Inc. Systems and methods for improved automated conversations

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010048980A (en) * 2008-08-20 2010-03-04 Universal Entertainment Corp Automatic conversation system and conversation scenario editing device
CN110692048A (en) * 2017-03-20 2020-01-14 电子湾有限公司 Detection of task changes in a session
CN107766559A (en) * 2017-11-06 2018-03-06 第四范式(北京)技术有限公司 Training method, trainer, dialogue method and the conversational system of dialog model
CN110489519A (en) * 2019-07-05 2019-11-22 深圳追一科技有限公司 The session method and Related product of dialogue-based prediction model

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
融合敏感词规则和字符级RCNN模型的用户意图识别;王冲;张虎;王鑫;刘全明;;计算机应用与软件(第03期);全文 *

Also Published As

Publication number Publication date
CN112735407A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
CN112632961B (en) Natural language understanding processing method, device and equipment based on context reasoning
CN107437416A (en) A kind of consultation service processing method and processing device based on speech recognition
CN115952272B (en) Method, device and equipment for generating dialogue information and readable storage medium
CN112735407B (en) Dialogue processing method and device
CN110277092A (en) A kind of voice broadcast method, device, electronic equipment and readable storage medium storing program for executing
CN115545002B (en) Model training and business processing method, device, storage medium and equipment
CN115203394A (en) Model training method, service execution method and device
CN115146601A (en) Method and device for executing language processing task, readable storage medium and equipment
CN114332873A (en) Training method and device for recognition model
CN111831795A (en) Multi-turn conversation processing method and device, electronic equipment and storage medium
CN112735374B (en) Automatic voice interaction method and device
CN116974676A (en) Page content sending method, device and equipment
CN117216271A (en) Article text processing method, device and equipment
CN116186231A (en) Method and device for generating reply text, storage medium and electronic equipment
CN115019781A (en) Conversation service execution method, device, storage medium and electronic equipment
CN110659361A (en) Conversation method, device, equipment and medium
CN115545720A (en) Model training method, business wind control method and business wind control device
CN115391503A (en) Application method and device of session flow
CN115952271B (en) Method and device for generating dialogue information, storage medium and electronic equipment
CN116434787B (en) Voice emotion recognition method and device, storage medium and electronic equipment
CN116501852B (en) Controllable dialogue model training method and device, storage medium and electronic equipment
CN115934902A (en) Method, device, readable storage medium and equipment for generating dialogue information
CN115658891B (en) Method and device for identifying intention, storage medium and electronic equipment
CN113223501B (en) Method and device for executing voice interaction service
CN116543759A (en) Speech recognition processing method and device

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