Complaint text classification model training method, complaint text classification method and device

CN115577098BActive Publication Date: 2026-08-18BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211083327.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-06
Publication Date
2026-08-18
Estimated Expiration
2042-09-06

AI Technical Summary

Technical Problem

[0005]有鉴于此,本发明提供一种客诉文本分类模型训练方法、客诉文本分类方法及设备,以解决现有技术中,对于歧义词和未登录词的识别能力低、分词效果差,以及耗费大量人力和人工成本高的问题

Benefits of technology

[0037]本发明提供一种客诉文本分类模型训练方法、客诉文本分类方法及设备,在对历史客诉文本样本进行分词处理,得到初始分词序列后,可以利用分词序列模型对初始分词序列进行重组,可以解决现有的分词技术以对组合型歧义词组、交易性歧义词组、真歧义词组进行合理分词的问题,利用重组后的目标分词序列对文本情感分类模型进行训练,可以有效提高文本情感分类模型进行分类的准确度;再利用文本情感分类模型预测的分类准确度更新分词序列模型的参数,可以使更新后得到的目标分词序列模型可以重组出准确度更高和更加合理的目标分词序列。这样在检测到当前存在客诉文本时,可以通过预选训练好的目标分词序列模型重组出更加准确和更加合理的客诉文本的分词序列,进而将重组的客诉文本的分词序列输入预训练的目标文本情感分类模型中,通过目标文本情感分类模型通过重组的客诉文本的分词序列,可以分类出更加准确的分类结果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115577098B_ABST
    Figure CN115577098B_ABST
Patent Text Reader

Abstract

The application provides a complaint text classification model training method, a complaint text classification method and equipment; a plurality of historical complaint text samples are obtained; each historical complaint text sample is subjected to word segmentation processing to obtain an initial segmentation sequence; the initial segmentation sequence is reorganized by using a segmentation sequence model to obtain a target segmentation sequence; a target word vector corresponding to the target segmentation sequence is extracted, the target word vector is input into a text sentiment classification model, the target word vector is classified and processed by using the text sentiment classification model, a classification result and a classification accuracy rate of a target classification result are calculated, parameters of the text sentiment classification model are adjusted with the classification result tending to the target classification result as a training target until the text sentiment classification model converges, and a target text sentiment classification model is obtained; and the parameters of the segmentation sequence model are updated by using the classification accuracy rate of the historical complaint text sample, so that the target segmentation sequence model can reorganize a target segmentation sequence with higher accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information security technology, and more specifically, to a method for training a customer complaint text classification model, a method for classifying customer complaint texts, and a device for such classification. Background Technology

[0002] With the continuous development of internet technology, online shopping has become a daily routine for people. To provide customers with a better shopping experience, customer service has become one of the most crucial aspects. Customer service can collect user feedback and, through word segmentation, help business lines identify areas for improvement and refinement. For example, word segmentation can be used to analyze account-related complaints such as account theft, account duplication, and risk control interception to identify potential account security issues, thereby improving account security-related processes.

[0003] In text processing, word segmentation is one of the most important steps. Since English words are separated by spaces, word segmentation can usually be achieved by using spaces. However, Chinese characters are not separated by spaces, making word segmentation impossible. Therefore, word segmentation of Chinese text requires recombining the continuous character sequence into a word sequence according to certain rules.

[0004] Existing word segmentation methods typically fall into three categories: string matching-based, understanding-based, and statistical-based. However, string matching-based methods rely heavily on dictionaries and rule bases, resulting in low recognition capabilities for ambiguous words and out-of-vocabulary words. Understanding-based methods require extensive linguistic knowledge and information, but the general and complex nature of Chinese linguistic knowledge makes it difficult to organize various speech information into a machine-readable format, leading to poor segmentation results. Statistical-based methods are highly complex and computationally expensive, and also rely on manually defined feature engineering, which consumes significant manpower and incurs high labor costs. Summary of the Invention

[0005] In view of this, the present invention provides a customer complaint text classification model training method, customer complaint text classification method and device to solve the problems of low recognition ability of ambiguous words and out-of-vocabulary words, poor word segmentation effect, and high manpower and labor costs in the prior art.

[0006] The first aspect of this invention discloses a method for training a customer complaint text classification model, the method comprising:

[0007] Obtain multiple historical customer complaint text samples;

[0008] For each of the historical customer complaint text samples, the historical customer complaint text samples are segmented into words to obtain an initial segmentation sequence;

[0009] The initial segmented word sequence is recombined using a word segmentation sequence model to obtain the target segmented word sequence;

[0010] Extract the target word vector corresponding to the target word segmentation sequence, and input the target word vector into the text sentiment classification model to classify the target word vector through the text sentiment classification model. Calculate the classification accuracy between the classification result and the target classification result. At the same time, adjust the parameters of the text sentiment classification model with the goal of making the classification result approach the target classification result, until the text sentiment classification model converges, and obtain the target text sentiment classification model.

