A method for extracting text template of short message and related device

By clustering and integrating the text message content to extract text message text templates containing variable rules, the problem of low SMS review efficiency is solved, automatic comparison and direct distribution are realized, and the review efficiency and manual utilization are improved.

CN107748739BActive Publication Date: 2024-08-27SHANGHAI DAHAN TRICOM COMM
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN201710980332.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2017-10-19
Publication Date
2024-08-27
Estimated Expiration
2037-10-19

AI Technical Summary

Technical Problem

In the SMS business, the review of huge amounts of text message content leads to manual mis-reviews and missed reviews, and a large number of similar or duplicate text messages require manual screening, which wastes a lot of labor costs.

Method used

By clustering and integrating the text message content to extract text message text templates containing variable rules, the terminal can compare the text messages with the template, reduce manual review, and directly send text messages.

Benefits of technology

It greatly saves review time, improves the utilization rate of manual review, reduces labor costs, and improves review efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN107748739B
    Figure CN107748739B
Patent Text Reader

Abstract

The present application discloses a method for extracting a text message template, an extraction device, a computer-readable storage medium and a server, the method comprising: obtaining text message data, clustering the text message data, and obtaining a classification set of multiple text messages; recording and processing the common text part of each text message in the clustering process, and obtaining the common text corresponding to each classification set; comparing each text message in the classification set with the common text, and obtaining the non-common text part of each text message; processing all the non-common text parts, and obtaining the value rules of the template variables, and using the common text and the value rules of the template variables as the template. By extracting the text message template containing the variable rules, the terminal can compare the text message with the template for review. When the text message hits a certain template, there is no need to continue manual review, and the text message can be directly sent, which greatly saves the review time and improves the efficiency of manual review.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing, and in particular to a method for extracting a text template of a short message, an extraction device, a computer-readable storage medium and a server. Background Art

[0002] In the SMS business, the application volume is increasing with the increasing customer demand. At the same time, in order to ensure the legitimacy of the content of the SMS, the content of the SMS needs to be reviewed. Generally, the SMS content needs to be reviewed manually, but in the face of a huge amount of SMS, manual review may lead to problems such as wrong review and missed review. In addition, since there are a large number of similar SMS and SMS with repeated content among the sent SMS, manual review is still required to screen, wasting a lot of labor costs.

[0003] Therefore, how to solve the problem of SMS review speed is a key issue that technical personnel are concerned about. Summary of the invention

[0004] The purpose of the present application is to provide a method, an extraction device, a computer-readable storage medium and a server for extracting SMS text templates. By clustering and integrating the SMS content, SMS text templates containing variable rules are extracted, so that the terminal can compare the SMS with the template for review. When the SMS hits a certain template, there is no need to continue manual review and the SMS can be sent directly, which greatly saves the review time and improves the utilization rate of manual review.

[0005] In order to solve the above technical problems, the present application provides a method for extracting a text template of a short message, comprising:

[0006] Acquire SMS data, cluster the SMS data, and obtain a classification set of multiple SMS messages;

[0007] In the clustering process, the common text part of each short message is recorded and processed to obtain the common text corresponding to each classification set;

[0008] Comparing each of the short messages in the classification set with the public text to obtain a non-public text portion of each of the short messages;

[0009] All the non-public text parts are processed to obtain the value-taking rules of the template variables, and the public text and the value-taking rules of the template variables are used as a template.

[0010] Optionally, the acquiring of SMS data and clustering of the SMS data to obtain a classification set of multiple SMS messages includes:

[0011] Comparing the content of the short message with the common text of the classification set in the memory to obtain a plurality of matching rates;

[0012] Determining whether all the matching rates are lower than a preset matching rate;

[0013] If yes, the short message is used as the new classification set and updated into the memory;

[0014] If not, the short message is added to the classification set with the highest matching rate.

[0015] Optionally, the acquiring SMS data and clustering the SMS data to obtain a classification set of multiple SMS messages further includes:

[0016] When the number of all the classification sets is greater than a preset number, grouping all the existing classification sets to obtain multiple set groups;

[0017] A thread is allocated to each of the collection groups, and all the threads are clustered.

[0018] Optionally, the processing of all the non-public text parts to obtain value rules of template variables, and using the public text and the value rules of the template variables as a template includes:

