Large-scale text data cleaning and labeling method for intelligent customer service system
By dividing long text data into modules and performing targeted cleaning and labeling, the sample deterioration problem caused by independent text data cleaning and labeling processes is solved, and more efficient intelligent labeling accuracy is achieved.
Patent Information
- Application Number
- CN202510529485.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-15
AI Technical Summary
In the prior art, the cleaning process of text data is independent of the intelligent annotation process and is not targeted, resulting in sample data deterioration and labeling errors, and it is impossible to effectively distinguish different types of text data, affecting the accuracy of intelligent annotation.
The data cleaning unit is used to divide the long text data into multiple text data modules, and the applicable type is determined through the allocation model, and assigned to the corresponding cleaning submodule for targeted cleaning. It is intelligently annotated with BERT, Bi-LSTM and CRF models to generate text samples.
Improve the accuracy and pertinence of intelligent labeling, ensure that the text data module is suitable for the correct labeling type, and reduce the possibility of incorrect labeling.
Smart Images

Figure CN120492799A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of text processing technology, and in particular to a large-scale text data cleaning and annotation method for an intelligent customer service system. Technical Background
[0002] To train the language model in the intelligent customer service system, annotated text samples are required. For example, to train a language model for sentiment analysis, text samples must be labeled with corresponding sentiment categories, such as optimism and pessimism. Another example is to train a language model for analyzing user intent, text samples must be labeled with corresponding intent categories, such as "want to trade electricity" and "need to provide electricity-related consultation."
[0003] To save labor costs, intelligent annotation technology has been applied to generate text samples by annotating text data using artificial intelligence-based annotation models. This allows intelligent annotation of large-scale text data after acquisition.
[0004] In existing technologies, the text data cleaning process and the intelligent annotation of text data are independent processes. Typically, acquired text data is first cleaned and stored. When the cleaned text data needs to be annotated, the stored text data is read and input into an AI-based intelligent annotation model for intelligent annotation. Furthermore, different types of intelligent annotation models are also required when annotating text data. For example, an emotion annotation model can be used to annotate text data with emotion categories, or an intent annotation model can be used to annotate text data with intent categories.
[0005] However, the text data suitable for labeling by various types of intelligent labeling models are usually different. For example, text data suitable for labeling emotion categories by emotion labeling models and text data suitable for labeling intent categories by intent labeling models are often different. In other words, not all data are suitable for labeling emotion categories by emotion labeling models; similarly, not all data are suitable for labeling emotion categories by emotion labeling models. Therefore, the existing technical solutions indiscriminately label all text data using various types of intelligent labeling models, which will cause the degradation of sample data. For example, if all text data are labeled with emotion categories using emotion labeling models, then the wrong emotion categories may be labeled for unsuitable text data, resulting in incorrect emotion text samples.
[0006] Furthermore, the text data used for different types of intelligent labeling models requires different emphases during data cleaning. For example, for text data used to label emotion categories, data cleaning focuses more on standardizing the expression of emotion-related terms; whereas, for text data used to label intent categories, data cleaning focuses more on standardizing the expression of intent-related terms. However, in reality, when acquiring text data, it is often unknown what type of labeling the text data is used for, so targeted data cleaning cannot be performed. Furthermore, the acquired text data may very well be an article that includes multiple sentences or paragraphs suitable for different types of category labeling. For example, the article may include sentences suitable for labeling emotion categories as well as sentences suitable for labeling intent categories. In this case, it is even more difficult to perform targeted cleaning of the acquired text data. Consequently, this is not conducive to the accurate implementation of subsequent intelligent labeling. Summary of the Invention
[0007] The present invention provides training samples for the language model of the customer service system and provides a large-scale text data cleaning and annotation method for the intelligent customer service system. The units involved include: a data cleaning unit and an intelligent annotation unit;
[0008] The data cleaning unit is used to clean the long text data; the intelligent tagging unit is used to read the text data cleaned by the data cleaning unit, add category tags to the cleaned text data, and generate text samples;
[0009] The data cleaning unit includes: a preprocessing module, a data allocation module, a data cleaning module and a data storage module; the preprocessing module is used to preprocess the long text data to be cleaned; the data allocation module receives the text data module set {S i}, i ranges from 1 to m; the data allocation module includes m allocation models, the data cleaning module includes m cleaning submodules; the intelligent labeling unit includes m intelligent labeling models; wherein different allocation models and cleaning submodules correspond to different types of intelligent labeling models in the intelligent labeling unit;
[0010] The distribution model is based on the BERT+FN layer+FC layer+two-classification architecture.
[0011] The intelligent tagging model includes: embedding layer, BERT, Bi-LSTM and CRF;
[0012] The method includes the following steps:
[0013] S100: The pre-processing module divides the long text data into multiple different sentences, or divides the text data into multiple different commas. The multiple different sentences or commas can be regarded as a long text, which is recorded as:
[0014] P={S1,S2,...,S i ,...,S n};
[0015] Among them, P stands for long text, S i Represents the text data module obtained by segmenting the long text P;
[0016] S200: The data distribution module receives the text data modules S1 to S2 obtained by segmentation by the pre-processing module. n , for text data module S1 to text data module S n Different intelligent allocation models correspond to different types of intelligent annotation models. The allocation model is for text data modules S1~S n Determine one by one and assign the text data modules suitable for the intelligent annotation model to the cleaning submodules corresponding to the intelligent annotation model in the data cleaning layer;
[0017] S300: Text data module S i Each word is input into the embedding layer and converted into the corresponding word vector; the word vector is input into BERT and converted into a semantic feature vector that combines the contextual semantics; the semantic feature vector is input into the FC layer and then into the binary classification layer; the binary classification layer outputs two probability values Q1 and Q2, where the probability value Q1 is the probability of determining that the text data module is suitable for the annotation type corresponding to the allocation model, and the probability value Q2 is the probability of determining that the text data module is not suitable for the annotation type corresponding to the allocation model.
[0018] S400: For each text data module S of the long text j , the allocation model will determine whether it is suitable for the corresponding annotation type to be annotated. If it is determined that it is suitable for the corresponding annotation type to be annotated, it will be assigned to the corresponding cleaning submodule; in the data cleaning module, after receiving the text data module assigned by the corresponding allocation model, each cleaning submodule performs data cleaning on the assigned text data module according to the corresponding data cleaning rules;
[0019] S500: Each cleaning submodule transfers the cleaned text data module to a corresponding storage area in the data storage module;
[0020] S600: The intelligent annotation unit includes m intelligent annotation models; the intelligent annotation model obtains the corresponding cleaned text data module from the corresponding storage area, and annotates the text data module to generate a corresponding text sample.
[0021] Preferably, in said S600, the text data module S iEach word is input into the embedding layer and converted into the corresponding word vector; the word vector is input into BERT and converted into a semantic feature vector that combines the contextual semantics; it is further converted into a semantic feature vector with memory through Bi-LSTM; the semantic feature vector with memory is input into the CRF layer to obtain probability information indicating the probability of different label categories; the text data module S is realized i Intelligent labeling.
[0022] Preferably, the storage area stores text data modules in the form of a stack.
[0023] The advantages of the present invention over the prior art are as follows:
[0024] (1) Each allocation model of the data cleaning unit of the present invention determines the text data modules one by one, and allocates the text data modules suitable for the corresponding intelligent annotation model to the corresponding cleaning sub-module in the data cleaning module; different cleaning rules can be used to clean the text data modules used for different types of intelligent annotation models; the accuracy of annotation by the intelligent annotation model can be improved.
[0025] (2) The data cleaning unit of the present invention cuts the long text data into multiple text data modules, allocates them to matching cleaning submodules based on the determination of the allocation model for data cleaning, and inputs them into the matching intelligent annotation model for annotation, thereby achieving more accurate annotation of the long text data. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is a hardware structure diagram of a large-scale text data cleaning and annotation method for an intelligent customer service system in an embodiment of the present invention.
[0027] Figure 2 3 is a process diagram of a large-scale text data cleaning and annotation method S300 for an intelligent customer service system in an embodiment of the present invention.
[0028] Figure 3 3 is a process diagram of a large-scale text data cleaning and annotation method S600 for an intelligent customer service system in an embodiment of the present invention. DETAILED DESCRIPTION
[0029] comparison Figure 1 The data cleaning and labeling unit includes: a data cleaning unit structure and an intelligent labeling unit; wherein, the data cleaning unit is used to clean long text data, which can be an article or a piece of news, etc.; the intelligent labeling unit is used to read the text data cleaned by the data cleaning layer, and add category labels to the cleaned text data to generate text samples.
[0030] The data cleaning unit is divided into four modules, namely: pre-processing module, data allocation module, data cleaning module and data storage module.
[0031] The preprocessing module is used to preprocess the long text data to be cleaned, dividing the long text data into multiple different sentences, or dividing the text data into multiple different commas, so that multiple different sentences or commas can be regarded as a text data module set, recorded as:
[0032] P={S1,S2,S3,...,S n};
[0033] Among them, P represents long text, S1~S n Represents the text data module obtained by segmenting the long text P;
[0034] The data distribution module receives the text data modules S1 to S1 obtained by the pre-processing module. n , allocate the text data module; specifically, Figure 1 The data allocation module includes m allocation models, and the data cleaning layer includes m cleaning sub-modules, wherein allocation model 1 to allocation model m and cleaning sub-module 1 to cleaning sub-module m correspond to different types of intelligent labeling models respectively.
[0035] For example, assignment model 1 corresponds to intelligent tagging model 1 for tagging emotion categories, and assignment model 2 corresponds to intelligent tagging model 2 for tagging intent categories. Similarly, different intelligent assignment models correspond to different types of intelligent tagging models, and are thus used to assign text data modules to different types of intelligent tagging models.
[0036] For example, the distribution model 1 is for text data modules S1 to S2. n Determine one by one and assign the text data module applicable to the intelligent annotation model 1 to the cleaning submodule 1 in the data cleaning module corresponding to the intelligent annotation model 1. n Determine one by one and assign the text data module applicable to the intelligent annotation model 2 to the cleaning submodule 2 corresponding to the intelligent annotation model 2 in the data cleaning module. n Determine one by one and assign the text data module applicable to the intelligent annotation model m to the cleaning submodule m corresponding to the intelligent annotation model m in the data cleaning module.
[0037] Among them, the allocation model can be an allocation model based on BERT+FN layer+FC layer+two-classification architecture, and its structure diagram is as follows Figure 2 As shown. Text data module Si Each word is input into the embedding layer and converted into the corresponding word vector. Each word vector is input into BERT and converted into a semantic feature vector that combines the contextual semantics. Each semantic feature vector is input into the FC layer and then into the binary classification layer.
[0038] The binary classification layer outputs two probability values Q1 and Q2, where the probability value Q1 is the probability of judging the text data module S as suitable for the annotation type corresponding to the allocation model; the probability value Q2 is the probability of judging the text data module S as unsuitable for the annotation type corresponding to the allocation model.
[0039] Therefore, for each text data module S of the long text data P j , the allocation model i will determine whether it is suitable for the corresponding annotation type to be labeled, and then if it is determined that it is suitable for the corresponding annotation type to be labeled, it will be allocated to the corresponding cleaning sub-module i. Figure 1 shown.
[0040] In the data cleaning module, after receiving the text data module allocated by the corresponding allocation model i, the cleaning submodule i performs data cleaning on the allocated text data module according to the corresponding data cleaning rules.
[0041] For example, cleaning submodule 1 corresponds to intelligent labeling model 1 for labeling emotion categories, and therefore, during data cleaning, it focuses more on standardizing the expression of emotion-related terms; cleaning submodule 2 corresponds to intelligent labeling model 2 for labeling intent categories, and therefore, during data cleaning, it focuses more on standardizing the expression of intent-related terms. And so on.
[0042] Then, each cleaning submodule transfers the cleaned text data module to a corresponding storage area in the data storage layer. The storage area stores the text data module in the form of a stack.
[0043] The intelligent annotation unit also includes m intelligent annotation models. Intelligent annotation model 1 to intelligent annotation model m obtain the corresponding cleaned text data modules from the corresponding storage areas 1 to storage areas m, and annotate the text data modules to generate corresponding text samples.
[0044] The intelligent annotation model can adopt the intelligent annotation model known in the prior art, such as Figure 3 Structure, intelligent labeling model includes: embedding layer, BERT, Bi-LSTM and CRF. Data module S iEach word is input into the embedding layer and converted into a corresponding word vector; each word vector is input into BERT and converted into a semantic feature vector that combines the contextual semantics, and is further converted into a semantic feature vector with memory through Bi-LSTM; the semantic feature vector with memory is input into the CRF layer to obtain probability information indicating the probability of different label categories. In this way, the text data module S is realized. i Intelligent labeling.
Claims
1. A large-scale text data cleaning and annotation method for an intelligent customer service system, characterized in that: The units involved include: data cleaning unit and intelligent labeling unit; The data cleaning unit is used to clean the long text data; the intelligent tagging unit is used to read the text data cleaned by the data cleaning unit, add category tags to the cleaned text data, and generate text samples; The data cleaning unit includes: a preprocessing module, a data allocation module, a data cleaning module and a data storage module; the preprocessing module is used to preprocess the long text data to be cleaned; the data allocation module receives the text data module set {S i }, i ranges from 1 to m; the data allocation module includes m allocation models, the data cleaning module includes m cleaning submodules; the intelligent labeling unit includes m intelligent labeling models; different allocation models and cleaning submodules correspond to different types of intelligent labeling models in the intelligent labeling unit; The distribution model is based on the BERT+FN layer+FC layer+two-classification architecture. The intelligent tagging model includes: embedding layer, BERT, Bi-LSTM and CRF; The method includes the following steps: S100: The pre-processing module divides the long text data into multiple different sentences, or divides the text data into multiple different commas. The multiple different sentences or commas can be regarded as a long text, which is recorded as: P={S1,S2,...,S i ,...,S n }; Among them, P stands for long text, S i Represents the text data module obtained by segmenting the long text P; S200: The data distribution module receives the text data modules S1 to S2 obtained by segmentation by the pre-processing module. n , for text data module S1 to text data module S n Different intelligent allocation models correspond to different types of intelligent annotation models. The allocation model is for text data modules S1~S n Determine one by one and assign the text data modules suitable for the intelligent annotation model to the cleaning submodules corresponding to the intelligent annotation model in the data cleaning layer; S300: Text data module S i Each word is input into the embedding layer and converted into the corresponding word vector; the word vector is input into BERT and converted into a semantic feature vector that combines the contextual semantics; the semantic feature vector is input into the FC layer and then into the binary classification layer; the binary classification layer outputs two probability values Q1 and Q2, where the probability value Q1 is the probability of determining that the text data module is suitable for the annotation type corresponding to the allocation model, and the probability value Q2 is the probability of determining that the text data module is not suitable for the annotation type corresponding to the allocation model. S400: For each text data module S of the long text j , the allocation model will determine whether it is suitable for the corresponding annotation type to be annotated. If it is determined that it is suitable for the corresponding annotation type to be annotated, it will be assigned to the corresponding cleaning submodule; in the data cleaning module, after receiving the text data module assigned by the corresponding allocation model, each cleaning submodule performs data cleaning on the assigned text data module according to the corresponding data cleaning rules; S500: Each cleaning submodule transfers the cleaned text data module to a corresponding storage area in the data storage module; S600: The intelligent annotation unit includes m intelligent annotation models; the intelligent annotation model obtains the corresponding cleaned text data module from the corresponding storage area, and annotates the text data module to generate a corresponding text sample.
2. A large-scale text data cleaning and annotation method for an intelligent customer service system according to claim 1, characterized in that: In the above S600, the text data module S i Each word is input into the embedding layer and converted into the corresponding word vector; the word vector is input into BERT and converted into a semantic feature vector that combines the contextual semantics; go through Bi-LSTM is further converted into a semantic feature vector with memory; The semantic feature vector with memory is input to the CRF layer to obtain the probability information indicating the probability of different annotation categories; the text data module S i Intelligent labeling.
3. A large-scale text data cleaning and annotation method for an intelligent customer service system according to claim 1 or 2, characterized in that: The storage area stores text data modules in the form of a stack.