[0011] The parameters of the word segmentation sequence model are updated using the classification accuracy of the historical customer complaint text samples.

[0012] Optionally, the initial word segmentation sequence includes multiple words, and the reorganization of the initial word segmentation sequence using a word segmentation sequence model to obtain the target word segmentation sequence includes:

[0013] The combination probability corresponding to each target word group in the initial word segmentation sequence is calculated using a word segmentation sequence model. The words in the target word groups whose combination probabilities are greater than a preset probability threshold are combined to obtain the target word segmentation sequence; wherein, the target word group includes at least two adjacent words.

[0014] Optionally, the word segmentation sequence model is a word segmentation sequence model constructed using the Policy Gradients algorithm.

[0015] Optionally, extracting the target word vector corresponding to the target word segmentation sequence includes:

[0016] The target word vectors corresponding to the target word segmentation sequence are extracted using a word vector extraction model.

[0017] The word vector extraction model is either the BERT model or the word2vec model.

[0018] Optionally, the step of inputting the target word vector into a text sentiment classification model to classify the target word vector using the text sentiment classification model, calculating the classification accuracy between the classification result and the target classification result, and simultaneously adjusting the parameters of the text sentiment classification model with the goal of the classification result approaching the target classification result, until the text sentiment classification model converges to obtain the target text sentiment classification model, includes:

[0019] Input the target word vectors into the text sentiment classification model;

[0020] The target word vector is classified using the text sentiment classification model, and the classification accuracy of the classification result and the target classification result is calculated. A corresponding loss function is constructed based on the classification result and the target classification result. The parameters of the text sentiment classification model are adjusted using the loss function until the text sentiment classification model converges, thus obtaining the target text sentiment classification model.

[0021] The second aspect of this invention discloses a customer complaint text classification method, applicable to the target word segmentation sequence model and target text sentiment classification model trained by the customer complaint text classification model training method disclosed in the first aspect of this invention, wherein the method includes:

[0022] The initial word segmentation sequence of the customer complaint text is input into the target word segmentation sequence model, so that the target word segmentation sequence model reorganizes the initial word segmentation sequence of the customer complaint text to obtain the word segmentation sequence of the customer complaint text; wherein, the initial word segmentation sequence is obtained by segmenting the customer complaint text;

[0023] Extract word vectors from the word segmentation sequence of the customer complaint text, and input the word vectors into the target text sentiment classification model so that the target text sentiment classification model can use the word vectors to perform classification processing and obtain the classification result of the customer complaint text.

[0024] Optionally, the step of inputting the initial word segmentation sequence into the target word segmentation sequence model, so that the target word segmentation sequence model reorganizes the initial word segmentation sequence to obtain the word segmentation sequence of the customer complaint text, includes:

[0025] The initial word segmentation sequence of the customer complaint text is input into the target word segmentation sequence model, so that the target word segmentation sequence model calculates the combination probability corresponding to each word group in the initial word segmentation sequence of the customer complaint text. The words in the word groups with combination probabilities greater than a preset probability threshold are combined to obtain the word segmentation sequence of the customer complaint text; wherein, the word group includes at least two adjacent words.

[0026] A third aspect of this invention discloses a training device for a customer complaint text classification model, characterized in that the method includes:

[0027] The historical customer complaint text sample acquisition unit is used to acquire multiple historical customer complaint text samples;

[0028] The word segmentation processing unit is used to perform word segmentation processing on each of the historical customer complaint text samples to obtain an initial word segmentation sequence.

[0029] The first recombination unit is used to recombine the initial word segmentation sequence using a word segmentation sequence model to obtain the target word segmentation sequence;

[0030] The classification accuracy calculation unit is used to extract the target word vector corresponding to the target word segmentation sequence, and input the target word vector into the text sentiment classification model to classify the target word vector through the text sentiment classification model, calculate the classification accuracy between the classification result and the target classification result, and adjust the parameters of the text sentiment classification model with the classification result approaching the target classification result as the training target until the text sentiment classification model reaches convergence, thus obtaining the target text sentiment classification model;

[0031] An update unit is used to update the parameters of the word segmentation sequence model using the classification accuracy of the historical customer complaint text samples.

[0032] The fourth aspect of this invention discloses a customer complaint text classification device, applicable to the target word segmentation sequence model and target text sentiment classification model trained by the customer complaint text classification model training device disclosed in the third aspect of this invention, the device comprising:

[0033] The second reorganization unit is used to input the initial word segmentation sequence of the customer complaint text into the target word segmentation sequence model, so that the target word segmentation sequence model reorganizes the initial word segmentation sequence of the customer complaint text to obtain the word segmentation sequence of the customer complaint text; wherein, the initial word segmentation sequence is obtained by segmenting the customer complaint text;

