WO2020147395A1 - Emotion-based text classification method and device, and computer apparatus - Google Patents

Emotion-based text classification method and device, and computer apparatus Download PDF

Info

Publication number
WO2020147395A1
WO2020147395A1 PCT/CN2019/117161 CN2019117161W WO2020147395A1 WO 2020147395 A1 WO2020147395 A1 WO 2020147395A1 CN 2019117161 W CN2019117161 W CN 2019117161W WO 2020147395 A1 WO2020147395 A1 WO 2020147395A1
Authority
WO
WIPO (PCT)
Prior art keywords
emotion
question
text
type
classified
Prior art date
Application number
PCT/CN2019/117161
Other languages
French (fr)
Chinese (zh)
Inventor
金戈
徐亮
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020147395A1 publication Critical patent/WO2020147395A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Definitions

  • This application relates to an emotion-based text classification processing method, device, computer equipment and storage medium.
  • sentiment classification is usually performed on all the collected texts uniformly.
  • text content corresponds to different problems, and different problems may reflect different emotions.
  • the unified sentiment classification of all text content cannot accurately reflect the sentiment expression under different problems, resulting in inaccurate results of sentiment classification. Therefore, how to improve the accuracy of sentiment classification has become a technical problem that needs to be solved at present.
  • an emotion-based text classification processing method is provided.
  • An emotion-based text classification processing method includes:
  • the emotion classification task includes a text identifier to be classified
  • the sentiment classification model including a plurality of sub-models corresponding to the question
  • An emotion-based text classification processing device includes:
  • the task acquisition module is used to acquire the sentiment classification task, and the sentiment classification task includes the text identification to be classified;
  • a text obtaining module configured to obtain a corresponding text to be classified according to the text identifier to be classified, where the text to be classified includes multiple questions and question answers corresponding to the questions;
  • the model calling module is used to call the corresponding emotion classification model according to the emotion classification task, the emotion classification model includes a plurality of sub-models corresponding to the question; the question answer corresponding to the question is input to the question corresponding The sub-model of, through the sub-model operation, output the emotional score corresponding to the question answer; and
  • the emotion type recognition module is used to recognize the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the multiple question answers.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the one or more processors are executed The following steps:
  • the emotion classification task includes a text identifier to be classified
  • the sentiment classification model including a plurality of sub-models corresponding to the question
  • One or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the computer-readable instructions When executed by one or more processors, the one or more processors perform the following steps:
  • the emotion classification task includes a text identifier to be classified
  • the sentiment classification model including a plurality of sub-models corresponding to the question
  • Fig. 1 is an application environment diagram of an emotion-based text classification processing method according to one or more embodiments.
  • Fig. 2 is a schematic flowchart of an emotion-based text classification processing method according to one or more embodiments.
  • Fig. 3 is a schematic flowchart of the steps of extracting subject information according to emotion types in one or more embodiments.
  • Fig. 4 is a block diagram of an emotion-based text classification processing apparatus according to one or more embodiments.
  • Figure 5 is a block diagram of a computer device in accordance with one or more embodiments.
  • the emotion-based text classification processing method provided in this application can be applied to the application environment shown in FIG. 1.
  • the terminal 102 communicates with the server 104 through the network through the network.
  • the server 104 obtains the sentiment classification task initiated by the terminal 102.
  • the sentiment classification task includes the text identification to be classified.
  • the server 104 obtains the corresponding text to be classified according to the text identification to be classified, and calls the corresponding sentiment classification model according to the obtained sentiment classification task.
  • the server 104 inputs the question and question answer in the text to be classified into the sub-model of the emotion classification model, and outputs the emotion score corresponding to the question through the sub-model calculation.
  • the server 104 recognizes the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the multiple questions.
  • the terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
  • an emotion-based text classification processing method is provided. Taking the method applied to the server 104 in FIG. 1 as an example for description, the method includes the following steps:
  • Step 202 Obtain an emotion classification task, and the emotion classification task includes a text identifier to be classified.
  • the server obtains the emotion classification task, analyzes the obtained emotion classification task, and obtains the text identification to be classified included in the emotion classification task.
  • the emotion classification task can be created by the terminal and uploaded to the server.
  • the sentiment classification task includes the text identification to be classified, and the text identification to be classified points to the corresponding text to be classified.
  • the text identifiers to be classified can include multiple types. In one of the embodiments, the text identifier to be classified may be the file name of the text to be classified.
  • the server can perform sentiment classification tasks, and perform sentiment classification processing on the text to be classified corresponding to the text identifier to be classified.
  • Step 204 Obtain the corresponding text to be classified according to the identifier of the text to be classified.
  • the text to be classified includes multiple questions and question answers corresponding to the questions.
  • the server may obtain the corresponding text to be classified according to the identifier of the text to be classified. Specifically, the server may obtain the mapping relationship between the text identification to be classified and the text to be classified, and use the mapping relationship to obtain the text to be classified corresponding to the text identification to be classified.
  • the text to be classified includes multiple questions and corresponding question answers.
  • the server can ask different questions for different users, or ask different users the same question.
  • the question answer is the answer made by the user for each question.
  • different questions can be asked for different interviewers, and the interviewer's answer can be received as the answer to the question corresponding to the question, so as to avoid the interviewer's private communication and more truly reflect the interviewer's adaptability.
  • the server can randomly select questions from preset questions to ask questions, or select related questions to ask questions based on the interviewer's answers.
  • the server may ask the same questions for different respondents, and receive answers to the questions from the respondents, so as to understand the respondent's emotional tendency toward these questions.
  • Step 206 Invoke a corresponding emotion classification model according to the emotion classification task.
  • the emotion classification model includes a plurality of sub-models corresponding to the question.
  • the server can call the corresponding sentiment classification model according to the sentiment classification task.
  • the sentiment classification model is a model obtained through training for sentiment classification of questions and question answer texts.
  • the sentiment classification model can be trained by a variety of classification models, such as the Fasttext model.
  • the sentiment classification model includes multiple sub-models, and different questions can correspond to different sub-models.
  • the server can call the sub-model corresponding to the question in the sentiment classification model according to the sentiment classification task to perform sentiment classification processing on the response to the question.
  • Step 208 Input the question answer corresponding to the question into the sub-model corresponding to the question, and output the emotional score corresponding to the question answer through the sub-model calculation.
  • the server inputs the question answer corresponding to the question in the text to be classified into the sub-model corresponding to the question, and calls the sub-model to perform sentiment classification on the question answer.
  • the sentiment score can reflect the emotional tendency of the question answer to the question.
  • the server obtains the probability of each emotion label corresponding to the question answer by calling the sub-model for calculation. Calculate according to the probability of the corresponding sentiment label, obtain the sentiment score corresponding to the question answer, and output the sentiment score corresponding to the question answer. For example, using the Fasttext model to perform sentiment classification on the text to be classified.
  • the server inputs the question answers in the text to be classified into the sub-models of the Fasttext model corresponding to the questions, and the sub-models perform sentiment classification processing on the question responses to obtain the probabilities corresponding to multiple sentiment labels.
  • the emotion label may include positive and negative
  • the result of the sentiment classification of the answer to the question is: a positive probability of 68%, and a negative probability of 32%.
  • the sentiment score corresponding to the corresponding question answer is calculated. For example, when the full score is 10 points, the sentiment score is 7 points.
  • Step 210 Identify the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the multiple question answers.
  • the server synthesizes the sentiment scores corresponding to the multiple question answers, recognizes the sentiment type corresponding to the text to be classified according to the sentiment scores corresponding to the multiple question responses, and completes the sentiment classification task of emotional classification of the text to be classified.
  • multiple questions corresponding to the text to be classified and the question answer corresponding to each question are obtained according to the text identification to be classified, and the response in the sentiment classification model is called
  • Multiple sub-models classify the sentiment of each question answer one by one, and identify the sentiment type corresponding to the text to be classified according to the obtained sentiment score corresponding to each question answer.
  • the sentiment classification of the question answer is carried out one by one, and then the sentiment score corresponding to each question answer is synthesized to identify the sentiment type corresponding to the text to be classified.
  • it Compared with the unified sentiment classification of all texts in the traditional way, it fully combines the questions and carries out sentiment classification to the corresponding question answers, which effectively improves the accuracy of sentiment classification of the text.
  • identifying the sentiment type corresponding to the text to be classified according to the sentiment scores corresponding to multiple question answers includes: obtaining the weight corresponding to each question; calculating according to the weight and the sentiment score corresponding to the question answer to obtain Modified score; add up the modified scores corresponding to the answers to multiple questions to obtain the total emotional score; identify the emotional type corresponding to the text to be classified according to the emotional total score.
  • the server obtains the weight corresponding to each question. Since each question has a different importance to the degree of classification of the classified text, in order to balance the impact of each question on the degree of sentiment classification, a weight is set for each question.
  • the user can preset the corresponding importance for each question, and the server sets the corresponding weight of each question according to the importance of each question in all the questions.
  • the weight of important questions can be higher, and the weight of simple questions can be lower.
  • the server calculates according to the weight and the emotional score corresponding to each question answer, and obtains the modified score corresponding to each question answer.
  • the revised score can objectively reflect the emotion of the corresponding question answer in the text to be classified.
  • the weight of the question about identity can be less than the weight of the question about personal skills and job search intentions. Therefore, according to the sentiment scores of the question answers of the three types of questions, it is necessary to recalculate the corresponding weights of the questions to obtain the revised scores corresponding to the question answers.
  • the server accumulates the modified scores corresponding to the multiple question answers calculated to obtain the total emotional score.
  • the total sentiment score is the total sentiment score of the text to be classified into the question.
  • the server recognizes the emotion type corresponding to the text to be classified according to the total emotional score, and completes the emotion classification task of text classification of the text to be classified.
  • the server obtains the weight corresponding to each question, calculates the revised score corresponding to each question answer, and accumulates the revised scores corresponding to the multiple question answers, to obtain the total emotion corresponding to the text to be classified.
  • the score is used to identify the emotional type corresponding to the text to be classified through the emotional total score.
  • the above emotion-based text classification processing method before obtaining the emotion classification task, further includes: obtaining reply data corresponding to the question; identifying the data type corresponding to the reply data; when the data type is a voice type, The reply data of voice type is converted into reply data of text type; the text to be classified is generated according to the reply data of text type and the question.
  • the user's response data to the question can include multiple data types. For example, it can include text type and voice type.
  • the server can obtain the reply data uploaded by the user in response to the question. After obtaining the reply data corresponding to the question, the server can determine the data type of the reply data. If the data type is a text type, the text type response data is directly used as the question response, and the text to be classified is generated by combining multiple questions and the corresponding question responses of the questions. If the reply data is voice type data, the server can convert the voice data into text type reply data, use the reply data as a question reply, and generate a text to be classified.
  • the server may also receive voice-type reply data.
  • voice type response data By converting voice type response data into text type response data, the text to be classified is generated based on the question and text type response data, which enriches the data types of compatible question responses and facilitates users to answer questions in multiple ways.
  • the question and the corresponding question answer are input to the corresponding sub-model, and the sub-model calculation is used to output the sentiment score corresponding to the question, including: segmenting the question answer to obtain multiple words; calling according to the question Corresponding sub-models; use the sub-models to classify the emotions of words and obtain the probability values corresponding to multiple emotional expressions; determine the emotional scores corresponding to the question answers according to the probability values.
  • the server can use multiple methods to segment the answers to the questions in the classified text to obtain multiple words. Specifically, the server may use one or a combination of string matching, comprehension, statistics and other methods to segment the answer to the question.
  • the string matching method refers to matching the question answer with the entry in the preset dictionary. If the string is found in the dictionary, it is considered that the match is successful, that is, a word is recognized.
  • the way of string matching can include forward string matching and reverse string matching.
  • the way of understanding means that the server performs semantic analysis and syntactic analysis when cutting the question answer, and uses semantic information and syntactic information to process the ambiguity that occurs when the words are cut.
  • the statistical method means that the server counts the frequency of the combination of adjacent co-occurring words in the question answer, and performs word segmentation based on their co-occurrence information.
  • the server may also introduce N-gram vectors when segmenting words. The obtained vector features are used to determine the word sequence after word segmentation of the question answer, which more accurately reflects the content of the question answer, and effectively improves the accuracy of sentiment classification of the classified text.
  • Each question corresponds to a sub-model.
  • the server obtains the mapping relationship between the problem and the sub-model, and calls the sub-model corresponding to the problem according to the mapping relationship.
  • the server inputs the multiple words obtained by word segmentation into the sub-model, and uses the sub-model to classify the words corresponding to the question answer, and obtains the probability values corresponding to the multiple preset emotion labels.
  • the probability value indicates the probability that the emotion of the answer to the question belongs to the corresponding emotion label.
  • the server may calculate the emotion score corresponding to the question answer according to the probability value corresponding to each of the multiple emotion tags.
  • the sub-model corresponding to the question is called to classify the obtained words, and the sentiment score corresponding to the question answer is obtained.
  • the corresponding sub-model is called for the specific content of each question, and the sentiment score corresponding to the question answer is calculated, which effectively improves the accuracy of sentiment classification for the text to be classified.
  • the server cleans the text to be classified. For example, delete the text to be classified that does not meet the preset rules. Then perform sentiment classification on the text to be classified after cleaning. Specifically, the server divides the question answer into words, and after obtaining multiple words, calls the corresponding sub-model according to the question. According to the needs of the sub-model, multiple words are sorted into the data form required by the sub-model. For example, the server can sort the words into a table form, and then input the words in the table form into the sub-model, and use the sub-model to classify the sentiment of the question answer to obtain the sentiment score corresponding to the question answer.
  • the text to be classified is obtained, the text to be classified is cleaned up, the illegal text to be classified is eliminated, the words obtained by word segmentation are sorted, and the data form corresponding to the sub-model is obtained and input into the sub-model. Effectively improve the efficiency of sentiment classification for classified text.
  • the above method further includes: extracting subject information according to the emotion type. As shown in Figure 3, this step specifically includes:
  • Step 302 Acquire preset types of emotional needs.
  • Step 304 Match the classified emotion type with the emotion demand type to obtain the corresponding first matching degree.
  • Step 306 Filter out target emotion types that meet preset conditions according to the first matching degree.
  • Step 308 Extract subject information corresponding to the target emotion type.
  • the server can obtain the type of emotional demand preset by the user.
  • the type of emotional demand refers to the emotional type that meets the needs of the user, and can be preset according to the actual needs of the user.
  • the server may use multiple methods to match the emotion type obtained after emotion classification of the text to be classified with the emotion demand type. Specifically, the server may match the emotional types obtained after classification with the emotional demand types one by one, and may also call multiple threads to match the emotional type and the emotional demand type in parallel. After the server matches the emotion type with the emotion demand type, the first matching degree corresponding to the emotion type is obtained.
  • the server screens the first matching degrees corresponding to multiple emotion types, and screens out target emotion types that meet preset conditions.
  • the preset condition may be a condition preset by the user, such as filtering out the emotion types whose first matching degree is greater than a threshold.
  • the server extracts subject information corresponding to the target emotion type that meets the preset conditions to obtain subject information that meets the emotional demand type.
  • the server classifies the text to be classified by the interviewer and obtains the emotion type corresponding to the interviewer.
  • the server can obtain the emotion demand type corresponding to the job position, and compare the emotion type of the interviewee with the position Match the types of emotional needs and get the first degree of matching between multiple interviewers and the position.
  • the server screens according to the first matching degree, and screens out the target emotion type whose first matching degree meets the preset conditions, and the target emotion type is the type that meets the emotional needs of the post.
  • the server extracts the subject information corresponding to the target emotion type that meets the conditions, and obtains the subject information that meets the job conditions.
  • the target emotional type that matches the emotional needs of the job is selected, and the interviewers who meet the needs of the recruitment position are initially selected from multiple interviewers according to the emotional type, which effectively improves the efficiency and accuracy of the interview Sex.
  • the target emotion type that meets the preset condition is screened according to the first matching degree, and the emotion type is effectively used for screening to obtain the subject information that meets the conditions. Enriched target screening methods and improved screening efficiency.
  • the above method further includes: obtaining a variety of product information, the product information includes product types; The emotion type corresponding to the classified text is matched to obtain the second matching degree; when the second matching degree is greater than the predetermined value, the product information corresponding to the product type is marked as the target product information; the terminal identification corresponding to the text to be classified is extracted, and the target product The information is pushed to the terminal corresponding to the terminal identifier.
  • the server obtains product information corresponding to multiple products, and the product information includes the product type corresponding to the product.
  • Multiple products can include products of different product types.
  • the fund products include high-risk and high-yield products as well as low-risk, low-yield products.
  • the server can use multiple methods to match the product types of multiple products with the emotional types corresponding to the text to be classified. Specifically, the server may sequentially match product types corresponding to multiple products with emotion types, or call multiple threads to match the product types and emotion types in parallel to obtain the second matching degree between the product types and emotion types. When the second matching degree is greater than the predetermined value, the product information corresponding to the product type is marked as the target product information.
  • the predetermined value is a value preset by the user.
  • the second matching degree is greater than the predetermined value, it means that the product corresponding to the product type matches the user corresponding to the emotion type. For example, high-risk and high-yield products are more likely to match users who tend to be adventurous, and low-risk and low-yield products are more likely to match users who tend to be conservative.
  • the server extracts the terminal identifier corresponding to the terminal uploading the text to be classified, pushes the target product information to the terminal corresponding to the terminal identifier, and completes the push of product information that matches the emotional type.
  • target product information that matches the emotion type is pushed to the user, which effectively improves the accuracy of corresponding information push.
  • emotional demand types can also be acquired, and the classified emotional types can be matched with emotional demand types to obtain Corresponding to the first matching degree, the emotion type that meets the preset condition is filtered out according to the first matching degree.
  • the server then matches multiple product types with the selected emotion types to obtain the corresponding second matching degree, marks the product information corresponding to the product type with the second matching degree greater than the predetermined value as target product information, and pushes the target product information To the terminal corresponding to the emotion type.
  • the server can use the emotion type to screen users, and screen out users who meet the type of emotional needs. For example, the server can filter out users who have a positive intention to purchase products according to their emotion types, and then match the product types with the selected user emotion types, and filter out product types that match the user's emotion types from multiple product types. Reach the effect of pushing product information that matches the user's emotional type to users with purchase intentions.
  • the combination of screening of emotion types and screening of product types effectively improves the efficiency and accuracy of product information push.
  • the above method further includes: establishing a general sentiment classification model, the general sentiment classification model includes a general sub-model; acquiring a training data set, the training data set includes multiple training texts and standard sentiment scores corresponding to the training texts; Call the general sub-model to perform operations on the training text to obtain the training emotional score; compare the training emotional score with the standard emotional score; adjust the general sub-model according to the comparison result to obtain the target sub-model.
  • the server can establish a general sentiment classification model, and the general sentiment classification model can adopt the Fasttext model.
  • the server receives the training data set, and the training data set may include multiple training texts and standard sentiment scores corresponding to the training texts.
  • the training text includes standard questions and answers to questions corresponding to the standard questions. Each standard question can correspond to multiple question answers, and the corresponding standard sentiment scores for multiple question answers.
  • the server can use the training data set to train the general sentiment classification model. Specifically, the server invokes the general sub-model in the general sentiment classification model corresponding to the standard question, inputs the corresponding question answer into the general sub-model, and outputs the training sentiment score through the general sub-model calculation.
  • the server may compare the training sentiment score with the standard sentiment score, and adjust the corresponding general sub-model according to the comparison result.
  • the server trains multiple general sub-models of the general sentiment classification model by using standard questions, question answers and standard sentiment scores in multiple training texts to obtain the target sentiment classification model.
  • the server uses the training data set to train the general sentiment classification model to obtain a target sentiment classification model including multiple target sub-models, which effectively improves the accuracy of the target sentiment classification model for classifying text based on sentiment treatment .
  • an emotion-based text classification processing device which includes: a task acquisition module 402, a text acquisition module 404, a model calling module 406, and an emotion type recognition module 408, wherein:
  • the task acquisition module 402 is used to acquire the sentiment classification task, and the sentiment classification task includes the text identification to be classified.
  • the text obtaining module 404 is configured to obtain the corresponding text to be classified according to the identifier of the text to be classified.
  • the text to be classified includes multiple questions and question answers corresponding to the questions.
  • the model calling module 406 is used to call the corresponding sentiment classification model according to the sentiment classification task.
  • the sentiment classification model includes a plurality of sub-models corresponding to the question; the question answer corresponding to the question is input into the corresponding sub-model of the question, and the sub-model calculation Output the emotional score corresponding to the answer to the question.
  • the emotion type recognition module 408 is configured to recognize the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the multiple question answers.
  • the above-mentioned model calling module 406 is also used to segment the answer to the question to obtain multiple words; call the corresponding sub-model according to the question; use the sub-model to classify the words and obtain the corresponding emotion tags Probability value: Determine the sentiment score corresponding to the question answer according to the probability value.
  • the above-mentioned device further includes a need type matching module for obtaining preset emotional need types; matching the classified emotional type with the emotional need type to obtain the first matching degree corresponding to the emotional type; The first matching degree screens out the target emotion type that meets the preset conditions; extracts the subject information corresponding to the target emotion type.
  • the above-mentioned device further includes a product push module for obtaining various product information
  • the product information includes the product type
  • the product type is matched with the emotion type corresponding to the text to be classified to obtain the second matching degree
  • the product information corresponding to the product type is marked as the target product information
  • the terminal identification corresponding to the text to be classified is extracted, and the target product information is pushed to the terminal corresponding to the terminal identification.
  • the above-mentioned emotion type recognition module 408 is also used to obtain the weight corresponding to each question; calculate according to the weight and the emotion score corresponding to the question answer to obtain the modified score; correspond to multiple question answers
  • the modified scores of is accumulated to obtain the total emotional score; the emotional type corresponding to the text to be classified is identified according to the total emotional score.
  • the above-mentioned task acquisition module 402 is also used to acquire the reply data corresponding to the question; identify the data type corresponding to the reply data; when the data type is a voice type, convert the reply data of the voice type into a text type. Reply data; generate text to be classified according to the reply data of the text type and the question.
  • the above-mentioned device further includes a model training module for establishing a general sentiment classification model, the general sentiment classification model includes a general sub-model; the training data set is obtained, and the training data set includes multiple training texts and corresponding training texts.
  • Standard sentiment score call the general sub-model to calculate the training text to obtain the training sentiment score; compare the training sentiment score with the standard sentiment score; adjust the general sub-model according to the comparison result to obtain the target sub-model .
  • the various modules in the above emotion-based text classification processing device can be implemented in whole or in part by software, hardware, and combinations thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 5.
  • the computer device includes a processor, memory, network interface, and database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer-readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the database of the computer equipment is used to store emotion-based text classification processing data.
  • the network interface of the computer device is used to communicate with external terminals through a network connection.
  • the computer-readable instructions are executed by the processor to realize an emotion-based text classification processing method.
  • FIG. 5 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Include more or less components than shown in the figure, or combine certain components, or have a different arrangement of components.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer readable instructions.
  • the one or more processors execute the above method. step.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the computer-readable instructions execute A step of.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Abstract

