CN115098665A - Method, device and equipment for expanding session data - Google Patents

Method, device and equipment for expanding session data Download PDF

Info

Publication number
CN115098665A
CN115098665A CN202211022616.XA CN202211022616A CN115098665A CN 115098665 A CN115098665 A CN 115098665A CN 202211022616 A CN202211022616 A CN 202211022616A CN 115098665 A CN115098665 A CN 115098665A
Authority
CN
China
Prior art keywords
role
dialogue
character
training
model
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.)
Withdrawn
Application number
CN202211022616.XA
Other languages
Chinese (zh)
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 Lingxin Intelligent Technology Co ltd
Original Assignee
Beijing Lingxin Intelligent 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 Lingxin Intelligent Technology Co ltd filed Critical Beijing Lingxin Intelligent Technology Co ltd
Priority to CN202211022616.XA priority Critical patent/CN115098665A/en
Publication of CN115098665A publication Critical patent/CN115098665A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/35Clustering; Classification
    • G06F16/353Clustering; Classification into predefined classes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The embodiment of the application relates to the field of artificial intelligence and discloses a method, a device and equipment for expanding dialogue data. The embodiment of the application relates to a dialogue data expansion method, which comprises the following steps: acquiring a dialogue corpus; splitting the dialogue corpus to obtain a first role training set and a second role training set; training the first dialogue model and the second dialogue model according to the first role training set and the second role training set respectively to obtain a first role and a second role dialogue model; and carrying out dialogue between the first role dialogue model and the second role dialogue model to obtain a target dialogue data set. Therefore, the complete dialogue information is used as a training sample, a dialogue model which can be used for generating a target dialogue data set by each role is obtained, the final target data set is collected and used as the training sample data, and the extension of the dialogue data is realized. In this way, consistency of context logic in the process of conversation of the finally obtained training sample is ensured.

Description