[0034] The text classification unit is used to extract word vectors from the word segmentation sequence of the customer complaint text, and input the word vectors into the target text sentiment classification model so that the target text sentiment classification model can use the word vectors to perform classification processing and obtain the classification result of the customer complaint text.

[0035] The fifth aspect of this invention discloses an electronic device, comprising: a processor and a memory, the processor and the memory being connected via a communication bus; wherein, the processor is configured to call and execute a program stored in the memory; the memory is configured to store the program, the program being configured to implement the customer complaint text classification model training method as disclosed in the first aspect of this invention, or to execute the customer complaint text classification method as disclosed in the second aspect of this invention.

[0036] The sixth aspect of this invention discloses a computer-readable storage medium storing computer-executable instructions for performing the customer complaint text classification model training method as disclosed in the first aspect of this invention, or for performing the customer complaint text classification method as disclosed in the second aspect of this invention.

[0037] This invention provides a training method, classification method, and device for customer complaint text classification. After segmenting historical customer complaint text samples to obtain an initial segmentation sequence, a segmentation sequence model can be used to reconstruct the initial segmentation sequence. This addresses the problem of existing segmentation techniques failing to properly segment compound ambiguous word groups, transactional ambiguous word groups, and truly ambiguous word groups. The reconstructed target segmentation sequence is then used to train a text sentiment classification model, effectively improving the accuracy of the model. The parameters of the segmentation sequence model are then updated using the classification accuracy predicted by the text sentiment classification model, enabling the updated target segmentation sequence model to reconstruct more accurate and reasonable target segmentation sequences. Thus, when a customer complaint text is detected, a more accurate and reasonable segmentation sequence can be reconstructed using a pre-trained target segmentation sequence model. This reconstructed segmentation sequence is then input into a pre-trained target text sentiment classification model, which, through the reconstructed segmentation sequence, can achieve a more accurate classification result. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0039] Figure 1 A flowchart illustrating a customer complaint text classification model training method provided in an embodiment of the present invention;

[0040] Figure 2 A flowchart illustrating a customer complaint text classification method provided in an embodiment of the present invention;

[0041] Figure 3 This is a schematic diagram of the structure of a customer complaint text classification model training device provided in an embodiment of the present invention;

[0042] Figure 4 This is a schematic diagram of the structure of a customer complaint text classification device provided in an embodiment of the present invention;

[0043] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] In this application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0046] As can be seen from the background above, existing word segmentation methods mainly include string matching-based methods, understanding-based methods, and statistical methods. Among them, string matching-based methods match the Chinese character string to be segmented with entries in a sufficiently large machine dictionary according to a certain strategy. If a certain string is found in the dictionary, a word is identified, i.e., a word is segmented. Understanding-based methods perform syntactic and semantic analysis simultaneously with word segmentation, using syntactic information and semantic analysis for word segmentation. Statistical methods calculate the mutual information between adjacent co-occurring characters in the corpus by statistically analyzing the frequency of each character combination. The mutual information can then be used to determine the degree of closeness between characters. When the degree of closeness is higher than a certain threshold, it indicates that the character group can form a word.

[0047] However, word segmentation methods based on string matching rely too heavily on dictionaries and rule bases, resulting in low recognition capabilities for ambiguous words and out-of-vocabulary words; word segmentation methods based on understanding require a large amount of linguistic knowledge and information, but the generality and complexity of Chinese linguistic knowledge makes it difficult to organize various speech information into a form that can be directly read by machines, thus leading to poor word segmentation results; word segmentation methods based on statistics are highly complex and computationally expensive, and also rely on manually defined feature engineering, which consumes a lot of manpower and has high labor costs.

[0048] Therefore, the customer complaint text classification model training method, customer complaint text classification method, and device provided by this invention, after segmenting historical customer complaint text samples to obtain an initial segmentation sequence, can use a segmentation sequence model to recombine the initial segmentation sequence. This solves the problem of existing segmentation techniques failing to reasonably segment compound ambiguous word groups, transactional ambiguous word groups, and truly ambiguous word groups. Using the recombined target segmentation sequence to train a text sentiment classification model can effectively improve the accuracy of the text sentiment classification model. Furthermore, using the classification accuracy predicted by the text sentiment classification model to update the parameters of the segmentation sequence model allows the updated target segmentation sequence model to recombine more accurate and reasonable target segmentation sequences. Thus, when a customer complaint text is detected, a more accurate and reasonable segmentation sequence of the customer complaint text can be recombined using a pre-trained target segmentation sequence model. The recombined segmentation sequence of the customer complaint text is then input into a pre-trained target text sentiment classification model, which, through the recombined segmentation sequence, can obtain a more accurate classification result.

