CN112732910A - Cross-task text emotion state assessment method, system, device and medium - Google Patents

Cross-task text emotion state assessment method, system, device and medium Download PDF

Info

Publication number
CN112732910A
CN112732910A CN202011603637.1A CN202011603637A CN112732910A CN 112732910 A CN112732910 A CN 112732910A CN 202011603637 A CN202011603637 A CN 202011603637A CN 112732910 A CN112732910 A CN 112732910A
Authority
CN
China
Prior art keywords
text
emotion
text emotion
model
recognition 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.)
Granted
Application number
CN202011603637.1A
Other languages
Chinese (zh)
Other versions
CN112732910B (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.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
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 South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN202011603637.1A priority Critical patent/CN112732910B/en
Publication of CN112732910A publication Critical patent/CN112732910A/en
Application granted granted Critical
Publication of CN112732910B publication Critical patent/CN112732910B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • 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 invention discloses a cross-task text emotion state assessment method, a system, a device and a medium, wherein the method comprises the following steps: adopting a deep bidirectional pre-training converter as a basic model of a text emotion state recognition model; formatting standardization is carried out on a text emotion database of various different tasks, and a text emotion training sample is adopted to carry out fine adjustment and test on a text emotion state recognition model so as to obtain a final text emotion state recognition model; and carrying out standardization processing on the text data to be recognized, inputting the final text emotion state recognition model for recognition, and outputting the recognized emotion state. The method designs the recognition model based on the characteristics of different text emotion recognition data and the characteristics of BERT input, can quickly extract the text emotion characteristics which are strong in generalization and can cross tasks from various text emotion databases, effectively improves the effect and performance of the text emotion state recognition model, and can be widely applied to the technical field of natural language processing.

Description

Cross-task text emotion state assessment method, system, device and medium
Technical Field
The invention relates to the technical field of natural language processing, in particular to a method, a system, a device and a medium for evaluating emotion states of cross-task texts.
Background
With the rapid development of internet and social media (such as posts, microblogs, WeChat, popular comments, etc.), human beings have produced a great deal of comment information in the internet world. The comment information contains emotional tendency of the user, such as happiness, anger, sadness and happiness. Mining the emotional tendency of the user from the comment information helps to understand the public's opinion and opinion of a certain event or product. The text emotional state recognition refers to a process of analyzing, processing and extracting subjective texts with emotional colors by using a natural language processing technology, and aims to find out the emotional state of a speaker on one text. In recent years, text emotional state recognition is one of the hot researches in the field of natural language processing. This technology plays an important role in the fields of society, market, and medical treatment. For example, governments monitor social public opinion trends, online shopping platforms learn user preferences for various products, and judge extreme emotions from the self-statement of a large number of psychological testers. Therefore, it is very important to automatically acquire emotional states.
Conventional textual emotion recognition methods typically employ a Recurrent Neural Network (RNN), such as LSTM, GRU, etc. RNN can accommodate sequence inputs of variable length, but RNN has poor parallel computing power. Google in 2017 proposed a self-attention-based transducer (Transformer), followed by a transform-based deep bidirectional pretrained transducer (BERT) in 2019. BERT works best under multiple downstream tasks of natural language processing. BERT has a stronger parallel capability than RNN.
The text emotion state recognition can be divided into four main emotion recognition subtasks according to different granularity of recognition objects: general emotion recognition (GSA), aspect classified emotion recognition (ACSA), aspect entity emotion recognition (ATSA), target aspect emotion recognition (TABSA). At present, most of text emotion state recognition work mainly solves a certain emotion recognition subtask.
Disclosure of Invention
In order to solve at least one technical problem existing in the prior art to a certain extent, the invention aims to:
the technical scheme adopted by the invention is as follows:
a cross-task text emotional state assessment method comprises the following steps:
adopting a deep bidirectional pre-training converter as a basic model of a text emotion state recognition model, and respectively inputting the pooled output of the basic model into an emotion discriminator and a subtask discriminator;
format standardization is carried out on a text emotion database of various different tasks, and fine adjustment and testing are carried out on the text emotion state recognition model by adopting a text emotion training sample after format standardization, so that a final text emotion state recognition model is obtained;
and standardizing the text data to be recognized, inputting the text data to be recognized into the final text emotion state recognition model for recognition, and outputting the recognized emotion state.
Further, the step of adopting a deep bidirectional pre-training converter as a basic model of the text emotion state recognition model and respectively inputting the pooled output of the basic model into an emotion discriminator and a subtask discriminator specifically comprises:
taking a deep bidirectional pre-training converter as a basic model G of the text emotion state recognition modelb(x;θb) Where x is the input to the model, θbIs a pre-training parameter of the model;
pooling output f ═ G of the base modelb(x;θb) Respectively input to the emotion discriminators GeAnd a task discriminator GtObtaining the probability y of three emotional statese=Ge(f;θe) And probability y of tasks of two different domainst=Gt(f;θt) Wherein thetaeAnd thetatAre each GeAnd GtRandomizing the parameters;
wherein the three emotional states include a positive emotional state, a neutral emotional state, and a negative emotional state.
Further, the formatting standardization of the text emotion database for various tasks includes:
extracting two text emotion databases of different tasks from the text emotion databases of the different tasks, and respectively using the two text emotion databases as source domain task text data and target domain task text data;
merging the source domain task text data and the target domain task text data, and dividing the merged data into a training set and a test set;
and standardizing the formats of all the text data to ensure that the text data in different forms have the same input format.
Further, all the text data come from text emotion databases of four different tasks, which are GSA, ACSA, ATSA and TABSA, respectively, and input characteristics of each task are different.
Further, the formatting of all text data includes:
designing a unified standardized input normal form according to the input situation of the deep bidirectional pre-training converter and the characteristics of the four different tasks;
the standardized input normal form corresponding to the GSA is as follows:
[ CLS ] + text sentence + [ SEP ] + [ MASK ] + [ SEP ] + [ MSAK ];
the standardized input normal form corresponding to the ACSA is as follows:
[ CLS ] + text sentence + [ SEP ] + Term + [ SEP ] + [ MSAK ];
the standardized input normal form corresponding to the ATSA is as follows:
[ CLS ] + text sentence + [ SEP ] + [ MASK ] + [ SEP ] + Category;
the standardized input paradigm corresponding to the TABSA is:
[ CLS ] + text sentence + [ SEP ] + Target + [ SEP ] + Aspect;
wherein [ CLS ], [ SEP ], [ MASK ] are symbols with specific functions in the deep bidirectional pre-training converter.
Further, the fine adjustment and the test of the text emotion state recognition model by adopting the text emotion training sample after format standardization comprise:
inputting the text emotion training sample with standardized format, calculating a total loss function of the text emotion state recognition model through forward propagation, and finely adjusting the text emotion state recognition model through a gradient descent algorithm;
and (4) for the text emotion test sample with the standardized input format of the text emotion state recognition model after fine tuning, counting the accuracy of emotion recognition results, and realizing the test of the model.
Further, the total loss function is designed by combining an antagonistic learning idea, so that the text emotional state recognition model can learn to distinguish the emotional state of the input sample, but cannot distinguish whether the emotional state comes from the source domain task text data or the target domain task text data;
the expression of the total loss function is:
Figure BDA0002869927820000031
wherein L iseFor prediction of loss function of emotion, LtA loss function is predicted for the task.
The other technical scheme adopted by the invention is as follows:
a cross-task text emotional state assessment system, comprising:
the model construction module is used for adopting a deep bidirectional pre-training converter as a basic model of a text emotion state recognition model and respectively inputting the pooled output of the basic model into an emotion discriminator and a subtask discriminator;
the model fine-tuning module is used for carrying out format standardization on a text emotion database of various different tasks, and fine-tuning and testing the text emotion state recognition model by adopting a text emotion training sample after format standardization to obtain a final text emotion state recognition model;
and the text recognition module is used for standardizing the text data to be recognized, inputting the text data into the final text emotion state recognition model for recognition and outputting the recognized emotion state.
The other technical scheme adopted by the invention is as follows:
a cross-task text emotional state assessment apparatus, comprising:
at least one processor;
at least one memory for storing at least one program;
when executed by the at least one processor, cause the at least one processor to implement the method described above.
The other technical scheme adopted by the invention is as follows:
a storage medium having stored therein processor-executable instructions for performing the method as described above when executed by a processor.
The invention has the beneficial effects that: according to the method, the recognition model is designed based on the characteristics of different text emotion recognition data and the characteristics of BERT input, the text emotion characteristics which are strong in generalization and can cross tasks can be rapidly extracted from various text emotion databases, and the effect and performance of the text emotion state recognition model are effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description is made on the drawings of the embodiments of the present invention or the related technical solutions in the prior art, and it should be understood that the drawings in the following description are only for convenience and clarity of describing some embodiments in the technical solutions of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of a textual emotional state recognition model in an embodiment of the invention;
FIG. 2 is a diagram illustrating a method for standardizing text data formats for various tasks according to an embodiment of the present invention;
FIG. 3 is a flow chart of training and testing a text emotional state recognition model in an embodiment of the invention;
FIG. 4 is a flowchart illustrating steps of a cross-task text emotional state assessment method according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention. The step numbers in the following embodiments are provided only for convenience of illustration, the order between the steps is not limited at all, and the execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.
In the description of the present invention, it should be understood that the orientation or positional relationship referred to in the description of the orientation, such as the upper, lower, front, rear, left, right, etc., is based on the orientation or positional relationship shown in the drawings, and is only for convenience of description and simplification of description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention.
In the description of the present invention, the meaning of a plurality of means is one or more, the meaning of a plurality of means is two or more, and larger, smaller, larger, etc. are understood as excluding the number, and larger, smaller, inner, etc. are understood as including the number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, unless otherwise explicitly limited, terms such as arrangement, installation, connection and the like should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific contents of the technical solutions.
As shown in fig. 4, the present embodiment provides a cross-task text emotional state assessment method, including the following steps:
and S1, adopting a deep bidirectional pre-training converter as a basic model of the text emotion state recognition model, and respectively inputting the pooled output of the basic model into an emotion discriminator and a subtask discriminator.
As shown in fig. 1, a text emotional state recognition model is built. Deep bidirectional pretraining converter (BERT) as base model Gb(x;θb) Where x is the input to the model, θbAre pre-training parameters for the model. Pooling output f ═ G of the base modelb(x;θb) Respectively input to the emotion discriminators GeAnd a task discriminator GtThe probability y of three emotional states (positive, neutral, negative) is obtainede=Ge(f;θe) And probability y of tasks of two different domainst=Gt(f;θt) Wherein thetaeAnd thetatAre each GeAnd GtThe randomization parameter of (1).
And S2, carrying out format standardization on the text emotion databases of various different tasks, and carrying out fine adjustment and testing on the text emotion state recognition model by adopting the text emotion training samples after format standardization to obtain a final text emotion state recognition model.
Carrying out format standardization on all text data to ensure that the text data in different forms have the same input format; the text data comes from a text emotion recognition database for four different tasks. The four tasks are GSA, ACSA, ATSA, and TABSA, respectively. The input characteristics of each task are different. GSA has only text sentences, ACSA has text sentences and category, ATSA has text sentences and term, and TABSA has text sentences, target and aspect. In order to enable different tasks to have the same input paradigm, the invention designs a unified input paradigm, namely [ CLS ] + text sentences + [ SEP ] + concrete terms + [ SEP ] + abstract terms, according to the input situation of the BERT and the characteristics of the four tasks. Specifically, GSA is normalized to [ CLS ] + text sentence + [ SEP ] + [ MASK ] + [ SEP ] + [ MSAK ], ACSA is normalized to [ CLS ] + text sentence + [ SEP ] + Term + [ SEP ] + [ MSAK ], ATSA is normalized to [ CLS ] + text sentence + [ SEP ] + [ MASK ] + [ SEP ] + Category, and TABSA is normalized to [ CLS ] + text sentence + [ SEP ] + Target + [ SEP ] + Aspect. Wherein, [ CLS ], [ SEP ], [ MASK ] are symbols (tokens) having specific functions in BERT.
And respectively selecting a classical standard database as a text emotion database for four text emotion recognition tasks (GSA, ACSA, ATSA and TABSA). A sample of the database of these four textual emotion recognition tasks is shown in attached table 1. Randomly extracting two text emotion databases of different tasks from text emotion databases of four tasks (GSA, ACSA, ATSA and TABSA), and respectively using the two text emotion databases as source domain task text data and target domain task text data; merging the source domain task text data and the target domain task text data, and then dividing the merged data into a training set and a test set; in the manner of fig. 2, all the text data are subjected to format standardization such that different forms of text data have the same input format.
TABLE 1
Figure BDA0002869927820000051
Figure BDA0002869927820000061
Respectively recording the text data of the source domain task and the text data of the target domain task in the formatted and standardized training data as
Figure BDA0002869927820000062
And
Figure BDA0002869927820000063
to generate high-level textual features across tasks, the present embodiment incorporates an antagonistic learning concept into the training process, introducing a gradient inversion layer Rα,RαThe gradient of (d) is:
Figure BDA0002869927820000064
where- α is a negative constant and I is an identity matrix. Antagonistic learning is reflected in the design of the total loss function. In the fine tuning stage of the model, by designing a specific total loss function, the model can learn to distinguish the emotional states of the input samples, but cannot distinguish the emotional states from the source domain and the target domain.
The total loss function of the model is:
Figure BDA0002869927820000065
wherein L iseAnd LtAn emotion prediction loss function and a task prediction loss function, respectively.
As shown in fig. 3, the text emotion training sample with standardized format is input, the total loss function of the model is calculated through forward propagation, and then the text emotion state recognition model is finely adjusted through a gradient descent algorithm, so that the model can automatically and quickly extract the text emotion characteristics with strong generalization and cross-task from various text emotion databases, and the effect and performance of the text emotion state recognition model are effectively improved. And (4) inputting the text emotion test sample with the standardized format into the finely adjusted text emotion state recognition model, and counting the accuracy of emotion recognition results to realize the test of the model.
And S3, standardizing the text data to be recognized, inputting the final text emotion state recognition model for recognition, and outputting the recognized emotion state.
In summary, compared with the prior art, the present embodiment at least includes the following beneficial effects:
(1) the method adopts the deep bidirectional pre-training converter, and through input format standardization, fine-tuning pre-training model and counterstudy, the text emotion characteristics with strong generalization and cross-task can be quickly extracted from various text emotion databases, and the effect and performance of the text emotion state recognition model are effectively improved. .
(2) The method and the device can rapidly identify the emotion state in the text in various text emotion model identification scenes, and are beneficial to realizing more intelligent human-computer interaction.
The embodiment also provides a cross-task text emotion state evaluation system, which includes:
the model construction module is used for adopting a deep bidirectional pre-training converter as a basic model of a text emotion state recognition model and respectively inputting the pooled output of the basic model into an emotion discriminator and a subtask discriminator;
the model fine-tuning module is used for carrying out format standardization on a text emotion database of various different tasks, and fine-tuning and testing the text emotion state recognition model by adopting a text emotion training sample after format standardization to obtain a final text emotion state recognition model;
and the text recognition module is used for standardizing the text data to be recognized, inputting the text data into the final text emotion state recognition model for recognition and outputting the recognized emotion state.
The cross-task text emotional state assessment system can execute the cross-task text emotional state assessment method provided by the method embodiment of the invention, can execute any combination implementation steps of the method embodiment, and has corresponding functions and beneficial effects of the method.
The embodiment also provides a cross-task text emotion state evaluation system, which includes:
the text emotion state recognition model building module is used for building each component of the model; adopting a deep bidirectional pre-training converter (BERT) as a basic model; respectively inputting the pooled output of the basic model into an emotion discriminator and a subtask discriminator; the emotion discriminator and the subtask discriminator are both fully connected neural networks; the emotion discriminator outputs the probabilities of three emotional states (positive, neutral and negative), and the subtask discriminator outputs the probabilities of two different domains of tasks (source domain and target domain);
and the text emotion state recognition model training test module is used for finely adjusting the text emotion state recognition model. And extracting the text emotion databases of two different tasks from the text emotion databases of the different tasks to respectively serve as the text data of the source domain task and the text data of the target domain task. Merging the source domain task text data and the target domain task text data, and then dividing the merged data into a training set and a test set; carrying out format standardization on all text data to ensure that the text data in different forms have the same input format; inputting the text emotion with standardized format into a text emotion state recognition model, and carrying out fine adjustment and testing on the model by adopting an antagonistic learning idea;
and the text emotional state recognition module is used for processing the text data to be recognized into standardized input and inputting the standardized input into the finely tuned text emotional state recognition model so as to recognize the emotional state.
The cross-task text emotional state assessment system can execute the cross-task text emotional state assessment method provided by the method embodiment of the invention, can execute any combination implementation steps of the method embodiment, and has corresponding functions and beneficial effects of the method.
The embodiment also provides a cross-task text emotion state assessment device, which includes:
at least one processor;
at least one memory for storing at least one program;
when executed by the at least one processor, cause the at least one processor to implement the method described above.
The cross-task text emotional state assessment device can execute the cross-task text emotional state assessment method provided by the method embodiment of the invention, can execute any combination implementation steps of the method embodiment, and has corresponding functions and beneficial effects of the method.
The embodiment of the application also discloses a computer program product or a computer program, which comprises computer instructions, and the computer instructions are stored in a computer readable storage medium. The computer instructions may be read by a processor of a computer device from a computer-readable storage medium, and executed by the processor to cause the computer device to perform the method illustrated in fig. 4.
The embodiment also provides a storage medium, which stores an instruction or a program capable of executing the cross-task text emotional state assessment method provided by the embodiment of the method of the invention, and when the instruction or the program is executed, the method can be executed by any combination of the embodiment of the method, and the method has corresponding functions and beneficial effects.
In alternative embodiments, the functions/acts noted in the block diagrams may occur out of the order noted in the operational illustrations. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality/acts involved. Furthermore, the embodiments presented and described in the flow charts of the present invention are provided by way of example in order to provide a more thorough understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and in which sub-operations described as part of larger operations are performed independently.
Furthermore, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the described functions and/or features may be integrated in a single physical device and/or software module, or one or more functions and/or features may be implemented in a separate physical device or software module. It will also be appreciated that a detailed discussion of the actual implementation of each module is not necessary for an understanding of the present invention. Rather, the actual implementation of the various functional modules in the apparatus disclosed herein will be understood within the ordinary skill of an engineer, given the nature, function, and internal relationship of the modules. Accordingly, those skilled in the art can, using ordinary skill, practice the invention as set forth in the claims without undue experimentation. It is also to be understood that the specific concepts disclosed are merely illustrative of and not intended to limit the scope of the invention, which is defined by the appended claims and their full scope of equivalents.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the foregoing description of the specification, reference to the description of "one embodiment/example," "another embodiment/example," or "certain embodiments/examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A cross-task text emotional state assessment method is characterized by comprising the following steps:
adopting a deep bidirectional pre-training converter as a basic model of a text emotion state recognition model, and respectively inputting the pooled output of the basic model into an emotion discriminator and a subtask discriminator;
format standardization is carried out on a text emotion database of various different tasks, and fine adjustment and testing are carried out on the text emotion state recognition model by adopting a text emotion training sample after format standardization, so that a final text emotion state recognition model is obtained;
and standardizing the text data to be recognized, inputting the text data to be recognized into the final text emotion state recognition model for recognition, and outputting the recognized emotion state.
2. The method for evaluating the emotion state of the cross-task text according to claim 1, wherein the step of using the deep bidirectional pre-training converter as a basic model of a text emotion state recognition model and inputting the pooled output of the basic model to an emotion discriminator and a subtask discriminator respectively comprises:
taking a deep bidirectional pre-training converter as a basic model G of the text emotion state recognition modelb(x;θb) Where x is the input to the model, θbIs a pre-training parameter of the model;
pooling output f ═ G of the base modelb(x;θb) Respectively input to the emotion discriminators GeAnd a task discriminator GtObtaining the probability y of three emotional statese=Ge(f;θe) And probability y of tasks of two different domainst=Gt(f;θt) Wherein thetaeAnd thetatAre each GeAnd GtA randomization parameter of (a);
wherein the three emotional states include a positive emotional state, a neutral emotional state, and a negative emotional state.
3. The method for evaluating emotional state of text across tasks according to claim 1, wherein the formatting standardization of the text emotion database for a plurality of different tasks comprises:
extracting two text emotion databases of different tasks from the text emotion databases of the different tasks, and respectively using the two text emotion databases as source domain task text data and target domain task text data;
merging the source domain task text data and the target domain task text data, and dividing the merged data into a training set and a test set;
and standardizing the formats of all the text data to ensure that the text data in different forms have the same input format.
4. The method of claim 3, wherein all text data is from a text emotion database of four different tasks, the four different tasks are GSA, ACSA, ATSA and TABSA, and the input features of each task are different.
5. The method for assessing emotional state of cross-task text according to claim 4, wherein the normalizing all text data formats comprises:
designing a unified standardized input normal form according to the input situation of the deep bidirectional pre-training converter and the characteristics of the four different tasks;
the standardized input normal form corresponding to the GSA is as follows:
[ CLS ] + text sentence + [ SEP ] + [ MASK ] + [ SEP ] + [ MSAK ];
the standardized input normal form corresponding to the ACSA is as follows:
[ CLS ] + text sentence + [ SEP ] + Term + [ SEP ] + [ MSAK ];
the standardized input normal form corresponding to the ATSA is as follows:
[ CLS ] + text sentence + [ SEP ] + [ MASK ] + [ SEP ] + Category;
the standardized input paradigm corresponding to the TABSA is:
[ CLS ] + text sentence + [ SEP ] + Target + [ SEP ] + Aspect;
wherein [ CLS ], [ SEP ], [ MASK ] are symbols with specific functions in the deep bidirectional pre-training converter.
6. The method for cross-task text emotional state assessment according to claim 3, wherein the text emotional state recognition model is trimmed and tested by using text emotional training samples with standardized formats, and the method comprises the following steps:
inputting the text emotion training sample with standardized format, calculating a total loss function of the text emotion state recognition model through forward propagation, and finely adjusting the text emotion state recognition model through a gradient descent algorithm;
and (4) for the text emotion test sample with the standardized input format of the text emotion state recognition model after fine tuning, counting the accuracy of emotion recognition results, and realizing the test of the model.
7. The method according to claim 6, wherein the total loss function is designed in combination with an antagonistic learning idea, so that the text emotional state recognition model learns to distinguish the emotional states of the input samples, but cannot distinguish whether the emotional states are from the source domain task text data or the target domain task text data; the expression of the total loss function is:
Figure FDA0002869927810000021
wherein L iseFor prediction of loss function of emotion, LtA loss function is predicted for the task.
8. A cross-task text emotional state assessment system, comprising:
the model construction module is used for adopting a deep bidirectional pre-training converter as a basic model of a text emotion state recognition model and respectively inputting the pooled output of the basic model into an emotion discriminator and a subtask discriminator;
the model fine-tuning module is used for carrying out format standardization on a text emotion database of various different tasks, and fine-tuning and testing the text emotion state recognition model by adopting a text emotion training sample after format standardization to obtain a final text emotion state recognition model;
and the text recognition module is used for standardizing the text data to be recognized, inputting the text data into the final text emotion state recognition model for recognition and outputting the recognized emotion state.
9. A cross-task text emotional state assessment apparatus, comprising:
at least one processor;
at least one memory for storing at least one program;
when executed by the at least one processor, cause the at least one processor to implement a cross-task text emotional state assessment method of any of claims 1-7.
10. A storage medium having stored therein a program executable by a processor, wherein the program executable by the processor is adapted to perform the method of any one of claims 1-7 when executed by the processor.
CN202011603637.1A 2020-12-29 2020-12-29 Cross-task text emotion state evaluation method, system, device and medium Active CN112732910B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011603637.1A CN112732910B (en) 2020-12-29 2020-12-29 Cross-task text emotion state evaluation method, system, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011603637.1A CN112732910B (en) 2020-12-29 2020-12-29 Cross-task text emotion state evaluation method, system, device and medium

Publications (2)

Publication Number Publication Date
CN112732910A true CN112732910A (en) 2021-04-30
CN112732910B CN112732910B (en) 2024-04-16

Family

ID=75609967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011603637.1A Active CN112732910B (en) 2020-12-29 2020-12-29 Cross-task text emotion state evaluation method, system, device and medium

Country Status (1)

Country Link
CN (1) CN112732910B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297366A (en) * 2021-06-22 2021-08-24 中国平安人寿保险股份有限公司 Multi-turn dialogue emotion recognition model training method, device, equipment and medium
CN114003694A (en) * 2021-11-01 2022-02-01 北京明略软件系统有限公司 Entity emotion analysis method and system, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108717406A (en) * 2018-05-10 2018-10-30 平安科技(深圳)有限公司 Text mood analysis method, device and storage medium
CN110134772A (en) * 2019-04-18 2019-08-16 五邑大学 Medical text Relation extraction method based on pre-training model and fine tuning technology
US20200334334A1 (en) * 2019-04-18 2020-10-22 Salesforce.Com, Inc. Systems and methods for unifying question answering and text classification via span extraction
CN111950296A (en) * 2020-08-21 2020-11-17 桂林电子科技大学 Comment target emotion analysis based on BERT fine tuning model
CN112101042A (en) * 2020-09-14 2020-12-18 平安科技(深圳)有限公司 Text emotion recognition method and device, terminal device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108717406A (en) * 2018-05-10 2018-10-30 平安科技(深圳)有限公司 Text mood analysis method, device and storage medium
CN110134772A (en) * 2019-04-18 2019-08-16 五邑大学 Medical text Relation extraction method based on pre-training model and fine tuning technology
US20200334334A1 (en) * 2019-04-18 2020-10-22 Salesforce.Com, Inc. Systems and methods for unifying question answering and text classification via span extraction
WO2020211275A1 (en) * 2019-04-18 2020-10-22 五邑大学 Pre-trained model and fine-tuning technology-based medical text relationship extraction method
CN111950296A (en) * 2020-08-21 2020-11-17 桂林电子科技大学 Comment target emotion analysis based on BERT fine tuning model
CN112101042A (en) * 2020-09-14 2020-12-18 平安科技(深圳)有限公司 Text emotion recognition method and device, terminal device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297366A (en) * 2021-06-22 2021-08-24 中国平安人寿保险股份有限公司 Multi-turn dialogue emotion recognition model training method, device, equipment and medium
CN114003694A (en) * 2021-11-01 2022-02-01 北京明略软件系统有限公司 Entity emotion analysis method and system, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112732910B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
Aafjes-van Doorn et al. A scoping review of machine learning in psychotherapy research
Shou et al. Conversational emotion recognition studies based on graph convolutional neural networks and a dependent syntactic analysis
Li et al. An automated assessment framework for atypical prosody and stereotyped idiosyncratic phrases related to autism spectrum disorder
CN110287337A (en) The system and method for medicine synonym is obtained based on deep learning and knowledge mapping
Kumar et al. A deep learning approaches and fastai text classification to predict 25 medical diseases from medical speech utterances, transcription and intent
Wang et al. A multimodal feature fusion-based method for individual depression detection on sina weibo
CN112732910B (en) Cross-task text emotion state evaluation method, system, device and medium
Machado et al. Forensic speaker verification using ordinary least squares
Karthikeyan Modified layer deep convolution neural network for text-independent speaker recognition
Liu et al. Audio and video bimodal emotion recognition in social networks based on improved alexnet network and attention mechanism.
Salem et al. Refining semantic similarity of paraphasias using a contextual language model
Shovon et al. The performance of graph neural network in detecting fake news from social media feeds
Ferdiana et al. Cat sounds classification with convolutional neural network
CN115758218A (en) Three-modal emotion analysis method based on long-time and short-time feature and decision fusion
Bharti et al. PEERRec: An AI-based approach to automatically generate recommendations and predict decisions in peer review
CN114298314A (en) Multi-granularity causal relationship reasoning method based on electronic medical record
Li et al. Trestle: Toolkit for reproducible execution of speech, text and language experiments
Ilias et al. Context-aware attention layers coupled with optimal transport domain adaptation and multimodal fusion methods for recognizing dementia from spontaneous speech
Priyanka et al. Sentiment analysis and emoji mapping
Clarke Content analysis in support of critical theory research: how to deliver an unwelcome message without being shot
Sun et al. An automatic diagnostic network using skew-robust adversarial discriminative domain adaptation to evaluate the severity of depression
Lu et al. Depression detection via conversation turn classification
Singh et al. Conversationmoc: Encoding conversational dynamics using multiplex network for identifying moment of change in mood and mental health classification
Ali et al. Enhancing the Fake News Classification Model Using Find-Tuning Approach
Sathishkumar et al. Stress Detection using RNN Algorithm

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