[0019] Obtain the value lengths of all the non-public text parts;

[0020] Selecting the shortest length and the longest length among the value lengths as the value length range of the template variable;

[0021] The common text and the value length range of the template variable are used as a template.

[0022] The present application also provides a device for extracting a text template of a short message, which is characterized by comprising:

[0023] A clustering processing module, used to obtain SMS data, cluster the SMS data, and obtain a classification set of multiple SMS messages;

[0024] A common text acquisition module, used to record and process the common text part of each short message in the clustering process, and obtain the common text corresponding to each classification set;

[0025] A non-public text acquisition module, used for comparing each of the short messages in the classification set with the public text to obtain the non-public text portion of each of the short messages;

[0026] The template acquisition module is used to process all the non-public text parts to obtain the value-taking rules of the template variables, and use the public text and the value-taking rules of the template variables as a template.

[0027] Optionally, the cluster processing module includes:

[0028] A comparison processing unit, used for comparing the content of the short message with the common text of the classification set in the memory to obtain a plurality of matching rates;

[0029] A judging unit, used to judge whether all the matching rates are lower than a preset matching rate;

[0030] A new classification set acquisition unit, used for taking the short message as the new classification set and updating it into the memory;

[0031] The classification processing unit is used to add the short message to the classification set with the highest matching rate.

[0032] Optionally, the cluster processing module further includes:

[0033] A grouping processing unit, used for grouping all the existing classification sets to obtain a plurality of set groups when the number of all the classification sets is greater than a preset number;

[0034] The thread allocation unit is used to allocate a thread to each of the collection groups, and all the threads are clustered.

[0035] Optionally, the template acquisition module includes:

[0036] A value length obtaining unit, used to obtain the value lengths of all the non-public text parts;

[0037] A value range acquisition unit, used for selecting the shortest length and the longest length of the value lengths as the value length range of the template variable;

[0038] The template acquisition unit is used to use the common text and the value length range of the template variable as a template.

[0039] A computer-readable storage medium is also provided, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the following steps are implemented:

[0040] Acquire SMS data, cluster the SMS data, and obtain a classification set of multiple SMS messages;

[0041] In the clustering process, the common text part of each short message is recorded and processed to obtain the common text corresponding to each classification set;

[0042] Comparing each of the short messages in the classification set with the public text to obtain a non-public text portion of each of the short messages;

[0043] All the non-public text parts are processed to obtain the value-taking rules of the template variables, and the public text and the value-taking rules of the template variables are used as a template.

[0044] The present application also provides a server, comprising:

[0045] Memory for storing computer programs;

[0046] The processor is used to implement the following steps when executing the computer program:

[0047] Acquire SMS data, cluster the SMS data, and obtain a classification set of multiple SMS messages;

[0048] In the clustering process, the common text part of each short message is recorded and processed to obtain the common text corresponding to each classification set;

[0049] Comparing each of the short messages in the classification set with the public text to obtain a non-public text portion of each of the short messages;

[0050] All the non-public text parts are processed to obtain the value-taking rules of the template variables, and the public text and the value-taking rules of the template variables are used as a template.

[0051] The present application provides a method for extracting a text template of a text message, comprising: acquiring text message data, clustering the text message data, and obtaining a classification set of multiple text messages; recording and processing the common text portion of each text message during the clustering process, and obtaining the common text corresponding to each of the classification sets; comparing each of the text messages in the classification set with the common text, and obtaining the non-common text portion of each text message; processing all the non-common text portions, and obtaining the value-taking rules of template variables, and using the common text and the value-taking rules of the template variables as a template.

[0052] By clustering and integrating the SMS content and extracting SMS text templates containing variable rules, the terminal can compare the SMS with the template for review. When the SMS hits a certain template, there is no need for further manual review and the SMS can be sent directly, which greatly saves review time and improves the utilization rate of manual review.

[0053] The present application also provides a device for extracting SMS text templates, a computer-readable storage medium and a server, which have the above-mentioned beneficial effects and are not elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] 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.

[0055] Figure 1 A flowchart of a method for extracting a text message template provided in an embodiment of the present application;

[0056] Figure 2 A flowchart of a clustering process of a method for extracting text templates of short messages provided in an embodiment of the present application;