[0049] See Figure 1 The diagram illustrates a flowchart of a customer complaint text classification model training method provided by an embodiment of the present invention. The customer complaint text classification model training method specifically includes the following steps:

[0050] S101: Obtain multiple historical customer complaint text samples.

[0051] In this embodiment of the application, a historical customer complaint text set can be obtained. For each historical customer complaint text in the set, the corresponding problem type and problem level are labeled, thus obtaining a historical customer complaint text sample. The labeled problem type and problem level represent the target classification result for this historical customer complaint text sample.

[0052] It should be noted that the problem type in the customer complaint text can be account-related, verification-related, etc., and can be set according to the actual application. This application embodiment does not limit it.

[0053] It should also be noted that the problem level can be divided into three levels: high, medium, and low. This can be set according to the actual application, and the embodiments in this application do not impose any limitations on it.

[0054] S102: For each historical customer complaint text sample, perform word segmentation on the historical customer complaint text sample to obtain the initial word segmentation sequence.

[0055] In the specific execution step S102, after obtaining multiple historical customer complaint text samples, for each obtained historical customer complaint text sample, existing word segmentation techniques can be used to segment the historical customer complaint text sample to obtain the initial word segmentation sequence of the historical customer complaint text sample. Among them, existing word segmentation techniques can be word segmentation methods based on string matching, word segmentation methods based on understanding, and word segmentation methods based on statistics.

[0056] In this embodiment, research has shown that existing word segmentation techniques struggle to segment compound ambiguous word groups, transactional ambiguous word groups, and truly ambiguous word groups effectively. Directly using the initial segmented sequence obtained from segmenting historical customer complaint text samples using existing techniques to train a text sentiment classification model results in poor classification performance. Therefore, after obtaining the initial segmented sequence of historical customer complaint text samples using existing techniques, further reorganization processing can be performed on the initial segmented sequence to obtain more reasonable word segmentation.

[0057] For example, a historical customer complaint text sample might be "Guangzhou San San Garment Factory's logistics is slow." Using existing word segmentation technology, this historical customer complaint text sample could be segmented into the following word sequence: Guangzhou, San San, garment factory, logistics, slow. However, "San San Service Factory" is a factory name and should be merged. This demonstrates that existing word segmentation technology struggles to reasonably segment compound ambiguous phrases, transactional ambiguous phrases, and truly ambiguous phrases.

[0058] S103: Use a word segmentation sequence model to reorganize the initial word segmentation sequence to obtain the target word segmentation sequence.

[0059] In this embodiment of the application, since existing word segmentation techniques are difficult to segment combined ambiguous word groups, transactional ambiguous word groups, and truly ambiguous word groups reasonably, a word segmentation sequence model can be constructed using reinforcement learning algorithms. After segmenting historical customer complaint text samples using existing word segmentation techniques, the initial word segmentation sequence can be recombined using the word segmentation sequence model to obtain a more reasonable target word segmentation sequence.

[0060] Optionally, the reinforcement learning algorithm in this embodiment can be the Policy Gradients algorithm. The appropriate reinforcement learning algorithm can be selected according to the actual application, and this embodiment does not impose any limitations.

[0061] Optionally, in the embodiments of the present application, for each historical customer complaint text sample, the initial word segmentation sequence of the historical customer complaint text sample can be pre-divided into multiple target word groups, and the combination probability of each target word group in the initial word segmentation sequence of the historical customer complaint text sample can be calculated by using a word segmentation sequence model. The words in the target word group corresponding to the combination probability greater than the preset probability threshold are combined to obtain a target word segmentation sequence. Among them, the target word group includes at least two adjacent words.

[0062] For example, the historical customer complaint text sample can be "The logistics of Guangzhou Sansan Garment Factory is slow". Using the existing word segmentation technology to segment this historical customer complaint text sample, the obtained word segmentation sequence can be: Guangzhou, Sansan, Garment Factory, Logistics, Slow; the initial word segmentation sequence of the historical customer complaint text sample can be pre-divided into multiple target word groups such as Guangzhou Sansan, Sansan Garment Factory, Garment Factory Logistics, Logistics Slow, etc.

[0063] Use the word segmentation sequence model to calculate the combination probability of each target word group in the initial word segmentation sequence of the historical customer complaint text sample. Among them, the combination probability of "Guangzhou Sansan" is 0.4, the combination probability of "Sansan Garment Factory" is 0.7, the combination probability of "Garment Factory Logistics" is 0.3, and the combination probability of "Logistics Slow" is 0.4. If the preset probability threshold is 0.5, it can be determined that the target word group corresponding to the combination probability greater than the preset probability threshold is "Sansan Garment Factory", that is, the words in "Sansan Garment Factory" can be combined. That is to say, it is possible to determine whether to combine according to the combination probability of each target word group, update the initial word segmentation sequence, and obtain the target word segmentation sequence as Guangzhou, Sansan Garment Factory, Logistics, Slow.

