Complaint item repetition determination method and device

By pre-processing the complaints and integrating text features and structured features using the Bert model, the duplication score of the complaints is calculated, which solves the problem of inefficient repetition judgment of complaints in the prior art, and achieves more efficient and accurate duplication judgments.

CN119669819APending Publication Date: 2025-03-21AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411716880.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The prior art relies on structured features in repeated judgments of complaints, resulting in incomplete and accurate judgment results, increasing the workload of staff, and inefficient judgments, making misjudgments prone to misjudgments.

Method used

By obtaining multiple complaints, pre-processing them, the target complaint is input into the pre-trained Bert model. The Bert model integrates text features and structured features based on the dual attention module, calculates the duplication score of the complaint, and determines whether it is greater than the preset threshold to determine whether it is a duplicate complaint.

Benefits of technology

It improves the efficiency and accuracy of repeated judgments of complaints, reduces the need for manual judgments, and enhances the system's automated judgment capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669819A_ABST
    Figure CN119669819A_ABST
Patent Text Reader

Abstract

The invention discloses a complaint copy repetition determination method and device. The method comprises the following steps: acquiring a plurality of complaint copies; preprocessing each complaint document to obtain a target complaint document corresponding to each complaint document; inputting all the target complaint documents into a pre-trained Bert model to obtain a feature combination corresponding to each target complaint document; for each target complaint document, calculating a repetition score of the target complaint document according to the feature combination corresponding to the target complaint document; and judging whether the repeated score of the target complaint document is greater than a preset threshold, and if the repeated score of the target complaint document is greater than the preset threshold, determining that the target complaint document is a repeated complaint document. Therefore, through the feature combination output by the Bert model, scores input into the complaint document and the feature set are comprehensively calculated, the repeated judgment result of the complaint document is determined by means of the scores, manual judgment is not needed any more, and then the repeated judgment efficiency and the repeated judgment accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of complaint data processing, and in particular to a method and device for determining duplication of complaints. Background Art

[0002] Complaints usually reflect the problems or dissatisfaction encountered by customers during the banking service process. Timely handling of complaints can help banks improve service quality. If complaints with the same content are handled repeatedly, the processing efficiency will be reduced. Therefore, it is particularly important to repeatedly judge complaints.

[0003] In the existing technology, complaints are first classified and recorded according to national standards (such as complaint classification, problem attributes, whether it involves law or litigation, letter address, and letter writer information). Then, the classified complaints are structured, and then the structured information is used to build a feature library for repeated judgment of complaints. The weights of different structured features are determined based on the staff's experience and knowledge, so that when a complaint is entered, the system can automatically use the traditional method of statistical analysis (PCA) to determine the duplication of the current entry and the historical ones.

[0004] However, in addition to structured information, the complaint's demands are mainly described in the content information. Other attachments (including the original complaint, handling methods, etc.) are also reflected in the content information. Therefore, content information is the key to complaint identification. If the duplicate identification results are completely dependent on structured features, the duplicate identification results obtained are often not complete and accurate. The staff also need to manually identify the similarities in the text content based on the system's duplicate identification results, which increases the staff's workload, and the duplicate identification efficiency is low, and it is also prone to misjudgment. Summary of the invention

[0005] Based on the above-mentioned deficiencies of the prior art, the present application provides a method and device for duplication determination of complaint pieces to solve the problem of low duplication determination efficiency brought about by the prior art.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] The first aspect of the present application provides a method for determining duplication of a complaint, comprising:

[0008] Get multiple complaints;

[0009] Pre-processing each of the complaints to obtain a target complaint corresponding to each of the complaints;

[0010] Input all the target complaints into a pre-trained Bert model to obtain the feature combination corresponding to each target complaint; wherein the Bert model integrates text features and structured features based on a dual attention module to obtain the feature combination; the Bert model is pre-trained using text content data corresponding to multiple sample complaints;

[0011] For each of the target complaints, respectively, calculate the repetition score of the target complaint according to the feature combination corresponding to the target complaint;

[0012] Determine whether the repetition score of the target complaint is greater than a preset threshold;

[0013] If the duplication score of the target complaint is greater than the preset threshold, the target complaint is determined to be a duplicate complaint.

[0014] Optionally, in the above-mentioned method for determining duplication of complaints, the preprocessing of each complaint to obtain a target complaint corresponding to each complaint includes:

[0015] Performing cleaning processing on each of the complaint pieces to obtain each cleaned complaint piece;

[0016] The word segmentation technology is used to perform word segmentation processing on each of the cleaning complaints to obtain the target complaint corresponding to each of the complaints.

[0017] Optionally, in the above-mentioned method for determining the duplication of complaints, the training method of the Bert model includes:

[0018] Obtain text content data corresponding to multiple sample complaints from a database;

[0019] Preprocessing each of the text content data to obtain target text content data corresponding to each of the text content data;

[0020] Inputting the target text content data corresponding to each of the text content data into the Bert model to obtain a feature combination corresponding to each of the text content data;

[0021] Calculating an average value of the feature combination corresponding to each of the text content data;