An emotion-based text classification method comprises: acquiring an emotion classification task comprising an identifier of a text to be classified; acquiring a corresponding text according to the identifier, the text comprising multiple questions and answers corresponding to the questions; calling a corresponding emotion classification model according to the emotion classification task, the emotion classification model comprising multiple submodels corresponding to the questions; inputting the answers corresponding to the questions into the submodels corresponding to the questions, performing operations by means of the submodels, and outputting emotion scores corresponding to the answers; and recognizing an emotion category corresponding to the text according to the emotion scores corresponding to the multiple answers.

Description

基于情感的文本分类处理方法、装置和计算机设备Emotion-based text classification processing method, device and computer equipment
本申请要求于2019年01月17日提交至中国专利局,申请号为2019100428375,申请名称为“基于情感的文本分类处理方法、装置和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed to the Chinese Patent Office on January 17, 2019. The application number is 2019100428375, and the application name is "Sentiment-based text classification processing methods, devices and computer equipment". The reference is incorporated in this application.
技术领域Technical field
本申请涉及一种基于情感的文本分类处理方法、装置、计算机设备和存储介质。This application relates to an emotion-based text classification processing method, device, computer equipment and storage medium.
背景技术Background technique
随着计算机技术的发展,计算机技术逐渐被应用到对文本的情感分类处理中。例如,在AI(Artificial Intelligence,人工智能)面试中,通过对面试者的回答进行情感分类处理,得到面试者的情感态度,以便企业根据需求对面试者进行筛选。再例如,在问卷调查中,对被调查者的回答进行情感分类处理,以了解被调查者的情感倾向。With the development of computer technology, computer technology is gradually applied to the processing of emotion classification of text. For example, in an AI (Artificial Intelligence) interview, the interviewer’s responses are classified by emotional classification to obtain the interviewer’s emotional attitude, so that the company can screen the interviewer according to the needs. For another example, in a questionnaire survey, emotional classification processing is performed on the answers of the respondents to understand the emotional tendencies of the respondents.
在传统方式中,通常是对采集到的所有文本统一进行情感分类。然而,发明人意识到,在很多情况下,文本内容对应有不同的问题,不同的问题对情感的反映程度可能是不同的。对所有文本内容统一进行情感分类不能准确反映不同问题下的情感表达,从而导致情感分类结果出现不准确的情况。因此,如何提高情感分类的准确性成为目前需要解决的一个技术问题。In the traditional method, sentiment classification is usually performed on all the collected texts uniformly. However, the inventor realizes that in many cases, text content corresponds to different problems, and different problems may reflect different emotions. The unified sentiment classification of all text content cannot accurately reflect the sentiment expression under different problems, resulting in inaccurate results of sentiment classification. Therefore, how to improve the accuracy of sentiment classification has become a technical problem that needs to be solved at present.
发明内容Summary of the invention
根据本申请公开的各种实施例,提供一种基于情感的文本分类处理方法、装置、计算机设备和存储介质。According to various embodiments disclosed in the present application, an emotion-based text classification processing method, device, computer equipment, and storage medium are provided.
一种基于情感的文本分类处理方法包括:An emotion-based text classification processing method includes:
获取情感分类任务,所述情感分类任务中包括待分类文本标识;Acquiring an emotion classification task, where the emotion classification task includes a text identifier to be classified;
根据所述待分类文本标识获取对应的待分类文本,所述待分类文本包括多个问题以及所述问题对应的问题答复;Obtaining a corresponding text to be classified according to the text identifier to be classified, where the text to be classified includes a plurality of questions and question answers corresponding to the questions;
根据所述情感分类任务调用对应的情感分类模型,所述情感分类模型包括多个与所述问题对应的子模型;Calling a corresponding sentiment classification model according to the sentiment classification task, the sentiment classification model including a plurality of sub-models corresponding to the question;
将所述问题对应的问题答复输入至所述问题对应的子模型,通过子模型运算,输出所述问题答复对应的情感分值;及Input the question answer corresponding to the question into the sub-model corresponding to the question, and output the emotional score corresponding to the question answer through the sub-model calculation; and
根据多个问题答复对应的情感分值识别所述待分类文本对应的情感类型。Identify the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the answers to the multiple questions.
一种基于情感的文本分类处理装置包括:An emotion-based text classification processing device includes:
任务获取模块,用于获取情感分类任务,所述情感分类任务中包括待分类文本标识;The task acquisition module is used to acquire the sentiment classification task, and the sentiment classification task includes the text identification to be classified;
文本获取模块,用于根据所述待分类文本标识获取对应的待分类文本,所述待分类文本包括多个问题以及所述问题对应的问题答复;A text obtaining module, configured to obtain a corresponding text to be classified according to the text identifier to be classified, where the text to be classified includes multiple questions and question answers corresponding to the questions;
模型调用模块,用于根据所述情感分类任务调用对应的情感分类模型,所述情感分类模型包括多个与所述问题对应的子模型;将所述问题对应的问题答复输入至所述问题对应的子模型,通过子模型运算,输出所述问题答复对应的情感分值;及The model calling module is used to call the corresponding emotion classification model according to the emotion classification task, the emotion classification model includes a plurality of sub-models corresponding to the question; the question answer corresponding to the question is input to the question corresponding The sub-model of, through the sub-model operation, output the emotional score corresponding to the question answer; and
情感类型识别模块,用于根据多个问题答复对应的情感分值识别所述待分类文本对应的情感类型。The emotion type recognition module is used to recognize the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the multiple question answers.
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the one or more processors are executed The following steps:
获取情感分类任务,所述情感分类任务中包括待分类文本标识;Acquiring an emotion classification task, where the emotion classification task includes a text identifier to be classified;
根据所述待分类文本标识获取对应的待分类文本,所述待分类文本包括多个问题以及所述问题对应的问题答复;Obtaining a corresponding text to be classified according to the text identifier to be classified, where the text to be classified includes a plurality of questions and question answers corresponding to the questions;
根据所述情感分类任务调用对应的情感分类模型,所述情感分类模型包括多个与所述问题对应的子模型;Calling a corresponding sentiment classification model according to the sentiment classification task, the sentiment classification model including a plurality of sub-models corresponding to the question;
将所述问题对应的问题答复输入至所述问题对应的子模型,通过子模型运算,输出所述问题答复对应的情感分值;及Input the question answer corresponding to the question into the sub-model corresponding to the question, and output the emotional score corresponding to the question answer through the sub-model calculation; and
根据多个问题答复对应的情感分值识别所述待分类文本对应的情感类型。Identify the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the answers to the multiple questions.
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:One or more non-volatile computer-readable storage media storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors perform the following steps:
获取情感分类任务,所述情感分类任务中包括待分类文本标识;Acquiring an emotion classification task, where the emotion classification task includes a text identifier to be classified;
根据所述待分类文本标识获取对应的待分类文本,所述待分类文本包括多个问题以及所述问题对应的问题答复;Obtaining a corresponding text to be classified according to the text identifier to be classified, where the text to be classified includes a plurality of questions and question answers corresponding to the questions;
根据所述情感分类任务调用对应的情感分类模型,所述情感分类模型包括多个与所述问题对应的子模型;Calling a corresponding sentiment classification model according to the sentiment classification task, the sentiment classification model including a plurality of sub-models corresponding to the question;
将所述问题对应的问题答复输入至所述问题对应的子模型,通过子模型运算,输出所述问题答复对应的情感分值;及Input the question answer corresponding to the question into the sub-model corresponding to the question, and output the emotional score corresponding to the question answer through the sub-model calculation; and
根据多个问题答复对应的情感分值识别所述待分类文本对应的情感类型。Identify the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the answers to the multiple questions.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the application are set forth in the drawings and description below. Other features and advantages of this application will become apparent from the description, drawings, and claims.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. A person of ordinary skill in the art can obtain other drawings based on these drawings without creative work.
图1为根据一个或多个实施例中基于情感的文本分类处理方法的应用环境图。Fig. 1 is an application environment diagram of an emotion-based text classification processing method according to one or more embodiments.
图2为根据一个或多个实施例中基于情感的文本分类处理方法的流程示意图。Fig. 2 is a schematic flowchart of an emotion-based text classification processing method according to one or more embodiments.
图3为根据一个或多个实施例中根据情感类型提取主体信息的步骤的流程示意图。Fig. 3 is a schematic flowchart of the steps of extracting subject information according to emotion types in one or more embodiments.
图4为根据一个或多个实施例中基于情感的文本分类处理装置的框图。Fig. 4 is a block diagram of an emotion-based text classification processing apparatus according to one or more embodiments.
图5为根据一个或多个实施例中计算机设备的框图。Figure 5 is a block diagram of a computer device in accordance with one or more embodiments.
具体实施方式detailed description
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the technical solutions and advantages of the present application more clear, the following describes the present application in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
本申请提供的基于情感的文本分类处理方法,可以应用于如图1所示的应用环境中。终端102通过网络与服务器104通过网络进行通信。服务器104获取终端102发起的情感分类任务,情感分类任务中包括待分类文本标识,服务器104根据待分类文本标识获取对应的待分类文本,根据获取到的情感分类任务调用对应的情感分类模型。服务器104将待分类文本中的问题及问题答复输入情感分类模型的子模型中,通过子模型运算,输出问题对应的情感分值。服务器104根据多个问题对应的情感分值识别待分类文本对应的情感类型。终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The emotion-based text classification processing method provided in this application can be applied to the application environment shown in FIG. 1. The terminal 102 communicates with the server 104 through the network through the network. The server 104 obtains the sentiment classification task initiated by the terminal 102. The sentiment classification task includes the text identification to be classified. The server 104 obtains the corresponding text to be classified according to the text identification to be classified, and calls the corresponding sentiment classification model according to the obtained sentiment classification task. The server 104 inputs the question and question answer in the text to be classified into the sub-model of the emotion classification model, and outputs the emotion score corresponding to the question through the sub-model calculation. The server 104 recognizes the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the multiple questions. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
在其中一个实施例中,如图2所示,提供了一种基于情感的文本分类处理方法,以该方法应用于图1中的服务器104为例进行说明,包括以下步骤:In one of the embodiments, as shown in FIG. 2, an emotion-based text classification processing method is provided. Taking the method applied to the server 104 in FIG. 1 as an example for description, the method includes the following steps:
步骤202,获取情感分类任务,情感分类任务中包括待分类文本标识。Step 202: Obtain an emotion classification task, and the emotion classification task includes a text identifier to be classified.
服务器获取情感分类任务,对获取到的情感分类任务进行解析,得到情感分类任务中包括的待分类文本标识。该情感分类任务可由终端创建、上传至服务器。情感分类任务中包括了待分类文本标识,待分类文本标识指向对应的待分类文本。待分类文本标识可以包括多种类型。在其中一个实施例中,待分类文本标识可以是待分类文本的文件名。服务器可以执行情感分类任务,对待分类文本标识对应的待分类文本进行情感分类处理。The server obtains the emotion classification task, analyzes the obtained emotion classification task, and obtains the text identification to be classified included in the emotion classification task. The emotion classification task can be created by the terminal and uploaded to the server. The sentiment classification task includes the text identification to be classified, and the text identification to be classified points to the corresponding text to be classified. The text identifiers to be classified can include multiple types. In one of the embodiments, the text identifier to be classified may be the file name of the text to be classified. The server can perform sentiment classification tasks, and perform sentiment classification processing on the text to be classified corresponding to the text identifier to be classified.
步骤204,根据待分类文本标识获取对应的待分类文本,待分类文本包括多个问题以及问题对应的问题答复。Step 204: Obtain the corresponding text to be classified according to the identifier of the text to be classified. The text to be classified includes multiple questions and question answers corresponding to the questions.
服务器可以根据待分类文本标识获取对应的待分类文本。具体的,服务器可以获取待分类文本标识与待分类文本之间的映射关系,利用映射关系获取与待分类文本标识对应的待分类文本。待分类文本中包括多个问题以及对应的问 题答复。The server may obtain the corresponding text to be classified according to the identifier of the text to be classified. Specifically, the server may obtain the mapping relationship between the text identification to be classified and the text to be classified, and use the mapping relationship to obtain the text to be classified corresponding to the text identification to be classified. The text to be classified includes multiple questions and corresponding question answers.
服务器可以针对不同用户提出不同问题,也可以对不同用户提出相同问题。问题答复是由用户针对每个问题对应做出的答复意见。例如,在人工智能面试过程中,可以针对不同的面试者提出不同的问题,接收面试者的回答作为问题对应的问题答复,以避免面试者私下交流,更真实的反映面试者的应变能力。提出问题的方式可以是多样的。服务器可以从预设问题中随机挑选问题进行提问,也可以根据面试者的回答挑选相关的问题进行提问。再例如,在问卷调查过程中,服务器可以针对不同的被调查者提出相同的问题,接收被调查者的问题答复,以了解被调查者对该些问题的情感倾向。The server can ask different questions for different users, or ask different users the same question. The question answer is the answer made by the user for each question. For example, in the process of an artificial intelligence interview, different questions can be asked for different interviewers, and the interviewer's answer can be received as the answer to the question corresponding to the question, so as to avoid the interviewer's private communication and more truly reflect the interviewer's adaptability. There are many ways to ask questions. The server can randomly select questions from preset questions to ask questions, or select related questions to ask questions based on the interviewer's answers. For another example, in the process of a questionnaire survey, the server may ask the same questions for different respondents, and receive answers to the questions from the respondents, so as to understand the respondent's emotional tendency toward these questions.
步骤206,根据情感分类任务调用对应的情感分类模型,情感分类模型包括多个与问题对应的子模型。Step 206: Invoke a corresponding emotion classification model according to the emotion classification task. The emotion classification model includes a plurality of sub-models corresponding to the question.
服务器可以根据情感分类任务调用对应的情感分类模型,情感分类模型是通过训练得到的用于对问题和问题答复文本进行情感分类的模型。情感分类模型可以由多种分类模型训练得到,比如Fasttext模型。情感分类模型中包括多个子模型,不同的问题可以对应不同的子模型。服务器可以根据情感分类任务调用情感分类模型中问题对应的子模型对问题答复进行情感分类处理。The server can call the corresponding sentiment classification model according to the sentiment classification task. The sentiment classification model is a model obtained through training for sentiment classification of questions and question answer texts. The sentiment classification model can be trained by a variety of classification models, such as the Fasttext model. The sentiment classification model includes multiple sub-models, and different questions can correspond to different sub-models. The server can call the sub-model corresponding to the question in the sentiment classification model according to the sentiment classification task to perform sentiment classification processing on the response to the question.
步骤208,将问题对应的问题答复输入至问题对应的子模型,通过子模型运算,输出问题答复对应的情感分值。Step 208: Input the question answer corresponding to the question into the sub-model corresponding to the question, and output the emotional score corresponding to the question answer through the sub-model calculation.
服务器将待分类文本中问题对应的问题答复输入至问题对应的子模型中,调用子模型对问题答复进行情感分类。通过子模型的运算,输出该问题答复对应的情感分值。情感分值可以反映针对问题的问题答复的情感倾向。具体的,服务器通过调用子模型进行运算,得到问题答复对应的各个情感标签的概率。根据对应的情感标签的概率进行计算,得到问题答复对应的情感分值,输出该问题答复对应的情感分值。比如,利用Fasttext模型对待分类文本进行情感分类。服务器将待分类文本中的问题答复分别输入问题对应的Fasttext模型的子模型中,子模型对问题答复进行情感分类处理,得到多个情感标签对应的概率。例如情感标签可以包括积极和消极,该问题答复的情感分类结果为:积极概率68%,消极概率32%。根据问题答复的情感标签概率,计算出对应问题答复对应 的情感分值,比如满分值10分时,情感分值为7分。The server inputs the question answer corresponding to the question in the text to be classified into the sub-model corresponding to the question, and calls the sub-model to perform sentiment classification on the question answer. Through the operation of the sub-model, the sentiment score corresponding to the answer to the question is output. The sentiment score can reflect the emotional tendency of the question answer to the question. Specifically, the server obtains the probability of each emotion label corresponding to the question answer by calling the sub-model for calculation. Calculate according to the probability of the corresponding sentiment label, obtain the sentiment score corresponding to the question answer, and output the sentiment score corresponding to the question answer. For example, using the Fasttext model to perform sentiment classification on the text to be classified. The server inputs the question answers in the text to be classified into the sub-models of the Fasttext model corresponding to the questions, and the sub-models perform sentiment classification processing on the question responses to obtain the probabilities corresponding to multiple sentiment labels. For example, the emotion label may include positive and negative, and the result of the sentiment classification of the answer to the question is: a positive probability of 68%, and a negative probability of 32%. According to the sentiment label probability of the question answer, the sentiment score corresponding to the corresponding question answer is calculated. For example, when the full score is 10 points, the sentiment score is 7 points.
步骤210,根据多个问题答复对应的情感分值识别待分类文本对应的情感类型。Step 210: Identify the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the multiple question answers.
服务器综合多个问题答复对应的情感分值,根据多个问题答复对应的情感分值识别该待分类文本对应的情感类型,完成对待分类文本进行情感分类的情感分类任务。The server synthesizes the sentiment scores corresponding to the multiple question answers, recognizes the sentiment type corresponding to the text to be classified according to the sentiment scores corresponding to the multiple question responses, and completes the sentiment classification task of emotional classification of the text to be classified.
在本实施例中,在获取到情感分类任务中的待分类文本标识后,根据待分类文本标识获取对应待分类文本中的多个问题以及每个问题对应的问题答复,调用情感分类模型中的多个子模型,对每个问题对应的问题答复逐一进行情感分类,根据得到的每个问题答复对应的情感分值识别待分类文本对应的情感类型。通过调用对应的子模型,针对每一个问题的具体情况,对问题答复逐一进行情感分类,再综合每个问题答复对应的情感分值识别待分类文本对应的情感类型。与传统方式中对所有文本统一进行情感分类相比,充分结合问题,对相应的问题答复进行情感分类,有效的提高了对文本进行情感分类的准确性。In this embodiment, after obtaining the text identification to be classified in the sentiment classification task, multiple questions corresponding to the text to be classified and the question answer corresponding to each question are obtained according to the text identification to be classified, and the response in the sentiment classification model is called Multiple sub-models classify the sentiment of each question answer one by one, and identify the sentiment type corresponding to the text to be classified according to the obtained sentiment score corresponding to each question answer. By calling the corresponding sub-model, according to the specific situation of each question, the sentiment classification of the question answer is carried out one by one, and then the sentiment score corresponding to each question answer is synthesized to identify the sentiment type corresponding to the text to be classified. Compared with the unified sentiment classification of all texts in the traditional way, it fully combines the questions and carries out sentiment classification to the corresponding question answers, which effectively improves the accuracy of sentiment classification of the text.
在其中一个实施例中,根据多个问题答复对应的情感分值识别待分类文本对应的情感类型,包括:获取每个问题对应的权重;根据权重和问题答复对应的情感分值进行计算,得到修改后的分值;将多个问题答复对应的修改后的分值进行累加,得到情感总分值;根据情感总分值识别待分类文本对应的情感类型。In one of the embodiments, identifying the sentiment type corresponding to the text to be classified according to the sentiment scores corresponding to multiple question answers includes: obtaining the weight corresponding to each question; calculating according to the weight and the sentiment score corresponding to the question answer to obtain Modified score; add up the modified scores corresponding to the answers to multiple questions to obtain the total emotional score; identify the emotional type corresponding to the text to be classified according to the emotional total score.
服务器获取每个问题所对应的权重。由于每个问题对待分类文本的分类程度的重要性不同,为了均衡每个问题对情感分类程度的影响,每个问题都对应设置一个权重。用户可针对每个问题预先设置对应的重要性,服务器根据每个问题在所有问题中所占的重要性设置每个问题对应的权重。重要的问题所占的权重就可以高一些,简单的问题所占的权重就可以低一些。服务器根据权重和每个问题答复对应的情感分值进行计算,得到每个问题答复对应的修改后的分值。该修改后的分值可以客观体现对应的问题答复在待分类文本中的情感。例如,在面试过程中,可能会出现不同类型的问题,比如可以包括关于身份的问题、关于个人技能的问题和关于求职意向的问题等。在上述三类问题中,关于 身份的问题所占的权重可以比关于个人技能和求职意向的问题所占的权重轻一些。因此,根据三类问题的问题答复的情感分值,需要结合问题对应的权重,重新进行计算,以得到问题答复对应的修改后的分值。The server obtains the weight corresponding to each question. Since each question has a different importance to the degree of classification of the classified text, in order to balance the impact of each question on the degree of sentiment classification, a weight is set for each question. The user can preset the corresponding importance for each question, and the server sets the corresponding weight of each question according to the importance of each question in all the questions. The weight of important questions can be higher, and the weight of simple questions can be lower. The server calculates according to the weight and the emotional score corresponding to each question answer, and obtains the modified score corresponding to each question answer. The revised score can objectively reflect the emotion of the corresponding question answer in the text to be classified. For example, in the interview process, different types of questions may appear, such as questions about identity, questions about personal skills, and questions about job search intentions. Among the above three types of questions, the weight of the question about identity can be less than the weight of the question about personal skills and job search intentions. Therefore, according to the sentiment scores of the question answers of the three types of questions, it is necessary to recalculate the corresponding weights of the questions to obtain the revised scores corresponding to the question answers.
服务器将计算得到的多个问题答复对应的修改后的分值进行累加,得到情感总分值。该情感总分值是综合了问题的待分类文本的情感总分值。服务器根据该情感总分值,识别待分类文本对应的情感类型,完成对待分类文本进行文本分类的情感分类任务。The server accumulates the modified scores corresponding to the multiple question answers calculated to obtain the total emotional score. The total sentiment score is the total sentiment score of the text to be classified into the question. The server recognizes the emotion type corresponding to the text to be classified according to the total emotional score, and completes the emotion classification task of text classification of the text to be classified.
在本实施例中,服务器通过获取每个问题对应的权重,计算每个问题答复所对应修改后的分值,累加多个问题答复对应的修改后的分值,得到待分类文本对应的情感总分值,通过情感总分值识别待分类文本对应的情感类型。通过结合每个问题对应的权重,解决了问题的重要性对最终情感类型的影响,有效的提高了对待分类文本进行情感分类的准确性。In this embodiment, the server obtains the weight corresponding to each question, calculates the revised score corresponding to each question answer, and accumulates the revised scores corresponding to the multiple question answers, to obtain the total emotion corresponding to the text to be classified. The score is used to identify the emotional type corresponding to the text to be classified through the emotional total score. By combining the weight corresponding to each question, the influence of the importance of the question on the final emotion type is solved, and the accuracy of emotion classification for the text to be classified is effectively improved.
在其中一个实施例中,在获取情感分类任务之前,上述基于情感的文本分类处理方法还包括:获取问题对应的答复数据;识别答复数据所对应的数据类型;当数据类型为语音类型时,将语音类型的答复数据转换为文本类型的答复数据;根据文本类型的答复数据以及问题生成待分类文本。In one of the embodiments, before obtaining the emotion classification task, the above emotion-based text classification processing method further includes: obtaining reply data corresponding to the question; identifying the data type corresponding to the reply data; when the data type is a voice type, The reply data of voice type is converted into reply data of text type; the text to be classified is generated according to the reply data of text type and the question.
用户针对问题做出的答复数据可以包括多种数据类型。比如,可以包括文本类型和语音类型。服务器可以获取用户针对问题上传的答复数据。在获取到问题对应的答复数据后,服务器可以判断答复数据的数据类型。若数据类型是文本类型,则直接将文本类型的答复数据作为问题答复,结合多个问题和问题各自对应的问题答复生成待分类文本。若答复数据是语音类型的数据,服务器可以将语音数据转换为文本类型的答复数据,将该答复数据作为问题答复,生成待分类文本。The user's response data to the question can include multiple data types. For example, it can include text type and voice type. The server can obtain the reply data uploaded by the user in response to the question. After obtaining the reply data corresponding to the question, the server can determine the data type of the reply data. If the data type is a text type, the text type response data is directly used as the question response, and the text to be classified is generated by combining multiple questions and the corresponding question responses of the questions. If the reply data is voice type data, the server can convert the voice data into text type reply data, use the reply data as a question reply, and generate a text to be classified.
在本实施例中,除了接收文本类型的答复数据,服务器还可以接收语音类型的答复数据。通过将语音类型的答复数据转换为文本类型的答复数据,根据问题和文本类型的答复数据生成待分类文本,丰富了兼容的问题答复的数据类型,便于用户采用多种方式做出问题答复。In this embodiment, in addition to receiving text-type reply data, the server may also receive voice-type reply data. By converting voice type response data into text type response data, the text to be classified is generated based on the question and text type response data, which enriches the data types of compatible question responses and facilitates users to answer questions in multiple ways.
在其中一个实施例中,将问题以及对应的问题答复输入至对应的子模型, 通过子模型运算,输出问题对应的情感分值,包括:将问题答复进行分词,得到多个词语;根据问题调用对应的子模型;利用子模型对词语进行情感分类,得到多个情感表情对应的概率值;根据概率值确定问题答复对应的情感分值。In one of the embodiments, the question and the corresponding question answer are input to the corresponding sub-model, and the sub-model calculation is used to output the sentiment score corresponding to the question, including: segmenting the question answer to obtain multiple words; calling according to the question Corresponding sub-models; use the sub-models to classify the emotions of words and obtain the probability values corresponding to multiple emotional expressions; determine the emotional scores corresponding to the question answers according to the probability values.
服务器可以采用多种方式对待分类文本中的问题答复进行分词,得到多个词语。具体的,服务器可以采用字符串匹配、理解、统计等方式中的一种或多种方式的结合对问题答复进行分词。字符串匹配方式是指将问题答复与预设词典中的词条进行匹配,若在词典中找到该字符串,则认为匹配成功,即识别出一个词。字符串匹配的方式可以包括正向字符串匹配和逆向字符串匹配。理解方式是指服务器在对问题答复进行词语切割时进行语义分析和句法分析,利用语义信息和句法信息处理切割词语时出现的歧义情况。统计方式是指服务器对问题答复中相邻共现的字的组合的频度进行统计,根据他们的共现信息进行分词。在其中一个实施例中,服务器在分词时还可以引入N-gram向量。通过得到的向量特征确定对问题答复进行分词后的词语顺序,更加准确的体现问题答复的内容,有效的提高了对待分类文本情感分类的准确性。The server can use multiple methods to segment the answers to the questions in the classified text to obtain multiple words. Specifically, the server may use one or a combination of string matching, comprehension, statistics and other methods to segment the answer to the question. The string matching method refers to matching the question answer with the entry in the preset dictionary. If the string is found in the dictionary, it is considered that the match is successful, that is, a word is recognized. The way of string matching can include forward string matching and reverse string matching. The way of understanding means that the server performs semantic analysis and syntactic analysis when cutting the question answer, and uses semantic information and syntactic information to process the ambiguity that occurs when the words are cut. The statistical method means that the server counts the frequency of the combination of adjacent co-occurring words in the question answer, and performs word segmentation based on their co-occurrence information. In one of the embodiments, the server may also introduce N-gram vectors when segmenting words. The obtained vector features are used to determine the word sequence after word segmentation of the question answer, which more accurately reflects the content of the question answer, and effectively improves the accuracy of sentiment classification of the classified text.
每个问题对应一个子模型。服务器获取问题与子模型之间的映射关系,根据映射关系调用问题对应的子模型。服务器将分词得到的多个词语输入子模型中,利用子模型对问题答复对应的词语进行情感分类,得到预设的多个情感标签分别对应的概率值。概率值表示该问题答复的情感属于对应情感标签的概率大小。服务器可以根据多个情感标签各自对应的概率值计算问题答复所对应的情感分值。Each question corresponds to a sub-model. The server obtains the mapping relationship between the problem and the sub-model, and calls the sub-model corresponding to the problem according to the mapping relationship. The server inputs the multiple words obtained by word segmentation into the sub-model, and uses the sub-model to classify the words corresponding to the question answer, and obtains the probability values corresponding to the multiple preset emotion labels. The probability value indicates the probability that the emotion of the answer to the question belongs to the corresponding emotion label. The server may calculate the emotion score corresponding to the question answer according to the probability value corresponding to each of the multiple emotion tags.
在本实施例中,通过对问题答复进行分词,调用问题对应的子模型对得到的词语进行情感分类,得到了问题答复对应的情感分值。针对每一个问题的具体内容调用对应的子模型,计算问题答复对应的情感分值,有效的提高了对待分类文本进行情感分类的准确性。In this embodiment, by segmenting the question answer, the sub-model corresponding to the question is called to classify the obtained words, and the sentiment score corresponding to the question answer is obtained. The corresponding sub-model is called for the specific content of each question, and the sentiment score corresponding to the question answer is calculated, which effectively improves the accuracy of sentiment classification for the text to be classified.
在其中一个实施例中,服务器在获取到待分类文本后,对待分类文本进行清理。比如删除不符合预设规则的待分类文本。再对清理之后的待分类文本进行情感分类。具体的,服务器将问题答复进行分词,得到多个词语后,根据问题调用对应的子模型。按照子模型的需要对多个词语进行整理,整理成子模型 需要的数据形式。比如,服务器可以将词语整理成表格形式,再将表格形式的词语输入子模型中,利用子模型对问题答复进行情感分类,得到问题答复对应的情感分值。In one of the embodiments, after obtaining the text to be classified, the server cleans the text to be classified. For example, delete the text to be classified that does not meet the preset rules. Then perform sentiment classification on the text to be classified after cleaning. Specifically, the server divides the question answer into words, and after obtaining multiple words, calls the corresponding sub-model according to the question. According to the needs of the sub-model, multiple words are sorted into the data form required by the sub-model. For example, the server can sort the words into a table form, and then input the words in the table form into the sub-model, and use the sub-model to classify the sentiment of the question answer to obtain the sentiment score corresponding to the question answer.
在本实施例中,获取到待分类文本后,对待分类文本进行清理,剔除不合法的待分类文本,对分词得到的词语进行整理,得到符合子模型对应的数据形式,输入子模型中。有效的提高了对待分类文本的情感分类效率。In this embodiment, after the text to be classified is obtained, the text to be classified is cleaned up, the illegal text to be classified is eliminated, the words obtained by word segmentation are sorted, and the data form corresponding to the sub-model is obtained and input into the sub-model. Effectively improve the efficiency of sentiment classification for classified text.
在其中一个实施例中,在根据多个问题答复对应的情感分值识别待分类文本对应的情感类型之后,上述方法还包括:根据情感类型提取主体信息的步骤。如图3所示,该步骤具体包括:In one of the embodiments, after identifying the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the multiple question answers, the above method further includes: extracting subject information according to the emotion type. As shown in Figure 3, this step specifically includes:
步骤302,获取预设的情感需求类型。Step 302: Acquire preset types of emotional needs.
步骤304,将分类后的情感类型与情感需求类型进行匹配,得到对应的第一匹配度。Step 304: Match the classified emotion type with the emotion demand type to obtain the corresponding first matching degree.
步骤306,根据第一匹配度筛选出符合预设条件的目标情感类型。Step 306: Filter out target emotion types that meet preset conditions according to the first matching degree.
步骤308,提取目标情感类型对应的主体信息。Step 308: Extract subject information corresponding to the target emotion type.
服务器可以获取用户预设的情感需求类型,情感需求类型是指符合用户需求的情感类型,可以根据用户的实际需求预先设置。服务器可以采用多种方式将对待分类文本进行情感分类后得到的情感类型与情感需求类型进行匹配。具体的,服务器可以将分类后得到的情感类型逐一与情感需求类型进行匹配,还可以调用多个线程并行匹配情感类型与情感需求类型。服务器将情感类型与情感需求类型进行匹配后,得到该情感类型对应的第一匹配度。服务器对多个情感类型对应的第一匹配度进行筛选,筛选出符合预设条件的目标情感类型。预设条件可以是由用户预先设置的条件,比如筛选出第一匹配度大于阈值的情感类型。服务器提取符合预设条件的目标情感类型对应的主体信息,以得到符合情感需求类型的主体信息。The server can obtain the type of emotional demand preset by the user. The type of emotional demand refers to the emotional type that meets the needs of the user, and can be preset according to the actual needs of the user. The server may use multiple methods to match the emotion type obtained after emotion classification of the text to be classified with the emotion demand type. Specifically, the server may match the emotional types obtained after classification with the emotional demand types one by one, and may also call multiple threads to match the emotional type and the emotional demand type in parallel. After the server matches the emotion type with the emotion demand type, the first matching degree corresponding to the emotion type is obtained. The server screens the first matching degrees corresponding to multiple emotion types, and screens out target emotion types that meet preset conditions. The preset condition may be a condition preset by the user, such as filtering out the emotion types whose first matching degree is greater than a threshold. The server extracts subject information corresponding to the target emotion type that meets the preset conditions to obtain subject information that meets the emotional demand type.
例如,在智能面试中,服务器将面试者提供的待分类文本进行情感分类后得到该面试者对应的情感类型,服务器可以获取招聘岗位对应的情感需求类型,将面试者们的情感类型与岗位的情感需求类型进行匹配,得到多个面试者们与该岗位之间的第一匹配度。服务器根据第一匹配度进行筛选,筛选出第一匹配 度符合预设条件的目标情感类型,该目标情感类型即是符合岗位情感需求类型的。服务器提取符合条件的目标情感类型对应的主体信息,得到符合岗位条件的主体信息。根据多个面试者的情感类型筛选出与岗位情感需求类型相匹配的目标情感类型,从多个面试者中根据情感类型初步筛选出符合招聘岗位需求的面试者,有效的提高了面试效率和准确性。For example, in a smart interview, the server classifies the text to be classified by the interviewer and obtains the emotion type corresponding to the interviewer. The server can obtain the emotion demand type corresponding to the job position, and compare the emotion type of the interviewee with the position Match the types of emotional needs and get the first degree of matching between multiple interviewers and the position. The server screens according to the first matching degree, and screens out the target emotion type whose first matching degree meets the preset conditions, and the target emotion type is the type that meets the emotional needs of the post. The server extracts the subject information corresponding to the target emotion type that meets the conditions, and obtains the subject information that meets the job conditions. According to the emotional types of multiple interviewers, the target emotional type that matches the emotional needs of the job is selected, and the interviewers who meet the needs of the recruitment position are initially selected from multiple interviewers according to the emotional type, which effectively improves the efficiency and accuracy of the interview Sex.
在本实施例中,通过将情感类型与情感需求类型进行匹配,根据第一匹配度筛选出符合预设条件的目标情感类型,有效的利用情感类型进行筛选,得到符合条件的主体信息,有效的丰富了目标筛选方式,提高了筛选效率。In this embodiment, by matching the emotion type with the emotion demand type, the target emotion type that meets the preset condition is screened according to the first matching degree, and the emotion type is effectively used for screening to obtain the subject information that meets the conditions. Enriched target screening methods and improved screening efficiency.
在其中一个实施例中,在根据多个问题答复对应的情感分值识别待分类文本对应的情感类型之后,上述方法还包括:获取多种产品信息,产品信息包括产品类型;将产品类型与待分类文本对应的情感类型进行匹配,得到第二匹配度;当第二匹配度大于预定值时,将产品类型对应的产品信息标记为目标产品信息;提取待分类文本对应的终端标识,将目标产品信息推送至终端标识对应的终端。In one of the embodiments, after identifying the sentiment type corresponding to the text to be classified according to the sentiment scores corresponding to the multiple question answers, the above method further includes: obtaining a variety of product information, the product information includes product types; The emotion type corresponding to the classified text is matched to obtain the second matching degree; when the second matching degree is greater than the predetermined value, the product information corresponding to the product type is marked as the target product information; the terminal identification corresponding to the text to be classified is extracted, and the target product The information is pushed to the terminal corresponding to the terminal identifier.
服务器获取多种产品对应的产品信息,产品信息中包括了产品对应的产品类型。多种产品中可以包括不同产品类型的产品。例如,在基金类产品中,包括高风险高收益型产品,也包括低风险低收益型产品。服务器可以采用多种方式将多种产品的产品类型与待分类文本对应的情感类型进行匹配。具体的,服务器可以将多种产品对应的产品类型依次与情感类型进行匹配,也可以调用多个线程并行对产品类型与情感类型进行匹配,得到产品类型与情感类型之间的第二匹配度。当第二匹配度大于预定值时,将产品类型对应的产品信息标记为目标产品信息。预定值是由用户预先设定的值。当第二匹配度大于预定值时,则表示该产品类型对应的产品与该情感类型对应的用户是相匹配的。例如,高风险高收益型产品与偏向冒险型的用户比较匹配,低风险低收益型产品与偏向保守型的用户比较匹配。服务器提取上传待分类文本的终端所对应的终端标识,将该目标产品信息推送至终端标识对应的终端,完成符合情感类型匹配的产品信息推送。The server obtains product information corresponding to multiple products, and the product information includes the product type corresponding to the product. Multiple products can include products of different product types. For example, the fund products include high-risk and high-yield products as well as low-risk, low-yield products. The server can use multiple methods to match the product types of multiple products with the emotional types corresponding to the text to be classified. Specifically, the server may sequentially match product types corresponding to multiple products with emotion types, or call multiple threads to match the product types and emotion types in parallel to obtain the second matching degree between the product types and emotion types. When the second matching degree is greater than the predetermined value, the product information corresponding to the product type is marked as the target product information. The predetermined value is a value preset by the user. When the second matching degree is greater than the predetermined value, it means that the product corresponding to the product type matches the user corresponding to the emotion type. For example, high-risk and high-yield products are more likely to match users who tend to be adventurous, and low-risk and low-yield products are more likely to match users who tend to be conservative. The server extracts the terminal identifier corresponding to the terminal uploading the text to be classified, pushes the target product information to the terminal corresponding to the terminal identifier, and completes the push of product information that matches the emotional type.
在本实施例中,通过将产品类型与用户的情感类型进行匹配,为用户推送 符合情感类型的目标产品信息,有效的提高了对应信息推送的准确性。In this embodiment, by matching the product type with the user's emotion type, target product information that matches the emotion type is pushed to the user, which effectively improves the accuracy of corresponding information push.
可以理解的是,在其中一个实施例中,在获取多种产品信息,将产品类别与情感类型进行匹配之前,还可以获取情感需求类型,将分类后的情感类型与情感需求类型进行匹配,得到对应的第一匹配度,根据第一匹配度筛选出符合预设条件的情感类型。It is understandable that, in one of the embodiments, before obtaining various product information and matching product categories with emotional types, emotional demand types can also be acquired, and the classified emotional types can be matched with emotional demand types to obtain Corresponding to the first matching degree, the emotion type that meets the preset condition is filtered out according to the first matching degree.
服务器再将多种产品类型与筛选出的情感类型进行匹配,得到对应的第二匹配度,将第二匹配度大于预定值的产品类型对应的产品信息标记为目标产品信息,将目标产品信息推送至情感类型对应的终端。服务器可以利用情感类型对用户进行筛选,筛选出符合情感需求类型的用户。例如,服务器可以根据情感类型筛选出对购买产品有积极意向的用户,再将产品类型与筛选出的用户的情感类型进行匹配,从多种产品类型中筛选出符合用户情感类型的产品类型。到达给有购买意向的用户推送符合用户情感类型的产品信息的效果。The server then matches multiple product types with the selected emotion types to obtain the corresponding second matching degree, marks the product information corresponding to the product type with the second matching degree greater than the predetermined value as target product information, and pushes the target product information To the terminal corresponding to the emotion type. The server can use the emotion type to screen users, and screen out users who meet the type of emotional needs. For example, the server can filter out users who have a positive intention to purchase products according to their emotion types, and then match the product types with the selected user emotion types, and filter out product types that match the user's emotion types from multiple product types. Reach the effect of pushing product information that matches the user's emotional type to users with purchase intentions.
在本实施例中,将对情感类型进行筛选和对产品类型进行筛选相结合,有效的提高了产品信息推送的效率和准确性。In this embodiment, the combination of screening of emotion types and screening of product types effectively improves the efficiency and accuracy of product information push.
在其中一个实施例中,上述方法还包括:建立通用情感分类模型,通用情感分类模型包括通用子模型;获取训练数据集,训练数据集中包括多个训练文本和训练文本对应的标准情感分值;调用通用子模型对训练文本进行运算,得到训练情感分值;将训练情感分值与标准情感分值进行比对;根据比对结果对通用子模型进行调整,得到目标子模型。In one of the embodiments, the above method further includes: establishing a general sentiment classification model, the general sentiment classification model includes a general sub-model; acquiring a training data set, the training data set includes multiple training texts and standard sentiment scores corresponding to the training texts; Call the general sub-model to perform operations on the training text to obtain the training emotional score; compare the training emotional score with the standard emotional score; adjust the general sub-model according to the comparison result to obtain the target sub-model.
服务器可以建立通用情感分类模型,通用情感分类模型可以采用Fasttext模型。服务器接收训练数据集,训练数据集中可以包括多个训练文本,以及训练文本对应的标准情感分值。训练文本中包括标准问题、标准问题对应的问题答复。每个标准问题可以对应多个问题答复,和多个问题答复各自对应的标准情感分值。服务器可以利用训练数据集对通用情感分类模型进行训练。具体的,服务器调用标准问题对应的通用情感分类模型中的通用子模型,将对应的问题答复输入通用子模型中,通过通用子模型运算,输出训练情感分值。服务器可以将训练情感分值与标准情感分值进行比对,根据比对结果对相应的通用子模型进行调整。调整后重复将问题答复输入对应的通用子模型中,对通用子模型 进行调整,直到训练情感分值与标准情感分值比对成功,得到标准问题对应的目标子模型。服务器利用多个训练文本中的标准问题、问题答复以及标准情感分值对通用情感分类模型的多个通用子模型进行训练,得到目标情感分类模型。The server can establish a general sentiment classification model, and the general sentiment classification model can adopt the Fasttext model. The server receives the training data set, and the training data set may include multiple training texts and standard sentiment scores corresponding to the training texts. The training text includes standard questions and answers to questions corresponding to the standard questions. Each standard question can correspond to multiple question answers, and the corresponding standard sentiment scores for multiple question answers. The server can use the training data set to train the general sentiment classification model. Specifically, the server invokes the general sub-model in the general sentiment classification model corresponding to the standard question, inputs the corresponding question answer into the general sub-model, and outputs the training sentiment score through the general sub-model calculation. The server may compare the training sentiment score with the standard sentiment score, and adjust the corresponding general sub-model according to the comparison result. After adjustment, repeatedly input the question answer into the corresponding general sub-model, and adjust the general sub-model until the training sentiment score is successfully compared with the standard sentiment score, and the target sub-model corresponding to the standard question is obtained. The server trains multiple general sub-models of the general sentiment classification model by using standard questions, question answers and standard sentiment scores in multiple training texts to obtain the target sentiment classification model.
在本实施例中,服务器利用训练数据集对通用情感分类模型进行训练,得到包括多个目标子模型的目标情感分类模型,有效的提高了目标情感分类模型基于情感对待分类文本进行分类的准确度。In this embodiment, the server uses the training data set to train the general sentiment classification model to obtain a target sentiment classification model including multiple target sub-models, which effectively improves the accuracy of the target sentiment classification model for classifying text based on sentiment treatment .
应该理解的是,虽然图2-3的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-3中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the various steps in the flowchart of FIGS. 2-3 are displayed in sequence as indicated by the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps in Figure 2-3 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. These sub-steps or stages The execution order of is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
在其中一个实施例中,如图4所示,提供了一种基于情感的文本分类处理装置,包括:任务获取模块402、文本获取模块404、模型调用模块406和情感类型识别模块408,其中:In one of the embodiments, as shown in FIG. 4, an emotion-based text classification processing device is provided, which includes: a task acquisition module 402, a text acquisition module 404, a model calling module 406, and an emotion type recognition module 408, wherein:
任务获取模块402,用于获取情感分类任务,情感分类任务中包括待分类文本标识。The task acquisition module 402 is used to acquire the sentiment classification task, and the sentiment classification task includes the text identification to be classified.
文本获取模块404,用于根据待分类文本标识获取对应的待分类文本,待分类文本包括多个问题以及问题对应的问题答复。The text obtaining module 404 is configured to obtain the corresponding text to be classified according to the identifier of the text to be classified. The text to be classified includes multiple questions and question answers corresponding to the questions.
模型调用模块406,用于根据情感分类任务调用对应的情感分类模型,情感分类模型包括多个与问题对应的子模型;将问题对应的问题答复输入至问题对应的子模型,通过子模型运算,输出问题答复对应的情感分值。The model calling module 406 is used to call the corresponding sentiment classification model according to the sentiment classification task. The sentiment classification model includes a plurality of sub-models corresponding to the question; the question answer corresponding to the question is input into the corresponding sub-model of the question, and the sub-model calculation Output the emotional score corresponding to the answer to the question.
情感类型识别模块408,用于根据多个问题答复对应的情感分值识别待分类文本对应的情感类型。The emotion type recognition module 408 is configured to recognize the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the multiple question answers.
在其中一个实施例中,上述模型调用模块406还用于将问题答复进行分词,得到多个词语;根据问题调用对应的子模型;利用子模型对词语进行情感分类,得到多个情感标签对应的概率值;根据概率值确定问题答复对应的情感分值。In one of the embodiments, the above-mentioned model calling module 406 is also used to segment the answer to the question to obtain multiple words; call the corresponding sub-model according to the question; use the sub-model to classify the words and obtain the corresponding emotion tags Probability value: Determine the sentiment score corresponding to the question answer according to the probability value.
在其中一个实施例中,上述装置还包括需求类型匹配模块,用于获取预设的情感需求类型;将分类后的情感类型与情感需求类型进行匹配,得到情感类型对应的第一匹配度;根据第一匹配度筛选出符合预设条件的目标情感类型;提取目标情感类型对应的主体信息。In one of the embodiments, the above-mentioned device further includes a need type matching module for obtaining preset emotional need types; matching the classified emotional type with the emotional need type to obtain the first matching degree corresponding to the emotional type; The first matching degree screens out the target emotion type that meets the preset conditions; extracts the subject information corresponding to the target emotion type.
在其中一个实施例中,上述装置还包括产品推送模块,用于获取多种产品信息,产品信息包括产品类型;将产品类型与待分类文本对应的情感类型进行匹配,得到第二匹配度;当第二匹配度大于预定值时,将产品类型对应的产品信息标记为目标产品信息;提取待分类文本对应的终端标识,将目标产品信息推送至终端标识对应的终端。In one of the embodiments, the above-mentioned device further includes a product push module for obtaining various product information, the product information includes the product type; the product type is matched with the emotion type corresponding to the text to be classified to obtain the second matching degree; When the second matching degree is greater than the predetermined value, the product information corresponding to the product type is marked as the target product information; the terminal identification corresponding to the text to be classified is extracted, and the target product information is pushed to the terminal corresponding to the terminal identification.
在其中一个实施例中,上述情感类型识别模块408还用于获取每个问题对应的权重;根据权重和问题答复对应的情感分值进行计算,得到修改后的分值;将多个问题答复对应的修改后的分值进行累加,得到情感总分值;根据情感总分值识别待分类文本对应的情感类型。In one of the embodiments, the above-mentioned emotion type recognition module 408 is also used to obtain the weight corresponding to each question; calculate according to the weight and the emotion score corresponding to the question answer to obtain the modified score; correspond to multiple question answers The modified scores of is accumulated to obtain the total emotional score; the emotional type corresponding to the text to be classified is identified according to the total emotional score.
在其中一个实施例中,上述任务获取模块402还用于获取问题对应的答复数据;识别答复数据所对应的数据类型;当数据类型为语音类型时,将语音类型的答复数据转换为文本类型的答复数据;根据文本类型的答复数据以及问题生成待分类文本。In one of the embodiments, the above-mentioned task acquisition module 402 is also used to acquire the reply data corresponding to the question; identify the data type corresponding to the reply data; when the data type is a voice type, convert the reply data of the voice type into a text type. Reply data; generate text to be classified according to the reply data of the text type and the question.
在其中一个实施例中,上述装置还包括模型训练模块,用于建立通用情感分类模型,通用情感分类模型包括通用子模型;获取训练数据集,训练数据集中包括多个训练文本和训练文本对应的标准情感分值;调用通用子模型对训练文本进行运算,得到训练情感分值;将训练情感分值与标准情感分值进行比对;根据比对结果对通用子模型进行调整,得到目标子模型。In one of the embodiments, the above-mentioned device further includes a model training module for establishing a general sentiment classification model, the general sentiment classification model includes a general sub-model; the training data set is obtained, and the training data set includes multiple training texts and corresponding training texts. Standard sentiment score; call the general sub-model to calculate the training text to obtain the training sentiment score; compare the training sentiment score with the standard sentiment score; adjust the general sub-model according to the comparison result to obtain the target sub-model .
关于基于情感的文本分类处理装置的具体限定可以参见上文中对于基于情感的文本分类处理方法的限定,在此不再赘述。上述基于情感的文本分类处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the emotion-based text classification processing device, please refer to the above limitation of the emotion-based text classification processing method, which will not be repeated here. The various modules in the above emotion-based text classification processing device can be implemented in whole or in part by software, hardware, and combinations thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器, 其内部结构图可以如图5所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储基于情感的文本分类处理数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种基于情感的文本分类处理方法。In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 5. The computer device includes a processor, memory, network interface, and database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer-readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The database of the computer equipment is used to store emotion-based text classification processing data. The network interface of the computer device is used to communicate with external terminals through a network connection. The computer-readable instructions are executed by the processor to realize an emotion-based text classification processing method.
本领域技术人员可以理解,图5中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art may understand that the structure shown in FIG. 5 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may Include more or less components than shown in the figure, or combine certain components, or have a different arrangement of components.
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行时实现上述方法实施例中的步骤。A computer device includes a memory and one or more processors. The memory stores computer readable instructions. When the computer readable instructions are executed by the processor, the one or more processors execute the above method. step.
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行时实现上述方法实施例中的步骤。One or more non-volatile computer-readable storage media storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute A step of.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM (ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art may understand that all or part of the process in the method of the above embodiments may be completed by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions may be stored in a non-volatile computer-readable In the storage medium, when the computer-readable instructions are executed, they may include the processes of the foregoing method embodiments. Wherein, any reference to the memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should It is considered as the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present application, and their descriptions are more specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that, for those of ordinary skill in the art, without departing from the concept of the present application, a number of modifications and improvements can also be made, which all fall within the protection scope of the present application. Therefore, the protection scope of the patent of this application shall be subject to the appended claims.

Claims (20)

  1. 一种基于情感的文本分类处理方法,包括:An emotion-based text classification processing method includes:
    获取情感分类任务,所述情感分类任务中包括待分类文本标识;Acquiring an emotion classification task, where the emotion classification task includes a text identifier to be classified;
    根据所述待分类文本标识获取对应的待分类文本,所述待分类文本包括多个问题以及所述问题对应的问题答复;Obtaining a corresponding text to be classified according to the text identifier to be classified, where the text to be classified includes a plurality of questions and question answers corresponding to the questions;
    根据所述情感分类任务调用对应的情感分类模型,所述情感分类模型包括多个与所述问题对应的子模型;Calling a corresponding sentiment classification model according to the sentiment classification task, the sentiment classification model including a plurality of sub-models corresponding to the question;
    将所述问题对应的问题答复输入至所述问题对应的子模型,通过子模型运算,输出所述问题答复对应的情感分值;及Input the question answer corresponding to the question into the sub-model corresponding to the question, and output the emotional score corresponding to the question answer through the sub-model calculation; and
    根据多个问题答复对应的情感分值识别所述待分类文本对应的情感类型。Identify the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the answers to the multiple questions.
  2. 根据权利要求1所述的方法,其特征在于,所述将所述问题以及对应的问题答复输入至对应的子模型,通过子模型运算,输出所述问题对应的情感分值,包括:The method according to claim 1, wherein the inputting the question and the corresponding question answer to the corresponding sub-model, and outputting the sentiment score corresponding to the question through the sub-model calculation, comprises:
    将所述问题答复进行分词,得到多个词语;Segment the answer to the question and get multiple words;
    根据所述问题调用对应的子模型;Call the corresponding sub-model according to the problem;
    利用所述子模型对所述词语进行情感分类,得到多个情感标签对应的概率值;及Use the sub-model to perform emotion classification on the words to obtain probability values corresponding to multiple emotion labels; and
    根据所述概率值确定所述问题答复对应的情感分值。Determine the sentiment score corresponding to the question answer according to the probability value.
  3. 根据权利要求1所述的方法,其特征在于,在所述根据多个问题对应的情感分值识别所述待分类文本对应的情感类型之后,所述方法还包括:The method according to claim 1, characterized in that, after the identifying the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the multiple questions, the method further comprises:
    获取预设的情感需求类型;Obtain preset types of emotional needs;
    将分类后的情感类型与所述情感需求类型进行匹配,得到所述情感类型对应的第一匹配度;Matching the classified emotion type with the emotion demand type to obtain the first matching degree corresponding to the emotion type;
    根据所述第一匹配度筛选出符合预设条件的目标情感类型;及Filter out target emotion types that meet preset conditions according to the first matching degree; and
    提取所述目标情感类型对应的主体信息。Extract the subject information corresponding to the target emotion type.
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,在所述根据多个问题答复对应的情感分值识别所述待分类文本对应的情感类型之后,所述方法还包括:The method according to any one of claims 1 to 3, wherein after the identifying the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the multiple question answers, the method further comprises:
    获取多种产品信息,所述产品信息包括产品类型;Obtain a variety of product information, where the product information includes product types;
    将所述产品类型与所述待分类文本对应的情感类型进行匹配,得到第二匹配度;Matching the product type with the emotion type corresponding to the text to be classified to obtain a second matching degree;
    当所述第二匹配度大于预定值时,将所述产品类型对应的产品信息标记为目标产品信息;及When the second degree of matching is greater than a predetermined value, mark the product information corresponding to the product type as target product information; and
    提取所述待分类文本对应的终端标识,将所述目标产品信息推送至所述终端标识对应的终端。The terminal identifier corresponding to the text to be classified is extracted, and the target product information is pushed to the terminal corresponding to the terminal identifier.
  5. 根据权利要求1所述的方法,其特征在于,所述根据多个问题答复对应的情感分值识别所述待分类文本对应的情感类型,包括:The method according to claim 1, wherein the identifying the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the multiple question answers comprises:
    获取每个问题对应的权重;Get the weight corresponding to each question;
    根据所述权重和所述问题答复对应的情感分值进行计算,得到修改后的分值;Calculate according to the weight and the sentiment score corresponding to the question answer to obtain the revised score;
    将多个问题答复对应的修改后的分值进行累加,得到情感总分值;及Accumulate the revised scores corresponding to the answers to multiple questions to get the total emotional score; and
    根据所述情感总分值识别所述待分类文本对应的情感类型。Identify the emotion type corresponding to the text to be classified according to the total emotion score.
  6. 根据权利要求1所述的方法,其特征在于,在所述获取情感分类任务之前,所述方法还包括:The method according to claim 1, characterized in that, before said obtaining the emotion classification task, the method further comprises:
    获取所述问题对应的答复数据;Obtaining response data corresponding to the question;
    识别所述答复数据所对应的数据类型;Identify the data type corresponding to the reply data;
    当所述数据类型为语音类型时,将所述语音类型的答复数据转换为文本类型的答复数据;及When the data type is a voice type, converting the voice type reply data into text type reply data; and
    根据所述文本类型的答复数据以及所述问题生成待分类文本。The text to be classified is generated according to the reply data of the text type and the question.
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    建立通用情感分类模型,所述通用情感分类模型包括通用子模型;Establishing a general sentiment classification model, the general sentiment classification model including general sub-models;
    获取训练数据集,所述训练数据集中包括多个训练文本和训练文本对应的标准情感分值;Acquiring a training data set, the training data set including a plurality of training texts and standard sentiment scores corresponding to the training texts;
    调用所述通用子模型对所述训练文本进行运算,得到训练情感分值;Calling the general sub-model to perform operations on the training text to obtain training emotion scores;
    将所述训练情感分值与所述标准情感分值进行比对;及Comparing the training emotion score with the standard emotion score; and
    根据比对结果对所述通用子模型进行调整,得到目标子模型。The general sub-model is adjusted according to the comparison result to obtain the target sub-model.
  8. 一种基于情感的文本分类处理装置,所述装置包括:An emotion-based text classification processing device, the device comprising:
    任务获取模块,用于获取情感分类任务,所述情感分类任务中包括待分类文本标识;The task acquisition module is used to acquire the sentiment classification task, and the sentiment classification task includes the text identification to be classified;
    文本获取模块,用于根据所述待分类文本标识获取对应的待分类文本,所述待分类文本包括多个问题以及所述问题对应的问题答复;A text obtaining module, configured to obtain a corresponding text to be classified according to the text identifier to be classified, where the text to be classified includes multiple questions and question answers corresponding to the questions;
    模型调用模块,用于根据所述情感分类任务调用对应的情感分类模型,所述情感分类模型包括多个与所述问题对应的子模型;将所述问题对应的问题答复输入至所述问题对应的子模型,通过子模型运算,输出所述问题答复对应的情感分值;及The model calling module is used to call the corresponding emotion classification model according to the emotion classification task, the emotion classification model includes a plurality of sub-models corresponding to the question; the question answer corresponding to the question is input to the question corresponding The sub-model of, through the sub-model operation, output the emotional score corresponding to the question answer; and
    情感类型识别模块,用于根据多个问题答复对应的情感分值识别所述待分类文本对应的情感类型。The emotion type recognition module is used to recognize the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the multiple question answers.
  9. 根据权利要求8所述的装置,其特征在于,所述模型调用模块还用于将所述问题答复进行分词,得到多个词语;根据所述问题调用对应的子模型;利用所述子模型对所述词语进行情感分类,得到多个情感标签对应的概率值;根据所述概率值确定所述问题答复对应的情感分值。The device according to claim 8, wherein the model calling module is further configured to segment the answer to the question to obtain multiple words; call the corresponding sub-model according to the question; and use the sub-model to pair Emotion classification is performed on the words to obtain probability values corresponding to multiple emotional tags; and the emotional score corresponding to the question answer is determined according to the probability value.
  10. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器存储有至少一条计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器加载并执行以下步骤:A computer device includes a memory and one or more processors. The memory stores at least one computer-readable instruction. When the computer-readable instruction is executed by the one or more processors, the one or Multiple processors load and execute the following steps:
    获取情感分类任务,所述情感分类任务中包括待分类文本标识;Acquiring an emotion classification task, where the emotion classification task includes a text identifier to be classified;
    根据所述待分类文本标识获取对应的待分类文本,所述待分类文本包括多个问题以及所述问题对应的问题答复;Obtaining a corresponding text to be classified according to the text identifier to be classified, where the text to be classified includes a plurality of questions and question answers corresponding to the questions;
    根据所述情感分类任务调用对应的情感分类模型,所述情感分类模型包括多个与所述问题对应的子模型;Calling a corresponding sentiment classification model according to the sentiment classification task, the sentiment classification model including a plurality of sub-models corresponding to the question;
    将所述问题对应的问题答复输入至所述问题对应的子模型,通过子模型运算,输出所述问题答复对应的情感分值;及Input the question answer corresponding to the question into the sub-model corresponding to the question, and output the emotional score corresponding to the question answer through the sub-model calculation; and
    根据多个问题答复对应的情感分值识别所述待分类文本对应的情感类型。Identify the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the answers to the multiple questions.
  11. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行计算机可读指令时还执行以下步骤:将所述问题答复进行分词,得到多个词语; 根据所述问题调用对应的子模型;利用所述子模型对所述词语进行情感分类,得到多个情感标签对应的概率值;及根据所述概率值确定所述问题答复对应的情感分值。The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instructions: segmenting the answer to the question to obtain a plurality of words; calling the corresponding child according to the question Model; using the sub-model to perform emotional classification on the words to obtain probability values corresponding to multiple emotional tags; and determining the emotional score corresponding to the question answer according to the probability value.
  12. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行计算机可读指令时还执行以下步骤:获取预设的情感需求类型;将分类后的情感类型与所述情感需求类型进行匹配,得到所述情感类型对应的第一匹配度;根据所述第一匹配度筛选出符合预设条件的目标情感类型;及提取所述目标情感类型对应的主体信息。The computer device according to claim 10, wherein the processor further executes the following steps when executing computer-readable instructions: obtaining a preset type of emotional need; comparing the classified emotional type with the emotional need type Matching to obtain a first matching degree corresponding to the emotion type; filtering out target emotion types that meet preset conditions according to the first matching degree; and extracting subject information corresponding to the target emotion type.
  13. 根据权利要求10-12中任一项所述的计算机设备,其特征在于,所述处理器执行计算机可读指令时还执行以下步骤:获取多种产品信息,所述产品信息包括产品类型;将所述产品类型与所述待分类文本对应的情感类型进行匹配,得到第二匹配度;当所述第二匹配度大于预定值时,将所述产品类型对应的产品信息标记为目标产品信息;及提取所述待分类文本对应的终端标识,将所述目标产品信息推送至所述终端标识对应的终端。The computer device according to any one of claims 10-12, wherein the processor further executes the following steps when executing computer-readable instructions: acquiring multiple product information, the product information including product types; Matching the product type with the emotion type corresponding to the text to be classified to obtain a second matching degree; when the second matching degree is greater than a predetermined value, marking the product information corresponding to the product type as target product information; And extract the terminal identifier corresponding to the text to be classified, and push the target product information to the terminal corresponding to the terminal identifier.
  14. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行计算机可读指令时还执行以下步骤:获取每个问题对应的权重;根据所述权重和所述问题答复对应的情感分值进行计算,得到修改后的分值;将多个问题答复对应的修改后的分值进行累加,得到情感总分值;及根据所述情感总分值识别所述待分类文本对应的情感类型。The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instructions: obtaining the weight corresponding to each question; according to the weight and the emotional score corresponding to the question answer Calculate the value to obtain the modified score; add up the modified scores corresponding to multiple question answers to obtain the total emotional score; and identify the emotional type corresponding to the text to be classified according to the emotional total score .
  15. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行计算机可读指令时还执行以下步骤:获取所述问题对应的答复数据;识别所述答复数据所对应的数据类型;当所述数据类型为语音类型时,将所述语音类型的答复数据转换为文本类型的答复数据;及根据所述文本类型的答复数据以及所述问题生成待分类文本。The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instructions: obtaining response data corresponding to the question; identifying the data type corresponding to the response data; When the data type is a voice type, converting the voice type response data into text type response data; and generating a text to be classified according to the text type response data and the question.
  16. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more non-volatile computer-readable storage media storing computer-readable instructions, which when executed by one or more processors, cause the one or more processors to perform the following steps:
    获取情感分类任务,所述情感分类任务中包括待分类文本标识;Acquiring an emotion classification task, where the emotion classification task includes a text identifier to be classified;
    根据所述待分类文本标识获取对应的待分类文本,所述待分类文本包括多个问题以及所述问题对应的问题答复;Obtaining a corresponding text to be classified according to the text identifier to be classified, where the text to be classified includes a plurality of questions and question answers corresponding to the questions;
    根据所述情感分类任务调用对应的情感分类模型,所述情感分类模型包括多个与所述问题对应的子模型;Calling a corresponding sentiment classification model according to the sentiment classification task, the sentiment classification model including a plurality of sub-models corresponding to the question;
    将所述问题对应的问题答复输入至所述问题对应的子模型,通过子模型运算,输出所述问题答复对应的情感分值;及Input the question answer corresponding to the question into the sub-model corresponding to the question, and output the emotional score corresponding to the question answer through the sub-model calculation; and
    根据多个问题答复对应的情感分值识别所述待分类文本对应的情感类型。Identify the emotion type corresponding to the text to be classified according to the emotion scores corresponding to the answers to the multiple questions.
  17. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:将所述问题答复进行分词,得到多个词语;根据所述问题调用对应的子模型;利用所述子模型对所述词语进行情感分类,得到多个情感标签对应的概率值;及根据所述概率值确定所述问题答复对应的情感分值。The storage medium according to claim 16, wherein when the computer-readable instructions are executed by the processor, the following steps are further executed: word segmentation is performed on the answer to the question to obtain a plurality of words; call according to the question Corresponding sub-model; using the sub-model to perform emotion classification on the words to obtain probability values corresponding to multiple emotion labels; and determining the emotion score corresponding to the question answer according to the probability value.
  18. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:获取预设的情感需求类型;将分类后的情感类型与所述情感需求类型进行匹配,得到所述情感类型对应的第一匹配度;根据所述第一匹配度筛选出符合预设条件的目标情感类型;及提取所述目标情感类型对应的主体信息。The storage medium according to claim 16, wherein when the computer-readable instructions are executed by the processor, the following steps are further executed: obtaining a preset type of emotional demand; comparing the classified emotion type with the emotion The need type is matched to obtain the first matching degree corresponding to the emotion type; the target emotion type that meets the preset condition is screened according to the first matching degree; and the subject information corresponding to the target emotion type is extracted.
  19. 根据权利要求16-18中任一项所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:获取多种产品信息,所述产品信息包括产品类型;将所述产品类型与所述待分类文本对应的情感类型进行匹配,得到第二匹配度;当所述第二匹配度大于预定值时,将所述产品类型对应的产品信息标记为目标产品信息;及提取所述待分类文本对应的终端标识,将所述目标产品信息推送至所述终端标识对应的终端。The storage medium according to any one of claims 16-18, wherein when the computer-readable instructions are executed by the processor, the following steps are further executed: obtaining information of a variety of products, the product information including products Type; match the product type with the emotion type corresponding to the text to be classified to obtain a second matching degree; when the second matching degree is greater than a predetermined value, mark the product information corresponding to the product type as a target Product information; and extracting the terminal identifier corresponding to the text to be classified, and pushing the target product information to the terminal corresponding to the terminal identifier.
  20. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:获取每个问题对应的权重;根据所述权重和所述问题答复对应的情感分值进行计算,得到修改后的分值;将多个问题答复对应的修改后的分值进行累加,得到情感总分值;及根据所述情感总分值识别所述待分类文本对应的情感类型。The storage medium according to claim 16, wherein when the computer-readable instructions are executed by the processor, the following steps are further performed: obtaining a weight corresponding to each question; corresponding to the weight and the question answer Calculate the sentiment score of, to obtain the modified score; add up the modified scores corresponding to multiple question answers to obtain the sentiment total score; and identify the corresponding text to be classified according to the sentiment total score Type of emotion.
PCT/CN2019/117161 2019-01-17 2019-11-11 Emotion-based text classification method and device, and computer apparatus WO2020147395A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910042837.5 2019-01-17
CN201910042837.5A CN109960725A (en) 2019-01-17 2019-01-17 Text classification processing method, device and computer equipment based on emotion

Publications (1)

Publication Number Publication Date
WO2020147395A1 true WO2020147395A1 (en) 2020-07-23

Family

ID=67023453

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117161 WO2020147395A1 (en) 2019-01-17 2019-11-11 Emotion-based text classification method and device, and computer apparatus

Country Status (2)

Country Link
CN (1) CN109960725A (en)
WO (1) WO2020147395A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131366A (en) * 2020-09-23 2020-12-25 腾讯科技(深圳)有限公司 Method, device and storage medium for training text classification model and text classification
CN112214576A (en) * 2020-09-10 2021-01-12 深圳价值在线信息科技股份有限公司 Public opinion analysis method, device, terminal equipment and computer readable storage medium
CN112383593A (en) * 2020-10-30 2021-02-19 中国平安人寿保险股份有限公司 Intelligent content pushing method and device based on offline accompanying visit and computer equipment
CN112906717A (en) * 2021-03-04 2021-06-04 广联达科技股份有限公司 Method and system for identifying engineering file content
CN113408269A (en) * 2021-07-20 2021-09-17 北京百度网讯科技有限公司 Text emotion analysis method and device
CN113722491A (en) * 2021-09-08 2021-11-30 北京有竹居网络技术有限公司 Method and device for determining text plot type, readable medium and electronic equipment
CN113807103A (en) * 2021-09-16 2021-12-17 平安普惠企业管理有限公司 Recruitment method, device, equipment and storage medium based on artificial intelligence
CN116108836A (en) * 2023-04-10 2023-05-12 之江实验室 Text emotion recognition method and device, computer equipment and readable storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109960725A (en) * 2019-01-17 2019-07-02 平安科技(深圳)有限公司 Text classification processing method, device and computer equipment based on emotion
CN111881286B (en) * 2019-09-10 2021-08-24 马上消费金融股份有限公司 Classification ambiguity analysis method and device
CN111222837A (en) * 2019-10-12 2020-06-02 中国平安财产保险股份有限公司 Intelligent interviewing method, system, equipment and computer storage medium
CN111078879A (en) * 2019-12-09 2020-04-28 北京邮电大学 Method and device for detecting text sensitive information of satellite internet based on deep learning
CN112651236B (en) * 2020-12-28 2021-10-01 中电金信软件有限公司 Method and device for extracting text information, computer equipment and storage medium
CN112784583A (en) * 2021-01-26 2021-05-11 浙江香侬慧语科技有限责任公司 Multi-angle emotion analysis method, system, storage medium and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017024553A1 (en) * 2015-08-12 2017-02-16 浙江核新同花顺网络信息股份有限公司 Information emotion analysis method and system
CN107679234A (en) * 2017-10-24 2018-02-09 上海携程国际旅行社有限公司 Customer service information providing method, device, electronic equipment, storage medium
CN108536681A (en) * 2018-04-16 2018-09-14 腾讯科技(深圳)有限公司 Intelligent answer method, apparatus, equipment and storage medium based on sentiment analysis
CN109960725A (en) * 2019-01-17 2019-07-02 平安科技(深圳)有限公司 Text classification processing method, device and computer equipment based on emotion

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090306967A1 (en) * 2008-06-09 2009-12-10 J.D. Power And Associates Automatic Sentiment Analysis of Surveys
CN106445919A (en) * 2016-09-28 2017-02-22 上海智臻智能网络科技股份有限公司 Sentiment classifying method and device
CN106909654B (en) * 2017-02-24 2020-07-21 北京时间股份有限公司 Multi-level classification system and method based on news text information
CN108133038B (en) * 2018-01-10 2022-03-22 重庆邮电大学 Entity level emotion classification system and method based on dynamic memory network
CN108513175B (en) * 2018-03-29 2020-05-22 网宿科技股份有限公司 Bullet screen information processing method and system
CN108629043B (en) * 2018-05-14 2023-05-12 平安科技(深圳)有限公司 Webpage target information extraction method, device and storage medium
CN108874992B (en) * 2018-06-12 2021-03-19 深圳华讯网络科技有限公司 Public opinion analysis method, system, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017024553A1 (en) * 2015-08-12 2017-02-16 浙江核新同花顺网络信息股份有限公司 Information emotion analysis method and system
CN107679234A (en) * 2017-10-24 2018-02-09 上海携程国际旅行社有限公司 Customer service information providing method, device, electronic equipment, storage medium
CN108536681A (en) * 2018-04-16 2018-09-14 腾讯科技(深圳)有限公司 Intelligent answer method, apparatus, equipment and storage medium based on sentiment analysis
CN109960725A (en) * 2019-01-17 2019-07-02 平安科技(深圳)有限公司 Text classification processing method, device and computer equipment based on emotion

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112214576A (en) * 2020-09-10 2021-01-12 深圳价值在线信息科技股份有限公司 Public opinion analysis method, device, terminal equipment and computer readable storage medium
CN112214576B (en) * 2020-09-10 2024-02-06 深圳价值在线信息科技股份有限公司 Public opinion analysis method, public opinion analysis device, terminal equipment and computer readable storage medium
CN112131366A (en) * 2020-09-23 2020-12-25 腾讯科技(深圳)有限公司 Method, device and storage medium for training text classification model and text classification
CN112131366B (en) * 2020-09-23 2024-02-09 腾讯科技(深圳)有限公司 Method, device and storage medium for training text classification model and text classification
CN112383593A (en) * 2020-10-30 2021-02-19 中国平安人寿保险股份有限公司 Intelligent content pushing method and device based on offline accompanying visit and computer equipment
CN112383593B (en) * 2020-10-30 2023-06-02 中国平安人寿保险股份有限公司 Intelligent content pushing method and device based on offline accompanying visit and computer equipment
CN112906717A (en) * 2021-03-04 2021-06-04 广联达科技股份有限公司 Method and system for identifying engineering file content
CN113408269A (en) * 2021-07-20 2021-09-17 北京百度网讯科技有限公司 Text emotion analysis method and device
CN113722491A (en) * 2021-09-08 2021-11-30 北京有竹居网络技术有限公司 Method and device for determining text plot type, readable medium and electronic equipment
CN113807103A (en) * 2021-09-16 2021-12-17 平安普惠企业管理有限公司 Recruitment method, device, equipment and storage medium based on artificial intelligence
CN113807103B (en) * 2021-09-16 2024-04-09 陈雪刚 Recruitment method, device, equipment and storage medium based on artificial intelligence
CN116108836A (en) * 2023-04-10 2023-05-12 之江实验室 Text emotion recognition method and device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN109960725A (en) 2019-07-02

Similar Documents

Publication Publication Date Title
WO2020147395A1 (en) Emotion-based text classification method and device, and computer apparatus
CN110021439B (en) Medical data classification method and device based on machine learning and computer equipment
WO2021068321A1 (en) Information pushing method and apparatus based on human-computer interaction, and computer device
WO2021042503A1 (en) Information classification extraction method, apparatus, computer device and storage medium
WO2020143844A1 (en) Intent analysis method and apparatus, display terminal, and computer readable storage medium
WO2020224213A1 (en) Sentence intent identification method, device, and computer readable storage medium
CN109992664B (en) Dispute focus label classification method and device, computer equipment and storage medium
WO2020048264A1 (en) Method and apparatus for processing drug data, computer device, and storage medium
WO2021047186A1 (en) Method, apparatus, device, and storage medium for processing consultation dialogue
WO2021027553A1 (en) Micro-expression classification model generation method, image recognition method, apparatus, devices, and mediums
WO2021051598A1 (en) Text sentiment analysis model training method, apparatus and device, and readable storage medium
CN113094578B (en) Deep learning-based content recommendation method, device, equipment and storage medium
CN110175229B (en) Method and system for on-line training based on natural language
US20230177799A1 (en) Relationship modeling and adjustment based on video data
CN110633475A (en) Natural language understanding method, device and system based on computer scene and storage medium
CN112632248A (en) Question answering method, device, computer equipment and storage medium
CN113240510A (en) Abnormal user prediction method, device, equipment and storage medium
CN111651606A (en) Text processing method and device and electronic equipment
JP7280705B2 (en) Machine learning device, program and machine learning method
CN113255368B (en) Method and device for emotion analysis of text data and related equipment
CN113095073B (en) Corpus tag generation method and device, computer equipment and storage medium
CN114038451A (en) Quality inspection method and device for dialogue data, computer equipment and storage medium
CN114138960A (en) User intention identification method, device, equipment and medium
CN114283429A (en) Material work order data processing method, device, equipment and storage medium
CN113469237A (en) User intention identification method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19909868

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19909868

Country of ref document: EP

Kind code of ref document: A1