[0064] S104: Extract the target word vector corresponding to the target word segmentation sequence, and input the target word vector into the text sentiment classification model, so as to classify the target word vector through the text sentiment classification model, calculate the classification accuracy between the classification result and the target classification result, and at the same time adjust the parameters of the text sentiment classification model with the training objective that the classification result approaches the target classification result until the text sentiment classification model converges to obtain the target text sentiment classification model.

[0065] In the embodiments of the present application, for each historical customer complaint text sample, after using the word segmentation sequence model to reorganize the initial word segmentation sequence of the historical customer complaint text sample to obtain the corresponding target word segmentation sequence, the target word vector corresponding to the target word segmentation sequence can be extracted, so as to input the extracted target word vector into the text sentiment classification model.

[0066] The target word vector is classified using the text sentiment classification model, and the classification accuracy of the classification result and the target classification result is calculated. A corresponding loss function is constructed based on the classification result and the target classification result. The parameters of the text sentiment classification model are adjusted using the loss function until the text sentiment classification model converges, thus obtaining the target text sentiment classification model.

[0067] In this embodiment of the application, the target word vector of the target word segmentation sequence can be extracted by the BERT model or the word2vec model.

[0068] It should be noted that the text sentiment classification model can be a convolutional neural network (CNN), a deep learning neural network (RNN), or a long short-term memory neural network (LSTM). The appropriate neural network can be selected based on the actual application, and this application does not limit the choice.

[0069] S105: Update the parameters of the word segmentation sequence model using the classification accuracy of historical customer complaint text samples.

[0070] In the embodiments of this application, it has been found that reinforcement learning can select a behavior through observation information (the input of the model) and directly backpropagate it. Specifically, by using the reward, the probability of the selected behavior can be directly enhanced or weakened. Good behavior will increase the probability of being selected in the next time, and bad behavior will decrease the probability of being selected in the next time.

[0071] Therefore, the parameters of the word segmentation sequence model can be updated using the classification accuracy of historical customer complaint text samples calculated by the text sentiment classification model, resulting in the target word segmentation sequence model. Using the target word segmentation sequence model, a more accurate and reasonable target word segmentation sequence can be reconstructed, and then a more accurate classification result can be obtained using the more accurate and reasonable target word segmentation sequence.

[0072] It should be noted that the classification accuracy of the text sentiment classification model in each round of the target word segmentation sequence model is used as a reward. The reward corresponding to different target word groups is calculated using the Policy Network, and the reward is updated to obtain the probability corresponding to different target word groups. Different combination probabilities are updated based on the probabilities corresponding to different target word groups, and then the initial word segmentation sequence is updated using the updated combination probabilities to obtain a more reasonable target word segmentation sequence.

[0073] This invention provides a training method for a customer complaint text classification model. After segmenting historical customer complaint text samples to obtain an initial segmentation sequence, the initial segmentation sequence can be recombined using a segmentation sequence model. This solves the problem of existing segmentation techniques failing to reasonably segment compound ambiguous word groups, transactional ambiguous word groups, and truly ambiguous word groups. The recombined target segmentation sequence is then used to train a text sentiment classification model, which can effectively improve the accuracy of the text sentiment classification model. Finally, the parameters of the segmentation sequence model are updated using the classification accuracy predicted by the text sentiment classification model, enabling the updated target segmentation sequence model to recombine a more accurate and reasonable target segmentation sequence.

[0074] See Figure 2 The diagram illustrates a flowchart of a customer complaint text classification method provided by an embodiment of the present invention. This customer complaint text classification method is applicable to... Figure 1 The publicly available customer complaint text classification model training method trains a target word segmentation sequence model and a target text sentiment classification model. This customer complaint text classification method specifically includes the following steps:

[0075] S201: Input the initial word segmentation sequence of the customer complaint text into the target word segmentation sequence model so that the target word segmentation sequence model can reorganize the initial word segmentation sequence of the customer complaint text to obtain the word segmentation sequence of the customer complaint text.

[0076] In this embodiment of the application, after training the target word segmentation sequence model using a historical customer complaint text sample set, it is possible to detect in real time whether a customer complaint text exists. When a customer complaint text is detected, the existing word segmentation technology can be used to segment the detected customer complaint text to obtain the initial word segmentation sequence of the customer complaint text. Then, the target word segmentation sequence model is used to reorganize the initial word segmentation sequence of the customer complaint text to obtain the word segmentation sequence of the customer complaint text.

[0077] Optionally, the initial word segmentation sequence of the customer complaint text is input into a target word segmentation sequence model. The target word segmentation sequence model calculates the combination probability corresponding to each word group in the initial word segmentation sequence of the customer complaint text, and combines the words in the word groups with combination probabilities greater than a preset probability threshold to obtain the word segmentation sequence of the customer complaint text. Each word group in the initial word segmentation sequence of the customer complaint text must include at least two adjacent words.