[0022] Determine whether the average value is greater than a preset threshold;

[0023] If the average value is greater than a preset threshold, the Bert model is determined to be a trained Bert model;

[0024] If the average value is not greater than the preset threshold, the parameters of the Bert model are adjusted, and the process of inputting the target text content data corresponding to each of the text content data into the Bert model is returned to obtain the feature combination corresponding to each of the text content data.

[0025] Optionally, in the above-mentioned method for determining the duplication of complaints, the Bert model includes a masking language module, a masking language module, a bidirectional self-attention mechanism module, a structuring module, and a dual attention module, and all the target complaints are input into a pre-trained Bert model to obtain a feature combination corresponding to each of the target complaints, including:

[0026] For all the target complaints, the masked language module is used to perform word segmentation processing on the target complaints to obtain a word segmentation text sequence corresponding to the target complaints;

[0027] Perform sentence learning on the word segmentation text sequence corresponding to the target complaint by the masked language module to obtain the sentence sequence corresponding to the target complaint;

[0028] Perform feature extraction on the sentence sequence through the bidirectional self-attention mechanism module to obtain a sequence vector;

[0029] Converting the target complaint into a structured vector through a structured module;

[0030] The sequence vector is classified and weighted by the self-attention module in the dual attention module to obtain a weighted sequence vector, and the structured vector is classified and weighted by the cross-attention module in the dual attention module to obtain a weighted structured vector;

[0031] Calculating the loss function of the weighted sequence vector and the loss function of the weighted structured vector through the cross entropy loss function of the dual attention module;

[0032] The loss function of the weighted sequence vector and the sum of the loss function of the weighted structured vector are calculated through the cross entropy loss function of the dual attention module to obtain a feature vector, and the feature vector is determined as the feature combination corresponding to the target complaint.

[0033] Optionally, in the above-mentioned method for determining duplication of complaints, for each of the target complaints, calculating the duplication score of the target complaint according to the feature combination corresponding to the target complaint, includes:

[0034] Obtain the number of times each of the feature combinations is displayed in the corresponding target complaint;

[0035] Calculating the sum of all the display times;

[0036] For each of the target complaints, the number of times the feature combination corresponding to the target complaint is displayed is divided by the sum to obtain the repetition score of the target complaint.

[0037] The second aspect of the present application provides a device for determining duplication of a complaint, comprising:

[0038] A complaint acquisition unit, used for acquiring multiple complaint files;

[0039] A preprocessing unit, used for preprocessing each of the complaints to obtain a target complaint corresponding to each of the complaints;

[0040] A data input unit is used to input all the target complaints into a pre-trained Bert model to obtain a feature combination corresponding to each target complaint; wherein the Bert model integrates text features and structured features based on a dual attention module to obtain a feature combination; the Bert model is pre-trained using text content data corresponding to multiple sample complaints;

[0041] A score calculation unit, used to calculate the repetition score of each target complaint case according to the feature combination corresponding to the target complaint case;

[0042] A threshold judgment unit, used to judge whether the repetition score of the target complaint is greater than a preset threshold;

[0043] A determination unit is used to determine that the target complaint is a duplicate complaint if the duplication score of the target complaint is greater than the preset threshold.

[0044] Optionally, in the above-mentioned complaint duplication determination device, the pre-processing unit includes:

[0045] A cleaning processing unit, used for cleaning each of the complaint pieces to obtain each cleaned complaint piece;

[0046] The word segmentation unit is used to perform word segmentation processing on each of the cleaning complaints using word segmentation technology to obtain a target complaint corresponding to each of the complaints.

[0047] Optionally, the above-mentioned complaint duplication determination device further includes:

[0048] A data acquisition unit, used to acquire text content data corresponding to a plurality of sample complaint pieces from a database;

[0049] A preprocessing subunit, used for preprocessing each of the text content data to obtain target text content data corresponding to each of the text content data;

[0050] An input unit, used for inputting the target text content data corresponding to each of the text content data into a Bert model to obtain a feature combination corresponding to each of the text content data;

[0051] An average value calculation unit, used to calculate the average value of the feature combination corresponding to each of the text content data;

[0052] A judging unit, used to judge whether the average value is greater than a preset threshold;

[0053] A model determination unit, configured to determine that the Bert model is a trained Bert model if the average value is greater than a preset threshold;

[0054] The adjustment unit is used to adjust the parameters of the Bert model if the average value is not greater than a preset threshold value, and return to execute the step of inputting the target text content data corresponding to each of the text content data into the Bert model to obtain a feature combination corresponding to each of the text content data.

[0055] Optionally, in the above-mentioned complaint duplication determination device, the Bert model includes a masking language module, a shaded language module, a bidirectional self-attention mechanism module, a structured module and a dual attention module, and the data input unit includes:

[0056] A processing unit, for performing word segmentation processing on all the target complaints respectively through the masking language module to obtain a word segmentation text sequence corresponding to the target complaint;

[0057] A sentence learning unit, used for performing sentence learning on the word segmentation text sequence corresponding to the target complaint through the masked language module to obtain a sentence sequence corresponding to the target complaint;

