Intelligent insurance agent face visit log text repetition degree detection device and intelligent insurance agent face visit log text repetition degree detection method
By designing an intelligent insurance agent face-to-face log text repetition detection device, using text cleaning, character similarity and semantic similarity calculation, the problem of difficulty in accurately detecting log duplication in the prior art is solved, and efficient and accurate log duplication detection and quality improvement are achieved.
Patent Information
- Application Number
- CN202411490130.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-03-07
Smart Images

Figure CN119578397A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text data processing, and in particular to an intelligent insurance agent interview log text repetition detection device and method. Background Art
[0002] Insurance agent visit logs are mainly used to record the visit communication between agents and customers, and are an important part of insurance company team activity management. Since there are a large number of duplicate logs in the current logs, it is not conducive to recording customer communication information, so it is necessary to perform duplication detection on the log text to improve the log quality.
[0003] The current management of insurance industry agent logs is based on encouragement, so the scale of text similarity is tight and the scale of semantic repetition is loose, that is, large paragraphs of text repetition are not allowed, but semantic repetition is allowed in combination with actual conditions. For example, log A: "I went to the customer's home to talk about health insurance. If you have money, you can buy it." Log B: "I went to the customer's home to talk about health insurance products. The customer said that insurance is good, but the economy is a bit difficult. If you have more money, you can buy it." Log A and log B are similar in semantics, but this scene is judged as non-repetitive. This simple method of completely consistent repetition judgment cannot detect duplicate logs in the following situations: Case 1: Most of the text is repeated, and only individual characters are changed; Case 2: The previous and next sentences are inverted; Case 3: There are many repeated characters and the semantic repetition is high. It is difficult to accurately detect text repetition, which is not conducive to effectively improving log quality.
[0004] In addition, existing research also uses supervised text classification technology, but this method requires training the text classification model based on a large amount of manually annotated data, which has the disadvantages of high annotation cost, strong dependence on computing hardware resources, and high model training time. Summary of the invention
[0005] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide an intelligent insurance agent interview log text repetition detection device and method, which can perform efficient and accurate log repetition detection from the aspects of text similarity and semantic repetition, and effectively improve the log quality.
[0006] The object of the present invention can be achieved by the following technical scheme: an intelligent insurance agent interview log text repetition detection device, comprising an input module, a pre-processing module, a similarity calculation module and a post-processing module connected in sequence, the input module is used to receive text pair data to be detected, the text pair data includes a current log and a historical log;
[0007] The preprocessing module is used to perform text cleaning on the text data;
[0008] The similarity calculation module is used to calculate the character similarity and semantic similarity of the text pair data respectively;
[0009] The post-processing module determines the repetition detection result based on character similarity and semantic similarity by using a threshold comparison method.
[0010] Furthermore, the preprocessing module includes a space removal unit, a punctuation removal unit, a special character removal unit, a text error correction unit, a traditional and simplified Chinese conversion unit, and an uppercase and lowercase conversion unit. The text error correction unit uses a preset auxiliary vocabulary and an insurance professional vocabulary to perform error correction processing on the text content.
[0011] Furthermore, the similarity calculation module includes a first calculation unit, a second calculation unit and a third calculation unit. The first calculation unit uses the edit distance method to calculate the first similarity of the text pair data, the second calculation unit uses the character vector method to calculate the second similarity of the text pair data, and the third calculation unit uses the semantic sentence embedding method to calculate the third similarity of the text pair data. The first similarity and the second similarity constitute character similarity, and the third similarity is semantic similarity.
[0012] A method for detecting text duplication of an intelligent insurance agent interview log comprises the following steps:
[0013] S1. Obtain the current log and historical log to be detected, and construct text pair data, wherein the historical log includes the customer visit log records within N historical days;
[0014] S2, performing text cleaning on the data to obtain the processed current log text and historical log text;
[0015] S3, for the current log text and the historical log text, respectively calculating the character similarity and semantic similarity between the two;
[0016] S4. Based on the character similarity and semantic similarity, a comparison and judgment is performed in combination with a preset corresponding threshold value, and a duplication detection result is output.
[0017] Furthermore, the text cleaning process in step S2 includes space removal, punctuation removal, special character removal, text error correction, traditional and simplified Chinese conversion, and uppercase and lowercase conversion.
[0018] Furthermore, the text correction specifically uses a pre-built auxiliary word library and an insurance professional word library to correct the text, wherein the auxiliary words include wrong characters and similar words, and the professional word library consists of product names and business terms.
[0019] Furthermore, the step S3 specifically includes the following steps:
[0020] S31, for the current log text and the historical log text, calculating the edit distance between the two, and calculating the first similarity between the two based on the edit distance;
[0021] S32, for the current log text and the historical log text, calculating the union of the characters between the two, performing character vectorization on the current log text and the historical log text, and then calculating the cosine similarity to obtain a second similarity between the two;
[0022] The first similarity and the second similarity together constitute the character similarity;
[0023] S33. Use the fine-tuned general semantic word embedding model to embed vectorize the current log text and the historical log text, calculate the cosine similarity, and obtain the third similarity between the two, which is the semantic similarity.
[0024] Furthermore, the calculation formula of the first similarity in step S31 is:
[0025]
[0026] Among them, ED AB is the edit distance between text A and text B, L A , L B are the lengths of text A and B respectively.
[0027] Furthermore, the general semantic word embedding model fine-tuned in step S33 specifically adopts the bge-small-zh-v1.5 Chinese embedding vector model of BGE-M3E open source as the base model, and then uses insurance field data for fine-tuning to generate a semantic sentence embedding model for vectorizing input text, with a vector dimension of 512 dimensions.
[0028] Furthermore, the step S4 comprises the following steps:
[0029] First, determine whether the first similarity is greater than the preset first threshold, if yes, determine it as a duplicate, otherwise determine whether the second similarity is greater than the preset second threshold, if yes, determine it as a duplicate, otherwise continue to determine whether the third similarity is greater than the preset third threshold, if yes, determine it as a duplicate, otherwise determine it as not a duplicate, and store the historical logs determined to be duplicates in the duplicate log set;
[0030] Repeat the above process, compare the current log with the historical N-day logs in pairs, and finally output the duplication detection results.
[0031] Furthermore, the repetition detection result includes a determination conclusion of whether there are duplicate logs, and the log text with the largest sum of three similarities in the duplicate log set.
[0032] Compared with the prior art, the present invention has the following advantages:
[0033] The present invention sets a preprocessing module, a similarity calculation module and a postprocessing module, uses the preprocessing module to perform text cleaning processing on the text pair data including the current log and the historical log; uses the similarity calculation module to respectively calculate the character similarity and semantic similarity of the text pair data; and finally, the postprocessing module determines the repetition detection result by using a threshold comparison method based on the character similarity and semantic similarity. Thus, the character similarity and semantic similarity are combined, and the log repetition detection can be performed efficiently and accurately from the aspects of text similarity and semantic repetition, and the log quality is effectively improved.
[0034] The design of the present invention performs preprocessing on the current log and historical log, including removing spaces, removing redundant punctuation marks at the beginning and end of sentences, removing special characters, converting traditional and simplified Chinese, converting uppercase and lowercase characters, and text error correction processing, which can achieve reliable text cleaning effects, thereby ensuring the accuracy of subsequent similarity calculations.
[0035] When calculating character similarity, the present invention calculates the first similarity based on the edit distance on the one hand, and calculates the union of characters and then calculates the cosine similarity to obtain the second similarity, which can improve the overall reliability of the character similarity calculation results; when calculating semantic similarity, a fine-tuned general semantic word embedding model is used, and fine-tuning is performed based on an open source high-quality semantic embedding model, which can reduce data annotation dependence on the one hand, and avoid training the semantic embedding model from scratch on the other hand, which can reduce GPU hardware resource dependence and achieve better classification effects than the supervised method in actual scenarios.
[0036] The present invention combines the first similarity, the second similarity and the third similarity, and compares and judges with the corresponding preset thresholds in sequence to determine the repetition detection result. The repetition detection result includes the judgment conclusion of whether there are duplicate logs and the log text with the largest repetition, which can greatly improve the accuracy and comprehensiveness of the repetition detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a schematic diagram of the structure of the device of the present invention;
[0038] Figure 2 It is a schematic diagram of the method flow of the present invention;
[0039] Figure 3 It is a schematic diagram of the application process of the embodiment;
[0040] Figure 4 It is a schematic diagram of the RetroMAE framework in the prior art;
[0041] Figure 5It is a schematic diagram of the post-processing process in the present invention;
[0042] Description of the marks in the figure: 1. Input module, 2. Preprocessing module, 3. Similarity calculation module, 4. Post-processing module. DETAILED DESCRIPTION
[0043] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0044] Example
[0045] like Figure 1 As shown, an intelligent insurance agent interview log text repetition detection device includes an input module 1, a pre-processing module 2, a similarity calculation module 3 and a post-processing module 4 connected in sequence, the input module 1 is used to receive text pair data to be detected, and the text pair data includes a current log and a historical log;
[0046] The preprocessing module 2 is used to perform text cleaning on the text data. The preprocessing module 2 includes a space removal unit, a punctuation removal unit, a special character removal unit, a text error correction unit, a traditional and simplified Chinese conversion unit, and an uppercase and lowercase conversion unit. The text error correction unit uses a preset auxiliary word library and an insurance professional word library to perform error correction on the text content;
[0047] The similarity calculation module 3 is used to calculate the character similarity and semantic similarity of the text pair data respectively. The similarity calculation module 3 includes a first calculation unit, a second calculation unit and a third calculation unit. The first calculation unit uses the edit distance method to calculate the first similarity of the text pair data. The second calculation unit uses the character vector method to calculate the second similarity of the text pair data. The third calculation unit uses the semantic sentence embedding method to calculate the third similarity of the text pair data. The first similarity and the second similarity constitute the character similarity, and the third similarity is the semantic similarity.
[0048] The post-processing module 4 determines the repetition detection result based on the character similarity and the semantic similarity by using a threshold comparison method.
[0049] Based on the above device, a method for detecting the repetition of text in interview logs of intelligent insurance agents is implemented. Figure 2 As shown, the following steps are included:
[0050] S1. Obtain the current log and historical log to be detected, and construct text pair data, wherein the historical log includes the customer visit log records within N historical days;
[0051] S2, performing text cleaning on the data to obtain the processed current log text and historical log text;
[0052] S3, for the current log text and the historical log text, respectively calculating the character similarity and semantic similarity between the two;
[0053] S4. Based on the character similarity and semantic similarity, a comparison and judgment is performed in combination with a preset corresponding threshold value, and a duplication detection result is output.
[0054] This embodiment applies the above solution, such as Figure 3 As shown, the main contents are:
[0055] The input is the data to be processed, including the log currently submitted by the agent user and the historical log traversal, forming text pair data that need to be compared. In this embodiment, the historical log text data is the customer visit log record within the history of 90. The output is whether the current submission log and the historical log are repeated, and the log with the largest degree of repetition is output.
[0056] The first stage is the preprocessing stage, in which the two texts to be compared are cleaned, including the following steps: removing spaces, removing extra punctuation marks at the beginning and end of sentences, removing special characters, converting traditional and simplified Chinese, converting uppercase and lowercase characters, and text error correction. Among them, text error correction specifically uses the auxiliary vocabulary and insurance professional vocabulary that have been accumulated and constructed in advance to correct the text. Auxiliary words are composed of wrong characters, similar words, etc. For example, if the text contains the wrong words: household worker card, expanded worker card, care card, and companion card, they are uniformly corrected as care worker card. The professional vocabulary is composed of product names and business words. For example, if the text contains the wrong words: this life is worry-free, Jinsheng Wuyou, Jinshen Wuyou, and this life is without you, they are uniformly corrected as Jinsheng Wuyou.
[0057] The second stage is the similarity calculation stage. Assume that the two preprocessed texts to be compared are recorded as text A and text B, and calculate their first, second, and third similarities. Specifically, the first step is to remove punctuation marks from text A and B and then calculate the edit distance. Edit Distance (ED) refers to the minimum number of operations required to convert one string into another. For example, to convert "abc" to "acb", it is necessary to replace the second b with c, and then replace the third c with b. In this way, "abc" is converted to "acb" through two replacement operations (deletion and then addition operations are also possible), so its minimum edit distance is 2. Then the similarity between A and B is calculated by the following formula to form the first similarity.
[0058]
[0059] Among them, ED AB is the edit distance between text A and text B, L A , L B are the lengths of text A and B respectively.
[0060] In the second step, after removing punctuation marks from texts A and B, calculate the union of the characters in A and B, denoted as SET_ALL. Then, vectorize the characters in A and B, and finally calculate their cosine similarity to form the second similarity. The calculation example is as follows:
[0061] Text A: Three visits, and the Pacific Tax-Advantaged Health Insurance for Inpatient Treatment is explained again.
[0062] Text B: Two visits, and the Tax-Advantaged Health Insurance for Inpatient Treatment is recommended again.
[0063] Union of A and B: ['太', '健', '访', '解', '税', '院', '康', '荐', '推', '讲', '三', '二', '医', '优', '拜', '疗', '洋', '保', '平', '险', '次', '住', '再']
[0064] Vector A: [1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
[0065] Vector B: [0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1]
[0066] In the third step, after fine-tuning using the general semantic embedding model, perform embedding vectorization on texts A and B, and calculate the cosine similarity to form the third similarity. Specifically, in this embodiment, the open-source bge-small-zh-v1.5 Chinese embedding vector model of BGE-M3E is used as the base model, and then it is fine-tuned using insurance domain data to generate a semantic sentence embedding model for vectorizing the input text, with a vector dimension of 512. Using the mainstream open-source embedding model BGE-M3E can generate vector representations for sentences. In principle, it uses the RetroMAE framework (as Figure 4 shown) to pre-train on a large amount of general text data, and fine-tune the preset dense and sparse tasks through contrastive learning on the constructed text pair dataset with the pre-trained model.
[0067] The third stage is the post-processing stage. Using the similarity numerical results calculated in the previous stage, combine with the judgment process to generate the repeated judgment result of the text pair. Specifically, first, offline batch generate the first, second, and third similarities of a batch of log text pairs. The business experts set similarity threshold 1, similarity threshold 2, and similarity threshold 3 according to actual experience combined with the three similarity results. Then, perform the online system repeated log judgment process (as Figure 5As shown in the figure, since the repetition judgment scenario involved in this solution has strict requirements on the scale of text similarity and loose requirements on the scale of semantic repetition, the online system determines whether the log is repeated according to the following process: first determine whether the first similarity is greater than threshold 1, if so, it is determined to be repeated, otherwise determine whether the second similarity is greater than threshold 2, if so, it is determined to be repeated, otherwise determine whether the third similarity is greater than threshold 3, if so, it is determined to be repeated, otherwise it is determined not to be repeated. After the current log is compared with the historical 90-day log in pairs, the final judgment conclusion on whether there is a duplicate log is output, and the log text with the largest sum of the three similarities in the duplicate log set is output.
[0068] In summary, this solution adopts a combination of character similarity (first and second similarities) and semantic similarity (third similarity) to solve the business quality inspection needs of insurance industry agent logs, that is, the scale of text similarity is tight and the scale of semantic repetition is loose, which can effectively assist in improving log quality and enable team activity management.
[0069] This solution can reduce the cost of manual labeling and reduce the dependence on model training resources: Previous supervised text classification required a large amount of manual data labeling to ensure the model classification effect. This solution is based on the open source high-quality semantic embedding model for fine-tuning. On the one hand, it can reduce the dependence on data labeling. On the other hand, avoiding training the semantic embedding model from scratch can reduce the dependence on GPU hardware resources, and achieve better classification results than supervised methods in actual scenarios.
[0070] This solution can be adjusted to suit actual business scenarios: With the actual use of the system, insurance agents' log filling will gradually become standardized, so the requirements for duplication quality inspection will also change dynamically. The first, second, and third similarity thresholds in the solution can be dynamically adjusted according to business conditions to better adapt to actual business scenarios.
Claims
1. An intelligent insurance agent interview log text repetition detection device, characterized in that: It includes an input module, a pre-processing module, a similarity calculation module and a post-processing module connected in sequence, wherein the input module is used to receive text pair data to be detected, and the text pair data includes a current log and a historical log; The preprocessing module is used to perform text cleaning on the text data; The similarity calculation module is used to calculate the character similarity and semantic similarity of the text pair data respectively; The post-processing module determines the repetition detection result based on character similarity and semantic similarity by using a threshold comparison method.
2. According to claim 1, the device for detecting text repetition of an intelligent insurance agent interview log is characterized in that: The preprocessing module includes a space removal unit, a punctuation removal unit, a special character removal unit, a text error correction unit, a traditional and simplified Chinese conversion unit, and an uppercase and lowercase conversion unit. The text error correction unit uses a preset auxiliary vocabulary and an insurance professional vocabulary to perform error correction processing on the text content.
3. The intelligent insurance agent interview log text repetition detection device according to claim 1 is characterized in that: The similarity calculation module includes a first calculation unit, a second calculation unit and a third calculation unit. The first calculation unit uses the edit distance method to calculate the first similarity of the text pair data, the second calculation unit uses the character vector method to calculate the second similarity of the text pair data, and the third calculation unit uses the semantic sentence embedding method to calculate the third similarity of the text pair data. The first similarity and the second similarity constitute character similarity, and the third similarity is semantic similarity.
4. A method for detecting the text repetition of an intelligent insurance agent interview log, applied to the device for detecting the text repetition of an intelligent insurance agent interview log as claimed in claim 1, characterized in that: The following steps are involved: S1. Obtain the current log and historical log to be detected, and construct text pair data, wherein the historical log includes the customer visit log records within N historical days; S2, performing text cleaning on the data to obtain processed current log text and historical log text; S3, for the current log text and the historical log text, respectively calculating the character similarity and semantic similarity between the two; S4. Based on the character similarity and semantic similarity, a comparison and judgment is performed in combination with a preset corresponding threshold value, and a duplication detection result is output.
5. The method for detecting text duplication of an intelligent insurance agent interview log according to claim 4, characterized in that: The text cleaning process in step S2 includes space removal, punctuation removal, special character removal, text error correction, traditional and simplified Chinese conversion, and uppercase and lowercase conversion.
6. The method for detecting text duplication of an intelligent insurance agent interview log according to claim 5, characterized in that: The text error correction specifically uses a pre-built auxiliary word library and insurance professional word library to correct the text, wherein the auxiliary words include wrong characters and similar words, and the professional word library is composed of product names and business words.
7. The method for detecting text duplication of an intelligent insurance agent interview log according to claim 4, characterized in that: The step S3 specifically comprises the following steps: S31, for the current log text and the historical log text, calculating the edit distance between the two, and calculating the first similarity between the two based on the edit distance; S32, for the current log text and the historical log text, calculating the union of the characters between the two, performing character vectorization on the current log text and the historical log text, and then calculating the cosine similarity to obtain a second similarity between the two; The first similarity and the second similarity together constitute the character similarity; S33. Use the fine-tuned general semantic word embedding model to embed vectorize the current log text and the historical log text, calculate the cosine similarity, and obtain the third similarity between the two, which is the semantic similarity.
8. The method for detecting text duplication of an intelligent insurance agent interview log according to claim 7, characterized in that: The calculation formula of the first similarity in step S31 is: Among them, ED AB is the edit distance between text A and text B, L A ,L B are the lengths of text A and B respectively.
9. The method for detecting text duplication of an intelligent insurance agent interview log according to claim 7, characterized in that: The fine-tuned universal semantic word embedding model in step S33 specifically uses the BGE-M3E open source bge-small-zh-v1.5 Chinese embedding vector model as the base model, and then uses insurance field data for fine-tuning to generate a semantic sentence embedding model for vectorizing input text, with a vector dimension of 512 dimensions.
10. The method for detecting text duplication of an intelligent insurance agent interview log according to claim 7, characterized in that: The step S4 comprises the following steps: First, determine whether the first similarity is greater than the preset first threshold, if yes, determine it as a duplicate, otherwise determine whether the second similarity is greater than the preset second threshold, if yes, determine it as a duplicate, otherwise continue to determine whether the third similarity is greater than the preset third threshold, if yes, determine it as a duplicate, otherwise determine it as not a duplicate, and store the historical logs determined to be duplicates in the duplicate log set; Repeat the above process, compare the current log with the historical N-day logs in pairs, and finally output the duplication detection result, which includes the judgment conclusion of whether there are duplicate logs and the log text with the largest sum of the three similarities in the duplicate log set.