[0078] S202: Extract the word vectors of the segmented sequence of the customer complaint text, and input the word vectors into the target text sentiment classification model so that the target text sentiment classification model can use the word vectors to perform classification processing and obtain the classification result of the customer complaint text.

[0079] In the specific execution step S202, after recombining the initial segmented sequence of the customer complaint text using the target segmented sequence model to obtain the segmented sequence of the customer complaint text, word vectors of the segmented sequence of the customer complaint text can be extracted using the BERT model or the word2vec model. Then, the extracted word vectors can be input into the target text sentiment classification model. The target text sentiment classification model uses the input word vectors to perform classification processing to obtain the classification result of the customer complaint text.

[0080] This invention provides a method for classifying customer complaint texts. It can reconstruct a more accurate and reasonable word segmentation sequence of customer complaint texts by using a pre-trained target word segmentation sequence model. Then, the reconstructed word segmentation sequence of customer complaint texts is input into a pre-trained target text sentiment classification model. Through the target text sentiment classification model, a more accurate classification result can be obtained by using the reconstructed word segmentation sequence of customer complaint texts.

[0081] Based on the customer complaint text classification model training method disclosed in the embodiments of the present invention, the embodiments of the present invention also disclose a customer complaint text classification model training device, such as... Figure 3 As shown, the training device for this customer complaint text classification model includes:

[0082] The historical customer complaint text sample acquisition unit 31 is used to acquire multiple historical customer complaint text samples;

[0083] The word segmentation processing unit 32 is used to perform word segmentation processing on each historical customer complaint text sample to obtain an initial word segmentation sequence.

[0084] The first recombination unit 33 is used to recombine the initial word segmentation sequence using a word segmentation sequence model to obtain the target word segmentation sequence;

[0085] The classification accuracy calculation unit 34 is used to extract the target word vector corresponding to the target word segmentation sequence and input the target word vector into the text sentiment classification model so that the target word vector is classified by the text sentiment classification model. The classification accuracy of the classification result and the target classification result is calculated. At the same time, the parameters of the text sentiment classification model are adjusted with the classification result approaching the target classification result as the training target until the text sentiment classification model converges and the target text sentiment classification model is obtained.

[0086] Update unit 35 is used to update the parameters of the word segmentation sequence model using the classification accuracy of historical customer complaint text samples.

[0087] The specific principles and execution processes of each unit in the customer complaint text classification model training device disclosed in the above embodiments of the present invention are the same as those in the customer complaint text classification model training method disclosed in the above embodiments of the present invention. Please refer to the corresponding parts in the customer complaint text classification model training method disclosed in the above embodiments of the present invention, and they will not be repeated here.

[0088] This invention provides a training device for a customer complaint text classification model. After segmenting historical customer complaint text samples to obtain an initial segmentation sequence, the device can reorganize the initial segmentation sequence using a segmentation sequence model. This solves the problem of existing segmentation techniques failing to properly segment compound ambiguous word groups, transactional ambiguous word groups, and truly ambiguous word groups. The reorganized target segmentation sequence is then used to train a text sentiment classification model, which can effectively improve the accuracy of the text sentiment classification model. Finally, the parameters of the segmentation sequence model are updated using the classification accuracy predicted by the text sentiment classification model, enabling the updated target segmentation sequence model to reorganize a more accurate and reasonable target segmentation sequence.

[0089] Optionally, the initial word segmentation sequence includes multiple words, and the first recombination unit includes:

[0090] The first recombination subunit is used to calculate the combination probability corresponding to each target word group in the initial word segmentation sequence using the word segmentation sequence model, and to combine the words in the target word group whose combination probability is greater than the preset probability threshold to obtain the target word segmentation sequence; wherein, the target word group includes at least two adjacent words.

[0091] Optionally, the word segmentation sequence model is a word segmentation sequence model constructed using the Policy Gradients algorithm.

[0092] Optional, the classification accuracy calculation unit includes:

[0093] The word vector extraction unit is used to extract the target word vectors corresponding to the target word segmentation sequence using a word vector extraction model;

[0094] The word vector extraction model is either the BERT model or the word2vec model.

[0095] Optional, the classification accuracy calculation unit includes:

[0096] The input unit is used to input the target word vector into the text sentiment classification model.

[0097] The text sentiment classification model training unit is used to classify the target word vector using the text sentiment classification model, calculate the classification accuracy of the classification result and the target classification result, construct a corresponding loss function based on the classification result and the target classification result, and adjust the parameters of the text sentiment classification model using the loss function until the text sentiment classification model converges to obtain the target text sentiment classification model.