[0058] A feature extraction unit, used to extract features from the sentence sequence through the bidirectional self-attention mechanism module to obtain a sequence vector;

[0059] A conversion unit, used for converting the target complaint into a structured vector through a structured module;

[0060] A weighting unit, configured to classify and weight the sequence vectors through the self-attention module in the dual attention module to obtain a weighted sequence vector, and classify and weight the structured vectors through the cross-attention module in the dual attention module to obtain a weighted structured vector;

[0061] A loss function calculation unit, used to calculate the loss function of the weighted sequence vector and the loss function of the weighted structured vector through the cross entropy loss function of the dual attention module;

[0062] A feature combination determination unit is used to calculate the loss function of the weighted sequence vector and the sum of the loss functions of the weighted structured vector through the cross entropy loss function of the dual attention module to obtain a feature vector, and determine the feature vector as the feature combination corresponding to the target complaint.

[0063] Optionally, in the above-mentioned complaint duplication determination device, the score calculation unit includes:

[0064] A frequency acquisition unit, used to acquire the display frequency of each feature combination in the corresponding target complaint;

[0065] A calculation unit, used for calculating the sum of all the display times;

[0066] The score calculation subunit is used to divide the number of times the feature combination corresponding to each target complaint item is displayed by the sum, so as to obtain the repetition score of the target complaint item.

[0067] The present application provides a method for determining duplication of complaint pieces, which obtains multiple complaint pieces, then pre-processes each complaint piece to obtain a target complaint piece corresponding to each complaint piece, and then inputs all target complaint pieces into a pre-trained Bert model to obtain a feature combination corresponding to each target complaint piece, wherein the Bert model integrates text features and structured features based on a dual attention module to obtain a feature combination, and the Bert model is pre-trained using text content data corresponding to multiple sample complaint pieces, and then for each target complaint piece, respectively, according to the feature combination corresponding to the target complaint piece, the duplication score of the target complaint piece is calculated, and finally it is determined whether the duplication score of the target complaint piece is greater than a preset threshold, and if the duplication score of the target complaint piece is greater than the preset threshold, the target complaint piece is determined to be a duplicate complaint piece. Thus, through the feature combination output by the Bert model, the scores of the input complaint piece and the feature set are comprehensively calculated, and the duplication determination result of the complaint piece is determined based on the score, and manual determination is no longer required, thereby improving the efficiency of duplication determination and the accuracy of duplication determination. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0069] Figure 1 A flowchart of a method for determining duplication of a complaint provided in an embodiment of the present application;

[0070] Figure 2 A flowchart of a method for preprocessing a complaint provided in an embodiment of the present application;

[0071] Figure 3 A schematic diagram of the structure of a Bert model provided in an embodiment of the present application;

[0072] Figure 4 A flowchart of a method for obtaining a feature combination provided in an embodiment of the present application;

[0073] Figure 5 A flowchart of a Bert model training method provided in an embodiment of the present application;

[0074] Figure 6 A flowchart of a method for calculating a duplicate score of a complaint provided in an embodiment of the present application;

[0075] Figure 7 A schematic diagram of a Bert-dual Attention-TF-IDF duplicate detection method provided in an embodiment of the present application;

[0076] Figure 8 A schematic diagram of the structure of a device for determining duplication of a complaint provided in accordance with another embodiment of the present application. DETAILED DESCRIPTION

[0077] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0078] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0079] The present application embodiment provides a method for determining duplication of complaints, such as Figure 1 As shown, the specific steps include:

[0080] S101. Obtain multiple complaints.

[0081] Optionally, users can upload complaints through the upload interface provided by the system so that the system can enter the information based on the uploaded complaints.

[0082] Among them, the basic components of a complaint include description of the complaint issue, source, time, complainant information, complaint classification, complaint handling status, attachments, etc. These elements constitute the main basis for judging the severity of a complaint.

[0083] S102, pre-process each complaint to obtain a target complaint corresponding to each complaint.

[0084] Specifically, considering that the complaints uploaded by users may not be complete and standardized, which may affect the efficiency and results of subsequent duplication judgment, after obtaining the complaints uploaded by users, each complaint needs to be processed in a complete and standardized manner.

[0085] Optionally, in another embodiment of the present application, a specific implementation of step S102 is as follows: Figure 2 As shown, the following steps are included:

[0086] S201, clean each complaint piece to obtain each cleaned complaint piece.

[0087] Specifically, the text content data of the complaint is cleaned to remove duplicate and redundant data, complete missing data in the text content data, and correct or delete erroneous data. Finally, the processed data is organized into valid data that can be processed, thereby obtaining a cleaned complaint.

[0088] S202. Use word segmentation technology to segment each cleaning complaint to obtain a target complaint corresponding to each complaint.

[0089] It is understandable that after obtaining each cleaned complaint, some useless information, stop words, etc. in the text can be removed, and then the word segmentation tool is used to segment each cleaned complaint to obtain a standard phrase, that is, the target complaint. The word segmentation tool can be Jieba, HanLP, THULAC, etc.