[0057] Figure 3 A flowchart of clustering acceleration of a method for extracting text templates of short messages provided in an embodiment of the present application;

[0058] Figure 4 A flowchart of a method for extracting a text message template provided in an embodiment of the present application;

[0059] Figure 5 A schematic diagram of the structure of a device for extracting a text template of a short message provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] The core of this application is to provide a method, an extraction device, a computer-readable storage medium and a server for extracting SMS text templates. By clustering and integrating the SMS content, SMS text templates containing variable rules are extracted, so that the terminal can compare the SMS with the template for review. When the SMS hits a certain template, there is no need to continue manual review and the SMS can be sent directly, which greatly saves the review time and improves the utilization rate of manual review.

[0061] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are 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.

[0062] Please refer to Figure 1 , Figure 1 A flowchart of a method for extracting a text template of a short message provided in an embodiment of the present application.

[0063] This embodiment provides a method for extracting a text template of a short message, which may include:

[0064] S101, acquiring SMS data, clustering the SMS data, and obtaining a classification set of multiple SMS messages;

[0065] This step mainly involves classifying the acquired SMS data to obtain multiple classification sets. This technical solution mainly identifies the SMS content, so it is necessary to cluster the SMS data according to the SMS content to obtain multiple classification sets.

[0066] Among them, a general clustering algorithm can be used to cluster text messages, or the clustering method of text messages can be set according to customer needs. Therefore, the appropriate clustering method is selected according to the needs of the specific application environment. As long as the text message data is clustered, multiple classification sets suitable for solving the template extraction problem can be obtained. The details will not be elaborated here.

[0067] S102, recording and processing the common text part of each short message in the clustering process to obtain the common text corresponding to each classification set;

[0068] On the basis of step S101, this step aims to record and process the common text part of each short message in the above clustering method to obtain the common text corresponding to each classification set.

[0069] In the above clustering process, it is an indispensable step to compare each SMS with the SMS in the classification set or the common text corresponding to the classification set. By comparing the SMS with the SMS in the same classification set, the common text part of each SMS can be obtained.

[0070] By processing the common text part in the same classification set, the common text of this classification set can be obtained. Based on the clustering in the previous step, the short messages are classified into various classification sets according to similarity. For each classification set, the corresponding common text is extracted to obtain the unique content identifier of this classification set, that is, the similarity of each classification set is revealed and becomes an explicit common text. In other words, each common text represents the content of this unique type of short message.

[0071] It should be noted that extracting the common text portion of each classification set is equivalent to completing the partial content of the template extraction, that is, the content in the template of a classification set that will not change.

[0072] S103, comparing each SMS in the classification set with the public text to obtain a non-public text portion of each SMS;

[0073] Based on step S102, this step aims to compare each short message with the public text to obtain the non-public text portion. For each short message in each classification set, the non-public text portion of each short message can be obtained by comparing its content with the public text in each classification set.

[0074] Among them, obtaining the non-public text part is equivalent to obtaining the variable part of each SMS for the public text. In the subsequent steps, statistical processing is performed on the variable part to know the rules, form and range of the content of the variable part.

[0075] S104, processing all non-public text parts to obtain value-taking rules of template variables, and using the public text and the value-taking rules of template variables as a template.

[0076] Based on step S103, this step aims to parse all non-public text parts under a classification set to obtain the value rules of the template variables of this classification set, and merge the public text and the value rules to obtain the template of the classification set.

[0077] Among them, all non-public text parts based on a classification set can be statistically summarized to obtain specific value rules, that is, the values ​​of template variables in this classification set are always included in the scope of this rule.

[0078] Specifically, the value-taking rule can be the value length range of the variable, so for the non-public text part, the maximum and minimum values ​​of its length must be determined. The specific steps are described in the following embodiment and will not be repeated here. Other value-taking rules can also be summarized, which can be the numerical type of the value or the parameter format of the value. Different rule selection angles should be selected depending on the specific problem-solving environment, and multiple angles can also be summarized at the same time to obtain a more comprehensive description of the variable rules, which will not be repeated here.

[0079] In summary, the SMS text template extraction method provided in this embodiment can extract the SMS text template containing variable rules by clustering and integrating the SMS content, so that the terminal can compare the SMS with the template for review. When the SMS hits a certain template, there is no need for further manual review and the SMS can be sent directly, which greatly saves the review time and improves the utilization rate of manual review.

