CN112735407A - Conversation processing method and device - Google Patents

Conversation processing method and device Download PDF

Info

Publication number
CN112735407A
CN112735407A CN202011551191.2A CN202011551191A CN112735407A CN 112735407 A CN112735407 A CN 112735407A CN 202011551191 A CN202011551191 A CN 202011551191A CN 112735407 A CN112735407 A CN 112735407A
Authority
CN
China
Prior art keywords
voice data
user
conversation
determining
reply
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011551191.2A
Other languages
Chinese (zh)
Other versions
CN112735407B (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

Images

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 present specification discloses a dialog processing method and apparatus, which can receive the voice data to be processed of a user first. Secondly, according to the voice data exchanged in the current conversation process, the first conversation characteristic is determined. And determining the aggregation characteristics according to the voice data to be processed, the adopted conversation strategy and the portrait information of the user. And then inputting the first session characteristics and the aggregation characteristics into a strategy selection model to determine a target strategy. And inputting the first conversation characteristic, the aggregation characteristic 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 statement to the terminal. Based on the first session characteristics and the aggregation characteristics of the user portrait, the adopted target strategy is determined through the strategy selection model, and the replied target statement is further determined through the statement selection model, so that the replied target statement better meets the needs of the user, and a better service effect is achieved.

Description

Conversation processing method and device
Technical Field
The present application relates to the field of information processing technologies, and in particular, to a method and an apparatus for processing a dialog.
Background
Currently, some service platforms usually provide early service services for users by intelligent voice customer service. When the intelligent voice customer service is set in the service platform, a developer can set scene states of various conversations and reply sentences corresponding to the scene states in advance based on experience and configure the scene states and the reply sentences in a finite state machine. And then when the intelligent voice customer service provides service for the user, judging which scene state the user is in at present by the finite state machine according to the session information of the user so as to further determine a corresponding reply statement.
However, the various scene states and reply statements 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 conversation processing method and device, which are used for partially solving the problems in the prior art.
The embodiment of the specification adopts the following technical scheme:
a dialog processing method provided in this specification includes:
receiving voice data to be processed sent by a user through a terminal;
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, and performing feature extraction on the determined voice conversation text to determine a first conversation feature;
respectively extracting features according to the voice data to be processed, the conversation strategy corresponding to the reply voice data and the portrait information of the user, performing feature fusion on the extracted features, and determining a fused aggregation feature;
inputting a pre-trained strategy selection model by taking the first session characteristic and the aggregation characteristic as input, and determining a target strategy output by the strategy selection model;
inputting a pre-trained statement selection model by taking the first session feature, the aggregation feature and a plurality of reply statements corresponding to the target strategy as input, and determining a target statement output by the statement selection model;
and sending the determined reply voice data corresponding to the target sentence to the terminal, so that the terminal plays the reply voice data.
Optionally, determining a 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, and performing feature extraction on the determined voice session text to determine a first session feature, specifically including:
determining a corresponding voice conversation text through voice recognition processing according to other voice data of the user in the current conversation process, and performing feature extraction on the determined voice conversation text to determine other conversation features;
determining a corresponding voice conversation text through voice recognition processing according to reply voice data sent to the user, and performing feature extraction on the determined voice conversation text to determine reply conversation features;
and according to the determined other session features and the reply session features, performing feature fusion, and determining the fused first session feature.
Optionally, before determining a 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 from the other voice data of the user and the reply voice data sent to the user in the current conversation process according to the time sequence of the conversation.
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 a fused aggregate feature, which specifically includes:
determining a corresponding voice conversation text through voice recognition processing according to the voice data to be processed, extracting features according to the determined voice conversation text, and determining second conversation features;
determining a conversation strategy corresponding to the reply voice data, extracting the characteristics of the conversation strategy and determining strategy reply characteristics;
according to the portrait information of the user, feature extraction is carried out, and portrait features of the user are determined;
and performing feature fusion according to the determined second session feature, the determined strategy reply feature and the portrait feature of the user, and determining a fused aggregation feature.
Optionally, the following method is used to determine a first training sample set for training the strategy selection model, wherein:
acquiring a voice data segment which is successfully executed during historical manual conversation, wherein the voice data segment comprises voice data of each user and reply voice data sent to the user;
for each user successfully executing the service, determining a piece of voice data of the user as voice data to be processed according to the voice data segment corresponding to the user, and determining reply voice data corresponding to the voice data to be processed as labeled voice data;
determining other voice data of the user and reply voice data sent to the user according to the voice data segment corresponding to the user, wherein the session time of the other voice data and the session time of the reply voice data are earlier than the session time of the voice data to be processed;
determining a corresponding voice conversation text through voice recognition processing according to the determined other voice data of the user and the reply voice data sent to the user, and performing feature extraction on the determined voice conversation text to determine a first conversation feature;
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, performing feature fusion on the extracted features, and determining a fused aggregation feature;
and determining a first training sample set according to the determined first session characteristics of the users and the determined aggregation characteristics of the users, wherein the first training sample set is used for training the strategy selection model.
Optionally, the strategy selection model is trained using the following method, wherein:
for each first training sample in the first training sample set, labeling the first training sample according to the labeled voice data corresponding to the first training sample;
inputting a strategy selection model to be trained by taking the first session characteristics and the aggregation characteristics contained in the first training sample as input, and determining a target strategy output by the strategy selection model;
and adjusting model parameters in the strategy selection model with the aim of minimizing the difference between the label of the first training sample and the target strategy output by the strategy selection model.
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 each first training sample corresponding to the target strategy, and labeling each second training sample contained in the second training sample set according to labeled voice data corresponding to each first training sample;
for each second training sample, taking the first session features, the aggregation features and a plurality of reply sentences corresponding to the 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 the model parameters in the sentence selection model with the aim of minimizing the difference between the label of the second training sample and the target sentence output by the sentence selection model.
Optionally, performing feature extraction on the determined voice session text, and determining a first session feature specifically includes:
the determined voice conversation text is used as input, a first feature extraction model trained in advance is input, and first conversation features output by the first feature extraction model are determined;
according to the voice data to be processed, the conversation strategy corresponding to the reply voice data and the portrait information of the user, feature extraction is respectively carried out, extracted features are subjected to feature fusion, and the fused aggregation features are determined, and the method specifically comprises the following steps:
carrying out voice recognition processing on the voice data to be processed, and determining a corresponding voice conversation text;
and inputting a pre-trained second feature extraction model 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 input, and determining the aggregation feature output by the second feature extraction model.
Optionally, performing feature extraction on the determined voice session text, and determining a first session feature specifically includes:
inputting a first feature extraction model to be trained by taking the determined voice conversation text as input, and determining first conversation features 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, performing feature fusion on each extracted feature, and determining a fused aggregation feature, wherein the method specifically comprises the following steps:
carrying out voice recognition processing on the voice data to be processed, and determining a corresponding voice conversation text;
and inputting a second feature extraction model to be trained 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 input, and determining the aggregation feature output by the second feature extraction model.
Optionally, the process of training the model specifically includes:
for each first training sample in the first training sample set, labeling the first training sample according to the labeled voice data corresponding to the first training sample;
inputting a strategy selection model to be trained by taking the first session characteristics and the aggregation characteristics contained in the first training sample as input, and determining a target strategy output by the strategy selection model;
determining a plurality of reply sentences corresponding to the preset target strategy;
inputting a sentence selection model to be trained by taking the first session feature, the aggregation feature and the determined reply sentence contained in the first training sample as input, and determining a target sentence 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 statement selection model with the aim of minimizing the difference between the label of the first training sample and the target statement output by the statement selection model.
The present specification provides a conversation processing apparatus including:
the receiving module is used for receiving the voice data to be processed sent by a user through a 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 features according to the voice data to be processed, the conversation strategy corresponding to the reply voice data and the portrait information of the user, performing feature fusion on the extracted features and determining a fused aggregation feature;
the third determining module is used for inputting the first session characteristics and the aggregation characteristics into a pre-trained strategy selection model and determining a target strategy output by the strategy selection model;
a fourth determining module, configured to input a pre-trained sentence selection model using the first session feature, the aggregation feature, and a plurality of reply sentences corresponding to the target policy as inputs, and determine a target sentence output by the sentence selection model;
and the sending module is used for sending the determined reply voice data corresponding to the target sentence to the terminal so that the terminal plays the reply voice data.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described dialogue processing method.
The present specification provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the above-mentioned dialog processing method.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
in this specification, to-be-processed voice data transmitted by a user through a terminal may be received first. Secondly, according to other voice data of the user and reply voice data sent to the user in the current conversation process, determining a corresponding voice conversation text through voice recognition processing, and performing feature extraction on the determined voice conversation text to determine a first conversation feature. And then, respectively extracting features according to the voice data to be processed, the conversation strategy corresponding to the reply voice data and the portrait information of the user, and performing feature fusion on the extracted features to determine a fused aggregation feature. Then, the first session feature and the aggregation feature are used as input, a pre-trained strategy selection model is input, and a target strategy output by the strategy selection model is determined. And finally, inputting the first session characteristic, the aggregation characteristic and a plurality of reply sentences corresponding to the target strategy as input, inputting a pre-trained sentence selection model, and determining the target sentence output by the sentence selection model. And sending the determined reply voice data corresponding to the target sentence to the terminal, so that the terminal plays the reply voice data. Based on the first session characteristics and the aggregation characteristics of the user portrait, the adopted target strategy is determined through the strategy selection model, and the replied target statement is further determined through the statement selection model, so that the replied target statement better meets 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 embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flowchart of a dialog processing method provided in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a voice conversation interface provided by an embodiment of the present specification;
fig. 3 is a schematic diagram of a dialog processing flow according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a dialog processing device according to an embodiment of the present disclosure;
fig. 5 is a schematic view of an electronic device implementing a dialog processing method according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more apparent, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person skilled in the art without making any inventive step based on the embodiments in the description belong to the protection scope of the present application.
In order to save human resources and improve service efficiency, some service platforms currently use intelligent voice customer service to provide early service for users, such as after-sales service of e-commerce platform and collection service of financial platform.
In the prior art, when the service platform sets the intelligent voice service, a Finite State Machine (FSM) may be configured in the intelligent voice service, so that when the intelligent voice service receives session information of a user, a scene State of a current session may be determined according to the session information of the user, and a statement corresponding to the current scene State may be returned to the user. The FSM stores a plurality of scene states set by developers according to the requirements of business services and reply sentences corresponding to the scene states in advance. For example, when the user asks for the delivery time, the user can be replied to the current delivery process by the intelligent voice customer service, and please wait patiently.
However, in the current scenario state jump based on the finite state machine, the scenario states and the corresponding reply statements are often set by considering experience, which cannot provide personalized services for each user, and the session information of the user cannot be accurately replied, resulting in poor service effect of the intelligent voice customer service.
In view of the above problems, the present specification provides a method and an apparatus for processing a dialog, which extract a first session feature of voice data exchanged by a user during a current session, and perform feature extraction and feature fusion according to the voice data exchanged currently, portrait information of the user, and a session policy replied to determine an aggregation feature. And then, according to the first session characteristics and the aggregation characteristics, determining a target statement to reply through a pre-trained strategy selection model and a statement selection model. In the description, the target sentence of the reply user is determined based on the portrait information of the user, and the personalized requirement of the user is better met. And aiming at the conversation information to be replied (namely, the voice data to be processed of the user), the target statement is generated through the strategy selection model and the statement selection model, so that the user can be replied accurately, and the user experience is further improved.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a dialog processing method provided in an embodiment of this specification, which may specifically include the following steps:
s100: and receiving to-be-processed voice data sent by a user through a terminal.
The dialog processing method provided by the present specification refers to a method for determining the content of a reply session of a user by processing the session after an intelligent voice customer service receives the session sent by the user. The intelligent voice customer service can be applied to various service fields such as e-commerce platforms and financial platforms.
Therefore, in this specification, the dialog processing method may be specifically executed by a server providing a service of intelligent voice customer service, where the server may be a single server, or may be a system composed of multiple servers, such as a distributed server, and the like.
Specifically, when performing the session processing, the server may receive the to-be-processed voice data sent by the user through the terminal. The to-be-processed voice data refers to a user session that is received latest but not replied yet, and may be voice data sent by a user during a voice call, or voice data sent by the user through an application (app) in a terminal, and may be specifically set according to a service requirement.
Taking the example of sending voice data to perform a session based on the app, fig. 2 is a schematic view of a session interface between a user and an intelligent customer service through the app. In fig. 2, voices a, b, c, and d are voice conversations that the user has communicated with the customer service, voice e is conversation information currently sent by the user, and the customer service has not replied to the voice e, so that the voice e can be used as voice data to be processed in the present specification, and the conversation content replied by the customer service is determined by the conversation processing method of the present 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, and performing feature extraction on the determined voice conversation text to determine a first conversation feature.
When determining to reply 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 the session information that has been 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 identifier 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 sent to the user.
Then, a corresponding voice conversation text is determined through voice Recognition (ASR) processing, and feature extraction is carried out on the determined voice conversation text to determine a first conversation feature.
Further, when extracting the first session feature, the server may determine a corresponding voice session text through ASR processing according to other voice data of the user during the current session, 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, and performing feature extraction on the determined voice conversation text to determine the reply conversation feature. And then, according to the determined other session features and the reply session features, performing feature fusion, and determining the fused first session feature. When the feature fusion is performed, the feature fusion can be performed through various ways such as feature splicing or Deep Neural Networks (DNNs), which is not limited in this specification and can be set as needed.
S104: and respectively extracting features according to the voice data to be processed, the conversation strategy corresponding to the reply voice data and the portrait information of the user, performing feature fusion on the extracted features, and determining the fused aggregation features.
When determining the session content replied to the user in this specification, the server may determine the personalized reply corresponding to the user through subsequent steps according to the session information sent by the user, that is, the to-be-processed voice data, the session policy adopted by the previously replied user and the user image of the user.
Specifically, the server may determine a corresponding voice session text through ASR processing according to the to-be-processed voice data received in step S100, and perform feature extraction according to the determined voice session text to determine a second session feature.
Secondly, the server can also determine a conversation strategy corresponding to the reply voice data from preset conversation strategies according to the reply voice data sent to the user in the current conversation process, extract the characteristics of the determined conversation strategy and determine strategy reply characteristics. Wherein, each conversation strategy is preset according to the service requirement. Taking the collection service in the financial platform as an example, different conversation strategies can be set in advance according to the arrearage time and the arrearage amount of the user. Alternatively, different session policies may be set according to user information, such as user age, 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 feature of the user.
Finally, the server can perform feature fusion according to the determined second session feature, the determined strategy reply feature and the portrait feature of the user, and determine the fused aggregation feature. When the features are fused, the features can be fused in various ways such as feature splicing or DNN fusion, which is not limited in this specification and can be set as required.
It should be noted that, the 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 specifically set according to needs.
S106: and inputting the first session characteristic and the aggregation characteristic as inputs into a pre-trained strategy selection model, and determining a target strategy output by the strategy selection model.
In this specification, after the first session feature of the exchanged session information is determined through step S102 and the fused aggregation feature is determined through step S104, the target policy adopted by the replying user at this time can be selected through the pre-trained policy selection model.
Specifically, the server may input the determined first session feature and the aggregation feature as input, input 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 set of training samples for model training is obtained.
Specifically, the server may obtain a speech data segment in which the service execution is successful during the historical manual session, where the speech data segment includes speech data of each user and reply speech data sent to each user.
Secondly, for each user successfully executing the service, determining a piece of voice data of the user from 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 labeled 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 session time of the other voice data and the session time of the reply voice data are earlier than the session 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, and performing feature extraction on the determined voice conversation text to determine a first conversation feature. And respectively extracting features according to the determined voice data to be processed, the conversation strategy corresponding to the reply voice data and the portrait information of the user, performing feature fusion on the extracted features, and determining a fused aggregation feature.
And finally, determining a first training sample set according to the determined first session characteristics of the users and the determined aggregation characteristics of the users for training the strategy selection model.
A2: and for each first training sample in the first training sample set, labeling the first training sample 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 labeled, so that model training is performed according to the labeled training target.
Specifically, the server may determine, for each first training sample in the first training sample set, the labeled speech data corresponding to the first training sample. And then, determining the conversation strategy to which the marked voice data belongs according to the marked voice data and the preset conversation strategies. And finally, labeling the first training sample according to a conversation strategy corresponding to the labeled voice data.
A4: and inputting the first session characteristics and the aggregation characteristics 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 with the aim of minimizing the difference between the label of the first training sample and the target strategy output by the strategy selection model.
After determining each first training sample for model training and labeling each first training sample, model training can be performed.
Specifically, the server may input, for each first training sample, the first session features and the aggregation features included in the first training sample as inputs, the policy selection model to be trained, and determine the 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, taking the minimized loss as a target, and adjusting the model parameters in the strategy selection model.
S108: and inputting a pre-trained statement selection model by taking the first session characteristic, the aggregation characteristic and a plurality of reply statements corresponding to the target strategy as input, and determining the target statement output by the statement selection model.
S110: and sending the determined reply voice data corresponding to the target sentence to the terminal, so that the terminal plays the reply voice data.
In the embodiment of the present specification, after it is determined by the policy selection model that a reply is performed by using the target policy, the target statement sent to the user may be further determined according to a plurality of reply statements corresponding to the target policy.
Specifically, the server may determine a plurality of reply statements corresponding to the target policy according to each preset session policy and the plurality of reply statements corresponding to the session policy. Wherein, each conversation strategy corresponds to a plurality of reply sentences. For example, when the a session policy is to determine that the service system is busy and requires the user to wait, statement 1 may be set corresponding to the a policy: the current business system is busy, ask you for patience waiting! Statement 2: when the current business system is busy, you call other customer service telephones, and the telephone number is XXXXX. To select a corresponding reply statement therefrom.
And then, inputting a pre-trained sentence selection model by taking the first session characteristic, the aggregation characteristic and a plurality of reply sentences corresponding to the determined target strategy as input, and determining the target sentences output by the sentence selection model.
And finally, the server can determine corresponding reply voice data according to the determined target sentence, 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 statement 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 strategy selection model, the first session features and the aggregation features included in the first training sample are used as inputs, the trained strategy selection model is input, and the target strategy output by the strategy selection model is determined. And determining a second training sample set according to the first session features contained in the first training samples, the aggregation features contained in the first training samples and the reply sentences of the target strategy corresponding to the first training samples.
And then, for each second training sample contained in the second training sample set, determining a reply sentence of the labeled voice data according to the labeled voice data of the first training sample corresponding to the second training sample, and labeling the second training sample according to the reply sentence.
Then, the server may input the sentence selection model to be trained and determine the target sentence output by the sentence selection model, with the first session feature, the aggregation feature, and the plurality of reply sentences corresponding to the target strategy included in the second training sample as inputs.
And finally, taking the difference between the label of the second training sample and the target statement output by the statement selection model as loss, taking the minimized loss as a target, and adjusting the model parameters in the statement selection model.
To sum up, in an embodiment of the present specification, a flow architecture diagram of the conversation processing method is shown in fig. 3, when performing conversation processing, the server may perform feature extraction according to other voice data of the user in the current conversation process to determine other conversation features, perform feature extraction according to reply voice data sent to the user in the current conversation process to determine reply conversation features, perform feature fusion between the other conversation features and the reply conversation features, and determine the first conversation feature.
The server can also extract features to determine second session features according to the received audio data to be processed, extract features to determine strategy reply features according to session strategies corresponding to the sent reply voice data, extract features to determine portrait features according to portrait information of the user, perform feature fusion on the second session features, the strategy reply features and the portrait features, and determine aggregation features.
And then inputting the first session characteristics and the aggregation characteristics into a strategy selection model, outputting the selected target strategy, and then inputting the statement selection model into a plurality of reply statements corresponding to the first session characteristics, the aggregation characteristics and the target strategy, and outputting the target statement.
Based on the dialog processing method shown in fig. 1, to-be-processed voice data sent by a user through a terminal may be received first. Secondly, according to other voice data of the user and reply voice data sent to the user in the current conversation process, determining a corresponding voice conversation text through voice recognition processing, and performing feature extraction on the determined voice conversation text to determine a first conversation feature. And then, respectively extracting features according to the voice data to be processed, the conversation strategy corresponding to the reply voice data and the portrait information of the user, and performing feature fusion on the extracted features to determine a fused aggregation feature. Then, the first session feature and the aggregation feature are used as input, a pre-trained strategy selection model is input, and a target strategy output by the strategy selection model is determined. And finally, inputting the first session characteristic, the aggregation characteristic and a plurality of reply sentences corresponding to the target strategy as input, inputting a pre-trained sentence selection model, and determining the target sentence output by the sentence selection model. And sending the determined reply voice data corresponding to the target sentence to the terminal, so that the terminal plays the reply voice data. Based on the first session characteristics and the aggregation characteristics of the user portrait, the adopted target strategy is determined through the strategy selection model, and the replied target statement is further determined through the statement selection model, so that the replied target statement better meets the needs of the user, and a better service effect is achieved.
In step S102, before performing ASR processing, the server may also determine, according to the time sequence of the session, at least one piece of other voice data and corresponding reply voice data from other voice data of the user during the current session and the reply voice data sent to the user. For example, the latest one piece of other voice data and the corresponding reply voice data are determined, or the latest five pieces of other voice data and the corresponding reply voice data are determined, etc. According to the conversation information recently exchanged by the user, the conversation content of the reply user can be more accurately determined.
Then, when the first session feature in the first training sample in step S106 is corresponding, at least one piece of other voice data and the corresponding piece of reply voice data may also be determined from the other voice data of the user and the 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, and performing feature extraction on the determined voice conversation text to determine a first conversation feature.
In one or more embodiments of the present specification, when determining the first session feature, the server may also directly input the determined voice session text as an input, input a pre-trained first feature extraction model, and 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 aggregation feature, the server may also perform speech recognition processing on the to-be-processed speech data to determine a corresponding speech session text. And then, inputting a pre-trained second feature extraction model 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 input, and determining the aggregation feature output by the second feature extraction model.
The first feature extraction model and the second feature extraction model are both models for feature extraction of a text, and the models may be various natural language processing models such as a text weighting model (Term-Inverse Document Frequency, TF-IDF), a bag-of-words model, or a combination of the models.
Correspondingly, when performing joint training on each model, the specific process is as follows:
b0: a first set of training samples for model training is obtained.
Specifically, the server may obtain a speech data segment in which the service execution is successful during the historical manual session, where the speech data segment includes speech data of each user and reply speech data sent to each user.
Secondly, for each user successfully executing the service, determining a piece of voice data of the user from 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 labeled 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 session time of the other voice data and the session time of the reply voice data are earlier than the session time of the voice data to be processed.
And then, determining other determined voice data of the user and reply voice data sent to the user through ASR processing to determine a corresponding voice conversation text, taking the voice conversation text as input, inputting a first feature extraction model to be trained, and determining first conversation features output by the first feature extraction model.
And performing ASR processing on the voice data to be processed, determining a corresponding voice conversation text, inputting the voice conversation text, a conversation strategy corresponding to the reply voice data and portrait information of the user as input, inputting a second feature extraction model to be trained, and determining the aggregation feature output by the second feature extraction model.
B2: and for each first training sample in the first training sample set, labeling the first training sample according to the labeled voice data corresponding to the first training sample.
After the first training samples are determined through the above B0, the first training samples can be labeled, so as to perform joint training on the models according to the labeled learning targets.
Specifically, for each first training sample, determining labeled speech data corresponding to the first training sample, and labeling the first training sample according to a reply sentence of the labeled speech data.
B4: and inputting the first session characteristics and the aggregation characteristics 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 inputting a sentence selection model to be trained by taking the first session characteristics, the aggregation characteristics and a plurality of reply sentences corresponding to the target strategy contained in the first training sample as input, and determining the 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 statement selection model with the aim of minimizing the difference between the label of the first training sample and the target statement output by the statement selection model.
After the first training samples and the labels thereof are determined, the first session features and the aggregation features contained in the first training samples can be input into a strategy selection model to be trained and a target strategy is output according to each first training sample.
And then, determining a plurality of reply sentences corresponding to the target strategy according to the preset conversation strategies and the reply sentences corresponding to the conversation strategies. And inputting the first session characteristics, the aggregation characteristics and a plurality of reply sentences corresponding to the target strategy contained in the first training sample into a sentence selection model to be trained, and determining the output target sentences.
And finally, taking the difference between the label of the first training sample and the target sentence output by the sentence selection model as 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 by taking the loss minimization as a target.
In this specification, before feature extraction is performed on a voice conversation text through a first feature extraction model or a second feature extraction model, an 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 operations such as removing a speech word in the speech session text, performing word segmentation processing on the speech session text, and extracting key data information in the speech session text, and may be specifically set as required.
When determining the conversation strategy corresponding to the labeled speech data of the first training sample in the present specification, the corresponding text of each speech conversation may be determined in advance by ASR processing according to each reply speech data of a historical manual conversation. And then, according to the voice conversation text of each manual conversation, determining a plurality of conversation strategies through a clustering algorithm or a heuristic algorithm, so that in the subsequent steps, each first training sample can be labeled according to the conversation strategy to which the labeled voice data belongs.
The conversation processing method provided by the specification can be applied to various service scenes such as after-sale service of an e-commerce platform, collection service of a financial platform and the like. When the intelligent voice customer service is applied to the collection service of the financial platform, the intelligent voice customer service can determine the target sentence for replying through the dialogue processing method of the steps S100 to S110 based on the current voice data to be processed of the user, and reply the voice data corresponding to the target sentence to the user.
The dialog processing method provided in the present specification may be processing not only for a voice conversation but also for a text conversation. When the user communicates with the intelligent customer service through text conversation, ASR processing is not needed in the steps, and the target sentence corresponding to the reply is determined through subsequent steps based on the conversation text.
Based on the dialog processing method shown in fig. 1, an embodiment of the present specification further provides a schematic structural diagram of a dialog processing apparatus, as shown in fig. 4.
Fig. 4 is a schematic structural diagram of a dialog processing device provided in an embodiment of the present specification, where the dialog processing device includes:
the receiving module 200 receives voice data to be processed sent by a user through a terminal;
the first determining module 202 is configured to determine, according to other voice data of the user and reply voice data sent to the user in the current session process, a corresponding voice session text through voice recognition processing, perform feature extraction on the determined voice session text, and determine a first session feature;
a second determining module 204, configured to perform feature extraction according to the voice data to be processed, the session policy corresponding to the reply voice data, and the portrait information of the user, respectively, perform feature fusion on the extracted features, and determine a fused aggregation feature;
a third determining module 206, which takes the first session feature and the aggregation feature as inputs, inputs a pre-trained policy selection model, and determines a target policy output by the policy selection model;
a fourth determining module 208, configured to input a pre-trained sentence selection model using the first session feature, the aggregation feature, and a plurality of reply sentences corresponding to the target policy as inputs, and determine a target sentence output by the sentence selection model;
the sending module 210 sends the determined reply voice data corresponding to the 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 process, 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, the corresponding voice session text through voice recognition processing, perform feature extraction on the determined voice session text, determine a reply session feature, perform feature fusion according to the determined other session features and the reply session feature, and determine the fused first session feature.
Optionally, the first determining module 202 is further configured to determine, according to a time sequence of a session, at least one piece of other voice data and reply voice data corresponding to the piece of other voice data from other voice data of the user and reply voice data sent to the user in a current session process.
Optionally, the second determining module 204 is specifically configured to, according to the to-be-processed voice data, determine a corresponding voice conversation text through voice recognition processing, perform feature extraction according to the determined voice conversation text, determine a second conversation feature, determine a conversation policy corresponding to the reply voice data, perform feature extraction on the conversation 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 conversation feature, the determined policy reply feature, and the portrait feature of the user, and determine a fused aggregation feature.
Optionally, the dialog processing apparatus further includes a model training module 212, where the model training module 212 is specifically configured to obtain a voice data segment in which service execution succeeds during a historical 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 in which service execution succeeds, a piece of voice data of the user according to the voice data segment corresponding to the user, as to-be-processed voice data, and determine reply voice data corresponding to the to-be-processed voice data, as labeled voice data, and determine, according to the 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 to-be-processed voice data, determining a corresponding voice conversation text through voice recognition processing according to the determined other voice data of the user and the reply voice data sent to the user, performing feature extraction on the determined voice conversation text, determining a first conversation feature, performing feature extraction respectively according to the determined voice data to be processed, a conversation strategy corresponding to the reply voice data and the portrait information of the user, performing feature fusion on the extracted features, determining a fused aggregation feature, and determining a first training sample set according to the determined first conversation feature of each user and the aggregated feature of each user, wherein the first training sample set is used for training a strategy selection 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 the 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 aggregation feature included in the first training sample as inputs, determine a target policy output by the policy selection model, and adjust a model parameter in the policy selection model with a goal of minimizing a difference between the label 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 pre-trained policy selection model using a first session feature and an aggregation 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 the preset target policy, determine a second training sample set according to the first session feature included in each first training sample, the aggregation feature included in each first training sample, and the plurality of reply sentences corresponding to the target policy of each first training sample, label each second training sample included in the second training sample set according to labeled speech data corresponding to each first training sample, and for each second training sample, use the first session feature, the aggregation feature, and the plurality of reply sentences corresponding to the target policy included in the second training sample as input, inputting a sentence selection model to be trained, 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, the first determining module 202 is specifically configured to input a determined voice conversation text as an input, input a pre-trained first feature extraction model, and 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 pre-trained second feature extraction model using a voice conversation text corresponding to the voice data to be processed, a conversation policy corresponding to the reply voice data, and the portrait information of the user as inputs, and determine an aggregation 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 an input, input a first feature extraction model to be trained, and 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 second feature extraction model to be trained, and determine an aggregation feature output by the second feature extraction model, using the voice conversation text corresponding to the voice data to be processed, a conversation strategy corresponding to the reply voice data, and the portrait information of the user as inputs.
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, determine a target policy output by the policy selection model, determine a plurality of reply sentences corresponding to a preset target policy, input the first session feature, the aggregation feature, and the determined reply sentence included in the first training sample as inputs, input the statement selection model to be trained, and determine a target statement output by the statement selection model, so as to minimize a difference between the label of the first training sample and the target statement output by the statement selection model, and adjusting model parameters in the first feature extraction model, the second feature extraction model, the strategy selection model and the statement selection model.
Embodiments of the present specification further provide a computer-readable storage medium, where the storage medium stores a computer program, and the computer program is operable to execute the dialog processing method provided in fig. 1.
Based on the dialog processing method shown in fig. 1, the embodiment of the present specification further proposes a schematic structural diagram of the electronic device shown in fig. 5. As shown in fig. 5, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs the computer program to implement the dialog processing method shown in fig. 1.
Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using 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, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, 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 for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, 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 divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
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 computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description 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.
This 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.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (13)

1. A conversation processing method, comprising:
receiving voice data to be processed sent by a user through a terminal;
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, and performing feature extraction on the determined voice conversation text to determine a first conversation feature;
respectively extracting features according to the voice data to be processed, the conversation strategy corresponding to the reply voice data and the portrait information of the user, performing feature fusion on the extracted features, and determining a fused aggregation feature;
inputting a pre-trained strategy selection model by taking the first session characteristic and the aggregation characteristic as input, and determining a target strategy output by the strategy selection model;
inputting a pre-trained statement selection model by taking the first session feature, the aggregation feature and a plurality of reply statements corresponding to the target strategy as input, and determining a target statement output by the statement selection model;
and sending the determined reply voice data corresponding to the target sentence to the terminal, so that the terminal plays the reply voice data.
2. The method according to claim 1, wherein 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 a current conversation process, and performing feature extraction on the determined voice conversation text to determine a first conversation feature specifically comprises:
determining a corresponding voice conversation text through voice recognition processing according to other voice data of the user in the current conversation process, and performing feature extraction on the determined voice conversation text to determine other conversation features;
determining a corresponding voice conversation text through voice recognition processing according to reply voice data sent to the user, and performing feature extraction on the determined voice conversation text to determine reply conversation features;
and according to the determined other session features and the reply session features, performing feature fusion, and determining the fused first session feature.
3. The method of claim 1, wherein before determining the corresponding voice conversation text through a voice recognition process based on other voice data of the user during the current conversation and reply voice data sent to the user, the method further comprises:
and determining at least one piece of other voice data and corresponding reply voice data from the other voice data of the user and the reply voice data sent to the user in the current conversation process according to the time sequence of the conversation.
4. The method according to claim 1, wherein 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 to determine a fused aggregate feature, specifically including:
determining a corresponding voice conversation text through voice recognition processing according to the voice data to be processed, extracting features according to the determined voice conversation text, and determining second conversation features;
determining a conversation strategy corresponding to the reply voice data, extracting the characteristics of the conversation strategy and determining strategy reply characteristics;
according to the portrait information of the user, feature extraction is carried out, and portrait features of the user are determined;
and performing feature fusion according to the determined second session feature, the determined strategy reply feature and the portrait feature of the user, and determining a fused aggregation feature.
5. The method of claim 1, wherein the first set of training samples for training the strategy selection model is determined using a method wherein:
acquiring a voice data segment which is successfully executed during historical manual conversation, wherein the voice data segment comprises voice data of each user and reply voice data sent to the user;
for each user successfully executing the service, determining a piece of voice data of the user as voice data to be processed according to the voice data segment corresponding to the user, and determining reply voice data corresponding to the voice data to be processed as labeled voice data;
determining other voice data of the user and reply voice data sent to the user according to the voice data segment corresponding to the user, wherein the session time of the other voice data and the session time of the reply voice data are earlier than the session time of the voice data to be processed;
determining a corresponding voice conversation text through voice recognition processing according to the determined other voice data of the user and the reply voice data sent to the user, and performing feature extraction on the determined voice conversation text to determine a first conversation feature;
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, performing feature fusion on the extracted features, and determining a fused aggregation feature;
and determining a first training sample set according to the determined first session characteristics of the users and the determined aggregation characteristics of the users, wherein the first training sample set is used for training the strategy selection model.
6. The method of claim 5, wherein the strategy selection model is trained using a method wherein:
for each first training sample in the first training sample set, labeling the first training sample according to the labeled voice data corresponding to the first training sample;
inputting a strategy selection model to be trained by taking the first session characteristics and the aggregation characteristics contained in the first training sample as input, and determining a target strategy output by the strategy selection model;
and adjusting model parameters in the strategy selection model with the aim of minimizing the difference between the label of the first training sample and the target strategy output by the strategy selection model.
7. The method of claim 6, wherein 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 each first training sample corresponding to the target strategy, and labeling each second training sample contained in the second training sample set according to labeled voice data corresponding to each first training sample;
for each second training sample, taking the first session features, the aggregation features and a plurality of reply sentences corresponding to the 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 the model parameters in the sentence selection model with the aim of minimizing the difference between the label of the second training sample and the target sentence output by the sentence selection model.
8. The method of claim 1, wherein performing feature extraction on the determined voice conversation text to determine a first conversation feature comprises:
the determined voice conversation text is used as input, a first feature extraction model trained in advance is input, and first conversation features output by the first feature extraction model are determined;
according to the voice data to be processed, the conversation strategy corresponding to the reply voice data and the portrait information of the user, feature extraction is respectively carried out, extracted features are subjected to feature fusion, and the fused aggregation features are determined, and the method specifically comprises the following steps:
carrying out voice recognition processing on the voice data to be processed, and determining a corresponding voice conversation text;
and inputting a pre-trained second feature extraction model 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 input, and determining the aggregation feature output by the second feature extraction model.
9. The method of claim 5, wherein performing feature extraction on the determined voice conversation text to determine a first conversation feature comprises:
inputting a first feature extraction model to be trained by taking the determined voice conversation text as input, and determining first conversation features 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, performing feature fusion on each extracted feature, and determining a fused aggregation feature, wherein the method specifically comprises the following steps:
carrying out voice recognition processing on the voice data to be processed, and determining a corresponding voice conversation text;
and inputting a second feature extraction model to be trained 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 input, and determining the aggregation feature output by the second feature extraction model.
10. The method of claim 9, wherein the process of training the model specifically comprises:
for each first training sample in the first training sample set, labeling the first training sample according to the labeled voice data corresponding to the first training sample;
inputting a strategy selection model to be trained by taking the first session characteristics and the aggregation characteristics contained in the first training sample as input, and determining a target strategy output by the strategy selection model;
determining a plurality of reply sentences corresponding to the preset target strategy;
inputting a sentence selection model to be trained by taking the first session feature, the aggregation feature and the determined reply sentence contained in the first training sample as input, and determining a target sentence 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 statement selection model with the aim of minimizing the difference between the label of the first training sample and the target statement output by the statement selection model.
11. A conversation processing apparatus, comprising:
the receiving module is used for receiving the voice data to be processed sent by a user through a 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 features according to the voice data to be processed, the conversation strategy corresponding to the reply voice data and the portrait information of the user, performing feature fusion on the extracted features and determining a fused aggregation feature;
the third determining module is used for inputting the first session characteristics and the aggregation characteristics into a pre-trained strategy selection model and determining a target strategy output by the strategy selection model;
a fourth determining module, configured to input a pre-trained sentence selection model using the first session feature, the aggregation feature, and a plurality of reply sentences corresponding to the target policy as inputs, and determine a target sentence output by the sentence selection model;
and the sending module is used for sending the determined reply voice data corresponding to the target sentence 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, wherein the processor implements the method of any of 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 true CN112735407A (en) 2021-04-30
CN112735407B 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)