[0090] S103. Input all target complaints into the pre-trained Bert model to obtain the feature combination corresponding to each target complaint.

[0091] Among them, the Bert model integrates text features and structural features based on the dual attention module to obtain feature combinations. The Bert model is pre-trained using the text content data corresponding to multiple sample complaints.

[0092] Specifically, if you want to output a feature combination consisting of a text feature vector and structured features through the Bert model, you need to use the Masked Language Model (MLM) and the Next Sentence Prediction (NSP) in the Bert model, as well as the bidirectional self-attention mechanism, structured transformation, and dual attention mechanism.

[0093] Therefore, optionally, in another embodiment of the present application, Figure 3 As shown, the Bert model includes a masking language module, a masking language module, a bidirectional self-attention mechanism module, a structural module and a dual attention module. Accordingly, in the embodiment of the present application, a specific implementation of step S103 is as follows: Figure 4 As shown, the following steps are included:

[0094] S401. For all target complaints, perform word segmentation processing on the target complaints through the masking language module to obtain the word segmentation text sequence corresponding to the target complaints.

[0095] It can be understood that the BERT model uses two pre-training tasks: one is MLM, i.e., masked language module, and the other is NSP, i.e., blocked language module.

[0096] For the masked language module, the masked language module will randomly select some words (or some phrases) from the input text, that is, the target complaint, and let the Bert model predict the masked words, so as to learn the context of the words and improve the accuracy of the word representation.

[0097] Specifically, the target complaint is segmented through the masked language module to obtain a segmented text sequence. Then, some words in the segmented sequence are fully masked [MASK], and a special marker [CLS] is added to the beginning of the sequence.

[0098] S402. Perform sentence learning on the word segmentation text sequence corresponding to the target complaint through the masked language module to obtain the sentence sequence corresponding to the target complaint.

[0099] For the masked language module, the masked language module will determine whether the sentences in the target complaint are adjacent sentences, so that the Bert model can learn the relationship between sentences to improve the accuracy of sentence representation.

[0100] Specifically, the masked language module is used to perform sentence learning on the word segmentation text sequence to obtain a sentence sequence, and then the sentences are separated by the tag [SEP]. At this time, the output Embedding of each word in the sentence sequence consists of three parts: TokenEmbedding, SegmentEmbedding and PositionEmbedding. Therefore, the sentence sequence is obtained by combining TokenEmbedding, SegmentEmbedding and PositionEmbedding.

[0101] S403. Perform feature extraction on the sentence sequence through a bidirectional self-attention mechanism module to obtain a sequence vector.

[0102] Specifically, in order to obtain a sequence vector containing rich semantic features to provide accuracy in duplicate detection, the sequence vector needs to be input into a bidirectional Transformer (that is, a bidirectional self-attention mechanism module) for feature extraction. Finally, a sequence vector containing rich semantic features can be obtained.

[0103] In addition, the embodiment of the present application uses the Bert-Base model based on sentence-level feature identification for testing because it has a Transformer architecture and has 12 hidden layers, each with a dimension of 768. However, in order to use this model, the complaint text content needs to be converted into sentence feature representation. A complete complaint text needs to be truncated into sentences and input into the training model in batches to obtain a complete sentence feature representation. Therefore, in the embodiment of the present application, the sentence sequence is input into the bidirectional Transformer, and the detailed training parameters are shown in Table 1:

[0104] Table 1

[0105] Parameter name Parameter Value Maximum sequence length 128 The amount of training data per batch 64 Initial learning rate 1e-5 Model iterations 10 Dropout rate 0.5

[0106] The data shown in Table 1 are only for illustration.

[0107] S404: Convert the target complaint into a structured vector through a structured module.

[0108] It is understandable that converting target complaints into structured vectors can effectively improve the automation and intelligence level of complaint management and processing, and promote the efficiency of information duplication checking.

[0109] S405. Classify and weight the sequence vectors through the self-attention module in the dual attention module to obtain a weighted sequence vector, and classify and weight the structured vectors through the cross-attention module in the dual attention module to obtain a weighted structured vector.

[0110] It should be noted that the dual attention module, that is, the Attention method, includes the calculation of the dual attention mechanism and the cross-entropy loss function. The dual attention mechanism mainly includes the self-attention module and the cross-attention module. The self-attention module is used to solve the problem of classifying targets (same text) with the same label (same text) but different words into different categories, that is, the intra-class inconsistency problem. That is, it is suitable for classifying features with the same label but different words in the sequence vector together.

[0111] The cross-attention module is used to improve the phenomenon of classifying targets of different categories (different structured information) into the same category (structured feature vector), that is, the problem of difficulty in distinguishing between classes. In other words, it is suitable for classifying feature vectors of different categories in structured vectors.

[0112] It should also be noted that after the classification is completed, the classified sequence vector and structured vector need to be weighted. During the weighting process, important information is assigned a large weight, and a set of weights is obtained through training. All results are assigned proportions according to the weights to obtain sufficient semantic information and contextual information.