[0080] Please refer to Figure 2 , Figure 2 A flowchart of the clustering process of a method for extracting SMS text templates provided in an embodiment of the present application.

[0081] In combination with the previous embodiment, this embodiment mainly explains how to perform clustering operations in the previous embodiment. Other parts are generally the same as the previous embodiment. The same parts can refer to the previous embodiment and will not be repeated here.

[0082] This embodiment may include:

[0083] S201, comparing the content of the SMS with the public text of the classification set in the memory to obtain multiple matching rates;

[0084] This step aims to compare the content of the SMS with the public text of the classification set to obtain a matching rate. The matching rate can be understood as similarity, that is, the degree of similarity between the content of the SMS and the public text. In order to determine whether the SMS should be classified into a certain classification set, a similarity comparison should be performed for each classification set to obtain multiple matching rates.

[0085] Among them, the common text can be gradually generated in the process of clustering and changes according to the changes of the short messages in the classification set.

[0086] Among them, the set table contains all the current classification sets. When a certain SMS needs to be judged, the SMS is judged against the classification sets in the set table.

[0087] S202, determining whether all matching rates are lower than a preset matching rate;

[0088] Based on step S201, this step is intended to determine whether the obtained matching rate is lower than a preset value.

[0089] The preset matching rate is equivalent to a critical value for determining whether the message can be classified. If the matching rate is lower than the critical value, it means that the content of the message is quite different from the content of the public text corresponding to the classification set, and is not suitable to be included in the same classification set.

[0090] Specifically, the preset matching rate can be set according to the specific application environment and the specific content of the problem to be solved, which will not be elaborated here.

[0091] S203, if yes, the short message is taken as a new classification set and updated into the memory;

[0092] Based on step S202, this step aims to treat the SMS with a matching rate lower than the preset rate as a new classification set. In other words, the matching rate of the SMS with all current classification sets is lower than the critical value, that is, it is not suitable to be classified into a certain classification set, so the content of the SMS should be treated as a new classification set and updated into the memory.

[0093] Here, memory refers to general memory. Since the program needs to store temporary data in memory during operation to speed up the reading of data, this step will store all clustered classification sets in memory.

[0094] S204: If not, add the short message to the classification set with the highest matching rate.

[0095] Based on step S202, this step aims to add the short message to the classification set with the highest matching rate.

[0096] Among them, the highest matching rate means that among all classification sets, the content of the SMS is the most similar. Therefore, adding the SMS to this set is the most appropriate classification method.

[0097] Please refer to Figure 3 , Figure 3 A flowchart of clustering acceleration of a method for extracting SMS text templates provided in an embodiment of the present application.

[0098] In combination with the previous embodiment, this embodiment mainly expands how to perform clustering acceleration in the previous embodiment. Other parts are generally the same as the previous embodiment. The same parts can refer to the previous embodiment and will not be repeated here.

[0099] This embodiment may include:

[0100] S301, when the number of all classification sets is greater than a preset number, grouping all existing classification sets to obtain multiple set groups;

[0101] S302, assigning a thread to each collection group, and performing clustering processing on all threads.

[0102] The grouping of the classification sets may be randomly allocated or evenly allocated according to the volume of each classification set. The appropriate grouping method should be selected according to the specific application environment, which will not be elaborated here.

[0103] In the clustering process, the SMS content is usually matched in a serial manner to find the class with the highest matching rate, but this is time-consuming. Therefore, in this embodiment, each group is assigned a thread, and the SMS classification process can be performed in parallel, and multiple classification sets can be matched at the same time, thereby improving the efficiency of clustering and solving the time-consuming problem of clustering.

[0104] Please refer to Figure 4 , Figure 4 A flowchart of a template acquisition method for extracting a text message template provided in an embodiment of the present application.

[0105] In combination with the previous embodiment, this embodiment mainly explains how to obtain the template in the previous embodiment. Other parts are generally the same as the previous embodiment. The same parts can refer to the previous embodiment and will not be repeated here.

[0106] This embodiment may include:

[0107] S401, obtaining the value length of all non-public text parts;

[0108] This step is intended to obtain the length of all non-public text parts. In this embodiment, the main purpose is to obtain the length rule of the variable, so it is necessary to obtain the length of the non-public text part to obtain the length range of the variable.