Conversation data expansion method, device and equipment
Technical Field
The embodiment of the invention relates to the field of artificial intelligence, in particular to a method, a device and equipment for expanding dialogue data.
Background
The conversation model is often applied to a conversation system for providing a chat communication service for users. The conversation model generally provides chat communication services for users, including: peer-to-peer chats and non-peer chats. The so-called peer-to-peer chat generally means that a dialogue model and a user do not have strict context logic consistency requirements in a dialogue process, and is mainly used for providing chatty service for the user; non-peer chat generally means that the conversation model and the user have definite identity definition during the conversation process and have strict consistency requirements of context logic, such as: the process of consulting between a questioner and a solver in a consulting scene aiming at a certain question.
In order to make the dialogue model provide better service for the user, training of the dialogue model needs to be completed in advance. Compared with other types of model training, the dialogue model requires a large amount of dialogue data as training samples, however, the acquisition difficulty and the cost of the training samples are high, and in order to obtain enough training samples for the dialogue model, data expansion needs to be performed on the existing training samples to obtain more dialogue data for training the dialogue model. The data expansion mode of the training samples used for the dialogue model at present is generally a word replacement method. However, the context logic consistency between training samples is low due to the fact that the keywords are replaced in the dialogue model training samples obtained by data expansion based on the word replacement method, and the model obtained by training with the training samples cannot be applied to the non-peer type chat scene.
Disclosure of Invention
The embodiment of the application provides a method, a device and equipment for expanding dialogue data, and aims to solve the problem that context logic consistency among training samples is low due to the fact that keywords are replaced in the existing dialogue data expansion method.
In a first aspect, an embodiment of the present application provides a method for extending dialog data, where the method includes:
obtaining a corpus of dialogues, the corpus of dialogues including: at least one group of conversation information of a first role and a second role, wherein the first role and the second role are in a non-peer-to-peer chat relationship;
splitting the dialogue corpus to obtain a first role training set and a second role training set;
training a first dialogue model according to the first character training set to obtain a first character dialogue model;
training a second dialogue model according to the second role training set to obtain a second role dialogue model;
and calling the first role dialogue model and the second role dialogue model to train a dialogue scene to obtain a target dialogue data set so as to realize data expansion.
In some possible embodiments, the corpus of conversations is derived from historical conversation records of the first character and the second character. Therefore, the data in the first character training set and the second character training set obtained by splitting are closer to the actual scene, and the final convergence results of the first character dialogue model and the second character dialogue training model are more accurate.
In some possible embodiments, each of the at least one set of dialog messages for the first persona and the second persona includes: the first role corresponds to the context information, the second role corresponds to the context information, the first role response information and the second role response information.
Specifically, the context information corresponding to the first role is sent by the first role, the context information corresponding to the second role is sent by the second role, the first role response information is response information sent by the first role in response to the context information corresponding to the second role, and the second role response information is response information sent by the second role in response to the context information corresponding to the first role.
In some possible embodiments, each of the dialog messages of the at least one group of first characters and second characters further includes: topic categories and emotion categories, wherein each conversation information of the first character and the second character corresponds to one topic category and one emotion category. In this way, the first character dialogue model and the second character dialogue model generate target dialogue data sets based on different topic categories and different emotion categories by classifying dialogue information corresponding to the different topic categories and the different emotion categories.
In some possible embodiments, the first character training set comprises: at least one set of first character dialog training information, the first character dialog training information comprising: the first role responds to the first role response information output by the first role in response to the context information corresponding to the second role;
the second character training set comprises: at least one set of second character dialog training information, the second character dialog training information comprising: the second persona outputs second persona response information in response to the context information corresponding to the first persona. Therefore, the training objectives of the first role dialogue model and the second role dialogue model can be stronger, and the context logic consistency of the target dialogue data set is further improved.
In some possible embodiments, the target dialog data set includes: dialog information for at least one set of the first character dialog model and the second character dialog model.
In some possible embodiments, the dialoguing the first character dialog model with the second character dialog model includes: setting at least one topic category for the first character dialog model or the second character dialog model. Therefore, the dialogue data in the dialogue data set obtained through the first role dialogue model and the second role dialogue model can be applied to more application scenes, and the data expansion range is larger.
In some possible embodiments, the dialog corpus may further be obtained from a preset coding model according to a preset rule, where the preset text coding model includes at least one of the following categories: convolutional neural network models, cyclic neural network models, Transformer models, and pre-trained BERT models.
In a second aspect, an embodiment of the present application further provides a session data extension apparatus, where the apparatus includes:
an obtaining module, configured to obtain a dialog corpus, where the dialog corpus includes: at least one group of dialogue information of a first role and a second role, wherein the first role and the second role are in a non-peer-to-peer chat relationship;
the splitting module is used for splitting the dialogue corpus to obtain a first role training set and a second role training set;
the first training module is used for training a first dialogue model according to the first character training set to obtain a first character dialogue model;
the second training module is used for training a second dialogue model according to the second role training set to obtain a second role dialogue model;
and the execution module is used for calling the first role dialogue model and the second role dialogue model to carry out dialogue scene training to obtain a target dialogue data set so as to realize data expansion.
In a third aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, and the processor performing the method of the first aspect or any possible implementation manner of the first aspect by executing the computer instructions.
In a fourth aspect, the present application further provides a computer-readable storage medium, where computer instructions are stored, and the computer instructions are configured to cause the computer to perform the method in the first aspect or any possible implementation manner of the first aspect.
The embodiment of the application provides a method for expanding dialogue data, in the scheme, firstly, a dialogue corpus is obtained, and the dialogue corpus comprises: at least one group of dialogue information of a first role and a second role, wherein the first role and the second role are in a non-peer-to-peer chat relationship; then, splitting the dialogue corpus to obtain a first role training set and a second role training set; then, training a first dialogue model according to the first character training set to obtain a first character dialogue model; training a second dialogue model according to the second role training set to obtain a second role dialogue model; and finally, calling the first role dialogue model and the second role dialogue model to train a dialogue scene to obtain a target dialogue data set so as to realize data expansion. Therefore, complete dialogue information is used as a training sample instead of a replacement keyword, the complete dialogue information is respectively input into the learning model corresponding to each dialogue role for independent training, the two trained dialogue models are subjected to actual dialogue application, and the dialogue contents are collected to serve as a final target data set, so that the extension of dialogue data is realized. Therefore, the consistency of the context logic in the conversation process of the finally obtained conversation data serving as the training sample is ensured, and the consistency of the context logic in the conversation process of the conversation model applying the training sample is better, so that the method is more suitable for the non-peer type chat scene.
Drawings
Fig. 1 is a schematic flowchart of a session data expansion method provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a session data expansion apparatus according to an embodiment of the present application;
fig. 3 is an exemplary structural diagram of a session data extension device provided in an embodiment of the present application.
Detailed Description
The terminology used in the following examples of the present application is for the purpose of describing alternative embodiments and is not intended to be limiting of the present application. As used in the specification and the appended claims of this application, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well. It should also be understood that although the terms first, second, etc. may be used in the following embodiments to describe a class of objects, the objects are not limited to these terms. These terms are used to distinguish between particular objects of that class of objects. For example, the following embodiments may adopt the terms first, second, etc. to describe other class objects in the same way, and are not described herein again.
The embodiment of the application provides a method for expanding dialog data, in this scheme, first, a dialog corpus is obtained, and the dialog corpus includes: at least one group of conversation information of a first role and a second role, wherein the first role and the second role are in a non-peer-to-peer chat relationship; then, splitting the dialogue corpus to obtain a first role training set and a second role training set; then, training a first dialogue model according to the first character training set to obtain a first character dialogue model; training a second dialogue model according to the second role training set to obtain a second role dialogue model; and finally, carrying out dialogue on the first role dialogue model and the second role dialogue model to obtain a target dialogue data set so as to realize data expansion. Therefore, complete dialogue information replaces a replacement keyword to serve as a training sample, the training sample is respectively input into the learning model corresponding to each dialogue role to carry out independent training, the two trained dialogue models are subjected to actual dialogue application, the dialogue content is collected to serve as a final target data set, and the extension of dialogue data is achieved. Therefore, the consistency of the context logic in the conversation process of the finally obtained conversation data serving as the training sample is ensured, and the consistency of the context logic in the conversation process of the conversation model applying the training sample is better, so that the method is more suitable for the non-peer type chat scene.
Any electronic device related to the embodiments of the present application may be an electronic device such as a mobile phone, a tablet computer, a wearable device (e.g., a smart watch, a smart bracelet, etc.), a notebook computer, a desktop computer, and an in-vehicle device. The electronic device is preinstalled with a software deployment application. It is understood that the embodiment of the present application does not set any limit to the specific type of the electronic device.
Conversation models are often used in conversation systems that provide chat communication services to users. The conversation model generally provides chat communication services for users, including: peer-to-peer chats and non-peer chats. The so-called peer-to-peer chat generally means that a dialogue model and a user do not have strict context logic consistency requirements in a dialogue process, and is mainly used for providing chatty service for the user; non-peer chat generally means that a conversation model and a user have definite identity definition during a conversation and have strict context logic consistency requirements, such as: the process of consulting between a questioner and a solver in a consulting scene aiming at a certain question.
In order to make the dialogue model provide better service for the user, training of the dialogue model needs to be completed in advance. Compared with other types of model training, the dialogue model requires a large amount of dialogue data as training samples, however, the acquisition difficulty and the cost of the training samples are high, and in order to obtain enough training samples for the dialogue model, data expansion needs to be performed on the existing training samples to obtain more dialogue data for training the dialogue model. The data expansion mode of the training samples used for the dialogue model at present is generally a word replacement method. However, the context logic consistency between training samples is low due to the fact that the keywords are replaced in the dialogue model training samples obtained by data expansion based on the word replacement method, and the model obtained by training with the training samples cannot be applied to the non-peer type chat scene.
Illustratively, in a psychological consulting scenario, the conversational characters are generally consultants and respondents. The consultant may be a user and the solver may be a dialogue model. During counseling, a part of the number of conversations around a certain subject is often needed, for example, in a counseling depression scene, the counselor needs to have a long conversation with the conversation model to assist the conversation model in disease identification. In this long dialog, in order to ensure the accuracy of the output result of the dialog model, the dialog context needs to be in the same topic, and the context logic consistency has a certain requirement.
The following is a description of several exemplary embodiments, and the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application will be explained.
In a first aspect of the present application, a method for expanding dialog data is provided, and referring to fig. 1, fig. 1 is a schematic flowchart of a method for expanding dialog data provided in an embodiment of the present application, and includes the following steps:
obtaining a corpus of dialogues, the corpus of dialogues including: at least one group of conversation information of a first role and a second role, wherein the first role and the second role are in a non-peer-to-peer chat relationship;
splitting the dialogue corpus to obtain a first role training set and a second role training set;
training a first dialogue model according to the first character training set to obtain a first character dialogue model;
training a second dialogue model according to the second role training set to obtain a second role dialogue model;
and calling the first role dialogue model and the second role dialogue model to train a dialogue scene to obtain a target dialogue data set so as to realize data expansion.
Illustratively, taking a conversation applied to a non-peer type conversation scenario in the field of psychological consulting conversations as an example, the conversation mode is assumed to be a "two-person conversation" (or one-person-one-agent conversation and two-agent conversation), and therefore, two roles, i.e., a first role and a second role, are generally required in the conversation scenario, and the chat relationship between the two conversation roles is a non-peer type chat relationship (a chat that is not a strict logical requirement).
It is understood that the first dialogue model and the second dialogue model are both neural network models to be trained, which have dialogue functions in dialogue scenes.
It is understood that a first character dialog model is a dialog model that bears a first character dialog content in a dialog scenario, and a second character dialog model is a dialog model that bears a second character dialog content in the dialog scenario. For example, in a psychological consulting scenario, the first character dialog model may be the character of a "consultant" and the second character dialog model may be the character of a "solver".
Further, a corpus of dialogues for expanding the dialog data is obtained, the corpus includes the dialog information of the first character and the second character,
optionally, the dialog corpus is obtained from historical dialog records of the first character and the second character;
optionally, the presentation form of the dialog information of the at least one group of the first character and the second character includes: dialog text of the first character and the second character and a text field containing dialog information of the first character and the second character.
Optionally, each of the dialog messages of the at least one group of the first character and the second character includes: context information corresponding to the first persona, context information corresponding to the second persona, first persona response information, and second persona response information,
specifically, the context information corresponding to the first role is sent by the first role, the context information corresponding to the second role is sent by the second role, the first role response information is response information sent by the first role in response to the context information corresponding to the second role, and the second role response information is response information sent by the second role in response to the context information corresponding to the first role.
Furthermore, the data in the dialog corpus is split (i.e., the dialog corpus is split), so as to obtain two independent data sets, i.e., a first role training set and a second role training set.
Optionally, the context information corresponding to the first role and the context information corresponding to the second role may be obtained from a preset semantic recognition model, where the context information corresponding to the first role is taken as an example, the method specifically includes:
obtaining at least one corpus corresponding to the first role;
identifying a keyword corresponding to each corpus in the corpus corresponding to the at least one first character;
semantic obtaining is carried out according to the key words corresponding to each corpus so as to obtain semantic features corresponding to each corpus;
and obtaining the context information corresponding to each corpus according to the semantic features corresponding to each corpus.
Obviously, the semantic features corresponding to each corpus are used for expressing the contextual information corresponding to the corpus.
For example, assuming that the semantic features corresponding to the corpus have an "angry" typeface, the "angry" typeface can express that the corpus corresponding to the context is an "angry" context.
Optionally, the first character training set includes: at least one set of first character dialog training information, the first character dialog training information comprising: first persona response information output by the first persona in response to context information corresponding to the second persona;
the second character training set comprises: at least one set of second character dialog training information, the second character dialog training information comprising: second persona response information output by the second persona in response to the context information corresponding to the first persona.
For example, assume that the obtained training data is in the form of (context) dialog, and the dialog contents are u11, u21, u12, u22, and u13 in this order. Wherein u11, u12 and u13 denote the first, second and third sentences of the first character in the current dialog scenario, u21 and u22 denote the first and second sentences of the second character in the current dialog scenario,
further, the dialog process of the first character and the second character may be as follows:
first character: "u 11";
the second role: "u 21";
a first role: "u 12";
the second role: "u 22";
first character: "u 13".
In the above dialog process, "u 11" may be represented as the context information corresponding to the first character, "u 21" may be represented as the response information sent by the second character in response to the context information corresponding to the first character, and as compared to "u 12", may also be represented as the context information of the second character, "u 12", "u 22", and "u 13", and so on, and thus, the description thereof is omitted here.
Further, according to the above mode, the data in the first character training set corresponding to the first character includes: { (context = [ u11, u21], response = u 12), (context = [ u11, u21, u12, u22], response = u 13) };
the data in the training set corresponding to the second role comprises: { (context = [ u11], response = u 21), (context = [ u11, u21, u12], response = u 22) }.
Further, training a first dialogue model according to the first character training set to obtain a first character dialogue model, wherein the first character dialogue model is a dialogue model capable of simulating a first character in a dialogue scene, so that the first character dialogue model can be suitable for the dialogue scene of the first character;
illustratively, assuming that the first character is set as a counselor in a psychological counseling scenario, the obtained first character dialogue model can output context information corresponding to the counselor and can output corresponding response information according to the context information of the second character (responder).
Further, a second dialogue model is trained according to the second role training set to obtain a second role dialogue model, wherein the second role dialogue model is a dialogue model capable of simulating a second role in a dialogue scene, so that the second role dialogue model can be suitable for the dialogue scene of the second role;
for example, assuming that the second character is set as a responder in a psychological consultation scenario, the obtained second character dialogue model can output context information corresponding to the responder and can output corresponding response information according to the context information of the first character (the consultant).
Furthermore, the trained first role dialogue model and the second role dialogue model are subjected to actual dialogue training, and the dialogue content is used as target dialogue data to realize data expansion.
Optionally, the target dialog data set includes: dialog information for at least one set of the first character dialog model and the second character dialog model.
In one possible embodiment, each of the dialog messages of the at least one group of first characters and second characters further includes: topic categories and emotion categories, wherein each conversation information of the first character and the second character corresponds to one topic category and one emotion category.
Optionally, the topic category and the emotion category may be obtained from each of the dialog messages of the at least one group of the first character and the second character by semantic acquisition, or may be obtained by a preset scenario.
Optionally, the dialog between the first character dialog model and the second character dialog model includes: setting at least one topic category for the first character dialog model or the second character dialog model.
Optionally, the dialog of the first character dialog model with the second character dialog model further includes: setting at least one round of dialog for the first character dialog model and the second character dialog model, each round of dialog corresponding to one topic category and one emotion category.
For example, assuming that the topic of the first turn of conversation between the first character conversation model and the second character conversation model is depression consultation, the corresponding emotion classification of the consultant is 'depression' emotion, and the corresponding emotion classification of the consultant can be obtained through contextual information output by the consultant;
after the first round of conversation is completed, the topic of the second round of conversation between the first role conversation model and the second role conversation model is set to be 'mania' consultation, the emotion category corresponding to the consultant is 'mania' emotion, and the emotion category corresponding to the consultant can be obtained through contextual information output by the consultant.
The foregoing embodiments describe various embodiments of the training method for a dialog model provided in this application, from the aspects of obtaining a dialog corpus, splitting the dialog corpus, training a first dialog model, training a second dialog model, and obtaining a target data set. It should be understood that the processing steps of obtaining a dialog corpus, splitting the dialog corpus, training a first dialog model, training a second dialog model, and obtaining a target data set may be implemented in hardware or a combination of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
For example, if the above implementation steps implement the corresponding functions through software modules. As shown in fig. 2, the dialogue data expansion apparatus may include an acquisition module, a splitting module, a first training module, a second training module, and an execution module. The dialogue data expansion device can be used for executing part or all of the operations of the dialogue data expansion method.
For example:
an obtaining module, configured to obtain a dialog corpus, where the dialog corpus includes: at least one group of conversation information of a first role and a second role, wherein the first role and the second role are in a non-peer-to-peer chat relationship;
the splitting module is used for splitting the dialogue corpus to obtain a first role training set and a second role training set;
the first training module is used for training a first dialogue model according to the first character training set to obtain a first character dialogue model;
the second training module is used for training a second dialogue model according to the second role training set to obtain a second role dialogue model;
and the execution module is used for calling the first role dialogue model and the second role dialogue model to carry out dialogue scene training to obtain a target dialogue data set so as to realize data expansion.
As can be seen from this, it is possible to see,
the embodiment of the application provides a method for expanding dialog data, in this scheme, first, a dialog corpus is obtained, and the dialog corpus includes: at least one group of dialogue information of a first role and a second role, wherein the first role and the second role are in a non-peer-to-peer chat relationship; then, splitting the dialogue corpus to obtain a first role training set and a second role training set; then, training a first dialogue model according to the first character training set to obtain a first character dialogue model; training a second dialogue model according to the second role training set to obtain a second role dialogue model; and finally, calling the first role dialogue model and the second role dialogue model to train a dialogue scene to obtain a target dialogue data set so as to realize data expansion. Therefore, complete dialogue information is used as a training sample instead of a replacement keyword, the complete dialogue information is respectively input into the learning model corresponding to each dialogue role for independent training, the two trained dialogue models are subjected to actual dialogue application, and the dialogue contents are collected to serve as a final target data set, so that the extension of dialogue data is realized. Therefore, the consistency of the context logic in the conversation process of the finally obtained conversation data serving as the training sample is ensured, and the consistency of the context logic in the conversation process of the conversation model applying the training sample is better, so that the method is more suitable for the non-peer type chat scene.
It is understood that the functions of the above modules may be implemented by integrating into a hardware entity, for example, the acquiring module may be implemented by integrating into a transceiver, the splitting module, the first training module, the second training module, and the executing module may be implemented by integrating into a processor, and programs and instructions for implementing the functions of the above modules may be maintained in a memory. As shown in fig. 3, an electronic device is provided, which includes a processor, a transceiver and a memory, wherein the transceiver is configured to execute learning result acquisition corresponding to the target reference information and each of the encoding information in the disease species identification method based on multiple information, and the memory is configured to store the program/code preinstalled by the aforementioned deployment apparatus, and may also store the code for execution by the processor, etc. When the processor runs the code stored in the memory, the electronic device is caused to execute part or all of the operations of the software deployment method in the method.
The specific process is described in the above embodiments of the method, and is not described in detail here.
In a specific implementation, corresponding to the foregoing electronic device, an embodiment of the present application further provides a computer storage medium, where the computer storage medium disposed in the electronic device may store a program, and when the program is executed, part or all of the steps in each embodiment of the software deployment method may be implemented. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
One or more of the above modules or units may be implemented in software, hardware or a combination of both. When any of the above modules or units are implemented in software, which is present as computer program instructions and stored in a memory, a processor may be used to execute the program instructions and implement the above method flows. The processor may include, but is not limited to, at least one of: various computing devices that run software, such as a Central Processing Unit (CPU), a microprocessor, a Digital Signal Processor (DSP), a Microcontroller (MCU), or an artificial intelligence processor, may each include one or more cores for executing software instructions to perform operations or processing. The processor may be built in a SoC (system on chip) or an Application Specific Integrated Circuit (ASIC), or may be a separate semiconductor chip. The processor may further include a necessary hardware accelerator such as a Field Programmable Gate Array (FPGA), a PLD (programmable logic device), or a logic circuit for implementing a dedicated logic operation, in addition to a core for executing software instructions to perform an operation or a process.
When the above modules or units are implemented in hardware, the hardware may be any one or any combination of CPU, microprocessor, DSP, MCU, artificial intelligence processor, ASIC, SoC, FPGA, PLD, dedicated digital circuit, hardware accelerator, or non-integrated discrete device, which can run necessary software or is not dependent on software to perform the above method flow.
Further, a bus interface may also be included in FIG. 3, which may include any number of interconnected buses and bridges, with one or more processors, represented by a processor, and various circuits, represented by a memory, being linked together. The bus interface may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. The bus interface provides an interface. The transceiver provides a means for communicating with various other apparatus over a transmission medium. The processor is responsible for managing the bus architecture and general processing, and the memory may store data used by the processor in performing operations.
When the above modules or units are implemented using software, they may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It should be understood that, in the various embodiments of the present application, the size of the serial number of each process does not mean the execution sequence, and the execution sequence of each process should be determined by the function and the inherent logic thereof, and should not constitute any limitation to the implementation process of the embodiments.
All parts of the specification are described in a progressive mode, the same and similar parts of all embodiments can be referred to each other, and each embodiment is mainly introduced to be different from other embodiments. In particular, as to the apparatus and system embodiments, since they are substantially similar to the method embodiments, the description is relatively simple and reference may be made to the description of the method embodiments in relevant places.
While alternative embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
The above-mentioned embodiments, objects, technical solutions and advantages of the present application are further described in detail, it should be understood that the above-mentioned embodiments are only examples of the present application, and are not intended to limit the scope of the present application, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present application should be included in the scope of the present invention.