[0113] S406. Calculate the loss function of the weighted sequence vector and the loss function of the weighted structured vector through the cross entropy loss function of the dual attention module.

[0114] Specifically, the calculation expression of the loss function of the weighted sequence vector is:

[0115] SNLOSE i =CrossEntryLose(y si ; w)

[0116] Among them, CrossEntryLose represents a specific loss calculation method, y i Represents the label of the i-th category of the sequence vector, y si Represents a point in the sequence vector, y i It can take values ​​0 or 1, where 0 represents that the target sequence vector belongs to the i-th category, and 1 represents that the target sequence vector does not belong to the i-th category, and w represents the weight factor.

[0117] The calculation expression of the loss function of the weighted structured vector is:

[0118] BNLOSE i =FocalLose(y si ; w)

[0119] Among them, y i represents the label of the i-th category of the structured vector, y si Represents a point in the structured vector, y iIt can take values ​​0 or 1, where 0 represents that the structured vector belongs to the i-th category, and 1 represents that the structured vector does not belong to the i-th category, and w represents the weight factor.

[0120] S407. Calculate the loss function of the weighted sequence vector and the sum of the loss function of the weighted structured vector through the cross entropy loss function of the dual attention module to obtain a feature vector, and determine the feature vector as the feature combination corresponding to the target complaint.

[0121] It should be noted that in the process of calculating the feature vector, the parameter σ needs to be introduced to balance the loss of self-attention and cross-attention features. Therefore, the calculation expression of the feature vector is:

[0122] L i =SNLOSE i +σBNLOSE i

[0123] Among them, i represents the number of layers of the self-attention module and the cross-attention module, where i∈{0, 1, 2, 3}, SNLOSE i and BNLOSE i is the loss of the i-th layer of the self-attention module and the cross-attention module. L i Represents the integrated feature vector. Experiments show that when σ is 0.5, the best feature combination effect can be achieved. Therefore, the deviation of the combined features can be better adjusted by using the cross entropy loss function.

[0124] Optionally, the present application embodiment provides a method for training a Bert model, such as Figure 5 As shown, the following steps are included:

[0125] S501. Obtain text content data corresponding to multiple sample complaints from a database.

[0126] Specifically, the text content data includes structured data stored in the database and unstructured data in the file. Therefore, the text content data corresponding to the sample complaint can be extracted from the database query results and the file content.

[0127] S502: Preprocess each text content data to obtain target text content data corresponding to each text content data.

[0128] It should be noted that the specific implementation of step S502 may refer to step S102 in the above method embodiment, which will not be described in detail here.

[0129] S503: Input the target text content data corresponding to each text content data into the Bert model to obtain the feature combination corresponding to each text content data.

[0130] It should be noted that the specific implementation of step S503 may refer to step S103 in the above method embodiment, which will not be described in detail here.

[0131] S504: Calculate the average value of the feature combination corresponding to each text content data.

[0132] It should be noted that the K-fold cross-validation method is used in the embodiment of the present application to verify whether the Bert model is successfully trained. Therefore, after obtaining the feature combination corresponding to each text content data, it is necessary to calculate the average value of the feature combination corresponding to each text content data, so as to use the average value as the evaluation indicator of the model.

[0133] S505: Determine whether the average value is greater than a preset threshold.

[0134] Specifically, after the average value is calculated, in order to obtain whether the Bert model meets the subsequent standard of weight determination accuracy, a threshold can be set for determination, that is, whether the average value is greater than a preset threshold. If the average value is greater than the preset threshold, it means that the Bert model meets the subsequent standard of weight determination accuracy, so step S506 is executed. If the average value is not greater than the preset threshold, it means that the Bert model does not meet the subsequent standard of weight determination accuracy, so step S507 needs to be executed.

[0135] S506: Determine that the Bert model is a trained Bert model.

[0136] S507: Adjust the parameters of the Bert model.

[0137] Specifically, when the average value is not greater than the preset threshold, the parameters of the Bert model need to be adjusted, and the process returns to step S503 until the average value is greater than the preset threshold.

[0138] In addition, in the process of returning to step S503 to train the Bert model, the Adam method can be used to optimize the training of the model so that the model can be trained more effectively.

[0139] S104. For each target complaint, calculate the repetition score of the target complaint according to the feature combination corresponding to the target complaint.

[0140] It should be noted that after obtaining the feature combination corresponding to each target complaint, it is necessary to use the TF-IDF method to calculate the duplication score of the target complaint. The larger the value corresponding to the duplication score, the higher the complaint entity score corresponding to the combined feature set, which means that the possibility of duplication of the complaint is greater. Therefore, 2. Calculating the score of the target complaint using the TF-IDF method can realize the duplication determination of the complaint.

[0141] Optionally, in another embodiment of the present application, a specific implementation of step S104 is as follows: Figure 6 As shown, the following steps are included:

[0142] S601. Obtain the number of times each feature combination appears in the corresponding target complaint.