[0109] S402, selecting the shortest length and the longest length among the value lengths as the value length range of the template variable;

[0110] Based on step S401, this step aims to obtain the shortest and longest lengths of the non-public texts to obtain the range of the variable lengths. For the range of the value lengths of the non-public texts, the range of the value can be obtained by obtaining the shortest and longest lengths thereof.

[0111] S403, using the common text and the value length range of the template variable as a template.

[0112] Based on step S402, this step aims to combine the acquired length range and the common text to obtain a template.

[0113] Specifically, the operation of this embodiment can be, for example, in a classification set, the public text is: "Your verification code is, thank you for your patronage", and the cluster set contains 3 text messages: the first one is "Your verification code is 1234, thank you for your patronage"; the second one is "Your verification code is 567, thank you for your patronage"; the third one is "Your verification code is 123456, thank you for your patronage". First, the first text message is processed and compared with the public text for interception. After interception, the non-public text 1234 is obtained, and its length is recorded as 4. In the same way, the non-public text lengths of the second and third text messages are obtained as 3 and 6. Take the shortest length and the longest length as the length range of the variable value rule, and combine them with the public text to obtain the template extracted by the cluster: "Your verification code is {3,6}, thank you for your patronage".

[0114] The embodiment of the present application provides a method for extracting SMS text templates, which can extract SMS text templates containing variable rules by clustering and integrating SMS contents, so that the terminal can compare the SMS with the template for review. When the SMS hits a certain template, there is no need for further manual review and the SMS can be sent directly, which greatly saves review time and improves the utilization rate of manual review.

[0115] A device for extracting a text message template provided in an embodiment of the present application is introduced below. The device for extracting a text message template described below and the method for extracting a text message template described above can refer to each other.

[0116] Please refer to Figure 5 , Figure 5 A schematic diagram of the structure of a device for extracting a text template of a short message provided in an embodiment of the present application.

[0117] This embodiment may include:

[0118] The cluster processing module 100 is used to obtain SMS data, cluster the SMS data, and obtain a classification set of multiple SMS messages;

[0119] The common text acquisition module 200 is used to record and process the common text part of each short message during the clustering process to obtain the common text corresponding to each classification set;

[0120] The non-public text acquisition module 300 is used to compare each SMS in the classification set with the public text to obtain the non-public text part of each SMS;

[0121] The template acquisition module 400 is used to process all non-public text parts to obtain the value-taking rules of the template variables, and use the public text and the value-taking rules of the template variables as the template.

[0122] Optionally, the clustering processing module 100 includes:

[0123] A comparison processing unit, used to compare the content of the SMS with the common text of the classification set in the memory to obtain multiple matching rates;

[0124] A judging unit, used to judge whether all matching rates are lower than a preset matching rate;

[0125] A new category set acquisition unit is used to take the short message as a new category set and update it into the memory;

[0126] The classification processing unit is used to add the short message to the classification set with the highest matching rate.

[0127] Optionally, the clustering processing module 100 may further include:

[0128] A grouping processing unit, used for grouping all existing classification sets to obtain multiple set groups when the number of all classification sets is greater than a preset number;

[0129] The thread allocation unit is used to allocate a thread to each collection group, and all threads are clustered.

[0130] Optionally, the template acquisition module 400 may include:

[0131] A value length obtaining unit, used to obtain the value lengths of all non-public text parts;

[0132] A value range acquisition unit is used to select the shortest length and the longest length among the value lengths as the value length range of the template variable;

[0133] The template acquisition unit is used to use the value length range of the common text and the template variable as the template.

[0134] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0135] Acquire SMS data, cluster the SMS data, and obtain a classification set of multiple SMS messages;

[0136] In the clustering process, the common text part of each SMS is recorded and processed to obtain the common text corresponding to each classification set;

[0137] Compare each SMS in the classified set with the public text to obtain the non-public text portion of each SMS;

[0138] All non-public text parts are processed to obtain the value-taking rules of the template variables, and the public text and the value-taking rules of the template variables are used as the template.

[0139] The present application also provides a server, including:

[0140] Memory for storing computer programs;

[0141] The processor, when used to execute a computer program, implements the following steps:

[0142] Acquire SMS data, cluster the SMS data, and obtain a classification set of multiple SMS messages;