[0098] Based on the customer complaint text classification method disclosed in the embodiments of this invention, the embodiments of this invention also disclose a customer complaint text classification model training device, applicable to the target word segmentation sequence model and target text sentiment classification model trained by the aforementioned customer complaint text classification model training device disclosed in real time by this invention, such as... Figure 4 As shown, the customer complaint text classification device includes:

[0099] The second reorganization unit 41 is used to input the initial word segmentation sequence of the customer complaint text into the target word segmentation sequence model, so that the target word segmentation sequence model reorganizes the initial word segmentation sequence of the customer complaint text to obtain the word segmentation sequence of the customer complaint text; wherein, the initial word segmentation sequence is obtained by segmenting the customer complaint text.

[0100] The text classification unit 42 is used to extract word vectors from the word segmentation sequence of the customer complaint text and input the word vectors into the target text sentiment classification model so that the target text sentiment classification model can use the word vectors to perform classification processing and obtain the classification result of the customer complaint text.

[0101] The specific principles and execution processes of each unit in the customer complaint text classification device disclosed in the above embodiments of the present invention are the same as those in the customer complaint text classification method disclosed in the above embodiments of the present invention. Please refer to the corresponding parts in the customer complaint text classification method disclosed in the above embodiments of the present invention, and they will not be repeated here.

[0102] This invention provides a customer complaint text classification device, which can reconstruct a more accurate and reasonable word segmentation sequence of customer complaint text by using a pre-trained target word segmentation sequence model. Then, the reconstructed word segmentation sequence of customer complaint text is input into a pre-trained target text sentiment classification model. Through the target text sentiment classification model, a more accurate classification result can be obtained by using the reconstructed word segmentation sequence of customer complaint text.

[0103] Optionally, the second recombination unit includes:

[0104] The second recombination subunit is used to input the initial word segmentation sequence of the customer complaint text into the target word segmentation sequence model, so that the target word segmentation sequence model calculates the combination probability corresponding to each word group in the initial word segmentation sequence of the customer complaint text, and combines the words in the word groups with combination probabilities greater than a preset probability threshold to obtain the word segmentation sequence of the customer complaint text; wherein, the word group includes at least two adjacent words.

[0105] This application provides an electronic device, such as... Figure 5 As shown, the electronic device includes a processor 501 and a memory 502. The memory 502 is used to store program code and data for customer complaint text classification model training or customer complaint text classification. The processor 501 is used to call the program instructions in the memory to execute the steps shown in the customer complaint text classification model training method or customer complaint text classification method in the above embodiments.

[0106] This application provides a storage medium including a stored program, wherein, when the program runs, it controls the device where the storage medium is located to execute the customer complaint text classification model training method or the customer complaint text classification method shown in the above embodiments.

[0107] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0108] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0109] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0110] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for training a customer complaint text classification model, characterized in that, The method includes: Obtain multiple historical customer complaint text samples; For each of the historical customer complaint text samples, the historical customer complaint text samples are segmented into words to obtain an initial segmentation sequence; The initial segmented word sequence is recombined using a word segmentation sequence model to obtain the target segmented word sequence; Extract the target word vector corresponding to the target word segmentation sequence, and input the target word vector into the text sentiment classification model to classify the target word vector through the text sentiment classification model. Calculate the classification accuracy between the classification result and the target classification result. At the same time, adjust the parameters of the text sentiment classification model with the goal of making the classification result approach the target classification result, until the text sentiment classification model converges, and obtain the target text sentiment classification model. Updating the parameters of the word segmentation sequence model using the classification accuracy of the historical customer complaint text samples includes: updating the probabilities corresponding to different target word groups with the classification accuracy as a reward, updating different combination probabilities based on the probabilities corresponding to different target word groups, and updating the word segmentation sequence model based on the updated combination probabilities; wherein, updating the probabilities corresponding to different target word groups with the classification accuracy as a reward includes: increasing the probability of good target word groups being selected and decreasing the probability of bad target word groups being selected.

2. The method according to claim 1, characterized in that, The initial word segmentation sequence includes multiple words. The reorganization of the initial word segmentation sequence using a word segmentation sequence model to obtain the target word segmentation sequence includes: The combination probability corresponding to each target word group in the initial word segmentation sequence is calculated using a word segmentation sequence model. The words in the target word groups whose combination probabilities are greater than a preset probability threshold are combined to obtain the target word segmentation sequence; wherein, the target word group includes at least two adjacent words.

3. The method according to claim 1, characterized in that, The word segmentation sequence model is a word segmentation sequence model constructed using the PolicyGradients algorithm.

4. The method according to claim 1, characterized in that, The step of extracting the target word vector corresponding to the target word segmentation sequence includes: The target word vectors corresponding to the target word segmentation sequence are extracted using a word vector extraction model. The word vector extraction model is either the BERT model or the word2vec model.