Cited By (2)

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

Citations (5)

* 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
US20200143115A1 (en) * 2015-01-23 2020-05-07 Conversica, Inc. Systems and methods for improved automated conversations

Patent Citations (5)

* 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
US20200143115A1 (en) * 2015-01-23 2020-05-07 Conversica, Inc. Systems and methods for improved automated conversations
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模型的用户意图识别", 计算机应用与软件, no. 03 *

Cited By (4)

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

Also Published As

Publication number Publication date
CN112735407B (en) 2023-07-21

Similar Documents

Publication Publication Date Title
CN107437416B (en) Consultation service processing method and device based on voice recognition
CN109514586B (en) Method and system for realizing intelligent customer service robot
CN112632961B (en) Natural language understanding processing method, device and equipment based on context reasoning
EP3477635A1 (en) System and method for natural language processing
CN110277092A (en) A kind of voice broadcast method, device, electronic equipment and readable storage medium storing program for executing
CN112735407A (en) Conversation processing method and device
CN115545002B (en) Model training and business processing method, device, storage medium and equipment
CN115952272A (en) Method, device and equipment for generating dialogue information and readable storage medium
CN111881399A (en) Message pushing method and device
CN114332873A (en) Training method and device for recognition model
CN115146601A (en) Method and device for executing language processing task, readable storage medium and equipment
CN111027291A (en) Method and device for adding punctuation marks in text and training model and electronic equipment
CN114819614A (en) Data processing method, device, system and equipment
CN112597301A (en) Voice intention recognition method and device
CN108831444A (en) Semantic resources training method and system for voice dialogue platform
CN113079201B (en) Information processing system, method, device and equipment
CN111402864A (en) Voice processing method and electronic equipment
CN112735374B (en) Automatic voice interaction method and device
CN117216271A (en) Article text processing method, device and equipment
CN115545720B (en) Model training method, business wind control method and business wind control device
CN115391503A (en) Application method and device of session flow
CN112529585A (en) Interactive awakening method, device, equipment and system for risk transaction
CN113342945A (en) Voice session processing method and device
CN111192063A (en) Online customer service queuing processing method and device and electronic equipment
CN111539520A (en) Method and device for enhancing robustness of deep learning model

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