[0143] In the clustering process, the common text part of each SMS is recorded and processed to obtain the common text corresponding to each classification set;

[0144] Compare each SMS in the classified set with the public text to obtain the non-public text portion of each SMS;

[0145] All non-public text parts are processed to obtain the value-taking rules of the template variables, and the public text and the value-taking rules of the template variables are used as the template.

[0146] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0147] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0148] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0149] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0150] If the integrated unit is implemented in the form of 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 the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a function calling device, or a network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0151] The above is a detailed introduction to a method for extracting a text message template, an extraction device, a computer-readable storage medium and a server provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. A method for extracting a text template of a short message, characterized in that: include: Acquire SMS data, cluster the SMS data, and obtain a classification set of multiple SMS messages; In the clustering process, the common text part of each short message is recorded and processed to obtain the common text corresponding to each classification set; Comparing each of the short messages in the classification set with the public text to obtain a non-public text portion of each of the short messages; Processing all the non-public text parts to obtain the value rules of the template variables, and using the public text and the value rules of the template variables as a template; the value rules are any one or any combination of the length range of the value, the numerical type of the value, and the parameter format of the value; The acquiring of the SMS data and clustering of the SMS data to obtain a classification set of multiple SMS messages includes: Comparing the content of the short message with the common text of the classification set in the memory to obtain a plurality of matching rates; Determining whether all the matching rates are lower than a preset matching rate; If yes, the short message is used as the new classification set and updated into the memory; If not, adding the short message to the classification set with the highest matching rate; The acquiring of the SMS data and clustering of the SMS data to obtain a classification set of multiple SMS messages also includes: When the number of all the classification sets is greater than a preset number, grouping all the existing classification sets to obtain multiple set groups; A thread is allocated to each of the collection groups, and all the threads are clustered.

2. The extraction method according to claim 1, characterized in that The step of processing all the non-public text parts to obtain the value rules of the template variables, and using the public text and the value rules of the template variables as a template includes: Obtain the value lengths of all the non-public text parts; Selecting the shortest length and the longest length among the value lengths as the value length range of the template variable; The common text and the value length range of the template variable are used as a template.

3. A device for extracting a text template of a short message, characterized in that: include: A clustering processing module, used to obtain SMS data, cluster the SMS data, and obtain a classification set of multiple SMS messages; A common text acquisition module, used to record and process the common text part of each short message in the clustering process, and obtain the common text corresponding to each classification set; A non-public text acquisition module, used for comparing each of the short messages in the classification set with the public text to obtain the non-public text portion of each of the short messages; A template acquisition module, used for processing all the non-public text parts to obtain the value rules of the template variables, and using the public text and the value rules of the template variables as a template; The value-taking rule is any one or any combination of the length range of the value, the numerical type of the value, and the parameter format of the value; The cluster processing module comprises: A comparison processing unit, used for comparing the content of the short message with the common text of the classification set in the memory to obtain a plurality of matching rates; A judging unit, used to judge whether all the matching rates are lower than a preset matching rate; A new classification set acquisition unit, used for taking the short message as the new classification set and updating it into the memory; A classification processing unit, used for adding the short message to the classification set with the highest matching rate; Also includes: A grouping processing unit, used for grouping all the existing classification sets to obtain a plurality of set groups when the number of all the classification sets is greater than a preset number; The thread allocation unit is used to allocate a thread to each of the collection groups, and all the threads are clustered.

4. The extraction device according to claim 3, characterized in that The template acquisition module includes: A value length obtaining unit, used to obtain the value lengths of all the non-public text parts; A value range acquisition unit, used for selecting the shortest length and the longest length of the value lengths as the value length range of the template variable; The template acquisition unit is used to use the common text and the value length range of the template variable as a template.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for extracting a text message template as claimed in any one of claims 1 to 2 are implemented.

6. A server, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for extracting a text message template as described in any one of claims 1 to 2 when executing the computer program.

Citation Information

Patent Citations

  • Short message processing method and short message processing device

    CN105516940A

  • Short message type determination method and system and short message management platform

    CN106777245A

  • Text information processing method and device

    CN107229638A

  • System and method of converting short message for supporting automatic update of mobile housekeeping book

    KR1020110125500A

  • Method and apparatus for pushing messages

    US20100075701A1