5. The method according to claim 1, characterized in that, The process of inputting the target word vector into a text sentiment classification model to classify the target word vector using the text sentiment classification model, calculating the classification accuracy between the classification result and the target classification result, and adjusting the parameters of the text sentiment classification model with the goal of the classification result approaching the target classification result, until the text sentiment classification model converges, thus obtaining the target text sentiment classification model, includes: Input the target word vectors into the text sentiment classification model; The target word vector is classified using the text sentiment classification model, and the classification accuracy of the classification result and the target classification result is calculated. A corresponding loss function is constructed based on the classification result and the target classification result. The parameters of the text sentiment classification model are adjusted using the loss function until the text sentiment classification model converges, thus obtaining the target text sentiment classification model.

6. A method for classifying customer complaint texts, characterized in that, The target word segmentation sequence model and the target text sentiment classification model trained by the customer complaint text classification model training method of any one of claims 1-5, the method comprising: The initial word segmentation sequence of the customer complaint text is input into the target word segmentation sequence model, so that the target word segmentation sequence model reorganizes the initial word segmentation sequence of the customer complaint text to obtain the word segmentation sequence of the customer complaint text; wherein, the initial word segmentation sequence is obtained by segmenting the customer complaint text; Extract word vectors from the word segmentation sequence of the customer complaint text, and input the word vectors into the target text sentiment classification model so that the target text sentiment classification model can use the word vectors to perform classification processing and obtain the classification result of the customer complaint text.

7. The method according to claim 6, characterized in that, The step of inputting the initial word segmentation sequence of the customer complaint text into the target word segmentation sequence model, so that the target word segmentation sequence model reorganizes the initial word segmentation sequence to obtain the word segmentation sequence of the customer complaint text, includes: The initial word segmentation sequence of the customer complaint text is input into the target word segmentation sequence model, so that the target word segmentation sequence model calculates the combination probability corresponding to each word group in the initial word segmentation sequence of the customer complaint text. The words in the word groups with combination probabilities greater than a preset probability threshold are combined to obtain the word segmentation sequence of the customer complaint text; wherein, the word group includes at least two adjacent words.

8. A training device for a customer complaint text classification model, characterized in that, The device includes: The historical customer complaint text sample acquisition unit is used to acquire multiple historical customer complaint text samples; The word segmentation processing unit is used to perform word segmentation processing on each of the historical customer complaint text samples to obtain an initial word segmentation sequence. The first recombination unit is used to recombine the initial word segmentation sequence using a word segmentation sequence model to obtain the target word segmentation sequence; The classification accuracy calculation unit is used to extract the target word vector corresponding to the target word segmentation sequence, and input the target word vector into the text sentiment classification model to classify the target word vector through the text sentiment classification model, calculate the classification accuracy between the classification result and the target classification result, and adjust the parameters of the text sentiment classification model with the classification result approaching the target classification result as the training target until the text sentiment classification model reaches convergence, thus obtaining the target text sentiment classification model; The update unit is used to update the parameters of the word segmentation sequence model using the classification accuracy of the historical customer complaint text samples. This includes: updating the probabilities corresponding to different target word groups using the classification accuracy as a reward; updating different combination probabilities based on the probabilities corresponding to different target word groups; and updating the word segmentation sequence model based on the updated combination probabilities. Specifically, updating the probabilities corresponding to different target word groups using the classification accuracy as a reward includes: increasing the probability of good target word groups being selected and decreasing the probability of bad target word groups being selected.

9. A customer complaint text classification device, characterized in that, The target word segmentation sequence model and target text sentiment classification model trained by the customer complaint text classification model training device according to claim 8, wherein the device comprises: The second reorganization unit is used to input the initial word segmentation sequence of the customer complaint text into the target word segmentation sequence model, so that the target word segmentation sequence model reorganizes the initial word segmentation sequence of the customer complaint text to obtain the word segmentation sequence of the customer complaint text; wherein, the initial word segmentation sequence is obtained by segmenting the customer complaint text; The text classification unit is used to extract word vectors from the word segmentation sequence of the customer complaint text, and input the word vectors into the target text sentiment classification model so that the target text sentiment classification model can use the word vectors to perform classification processing and obtain the classification result of the customer complaint text.

10. An electronic device, characterized in that, include: A processor and a memory are connected via a communication bus; wherein the processor is used to call and execute a program stored in the memory; The memory is used to store a program for implementing the customer complaint text classification model training method as described in any one of claims 1-5, or for executing the customer complaint text classification method as described in any one of claims 6-7.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for performing the customer complaint text classification model training method as described in any one of claims 1-5, or for performing the customer complaint text classification method as described in any one of claims 6-7.

Citation Information

Patent Citations

  • Text sentiment classification method based on deep learning combined model

    CN108108351A

  • Keyword extraction method and device, electronic equipment and storage medium

    CN111859940A