Claims (10)

1. A method for session data expansion, the method comprising:
obtaining a corpus of dialogues, the corpus of dialogues including: at least one group of dialogue information of a first role and a second role, wherein the first role and the second role are in a non-peer-to-peer chat relationship;
splitting the dialogue corpus to obtain a first role training set and a second role training set;
training a first dialogue model according to the first character training set to obtain a first character dialogue model;
training a second dialogue model according to the second role training set to obtain a second role dialogue model;
and calling the first role dialogue model and the second role dialogue model to train a dialogue scene to obtain a target dialogue data set so as to realize data expansion.
2. The method of claim 1, wherein the corpus of conversations is derived from historical conversation records of the first character and the second character.
3. The method of claim 1, wherein each of the at least one set of dialog information for the first character and the second character comprises: the first role corresponds to the context information, the second role corresponds to the context information, the first role response information and the second role response information.
4. The method of claim 1, wherein each of the at least one set of dialog information for the first character and the second character further comprises: topic categories and emotion categories, wherein each conversation information of the first character and the second character corresponds to one topic category and one emotion category.
5. The method of claim 1 or 3, wherein the first character training set comprises: at least one set of first character dialog training information, the first character dialog training information comprising: the first role responds to the first role response information output by the first role in response to the context information corresponding to the second role;
the second character training set comprises: at least one set of second character dialog training information, the second character dialog training information comprising: second persona response information output by the second persona in response to the context information corresponding to the first persona.
6. The method of claim 1, wherein the target dialog data set comprises: dialog information for at least one set of the first character dialog model and the second character dialog model.
7. The method of claim 1, wherein said dialoguing the first character dialog model with the second character dialog model comprises: setting at least one topic category for the first character dialog model or the second character dialog model.
8. A session data extension apparatus, comprising:
an obtaining module, configured to obtain a dialog corpus, where the dialog corpus includes: at least one group of conversation information of a first role and a second role, wherein the first role and the second role are in a non-peer-to-peer chat relationship;
the splitting module is used for splitting the dialogue corpus to obtain a first role training set and a second role training set;
the first training module is used for training a first dialogue model according to the first character training set to obtain a first character dialogue model;
the second training module is used for training a second dialogue model according to the second role training set to obtain a second role dialogue model;
and the execution module is used for calling the first role dialogue model and the second role dialogue model to carry out dialogue scene training to obtain a target dialogue data set so as to realize data expansion.
9. An electronic device, characterized in that the electronic device comprises: a memory and a processor communicatively coupled to each other, the memory having stored therein computer instructions, the processor performing the method of any of claims 1-7 by executing the computer instructions.
10. A computer-readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
CN202211022616.XA 2022-08-25 2022-08-25 Method, device and equipment for expanding session data Withdrawn CN115098665A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211022616.XA CN115098665A (en) 2022-08-25 2022-08-25 Method, device and equipment for expanding session data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211022616.XA CN115098665A (en) 2022-08-25 2022-08-25 Method, device and equipment for expanding session data