[0143] Specifically, the weight of a feature is directly proportional to the number of times it appears in the complaint set, and inversely proportional to the frequency of its appearance in the complaint set. That is, the higher the frequency of a feature appearing in a specific complaint, the higher its ability to distinguish the content attributes of the text. If a feature appears more widely in the complaint, that is, the number of times it appears in each category is similar, the lower the attribute of the feature in distinguishing the content. Therefore, the score of the target complaint can be calculated based on the number of times the feature combination appears. Therefore, it is necessary to pre-count the number of times each feature combination appears in the corresponding target complaint.

[0144] S602: Calculate the sum of all display times.

[0145] S603. For each target complaint, divide the number of times the feature combination corresponding to the target complaint is displayed by the sum to obtain the repetition score of the target complaint.

[0146] Specifically, the calculation formula for the duplication score of the target complaint is:

[0147]

[0148] Among them, tf ij is the characteristic term L i The frequency in each complaint, n i,j Indicates the number of times this feature combination appears in the complaint, and the denominator is the sum of the number of occurrences of all combined features in the complaint set, that is, the sum of all display times in step S602. ij The larger the value, the more important the combined feature is to the complaint.

[0149] S105. Determine whether the repetition score of the target complaint is greater than a preset threshold.

[0150] It is understandable that by setting a threshold value, complaint entities below the threshold value can be filtered out, so that repeated complaint entities can be flexibly and effectively detected. That is, it can be determined by judging whether the repetition score of the target complaint is greater than a preset threshold. If the repetition score of the target complaint is greater than the preset threshold, it means that the target complaint may be a repeated complaint, so step S106 is executed.

[0151] Optionally, if the duplication score of the target complaint is not greater than a preset threshold, it means that the target complaint is not a duplicate complaint. At this time, the complaint is stored and displayed to the front end so that the front-end staff can analyze the content of the complaint to optimize the company's services.

[0152] S106. Determine that the target complaint is a duplicate complaint.

[0153] Optionally, after obtaining all target complaints that are greater than a preset threshold, these target complaints can be sorted according to their repetition scores, and the sorted target complaints can be displayed in sequence.

[0154] It should be noted that the overall process of step S101 to step S106 can be found in Figure 7 The structural diagram of the Bert-dual Attention-TF-IDF duplicate detection method is shown.

[0155] The present application provides a method of obtaining multiple complaints, and then pre-processing each complaint to obtain a target complaint corresponding to each complaint, and then inputting all target complaints into a pre-trained Bert model to obtain a feature combination corresponding to each target complaint, wherein the Bert model integrates text features and structured features based on a dual attention module to obtain a feature combination, and the Bert model is pre-trained using text content data corresponding to multiple sample complaints, and then for each target complaint, respectively, according to the feature combination corresponding to the target complaint, the target complaint is calculated for a repetition score, and finally it is determined whether the repetition score of the target complaint is greater than a preset threshold, and if the repetition score of the target complaint is greater than the preset threshold, the target complaint is determined to be a repetition complaint. Thus, through the feature combination output by the Bert model, the scores of the input complaint and the feature set are comprehensively calculated, and the repetition determination result of the complaint is determined based on the score, and manual determination is no longer required, thereby improving the efficiency of duplicate determination and the accuracy of duplicate determination.

[0156] Another embodiment of the present application provides a device for determining duplication of a complaint, such as Figure 8 As shown, it includes the following units:

[0157] The complaint acquisition unit 801 is used to acquire multiple complaint files.

[0158] The pre-processing unit 802 is used to pre-process each complaint to obtain a target complaint corresponding to each complaint.

[0159] The data input unit 803 is used to input all target complaints into the pre-trained Bert model to obtain the feature combination corresponding to each target complaint. The Bert model integrates text features and structured features based on the dual attention module to obtain the feature combination. The Bert model is pre-trained using the text content data corresponding to multiple sample complaints.

[0160] The score calculation unit 804 is used to calculate the repetition score of each target complaint case according to the feature combination corresponding to the target complaint case.

[0161] The threshold judgment unit 805 is used to judge whether the repetition score of the target complaint is greater than a preset threshold.

[0162] The determination unit 806 is used to determine that the target complaint is a duplicate complaint if the duplication score of the target complaint is greater than a preset threshold.

[0163] It should be noted that the specific working process of the above-mentioned units in the embodiment of the present application can refer to steps S101 to S106 in the above-mentioned method embodiment, and will not be repeated here.

[0164] Optionally, in a device for determining duplication of a complaint provided by another embodiment of the present application, the preprocessing unit 802 includes:

[0165] The cleaning processing unit is used to perform cleaning processing on each complaint piece to obtain each cleaned complaint piece.

[0166] The word segmentation unit is used to perform word segmentation processing on each cleaning complaint using the word segmentation technology to obtain the target complaint corresponding to each complaint.

[0167] Optionally, another embodiment of the present application provides a device for determining duplication of a complaint, further comprising:

[0168] The data acquisition unit is used to obtain text content data corresponding to multiple sample complaints from the database.

[0169] The preprocessing subunit is used to preprocess each text content data to obtain the target text content data corresponding to each text content data.

