A method for constructing a complaint identification model, a complaint identification method and device
The customer complaint identification model built through deep learning, which utilizes a two-layer bidirectional LSTM network and a fully connected layer for matching degree verification, solves the problem of poor timeliness in identifying bank customer complaints, achieves efficient customer complaint handling, and improves customer satisfaction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2023-03-29
- Publication Date
- 2026-06-09
AI Technical Summary
The current technology for identifying bank customer complaints is not timely enough, which requires frequent updates to expert rules and machine learning models, consuming a lot of human and material resources.
A customer complaint identification model is constructed using deep learning methods. The model is trained on customer complaint data through a two-layer bidirectional LSTM network. Layer normalization, data cleaning, filling and masking are combined, and a fully connected layer is used for matching degree verification to build an efficient customer complaint identification model.
This improved the timeliness of customer complaint identification, enabled timely handling of customer complaints, and enhanced customer satisfaction.
Smart Images

Figure CN116383698B_ABST
Abstract
Description
Technical Field
[0001] This article relates to the field of artificial intelligence technology, and in particular to a method for constructing a customer complaint identification model, a customer complaint identification method, and a device. Background Technology
[0002] Customer complaints refer to complaints made by bank customers to the bank. Currently, most banks identify whether a customer complaint is valid by developing expert rules and machine learning models. However, the effectiveness of existing expert rules and machine learning models will decline significantly over time, requiring the continuous development of new expert rules and training of new machine learning models, which consumes a lot of human and material resources.
[0003] There is an urgent need for a method for constructing a customer complaint identification model, a customer complaint identification method, and a device, so as to solve the problem of poor timeliness in identifying customer complaint types in existing technologies. Summary of the Invention
[0004] To address the problems in the prior art, this embodiment provides a method for constructing a customer complaint identification model, a customer complaint identification method, and an apparatus. It enables the identification of customer complaint data through deep learning, which significantly improves the timeliness of identification compared to the existing methods that use expert rules and machine learning models for prediction.
[0005] To solve any of the above-mentioned technical problems, the specific technical solution presented in this paper is as follows:
[0006] On the one hand, the embodiments in this paper provide a method for constructing a customer complaint identification model, including,
[0007] The pre-labeled customer complaint sample set and non-customer complaint sample set are processed by layer normalization to obtain the training dataset;
[0008] The training dataset is input into a two-layer bidirectional LSTM network for training, and the output of each sample in the training dataset is obtained.
[0009] The hidden layer outputs of the last character of each sample in the training dataset are combined to form the first vector;
[0010] The outputs of all samples in the training dataset are subjected to max pooling and average pooling operations along the column dimension to obtain the second vector and the third vector.
[0011] The first vector, the second vector, and the third vector are input into a fully connected layer for training.
[0012] When the matching degree between the output of the fully connected layer and the annotation in the training dataset meets the requirements, the customer complaint recognition model is obtained.
[0013] Furthermore, before inputting the training dataset into the two-layer bidirectional LSTM network for training, the method further includes: cleaning the training dataset.
[0014] Furthermore, the data cleaning includes:
[0015] Samples exceeding the maximum text length of the input to the bidirectional LSTM network are truncated to facilitate the input of the truncated training dataset into the bidirectional LSTM network for training.
[0016] Furthermore, the method also includes:
[0017] For samples whose text length is less than the maximum text length, the content of the samples is padded according to the maximum text length;
[0018] The filled content is masked so that the masked training dataset can be input into a two-layer bidirectional LSTM network for training.
[0019] Furthermore, filling the sample content according to the maximum text length further includes:
[0020] The sample content is then continuously padded with multiple predetermined characters until the text length of the sample after the predetermined characters are padded equals the maximum text length.
[0021] Furthermore, the masking process for the filled content further includes:
[0022] The filled content is marked so that, during the training of the two-layer bidirectional LSTM neural network, the filled content that does not participate in the calculation can be determined based on the marking.
[0023] Furthermore, the data cleaning also includes:
[0024] The training dataset is anonymized so that it can be input into a two-layer bidirectional LSTM network for training.
[0025] Furthermore, the method also includes:
[0026] After each training session on all samples in the training dataset, the accuracy of the customer complaint identification model is calculated based on the output of the fully connected layer and the annotation in the training dataset.
[0027] When the accuracy rate exceeds a preset threshold and is greater than the accuracy rate corresponding to a predetermined number of training sessions, the customer complaint identification model corresponding to that accuracy rate is taken as the final customer complaint identification model.
[0028] Furthermore, calculating the matching degree between the output of the fully connected layer and the annotation results further includes:
[0029] The argmax operation is performed on the output of the fully connected layer to obtain the sample classification of the training dataset;
[0030] Calculate the matching degree between the sample classification and the labeling.
[0031] Based on the same inventive concept, embodiments of the present invention also provide a customer complaint identification method, the method comprising:
[0032] Obtain text data from user feedback;
[0033] The text data is input into the customer complaint identification model obtained in advance using the customer complaint identification model construction method described above, and the customer complaint identification result corresponding to the text data is obtained.
[0034] On the other hand, embodiments of the present invention also provide an apparatus for constructing a customer complaint identification model, the apparatus comprising:
[0035] The sample set normalization processing unit is used to process the pre-labeled customer complaint sample set and non-customer complaint sample set through layer normalization to obtain the training dataset;
[0036] A two-layer bidirectional LSTM network training unit is used to input the training dataset into the two-layer bidirectional LSTM network for training, and to obtain the output of each sample in the training dataset.
[0037] The first vector construction unit is used to form a first vector by taking the hidden layer output of the last character of each sample in the training dataset;
[0038] The pooling processing unit is used to perform max pooling and average pooling operations on the output of all samples in the training dataset in the column dimension to obtain the second vector and the third vector.
[0039] The fully connected layer training unit is used to input the first vector, the second vector, and the third vector into the fully connected layer for training;
[0040] The customer complaint identification model determination unit is used to obtain a customer complaint identification model when the matching degree between the output of the fully connected layer and the annotation in the training dataset meets the requirements.
[0041] Based on the same inventive concept, embodiments of the present invention also provide a customer complaint identification device, the device comprising:
[0042] The customer complaint text acquisition unit is used to acquire text data of user feedback;
[0043] The customer complaint identification unit is used to input the text data into the customer complaint identification model obtained in advance using the customer complaint identification model construction method described above, and to calculate the customer complaint identification result corresponding to the text data.
[0044] On the other hand, embodiments of the present invention also provide a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the above-described method.
[0045] On the other hand, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0046] Finally, this embodiment of the invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method.
[0047] Using the embodiments described in this paper, firstly, historical texts of multiple user feedbacks are labeled to determine whether each text is a customer complaint, resulting in separate customer complaint and non-customer complaint sample sets. Then, layer normalization is performed on both sets to obtain a training dataset. This training dataset is then input into a two-layer bidirectional LSTM network for training, yielding the output for each sample. Since the bidirectional two-layer LSTM network is a recurrent neural network, the hidden layer output of the last character of each sample contains the contextual semantic information of the preceding characters. The hidden layer data of the last character of each sample is used to form the first vector. Then, max pooling and average pooling operations are performed on the column dimensions of the outputs of all samples in the training dataset to obtain the second and third vectors. The second and third vectors are then merged, and the merged vector is input into a fully connected layer for training. The output of the fully connected layer is the result of whether each sample is a customer complaint, which is then matched with the labels of each sample. If the matching degree meets the requirements, each step in the training process is combined to form a customer complaint recognition model. This model is then used to identify user feedback texts and determine whether they constitute customer complaints. The method of this invention enables the analysis of user feedback text to determine whether it constitutes a customer complaint, thus solving the problem of poor timeliness in identifying customer complaints in the prior art, thereby enabling timely handling of customer complaints and improving customer satisfaction. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments or prior art described herein, the accompanying drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this article. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 The figure shown is a schematic diagram of an implementation system for a method of constructing a customer complaint identification model according to an embodiment of the present invention;
[0050] Figure 2 The diagram shown is a flowchart illustrating a method for constructing a customer complaint identification model according to an embodiment of this paper.
[0051] Figure 3 The diagram illustrates the process of filling and masking the sample in this embodiment.
[0052] Figure 4 The diagram illustrates the process of determining the final customer complaint identification model in this embodiment.
[0053] Figure 5 The diagram shown is a structural schematic of a device for constructing a customer complaint identification model in an embodiment of this paper.
[0054] Figure 6 The diagram shown is a flowchart of a customer complaint identification method in this embodiment.
[0055] Figure 7 The diagram shown is a schematic diagram of a customer complaint identification device in an embodiment of this paper.
[0056] Figure 8 The diagram shown is a structural schematic of the computer device in the embodiments of this article.
[0057] [Explanation of Figure Markers]:
[0058] 101. User terminal;
[0059] 102. Server;
[0060] 501. Sample set normalization processing unit;
[0061] 502. Two-layer bidirectional LSTM network training unit;
[0062] 503, First Vector Construction Unit;
[0063] 504. Pooling processing unit;
[0064] 505. Fully connected layer training unit;
[0065] 506. Customer Complaint Identification Model Determination Unit;
[0066] 701. Customer Complaint Text Acquisition Unit;
[0067] 702. Customer Complaint Identification Unit;
[0068] 802. Computer equipment;
[0069] 804. Processing equipment;
[0070] 806. Storage resources;
[0071] 808. Drive mechanism;
[0072] 810. Input / Output Module;
[0073] 812. Input devices;
[0074] 814. Output devices;
[0075] 816. Presentation equipment;
[0076] 818. Graphical User Interface;
[0077] 820. Network interface;
[0078] 822. Communication link;
[0079] 824. Communication bus. Detailed Implementation
[0080] The technical solutions in the embodiments described below will be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments described herein, and not all of the embodiments. Based on the embodiments described herein, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this document.
[0081] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings herein are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0082] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this application all comply with the relevant provisions of national laws and regulations.
[0083] like Figure 1 The diagram illustrates an implementation system for constructing a customer complaint identification model according to an embodiment of the present invention, including a user terminal 101 and a server 102. The user terminal 101 and the server 102 can communicate via a network, which may include a local area network (LAN), a wide area network (WAN), the Internet, or a combination thereof, and is connected to a website, user equipment (e.g., a computing device), and a backend system.
[0084] Server 102 stores multiple historical texts fed back by users through user terminals 101. Server 102 analyzes and trains the historical texts to obtain a customer complaint recognition model, which is then stored. When a user feeds back new text to server 102 through user terminal 101, server 102 uses the customer complaint recognition model to analyze the text fed back by the user to determine whether the text is a customer complaint, so that business personnel can process the customer complaint text in a timely manner and improve the user experience.
[0085] In addition, it should be noted that, Figure 1 The example shown is merely one application environment provided by this disclosure. In practical applications, other application environments may also be included, and this specification does not impose any limitations.
[0086] To address the problems existing in the prior art, this embodiment provides a method for constructing a customer complaint identification model. This method enables the identification of customer complaint data through deep learning, which significantly improves the timeliness of identification compared to the existing methods that use expert rules and machine learning models for prediction. Figure 2 The diagram illustrates a flowchart of a method for constructing a customer complaint identification model according to an embodiment of this paper. The diagram describes the process of training the customer complaint identification model using historical text of customer feedback. The order of steps listed in the embodiment is merely one possible execution order among many and does not represent the only possible execution order. In actual system or device products, the methods shown in the embodiment or the accompanying drawings can be executed sequentially or in parallel. Specifically, as shown... Figure 2 As shown, the method can be executed by server 102 and may include:
[0087] Step 201: The pre-labeled customer complaint sample set and non-customer complaint sample set are processed by layer normalization to obtain the training dataset;
[0088] Step 202: Input the training dataset into a two-layer bidirectional LSTM network for training to obtain the output of each sample in the training dataset;
[0089] Step 203: Combine the hidden layer outputs of the last character of each sample in the training dataset into a first vector;
[0090] Step 204: Perform max pooling and average pooling operations on the column dimensions of the output of all samples in the training dataset to obtain the second vector and the third vector;
[0091] Step 205: Input the first vector, the second vector, and the third vector into the fully connected layer for training;
[0092] Step 206: If the matching degree between the output of the fully connected layer and the annotation in the training dataset meets the requirements, the customer complaint recognition model is obtained.
[0093] Using the embodiments described in this paper, firstly, historical texts of multiple user feedbacks are labeled to determine whether each text is a customer complaint, resulting in separate customer complaint and non-customer complaint sample sets. Then, layer normalization is performed on both sets to obtain a training dataset. This training dataset is then input into a two-layer bidirectional LSTM network for training, yielding the output for each sample. Since the bidirectional two-layer LSTM network is a recurrent neural network, the hidden layer output of the last character of each sample contains the contextual semantic information of the preceding characters. The hidden layer data of the last character of each sample is used to form the first vector. Then, max pooling and average pooling operations are performed on the column dimensions of the outputs of all samples in the training dataset to obtain the second and third vectors. The second and third vectors are then merged, and the merged vector is input into a fully connected layer for training. The output of the fully connected layer is the result of whether each sample is a customer complaint, which is then matched with the labels of each sample. If the matching degree meets the requirements, each step in the training process is combined to form a customer complaint recognition model. This model is then used to identify user feedback texts and determine whether they constitute customer complaints. The method of this invention enables the analysis of user feedback text to determine whether it constitutes a customer complaint, thus solving the problem of poor timeliness in identifying customer complaints in the prior art, thereby enabling timely handling of customer complaints and improving customer satisfaction.
[0094] In this embodiment of the invention, user feedback information is stored in the database in text form, mainly including user requests, details related to the requests, and user identity information. Then, the text data is labeled using regular expressions, keywords, and other methods, dividing it into a customer complaint sample set and a non-customer complaint sample set. Finally, layer normalization is performed on the customer complaint sample set and the non-customer complaint sample set to obtain the training dataset.
[0095] The training dataset is then input into a two-layer bidirectional LSTM network for training. For example, the input to the two-layer bidirectional LSTM network is a three-dimensional vector (batch_size, max_len, 128), where batch_size represents the number of samples in one training iteration, and max_len represents the maximum sample length. The output is also a three-dimensional vector (batch_size, max_len, 128). The hidden layer outputs of the last character of each sample in the training dataset are then used to form the first vector. The hidden layer output corresponding to the last character contains the contextual semantic information of the preceding characters; that is, the hidden layer output of the last character of each sample is a one-dimensional vector of (1, 128), and the dimension of the first vector formed by the hidden layer outputs of the last character of each sample is (batch_size, 128).
[0096] Then, max pooling and average pooling operations are performed on the output (batch_size, max_len, 128) of all samples in the training dataset along the column dimensions. For a single sample, the vector output by the two-layer bidirectional LSTM network has a dimension of (max_len, 128), which can be viewed as a matrix of max_len rows and 128 columns. The column-dimensional operations involve taking the maximum value in each column (max pooling) and taking the average value in each column (average pooling). Both max pooling and average pooling ultimately result in a (1, 128) vector (maximum and average values are applied to each column). For a batch of samples, both max pooling and average pooling result in a vector with a dimension of (batch_size, 128).
[0097] Then, the first, second, and third vectors are merged to obtain a vector of (batch_size, 128*3), which serves as the input to the final fully connected layer. The fully connected layer outputs a vector of (batch_size, 2). After performing an argmax operation, the output category can be determined, thus calculating the predicted labeling for each sample in the training dataset (e.g., 1 represents a customer complaint sample, and 0 represents a non-customer complaint sample). This is then matched with the actual labeling in the training dataset. If the matching degree meets the requirements, a customer complaint identification model is obtained. The customer complaint identification model includes all training steps, and the parameters of each step are the parameters of the customer complaint identification model. For example, the number of samples whose predicted labeling matches the actual labeling can be determined, and the ratio of the number of matching samples to the total number of samples can be calculated. When this ratio exceeds a preset threshold, the customer complaint identification model is determined.
[0098] It should be noted that not all of the training dataset is used for model training; some data is also used to validate the model and calculate its accuracy. The training dataset can be divided into a model training set, a model validation set, and a model test set according to a predetermined ratio. The final customer complaint recognition model can then be trained using the model training set, model validation set, and model test set.
[0099] According to one embodiment of the present invention, before inputting the training dataset into a two-layer bidirectional LSTM network for training, the method further includes: cleaning the training dataset.
[0100] Furthermore, the data cleaning includes: truncating samples that exceed the maximum text length of the input to the two-layer bidirectional LSTM network, so that the truncated training dataset can be input into the two-layer bidirectional LSTM network for training.
[0101] In this embodiment of the invention, samples can be truncated according to the maximum text length `max_len` in the training parameters, for example, only text within the maximum text length `max_len` can be retained for training. Furthermore, text exceeding the maximum text length `max_len` can be used as new samples based on the sample format, provided that it can be determined from the sample format that text exceeding the maximum text length `max_len` can still represent the meaning of the entire sample.
[0102] In some other embodiments of the invention, excessively short texts can be deleted, rare characters in the text can be deleted, and the text can be desensitized, etc., and the embodiments of the invention are not limited thereto. The cleaned text is initialized as a word vector of a specified dimension by a two-layer bidirectional LSTM network and input into the two-layer bidirectional LSTM network for training.
[0103] In this embodiment of the invention, the text length of each batch during the training process may be different. To improve the training speed, according to one embodiment of the invention, such as... Figure 3 As shown, the method further includes:
[0104] Step 301: For samples whose text length is less than the maximum text length, fill the content of the samples according to the maximum text length;
[0105] Step 302: Mask the filled content so that the masked training dataset can be input into the two-layer bidirectional LSTM network for training.
[0106] In this embodiment of the invention, samples whose text length is less than the maximum text length are padded with the maximum text length, for example, by filling them with multiple "0" values, before calculation. Compared to processing multiple texts of different lengths, this avoids the inability to perform parallel calculations due to different lengths, thereby reducing unnecessary gradient calculations. Multiple texts can be processed in parallel, accelerating the training speed. Furthermore, the padded values are masked, and the masked values do not participate in the calculation, thus avoiding the impact of the padded values on the training model.
[0107] According to one embodiment of the present invention, filling the content of the sample according to the maximum text length further includes:
[0108] The sample content is then continuously padded with multiple predetermined characters until the text length of the sample after the predetermined characters are padded equals the maximum text length.
[0109] According to one embodiment of the present invention, the masking process for the filled content further includes:
[0110] The filled content is marked so that, during the training of the two-layer bidirectional LSTM neural network, the filled content that does not participate in the calculation can be determined based on the marking.
[0111] It should be noted that other methods can also be used for filling and masking, and this manual does not impose any restrictions.
[0112] According to one embodiment of the present invention, in order to determine the most accurate customer complaint identification model, such as Figure 4 As shown, the method further includes:
[0113] Step 401: After training all samples in the training dataset once, calculate the accuracy of the customer complaint recognition model based on the output of the fully connected layer and the annotation in the training dataset;
[0114] Step 402: When the accuracy exceeds a preset threshold and is greater than the accuracy corresponding to the previous and subsequent predetermined training sessions, the customer complaint identification model corresponding to that accuracy is taken as the final customer complaint identification model.
[0115] In this embodiment of the invention, after training all training samples once (one epoch), the accuracy of the validation set (samples not involved in training) is calculated once. If the accuracy exceeds a preset threshold and is greater than the accuracy corresponding to the predetermined number of training iterations, the customer complaint identification model corresponding to that accuracy is taken as the final customer complaint identification model.
[0116] The number of pre- and post-training iterations can be set according to actual needs, such as one pre- and post-training iteration. Alternatively, rules can be set, such as setting the number of pre-training iterations such that if the accuracy of the last training iteration is still greater than the accuracy of the previous training iteration after a set number of iterations has been reached, then the number of pre-training iterations for the post- and post-training iterations is 0, and no further training is performed. The customer complaint recognition model from the last training iteration is then used as the final model.
[0117] pass Figure 4 The method shown ensures that the accuracy of the trained model is optimal.
[0118] Based on the same inventive concept, embodiments of the present invention also provide an apparatus for constructing a customer complaint identification model, such as... Figure 5 As shown, it includes:
[0119] The sample set normalization processing unit 501 is used to process the pre-labeled customer complaint sample set and non-customer complaint sample set through layer normalization to obtain the training dataset.
[0120] The dual-layer bidirectional LSTM network training unit 502 is used to input the training dataset into the dual-layer bidirectional LSTM network for training, and to obtain the output of each sample in the training dataset.
[0121] The first vector construction unit 503 is used to form a first vector by taking the hidden layer output of the last character of each sample in the training dataset;
[0122] Pooling processing unit 504 is used to perform max pooling and average pooling operations on the output of all samples in the training dataset in the column dimension to obtain the second vector and the third vector.
[0123] The fully connected layer training unit 505 is used to input the first vector, the second vector, and the third vector into the fully connected layer for training;
[0124] The customer complaint identification model determination unit 506 is used to obtain a customer complaint identification model when the matching degree between the output result of the fully connected layer and the annotation in the training dataset meets the requirements.
[0125] Since the principle of the above-mentioned device in solving the problem is similar to that of the above-mentioned method, the implementation of the above-mentioned device can refer to the implementation of the above-mentioned method, and the repeated parts will not be described again.
[0126] Based on the same inventive concept, embodiments of the present invention also provide a customer complaint identification method, such as... Figure 6 As shown, the method includes:
[0127] Step 601: Obtain text data from user feedback;
[0128] Step 602: Input the text data into the customer complaint identification model obtained in advance using the customer complaint identification model construction method described above, and calculate to obtain the customer complaint identification result corresponding to the text data.
[0129] For example, the customer complaint identification model can be run at set intervals to predict whether text data generated within the specified time interval is a customer complaint. If it is, the business personnel are notified to handle it. All raw customer complaint data, cleaned data, and model prediction results input into the model are saved to the database for future data traceability.
[0130] Based on the same inventive concept, embodiments of the present invention also provide a customer complaint identification device, such as... Figure 7 As shown, the device includes:
[0131] Customer complaint text acquisition unit 701 is used to acquire text data of user feedback;
[0132] The customer complaint identification unit 702 is used to input the text data into the customer complaint identification model obtained in advance using the above-described method for constructing the customer complaint identification model, and to calculate the customer complaint identification result corresponding to the text data.
[0133] Since the principle of the above-mentioned device in solving the problem is similar to that of the above-mentioned method, the implementation of the above-mentioned device can refer to the implementation of the above-mentioned method, and the repeated parts will not be described again.
[0134] like Figure 8The diagram illustrates the structure of a computer device according to an embodiment of the present invention. The apparatus in this invention can be the computer device described in this embodiment, executing the method of the present invention as described above. The computer device 802 may include one or more processing devices 804, such as one or more central processing units (CPUs), each of which can implement one or more hardware threads. The computer device 802 may also include any storage resource 806 for storing information of any kind, such as code, settings, data, etc. Non-limitingly, for example, the storage resource 806 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory, hard disk, optical disk, etc. More generally, any storage resource can use any technology to store information. Further, any storage resource can provide volatile or non-volatile retention of information. Further, any storage resource can represent a fixed or removable component of the computer device 802. In one case, when the processing device 804 executes associated instructions stored in any storage resource or combination of storage resources, the computer device 802 can perform any operation of the associated instructions. The computer device 802 also includes one or more drive mechanisms 808 for interacting with any storage resource, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.
[0135] Computer device 802 may also include an input / output module 810 (I / O) for receiving various inputs (via input device 812) and providing various outputs (via output device 814). A specific output mechanism may include a presentation device 816 and an associated graphical user interface (GUI) 818. In other embodiments, the input / output module 810 (I / O), input device 812, and output device 814 may be omitted, and the device may function solely as a computer device within a network. Computer device 802 may also include one or more network interfaces 820 for exchanging data with other devices via one or more communication links 822. One or more communication buses 824 couple the components described above together.
[0136] Communication link 822 can be implemented in any way, such as via a local area network, a wide area network (e.g., the Internet), a point-to-point connection, or any combination thereof. Communication link 822 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
[0137] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0138] This embodiment also provides a computer-readable instruction, wherein when a processor executes the instruction, the program therein causes the processor to perform the above-described method.
[0139] It should be understood that in the various embodiments of this document, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.
[0140] It should also be understood that, in the embodiments herein, the term "and / or" is merely a description of the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following associated objects have an "or" relationship.
[0141] Those skilled in the art will 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 implementation should not be considered beyond the scope of this document.
[0142] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0143] In the embodiments provided herein, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, devices, or units, or they may be electrical, mechanical, or other forms of connection.
[0144] 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 units can be selected to achieve the purpose of the embodiments described herein, depending on actual needs.
[0145] Furthermore, the functional units in the various embodiments of this document can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0146] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this paper, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this paper. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0147] This document uses specific embodiments to illustrate the principles and implementation methods of this document. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this document. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this document. Therefore, the content of this specification should not be construed as a limitation of this document.
Claims
1. A method for constructing a customer complaint identification model, characterized in that, The method includes: The pre-labeled customer complaint sample set and non-customer complaint sample set are processed by layer normalization to obtain the training dataset; The training dataset is input into a two-layer bidirectional LSTM network for training, and the output of each sample in the training dataset is obtained. The hidden layer outputs of the last character of each sample in the training dataset are combined to form a first vector; wherein the hidden layer output of the last character contains the contextual semantic information of the preceding characters; The outputs of all samples in the training dataset are subjected to max pooling and average pooling operations along the column dimension to obtain the second vector and the third vector. The first vector, the second vector, and the third vector are input into a fully connected layer for training. When the matching degree between the output of the fully connected layer and the annotation in the training dataset meets the requirements, the customer complaint identification model is obtained. The method further includes: After each training session on all samples in the training dataset, the accuracy of the customer complaint identification model is calculated based on the output of the fully connected layer and the annotation in the training dataset. When the accuracy rate exceeds a preset threshold and is greater than the accuracy rate corresponding to a predetermined number of training sessions, the customer complaint identification model corresponding to that accuracy rate is taken as the final customer complaint identification model.
2. The method according to claim 1, characterized in that, Before inputting the training dataset into the two-layer bidirectional LSTM network for training, the method further includes: cleaning the training dataset.
3. The method according to claim 2, characterized in that, The data cleaning includes: Samples exceeding the maximum text length of the input to the bidirectional LSTM network are truncated to facilitate the input of the truncated training dataset into the bidirectional LSTM network for training.
4. The method according to claim 3, characterized in that, The method further includes: For samples whose text length is less than the maximum text length, the content of the samples is padded according to the maximum text length; The filled content is masked so that the masked training dataset can be input into a two-layer bidirectional LSTM network for training.
5. The method according to claim 4, characterized in that, Filling the sample content according to the maximum text length further includes: The sample content is then continuously padded with multiple predetermined characters until the text length of the sample after the predetermined characters are padded equals the maximum text length.
6. The method according to claim 4, characterized in that, Masking the filled content further includes: The filled content is marked so that, during the training of the two-layer bidirectional LSTM neural network, the filled content that does not participate in the calculation can be determined based on the marking.
7. The method according to claim 2, characterized in that, The data cleaning also includes: The training dataset is anonymized so that it can be input into a two-layer bidirectional LSTM network for training.
8. The method according to claim 1, characterized in that, Calculating the matching degree between the output of the fully connected layer and the annotation results further includes: The argmax operation is performed on the output of the fully connected layer to obtain the sample classification of the training dataset; Calculate the matching degree between the sample classification and the labeling.
9. A method for identifying customer complaints, characterized in that, The method includes: Obtain text data from user feedback; The text data is input into the customer complaint identification model obtained in advance using any one of claims 1-8 to perform calculations, thereby obtaining the customer complaint identification result corresponding to the text data.
10. A device for constructing a customer complaint identification model, characterized in that, The device includes: The sample set normalization processing unit is used to process the pre-labeled customer complaint sample set and non-customer complaint sample set through layer normalization to obtain the training dataset; A two-layer bidirectional LSTM network training unit is used to input the training dataset into the two-layer bidirectional LSTM network for training, and to obtain the output of each sample in the training dataset. The first vector construction unit is used to form a first vector from the hidden layer output of the last character of each sample in the training dataset; wherein the hidden layer output of the last character contains the contextual semantic information of the preceding characters; The pooling processing unit is used to perform max pooling and average pooling operations on the output of all samples in the training dataset in the column dimension to obtain the second vector and the third vector. The fully connected layer training unit is used to input the first vector, the second vector, and the third vector into the fully connected layer for training; The customer complaint identification model determination unit is used to obtain the customer complaint identification model when the matching degree between the output of the fully connected layer and the annotation in the training dataset meets the requirements. The device is also used for: After each training session on all samples in the training dataset, the accuracy of the customer complaint identification model is calculated based on the output of the fully connected layer and the annotation in the training dataset. When the accuracy rate exceeds a preset threshold and is greater than the accuracy rate corresponding to a predetermined number of training sessions, the customer complaint identification model corresponding to that accuracy rate is taken as the final customer complaint identification model.
11. A customer complaint identification device, characterized in that, The device includes: The customer complaint text acquisition unit is used to acquire text data of user feedback; The customer complaint identification unit is used to input the text data into the customer complaint identification model obtained in advance using any one of claims 1-8 to calculate and obtain the customer complaint identification result corresponding to the text data.
12. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 9.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 9.
14. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 9.