Publications (1)

Publication Number Publication Date
CN115098665A true CN115098665A (en) 2022-09-23

Family

ID=83300222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211022616.XA Withdrawn CN115098665A (en) 2022-08-25 2022-08-25 Method, device and equipment for expanding session data

Country Status (1)

Country Link
CN (1) CN115098665A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116662520A (en) * 2023-07-21 2023-08-29 六合熙诚(北京)信息科技有限公司 Multi-round dialogue generation method suitable for psychological role scene simulation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108897797A (en) * 2018-06-12 2018-11-27 腾讯科技(深圳)有限公司 Update training method, device, storage medium and the electronic equipment of dialog model
CN110888968A (en) * 2019-10-15 2020-03-17 浙江省北大信息技术高等研究院 Customer service dialogue intention classification method and device, electronic equipment and medium
CN113806512A (en) * 2021-09-30 2021-12-17 中国平安人寿保险股份有限公司 Robot dialogue model training method, device, equipment and storage medium
US20220198327A1 (en) * 2020-12-18 2022-06-23 Beijing Baidu Netcom Science And Technology Co., Ltd. Method, apparatus, device and storage medium for training dialogue understanding model
CN114822812A (en) * 2022-04-11 2022-07-29 平安科技(深圳)有限公司 Character dialogue simulation method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108897797A (en) * 2018-06-12 2018-11-27 腾讯科技(深圳)有限公司 Update training method, device, storage medium and the electronic equipment of dialog model
CN110888968A (en) * 2019-10-15 2020-03-17 浙江省北大信息技术高等研究院 Customer service dialogue intention classification method and device, electronic equipment and medium
US20220198327A1 (en) * 2020-12-18 2022-06-23 Beijing Baidu Netcom Science And Technology Co., Ltd. Method, apparatus, device and storage medium for training dialogue understanding model
CN113806512A (en) * 2021-09-30 2021-12-17 中国平安人寿保险股份有限公司 Robot dialogue model training method, device, equipment and storage medium
CN114822812A (en) * 2022-04-11 2022-07-29 平安科技(深圳)有限公司 Character dialogue simulation method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116662520A (en) * 2023-07-21 2023-08-29 六合熙诚(北京)信息科技有限公司 Multi-round dialogue generation method suitable for psychological role scene simulation