[0170] The input unit is used to input the target text content data corresponding to each text content data into the Bert model to obtain the feature combination corresponding to each text content data.

[0171] The average value calculation unit is used to calculate the average value of the feature combination corresponding to each text content data.

[0172] The judging unit is used to judge whether the average value is greater than a preset threshold.

[0173] The model determination unit is used to determine that the Bert model is a trained Bert model if the average value is greater than a preset threshold.

[0174] The adjustment unit is used to adjust the parameters of the Bert model if the average value is not greater than the preset threshold value, and return to execute inputting the target text content data corresponding to each text content data into the Bert model to obtain the feature combination corresponding to each text content data.

[0175] Optionally, in a complaint duplication determination device provided in another embodiment of the present application, the Bert model includes a masking language module, a masking language module, a bidirectional self-attention mechanism module, a structuring module and a dual attention module, and the data input unit 803 includes:

[0176] The processing unit is used to perform word segmentation processing on all target complaints through the masking language module to obtain the word segmentation text sequence corresponding to the target complaint.

[0177] The sentence learning unit is used to perform sentence learning on the word segmentation text sequence corresponding to the target complaint through the masked language module to obtain the sentence sequence corresponding to the target complaint.

[0178] The feature extraction unit is used to extract features of the sentence sequence through a bidirectional self-attention mechanism module to obtain a sequence vector.

[0179] The conversion unit is used to convert the target complaint into a structured vector through a structured module.

[0180] The weighting unit is used to classify and weight the sequence vector through the self-attention module in the dual attention module to obtain a weighted sequence vector, and to classify and weight the structured vector through the cross-attention module in the dual attention module to obtain a weighted structured vector.

[0181] The loss function calculation unit is used to calculate the loss function of the weighted sequence vector and the loss function of the weighted structured vector through the cross entropy loss function of the dual attention module.

[0182] The feature combination determination unit is used to calculate the loss function of the weighted sequence vector and the sum of the loss functions of the weighted structured vector through the cross entropy loss function of the dual attention module to obtain a feature vector, and determine the feature vector as the feature combination corresponding to the target complaint.

[0183] Optionally, in a complaint duplication determination device provided in another embodiment of the present application, the score calculation unit 804 includes:

[0184] The frequency acquisition unit is used to obtain the display frequency of each feature combination in the corresponding target complaint.

[0185] A calculation unit, used to calculate the sum of all display times.

[0186] The score calculation subunit is used to divide the number of times the feature combination corresponding to each target complaint is displayed by the sum, so as to obtain the repetition score of the target complaint.

[0187] It should be noted that the specific working process of each unit provided in the above embodiments of the present application can refer to the corresponding steps in the above method embodiments, and will not be repeated here.

[0188] It should also be noted that the complaint duplication determination device provided in the embodiment of the present application has the technical effects of any of the above embodiments, and the embodiment of the present application will not be described in detail here.

[0189] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0190] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be 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 present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for determining duplication of complaints, characterized in that: include: Get multiple complaints; Pre-processing each of the complaints to obtain a target complaint corresponding to each of the complaints; Input all the target complaints into a pre-trained Bert model to obtain the feature combination corresponding to each target complaint; wherein the Bert model integrates text features and structured features based on a dual attention module to obtain the feature combination; the Bert model is pre-trained using text content data corresponding to multiple sample complaints; For each of the target complaints, respectively, calculate the repetition score of the target complaint according to the feature combination corresponding to the target complaint; Determine whether the repetition score of the target complaint is greater than a preset threshold; If the duplication score of the target complaint is greater than the preset threshold, the target complaint is determined to be a duplicate complaint.

2. The method according to claim 1, characterized in that The pre-processing of each complaint to obtain a target complaint corresponding to each complaint includes: Performing cleaning processing on each of the complaint pieces to obtain each cleaned complaint piece; The word segmentation technology is used to perform word segmentation processing on each of the cleaning complaints to obtain the target complaint corresponding to each of the complaints.

3. The method according to claim 1, characterized in that The training method of the Bert model includes: Obtain text content data corresponding to multiple sample complaints from a database; Preprocessing each of the text content data to obtain target text content data corresponding to each of the text content data; Inputting the target text content data corresponding to each of the text content data into the Bert model to obtain a feature combination corresponding to each of the text content data; Calculating an average value of the feature combination corresponding to each of the text content data; Determine whether the average value is greater than a preset threshold; If the average value is greater than a preset threshold, the Bert model is determined to be a trained Bert model; If the average value is not greater than the preset threshold, the parameters of the Bert model are adjusted, and the process of inputting the target text content data corresponding to each of the text content data into the Bert model is returned to obtain the feature combination corresponding to each of the text content data.

4. The method according to claim 1, characterized in that: The Bert model includes a masking language module, a concealing language module, a bidirectional self-attention mechanism module, a structuring module, and a dual attention module. All the target complaints are input into the pre-trained Bert model to obtain the feature combination corresponding to each target complaint, including: For all the target complaints, the masked language module is used to perform word segmentation processing on the target complaints to obtain a word segmentation text sequence corresponding to the target complaints; Perform sentence learning on the word segmentation text sequence corresponding to the target complaint by the masked language module to obtain the sentence sequence corresponding to the target complaint; Perform feature extraction on the sentence sequence through the bidirectional self-attention mechanism module to obtain a sequence vector; Converting the target complaint into a structured vector through a structured module; The sequence vector is classified and weighted by the self-attention module in the dual attention module to obtain a weighted sequence vector, and the structured vector is classified and weighted by the cross-attention module in the dual attention module to obtain a weighted structured vector; Calculating the loss function of the weighted sequence vector and the loss function of the weighted structured vector through the cross entropy loss function of the dual attention module; The loss function of the weighted sequence vector and the sum of the loss function of the weighted structured vector are calculated through the cross entropy loss function of the dual attention module to obtain a feature vector, and the feature vector is determined as the feature combination corresponding to the target complaint.

5. The method according to claim 1, characterized in that The step of calculating the repetition score of each target complaint case according to the feature combination corresponding to the target complaint case comprises: Obtain the number of times each of the feature combinations is displayed in the corresponding target complaint; Calculating the sum of all the display times; For each of the target complaints, the number of times the feature combination corresponding to the target complaint is displayed is divided by the sum to obtain the repetition score of the target complaint.

6. A device for determining duplication of complaints, characterized in that: include: A complaint acquisition unit, used for acquiring multiple complaint files; A preprocessing unit, used for preprocessing each of the complaints to obtain a target complaint corresponding to each of the complaints; A data input unit is used to input all the target complaints into a pre-trained Bert model to obtain a feature combination corresponding to each target complaint; wherein the Bert model integrates text features and structured features based on a dual attention module to obtain a feature combination; the Bert model is pre-trained using text content data corresponding to multiple sample complaints; A score calculation unit, used to calculate the repetition score of each target complaint case according to the feature combination corresponding to the target complaint case; A threshold judgment unit, used to judge whether the repetition score of the target complaint is greater than a preset threshold; A determination unit is used to determine that the target complaint is a duplicate complaint if the duplication score of the target complaint is greater than the preset threshold.

7. The device according to claim 6, characterized in that The pre-processing unit comprises: A cleaning processing unit, used for cleaning each of the complaint pieces to obtain each cleaned complaint piece; The word segmentation unit is used to perform word segmentation processing on each of the cleaning complaints using word segmentation technology to obtain a target complaint corresponding to each of the complaints.

8. The device according to claim 6, characterized in that Also includes: A data acquisition unit, used to acquire text content data corresponding to a plurality of sample complaint pieces from a database; A preprocessing subunit, used for preprocessing each of the text content data to obtain target text content data corresponding to each of the text content data; An input unit, used for inputting the target text content data corresponding to each of the text content data into a Bert model to obtain a feature combination corresponding to each of the text content data; An average value calculation unit, used to calculate the average value of the feature combination corresponding to each of the text content data; A judging unit, used to judge whether the average value is greater than a preset threshold; A model determination unit, configured to determine that the Bert model is a trained Bert model if the average value is greater than a preset threshold; The adjustment unit is used to adjust the parameters of the Bert model if the average value is not greater than a preset threshold value, and return to execute the step of inputting the target text content data corresponding to each of the text content data into the Bert model to obtain a feature combination corresponding to each of the text content data.

9. The device according to claim 6, characterized in that The Bert model includes a masked language module, a shaded language module, a bidirectional self-attention mechanism module, a structured module and a dual attention module, and the data input unit includes: A processing unit, for performing word segmentation processing on all the target complaints respectively through the masking language module to obtain a word segmentation text sequence corresponding to the target complaint; A sentence learning unit, used for performing sentence learning on the word segmentation text sequence corresponding to the target complaint through the masked language module to obtain a sentence sequence corresponding to the target complaint; A feature extraction unit, used to extract features from the sentence sequence through the bidirectional self-attention mechanism module to obtain a sequence vector; A conversion unit, used for converting the target complaint into a structured vector through a structured module; A weighting unit, configured to classify and weight the sequence vectors through the self-attention module in the dual attention module to obtain a weighted sequence vector, and classify and weight the structured vectors through the cross-attention module in the dual attention module to obtain a weighted structured vector; A loss function calculation unit, used to calculate the loss function of the weighted sequence vector and the loss function of the weighted structured vector through the cross entropy loss function of the dual attention module; A feature combination determination unit is used to calculate the loss function of the weighted sequence vector and the sum of the loss functions of the weighted structured vector through the cross entropy loss function of the dual attention module to obtain a feature vector, and determine the feature vector as the feature combination corresponding to the target complaint.

10. The device according to claim 6, characterized in that The score calculation unit comprises: A frequency acquisition unit, used to acquire the display frequency of each feature combination in the corresponding target complaint; A calculation unit, used for calculating the sum of all the display times; The score calculation subunit is used to divide the number of times the feature combination corresponding to each target complaint item is displayed by the sum, so as to obtain the repetition score of the target complaint item.