Similar Documents

Publication Publication Date Title
CN111930940B (en) Text emotion classification method and device, electronic equipment and storage medium
CN108877782B (en) Speech recognition method and device
CN114757176B (en) Method for acquiring target intention recognition model and intention recognition method
AU2014285033A1 (en) Systems and methods for creating and implementing an artificially intelligent agent or system
US11636272B2 (en) Hybrid natural language understanding
US20220358292A1 (en) Method and apparatus for recognizing entity, electronic device and storage medium
CN113987147A (en) Sample processing method and device
CN111930914A (en) Question generation method and device, electronic equipment and computer-readable storage medium
Windiatmoko et al. Developing facebook chatbot based on deep learning using rasa framework for university enquiries
CN112579733B (en) Rule matching method, rule matching device, storage medium and electronic equipment
Windiatmoko et al. Developing FB chatbot based on deep learning using RASA framework for university enquiries
CN115098665A (en) Method, device and equipment for expanding session data
CN114330483A (en) Data processing method, model training method, device, equipment and storage medium
CN110377706B (en) Search sentence mining method and device based on deep learning
CN108763355A (en) A kind of intelligent robot interaction data processing system and method based on user
CN115617974B (en) Dialogue processing method, device, equipment and storage medium
CN111401069A (en) Intention recognition method and intention recognition device for conversation text and terminal
CN115017876A (en) Method and terminal for automatically generating emotion text
CN113705194A (en) Extraction method and electronic equipment for short
CN115408500A (en) Question-answer consistency evaluation method and device, electronic equipment and medium
CN116933800B (en) Template-based generation type intention recognition method and device
CN116913278B (en) Voice processing method, device, equipment and storage medium
CN117609480A (en) Corpus filtering and method and device for training natural language processing neural network model
Yoon et al. Intelligent Chatbot Based on Emotional Model Including Newly-Coined Word and Emoticons
CN116959441A (en) Speech recognition method and device, storage medium and electronic equipment

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20220923