Illegal short message identification method and device, electronic equipment and storage medium

Through semantic understanding, identifying illegal SMS, and using graph clustering algorithm to identify entities and relationships in SMS, solving the problem of high missed detection rates in traditional methods, achieving more efficient identification of illegal SMS.

CN119443098APending Publication Date: 2025-02-14CHINA MOBILE GROUP SHANDONG +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411470474.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

Traditional methods of identifying illegal SMS rely on keyword matching and have a high missed detection rate, because illegal SMS can avoid keyword use through text description techniques.

Method used

Identify illegal SMS through semantic understanding, find out the entities and entity relationships of established illegal SMS, build a SMS relationship map, use the graph clustering algorithm to classify the community, and determine that other SMS in the suspicious community is illegal SMS.

Benefits of technology

Compared with traditional methods, recognition methods based on semantic understanding are more difficult to targeted detection, which significantly reduces the missed detection rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443098A_ABST
    Figure CN119443098A_ABST
Patent Text Reader

Abstract

The invention provides an illegal short message identification method, apparatus and device, and a computer program product. The method comprises the steps that semantic recognition is conducted on short messages in a target short message set, entities and entity relations in the short messages are determined, and part of the short messages in the target short message set are set violation short messages. A homogeneous short message relation graph corresponding to the target short message set is constructed, nodes of the graph are short messages, edges of the graph are similarities among the short messages, and the similarities among the short messages are determined based on common entities and corresponding entity relations. And performing community classification on the nodes of the homogeneous short message relation graph to obtain at least two communities. And determining the community which contains the established violation short message and meets a preset standard as a suspicious community, and determining the violation short message from other short messages except the established violation short message contained in the suspicious community. According to the method, the entity and the entity relationship of the established violation short message generality can be found based on semantic understanding, so that the entity and the entity relationship are used as an interpretability basis, and a new violation short message is mined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of risk control, and in particular to a method, device, equipment and computer program product for identifying illegal text messages. Background Art

[0002] Currently, industry-specific SMS messages are widely used and have become an important carrier of information dissemination in people's daily lives. Therefore, the identification of illegal SMS messages is particularly important.

[0003] At present, the traditional method of identifying illegal text messages mainly relies on keyword matching. However, in actual applications, many illegal text messages will avoid the use of keywords through appropriate text description techniques. The illegal text message identification method based on keyword matching has high limitations and a high missed detection rate.

[0004] Therefore, it is necessary to propose a solution to identify illegal text messages from an explainable perspective. Summary of the invention

[0005] The purpose of this application is to provide a method, device, equipment and computer program product for identifying illegal text messages, which can find out the entities and entity relationships common to established illegal text messages based on semantic understanding, so as to use this as an interpretable basis to mine new illegal text messages.

[0006] In order to achieve the above purpose, the embodiment of the present application is implemented as follows: In a first aspect, a communication encryption control method is provided, comprising: Performing semantic recognition on the text messages in the target text message set to determine entities and entity relationships of the text messages in the target text message set, where some of the text messages in the target text message set are established illegal text messages; Constructing a first SMS relationship graph corresponding to the target SMS set, wherein the nodes of the first SMS relationship graph are the SMS in the target SMS set, the edges of the first SMS relationship graph are the similarities between the SMS, and the similarities between the SMS in the target SMS set are determined based on common entities and corresponding entity relationships; Classifying the nodes of the first SMS relationship graph into communities based on a graph clustering algorithm to obtain at least two communities; The community containing the predetermined illegal text messages whose number meets a preset standard is determined as a suspicious community, and illegal text messages are determined from other text messages in the suspicious community except the predetermined illegal text messages.

[0007] In a second aspect, a device for identifying illegal text messages is provided, comprising: An entity analysis module, used for performing semantic recognition on the text messages in the target text message set, determining the entities and entity relationships of the text messages in the target text message set, and some of the text messages in the target text message set are established illegal text messages; A graph generation module, used to construct a first SMS relationship graph corresponding to the target SMS set, wherein the nodes of the first SMS relationship graph are the SMS in the target SMS set, and the edges of the first SMS relationship graph are the similarities between the SMS, and the similarities between the SMS in the target SMS set are determined based on common entities and corresponding entity relationships; A community classification module, used to classify the nodes of the first short message relationship graph into communities based on a graph clustering algorithm to obtain at least two communities; The violation identification module is used to determine the community containing the predetermined violation text messages in a number that meets a preset standard as a suspicious community, and to determine the violation text messages from other text messages in the suspicious community except the predetermined violation text messages.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, cause the processor to execute the method described in the first aspect.

[0009] According to a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions implement the method described in the first aspect when executed by a processor.

[0010] The scheme of the embodiment of the present application prepares a target SMS set, and some of the SMS in the target SMS set are established illegal SMS; then, semantic recognition is performed on the SMS in the target SMS set, and the entities and entity relationships of the SMS in the target SMS set are determined to construct the first SMS relationship graph of the point target SMS set. The nodes of the first SMS relationship graph are the SMS in the target SMS set, and the edges are the similarities between the SMS. Among them, the similarity between the SMS is determined based on the common entity and the corresponding entity relationship. After that, the nodes of the first SMS relationship graph are classified into communities based on the graph clustering algorithm to determine the community containing the number of established illegal SMS that meets the preset standard as a suspicious community, and determine the illegal SMS from other SMS in the suspicious community except the established illegal SMS. It can be seen that the scheme of the embodiment of the present application finds out the entities and entity relationships of the commonality of the established illegal SMS based on semantic understanding, so as to use this as the basis for interpretability, and mines out new illegal SMS. Compared with the traditional illegal SMS scheme based on keyword matching, it is more difficult to be targeted to avoid detection, so there is a significant improvement in the missed detection rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] 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 some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0012] Figure 1 Schematic diagram of the process of identifying illegal text messages according to an embodiment of the present application.

[0013] Figure 2 A schematic diagram of the process of semantically encoding text messages in the method for identifying illegal text messages according to an embodiment of the present application.

[0014] Figure 3 This is a flow chart of entity relationship identification of text messages by the method for identifying illegal text messages according to an embodiment of the present application.

[0015] Figure 4 This is a first schematic diagram of the second SMS relationship map of the illegal SMS identification method according to an embodiment of the present application.

[0016] Figure 5 This is a second schematic diagram of the second SMS relationship map of the illegal SMS identification method according to an embodiment of the present application.

[0017] Figure 6 This is a schematic diagram of a first SMS relationship map of the illegal SMS identification method according to an embodiment of the present application.

[0018] Figure 7 This is a schematic diagram of community classification of a first SMS relationship graph by the illegal SMS identification method according to an embodiment of the present application.

[0019] Figure 8 This is a schematic diagram of the structure of the illegal text message identification device according to an embodiment of the present application.

[0020] Fig. 9 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] As mentioned above, the traditional method of identifying illegal SMS mainly relies on keyword matching. In actual applications, many illegal SMS will avoid the use of keywords through appropriate text description techniques to evade detection. It can be seen that the traditional method of identifying illegal SMS is subject to the limitations of keyword matching and has a high missed detection rate.

[0022] To this end, this application aims to propose a technical solution for identifying illegal text messages from an explainable perspective, which has a better illegal text message identification effect than the traditional method of keyword matching.

[0023] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0024] An embodiment of the present application provides a method for identifying illegal text messages. Figure 1 The flowchart of the method for identifying illegal text messages includes the following steps: S102, performing semantic recognition on the text messages in the target text message set, determining the entities and entity relationships of the text messages in the target text message set, and some of the text messages in the target text message set are established illegal text messages.

[0025] In this embodiment, the target SMS set mainly includes SMS messages to be identified as violations and established violation SMS messages, wherein the established violation SMS messages are used as reference samples in subsequent clustering.

[0026] In one implementation, this embodiment first performs semantic coding on the text messages in the target text message set, and then identifies entities and entity relationships in the text messages based on the semantic coding results.

[0027] In the semantic encoding process, each character can be converted into a word vector, and then further semantic encoding is performed based on the word vector to obtain the corresponding semantic encoding feature sequence.

[0028] As an exemplary introduction, this embodiment can use a long short-term memory (LSTM) model to semantically encode the text messages in the target text message set. Figure 2 As shown in the figure, the encoder structure is composed of an embedding layer and an LSTM network. The embedding layer is used to convert each character of the SMS into a word vector, and obtain the word vector sequence E1, E2, ..., E n , n represents the number of characters in the text message; the LSTM model is used to embed the word vector sequence E1, E2, ..., E n Perform semantic coding to further obtain the semantic coding feature sequence H1, H2, ..., H corresponding to the text message n .

[0029] In the process of entities and entity relationships, entity recognition depends on the semantics of characters. After determining the semantics of characters, the entity to which the characters belong can be directly determined. Entity relationship recognition can be completed through the entity relationship recognition model constructed by the pooling layer and the classifier. Figure 3 As shown, Figure 3 It is a schematic diagram of the structure of the entity relationship recognition model. The pooling layer is used to encode the semantic feature sequence H1, H2, ..., H n Downsampling is performed to obtain a simplified semantic coding feature sequence H'1, H'2, ..., H' n ; The classifier is used to simplify the semantic encoding feature sequence H'1, H'2, ..., H' output of the pooling layer n Classify and identify entity relationships to obtain a set of entity relationships that may exist in the text message, S{1, 2, ..., m}, where m represents the number of entity relationships identified by the classifier.

[0030] based on Figure 3 It can be seen that the above entity relationship recognition model belongs to a classification model. The sample text marked with entity relationship labels can be encoded through the encoding logic of the semantic feature encoding described above, and the training of the entity relationship recognition model can be completed based on the obtained encoding results. During the training process, the entity relationship labels marked by the sample text can be regarded as the output expectations of the entity relationship recognition model for the sample text. By continuously iteratively adjusting the parameters in the pooling layer and the classifier, the prediction results of the entity relationship recognition model for the entity relationship of the sample text gradually converge to the marked entity relationship labels, thereby forming the ability to recognize entity relationships in text.

[0031] In practical applications, both the Large Language Model (LLM) and the language representation model can adopt the above-mentioned long short-term memory model and entity relationship recognition model structure. Therefore, the SMS text of the target SMS can be directly input into the large language model or the language representation model to extract the entities and entity relationships of the SMS in the target SMS set.

[0032] It should be noted that the entity described in this embodiment is an entity in the semantic dimension, not a literal entity in the text content.

[0033] Assume that the content of the text message (desensitized) is: "

Traffic Management Bureau

[0034] The corresponding entities include: Traffic Management Bureau, car owner, ETC card, ectcx.cc and account cancellation; The entity relationships are: 1) Source entity: Traffic Management Bureau, destination entity: car owner, entity relationship: notification sending; 2) Source entity: high-speed ETC card, destination entity: car owner, entity relationship: disabled state; 3) Source entity: high-speed ETC card, destination entity: ectcx.cc, entity relationship: recovery path; 4) Source entity: high-speed ETC card, end point entity: account cancellation, entity relationship: delayed result.

[0035] It should be understood that for machine execution, it is impossible to extract the above entities and entity relationships without semantic recognition. For example, in the relationship of notification sending, if the semantic meaning of notification sending is not understood, it is impossible to determine that the traffic control bureau is the source entity of notification sending and the car owner is the destination entity of notification sending.

[0036] Furthermore, the extraction of entities and entity relations in text messages using a large language model is taken as an example.

[0037] In practical applications, this embodiment can set a large language model to extract prompt words of entities and entity relationships from text messages, so that the large language model performs semantic recognition on text messages in the target text message set according to the prompt words to extract entities and entity relationships in the semantic dimension. Among them, the prompt words can specifically indicate the information structure of the extracted entities and entity relationships, and the information structure can include semantic attributes, text content, and description annotations.

[0038] For example, for a target SMS with the text content of "Hello, your mobile phone has become a lucky viewer of the "XXXXXXXX" program, and you have won 98,000 yuan and an Apple laptop. Please call 13579 immediately", the prompt words can be set as follows: #Basic requirements: Extract entities and entity relationships from the text content of the target short message "...". The basic attributes of the obtained entities and entity relationships need to be determined according to the content of the target short message, and the attributes at least include semantic attributes, text content, and description annotations. In addition, the basic attributes of the entity relationship need to explain the entity evidence corresponding to the source point and endpoint. The semantic attributes and text content need to come from the text content of the target SMS, and the description annotation comes from the summary of the basic attributes of the text content of the target SMS. The final output format is Json format.

[0039] #Specific example: Input = "[Traffic Management Bureau] Dear car owner! Your high-speed ETC card is disabled on June 15. Please click on ectcx.cc immediately to unblock it and resume use. If you delay, your account will be cancelled!" Output = { "Entity": [ { "Semantic Attribute Name": "Organization Name", "Text content": "Traffic Management Bureau", “Description Note”: "The name of the agency sending the notification refers to the Transportation Administration, the department responsible for transportation management and services." }, { "Semantic attribute name": "Car owner", "Text content": "Owner", “Description annotation”: "The recipients of the notification are car owners with high-speed ETC cards." }, { "Semantic attribute name": "High-speed ETC card", "Text content": "High-speed ETC card", "Description Note": "An electronic tag card used by the driver for automatic highway toll payment." }, { "Semantic Attribute Name": "Website Link", "Text content": "ectcx.cc", “Description annotation”: "A website link, after clicking it, the car owner can restore the status of the high-speed ETC card." } ], "Entity Relationship": [ { "Entity Relationship Name": "Notification Send", "Source Entity": "Traffic Management Bureau", "End Entity": "Car Owner", “Description annotation”: “The Traffic Management Bureau sent a notification to the car owner regarding the change in the status of the high-speed ETC card.” }, { "Entity Relationship Name": "Disabled State", "Source Entity": "High-speed ETC Card", "End Entity": "Car Owner", “Description annotation”: "The owner's high-speed ETC card is currently disabled." }, { "Entity Relationship Name": "Restoration Path", "Source Entity": "High-speed ETC Card", "End Entity": "Website Link", “Description Note”: “Car owners can unblock the high-speed ETC card and resume use by clicking on the website link ectcx.cc.” }, { "Entity Relationship Name": "Delayed Result", "Source Entity": "High-speed ETC Card", "End Entity": "Cancel Account", "Description Note": "If the car owner fails to deal with the disabled status of the high-speed ETC card in time, the ETC card may be cancelled." } ] } Based on the above prompt words, the following JSON string of the target SMS can be obtained: { "Entity": [ { "Semantic Property Name": "Notification Object", "Text content": "You", “Description annotation”: "The notified object refers to the mobile phone user who receives the notification." }, { "Semantic Attribute Name": "Program Name", "Text content": "《XXXXXXXX》", "Description Annotation": "The name of the TV show mentioned is a parent-child reality show." }, { "Semantic Attribute Name": "Prize", "Text content": [ "98000 Yuan", "An Apple laptop" ], “Description Notes”: "Prizes mentioned in the notification, including cash and items." }, { "Semantic Attribute Name": "Contact Number", "Text content": "13579", “Description Note”: "The contact number provided, the user needs to call this number to confirm or claim the prize." } ], "Entity Relationship": [ { "Entity Relationship Name": "Become a Lucky Viewer", "Source Entity": "Notification Object", "End Entity": "Program Name", “Description Annotation”: "Notify the recipient of being selected as a lucky viewer of the show "XXXXXXXX"." }, { "Entity Relationship Name": "Win Prizes", "Source Entity": "Notification Object", "End Entity": "Prize", "Description Note": "Notify the recipient of the prize they received for being the lucky viewer." }, { "Entity Relationship Name": "Contact Information", "Source Entity": "Notification Object", “End Entity”: “Contact Number”, “Description Note”: “The recipient needs to call this contact number to confirm or claim the prize.” } ] } S104, constructing a first SMS relationship graph corresponding to the target SMS set, wherein the nodes of the first SMS relationship graph are the SMS in the target SMS set, and the edges of the first SMS relationship graph are the similarities between the SMS. The similarities between the SMS in the target SMS set are determined based on common entities and corresponding entity relationships.

[0040] This embodiment first constructs a second SMS relationship graph corresponding to the target SMS set based on the entities and entity relationships of the SMS in the target SMS set. The nodes of the second SMS relationship graph include the SMS in the target SMS set and the entities corresponding to the SMS, and the edges of the second SMS relationship graph include the entity relationships between entities and the heterogeneous relationships between SMS and entities. Then, based on the second SMS relationship graph, the similarity between the SMS in the target SMS set is determined. Afterwards, based on the similarity between the SMS in the target SMS set, the second SMS relationship graph is converted into the first SMS relationship graph.

[0041] As an example, assume that the content of SMS 001 is "Hello, your mobile phone becomes a lucky viewer of the "XXXXXXXX" program, and you will receive 98,000 yuan and an Apple laptop. Please call 13579 immediately."

[0042] For SMS 001, based on the above introduction, we can know that the four entities including "notification object", "program name", "prize", and "contact information" can be extracted through the large language model or language representation model. If the second SMS relationship graph is constructed only for SMS 001, the structure of the second SMS relationship graph can be as follows: Figure 4As shown in the figure, the shaded points represent the text messages in the text message library, the white points represent the entities extracted by the large model, the solid line edges represent the entities associated with the text messages, and the dotted line edges represent the connections between the entities extracted by the large model.

[0043] Here, further assuming that there are SMS 002 and 003 (the contents of SMS 002 and 003 are not given any more examples), if a second SMS relationship graph is constructed around the set of SMS 001, 002, and 003, the structure of the second SMS relationship graph can be as follows: Figure 5 shown. Figure 5 In the figure, the shaded points represent SMS 001, 002, and 003, the white points represent entities, the solid edges represent entities associated with the SMS, and the dotted edges represent the connections between entities. Figure 5 In the example, the entity relationship between "notification object - prize" appears twice in the set, so the corresponding weight is 2.

[0044] It can be seen that the second SMS relationship graph of this embodiment belongs to a heterogeneous relationship. There are two different types of nodes, SMS and entity, and each SMS contains multiple types of entities, and there are multiple types of relationships between entities. Afterwards, it is necessary to convert it into the first SMS relationship graph of homogeneous relationship based on the second SMS relationship graph. The first SMS relationship graph only contains SMS nodes, and the edges between SMS represent the similarity between SMS. The specific implementation method is as follows: Assume that SMS node i contains N (N ≥ 1) entities, SMS j contains M (M ≥ 1) entities, represents the relationship weight between entity x and entity y in the SMS network. The present invention defines a method for calculating the weight between SMS nodes, using represents the weight of the edge between node i and node j.

[0045] Assume that the similarity between the SMS messages in the target SMS set is determined based on the number of occurrences of the entity relationship between the common entities in the target SMS set, then take .

[0046] like ,but ; like ,but .

[0047] Based on the above algorithm, a heterogeneous graph can be converted into a homogeneous graph, for example, Figure 5 The second SMS relationship graph in the example is converted to Figure 6 The first SMS relationship map is shown. Figure 5In the example, SMS 001 and 002 both contain two entities: notification object and SMS. The weight between the two entities is 2. Therefore, Figure 6 In the example, the weight between SMS 001 and 002 is 0.5.

[0048] S106, classifying the nodes of the first short message relationship graph into communities based on a graph clustering algorithm to obtain at least two communities.

[0049] Specifically, in this embodiment, the following steps may be iterated multiple times on the first short message relationship graph until the modularity of the first short message relationship graph no longer changes: 1) Determine each node in the first SMS relationship graph as an independent community; 2) Continuously reassign each current node to the community where the neighbor node with the largest positive modularity gain is located until the community no longer changes; The calculation formula of modularity is as follows: ; ; in, represents the sum of the weights of all edges connected to node i; Indicates the community to which the node belongs; Represents the sum of the weights of all edges.

[0050] set up represents the modularity gain, then The calculation formula is as follows: ; The positive modularity gain in this embodiment refers to .

[0051] 3) All nodes in the same community are compressed into a new node to convert the edge weights between nodes in the community into the ring weights of the new node, and the edge weights between communities into the edge weights between new nodes. The modularity of the first SMS relationship graph is associated with the edge weights between nodes in the community and the edge weights between communities.

[0052] It should be understood that after the aggregation is completed, in theory, each community has only one final compressed node, but this node still contains all the corresponding text messages, which is equivalent to clustering the target text message set.

[0053] S108, determining a community containing predetermined illegal text messages in a number that meets a preset standard as a suspicious community, and determining illegal text messages from text messages other than the predetermined illegal text messages in the suspicious community.

[0054] In this embodiment, a community containing predetermined illegal short messages with a predetermined proportion may be determined as a suspicious community.

[0055] For example, if a community is determined as a suspicious community as long as the number of predetermined illegal text messages meets a predetermined proportion, the preset standard is: the number of predetermined illegal text messages>0.

[0056] After determining the suspicious community, the illegal text messages can be determined from the text messages other than the established illegal text messages in the suspicious community. For example, all the other text messages other than the established illegal text messages in the suspicious community can be determined as illegal text messages. For another example, other risk detections can be performed on all the other text messages other than the established illegal text messages in the suspicious community, such as existing keyword matching. If other risk detection results indicate that there is a risk, the other text messages are determined as illegal text messages.

[0057] As an illustrative introduction, refer to Figure 7 As shown, assuming that SMS 001 and 002 are classified into community 1, and SMS 003 is classified into community 2, where SMS 001 is a known illegal SMS, community 1 can be regarded as a suspicious community, and SMS 002 in community 1, which has not been determined to be illegal before, can be classified as an illegal SMS.

[0058] In addition, this embodiment determines the illegal means corresponding to the suspicious community based on the text messages in the suspicious community; then, the text message number, text message content, text message source, community ID and illegal means of the suspicious community are associated and stored as a knowledge sample of illegal text messages.

[0059] Assume that the content of SMS 001 is "Hello, your mobile phone has become a lucky viewer of the "XXXXXXXX" program, and you will receive 98,000 yuan and an Apple laptop. Please call 13579 immediately." The content of SMS 002 is "

YY Bank

[0060] In summary, the method of this embodiment prepares a target SMS set, and some of the SMS in the target SMS set are established illegal SMS; then, semantic recognition is performed on the SMS in the target SMS set, and the entities and entity relationships of the SMS in the target SMS set are determined to construct a first SMS relationship graph of the target SMS set, and the nodes of the first SMS relationship graph are the SMS in the target SMS set, and the edges are the similarities between the SMS. Among them, the similarity between the SMS is determined based on the common entities and the corresponding entity relationships. After that, the nodes of the first SMS relationship graph are classified into communities based on the graph clustering algorithm to determine the community containing the number of established illegal SMS that meets the preset standard as a suspicious community, and determine the illegal SMS from other SMS in the suspicious community except the established illegal SMS. It can be seen that the method of this embodiment finds out the entities and entity relationships of the commonality of the established illegal SMS based on semantic understanding, and thus uses this as the basis for interpretability to mine new illegal SMS. Compared with the traditional illegal SMS solution based on keyword matching, it is more difficult to be targeted to avoid detection, so there is a significant improvement in the missed detection rate.

[0061] In addition, corresponding to Figure 1 In addition to the method shown, another embodiment of this embodiment further provides an illegal text message identification device. Figure 8 8 is a schematic diagram of the structure of the illegal short message identification device 800, including: The entity analysis module 810 is used to perform semantic recognition on the text messages in the target text message set, determine the entities and entity relationships of the text messages in the target text message set, and some of the text messages in the target text message set are established illegal text messages.

[0062] The graph generation module 820 is used to construct a first SMS relationship graph corresponding to the target SMS set, wherein the nodes of the first SMS relationship graph are the SMS in the target SMS set, and the edges of the first SMS relationship graph are the similarities between the SMS, which are determined based on common entities and corresponding entity relationships.

[0063] The community classification module 830 is used to classify the nodes of the first short message relationship graph into communities based on a graph clustering algorithm to obtain at least two communities.

[0064] The violation identification module 840 is used to determine the community containing the predetermined violation text messages in a number that meets a preset standard as a suspicious community, and to determine the violation text messages from other text messages in the suspicious community except the predetermined violation text messages.

[0065] Optionally, the graph generation module 820 constructs a first SMS relationship graph corresponding to the target SMS set, including: based on the entities and entity relationships of the SMS in the target SMS set, constructing a second SMS relationship graph corresponding to the target SMS set, the nodes of the second SMS relationship graph including the SMS in the target SMS set and the entities corresponding to the SMS, the edges of the second SMS relationship graph including entity relationships between entities and heterogeneous relationships between SMS and entities; based on the second SMS relationship graph, determining the similarity between the SMS in the target SMS set; based on the similarity between the SMS in the target SMS set, converting the second SMS relationship graph into the first SMS relationship graph.

[0066] Optionally, the similarity between the text messages in the target text message set is determined based on the number of occurrences of entity relationships between common entities in the target text message set.

[0067] Optionally, the community classification module 830 performs community classification on the nodes of the first SMS relationship graph based on a graph clustering algorithm, including: performing multiple rounds of iterations on the first SMS relationship graph until the modularity of the first SMS relationship graph no longer changes: Determine each node in the first SMS relationship graph as an independent community; Continuously reassign each current node to the community where the neighbor node with the largest positive modularity gain is located until the community no longer changes; All nodes in the same community are compressed into a new node to convert the edge weights between nodes in the community into the ring weights of the new node, and the edge weights between communities are converted into the edge weights between new nodes. The modularity of the first SMS relationship graph is associated with the edge weights between nodes in the community and the edge weights between communities.

[0068] Optionally, the violation identification module 840 determines the violation text messages from other text messages in the suspicious community except the predetermined violation text messages, including: determining all other text messages in the suspicious community except the predetermined violation text messages as violation text messages.

[0069] Optionally, the device of this embodiment further includes: The storage module is used, after determining the community containing the established illegal text messages that meet the preset standards as a suspicious community, to: determine the illegal means corresponding to the suspicious community based on the text messages in the suspicious community; and associate and store the text message number, text message content, text message source, community ID and illegal means of the suspicious community as a knowledge sample of illegal text messages.

[0070] Optionally, the entity analysis module 810 performs semantic recognition on the text messages in the target text message set to determine the entities and entity relationships of the text messages in the target text message set, including: setting a large language model to extract prompt words of entities and entity relationships from the text messages, so that the large language model performs semantic recognition on the text messages in the target text message set according to the prompt words, and extracts entities and entity relationships of semantic dimensions; wherein the prompt words include the information structure of the extracted entities and entity relationships, and the information structure includes at least one of semantic attributes, text content and description annotations.

[0071] It should be noted that the illegal SMS identification device of this embodiment can be used as Figure 1 The execution subject of the method shown can thus realize Figure 1 The steps and functions in the method shown.

[0072] Fig. 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig. 9 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.

[0073] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0074] The memory is used to store the computer program. Specifically, the computer program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides the computer program to the processor.

[0075] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming the above-mentioned Figure 8 Correspondingly, the processor executes the program stored in the memory and is specifically used to perform the following operations: Semantic recognition is performed on the text messages in the target text message set to determine entities and entity relationships of the text messages in the target text message set, and some of the text messages in the target text message set are established illegal text messages.

[0076] Construct a first SMS relationship graph corresponding to the target SMS set, wherein the nodes of the first SMS relationship graph are the SMS in the target SMS set, the edges of the first SMS relationship graph are the similarities between the SMS, and the similarities between the SMS in the target SMS set are determined based on common entities and corresponding entity relationships.

[0077] Based on a graph clustering algorithm, the nodes of the first SMS relationship graph are classified into communities to obtain at least two communities.

[0078] The community containing the predetermined illegal text messages whose number meets a preset standard is determined as a suspicious community, and illegal text messages are determined from other text messages in the suspicious community except the predetermined illegal text messages.

[0079] The above is as in this manual Figure 1The method disclosed in the illustrated embodiment can be applied to a processor and implemented by the processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0080] Of course, in addition to software implementation, the electronic device of this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0081] In addition, an embodiment of the present application also proposes a computer-readable storage medium, which stores one or more computer programs, and the one or more computer programs include instructions.

[0082] When the above instructions are executed by a portable electronic device including multiple application programs, the portable electronic device can execute Figure 1 The steps in the method shown include: Semantic recognition is performed on the text messages in the target text message set to determine entities and entity relationships of the text messages in the target text message set, and some of the text messages in the target text message set are established illegal text messages.

[0083] Construct a first SMS relationship graph corresponding to the target SMS set, wherein the nodes of the first SMS relationship graph are the SMS in the target SMS set, the edges of the first SMS relationship graph are the similarities between the SMS, and the similarities between the SMS in the target SMS set are determined based on common entities and corresponding entity relationships.

[0084] Based on a graph clustering algorithm, the nodes of the first SMS relationship graph are classified into communities to obtain at least two communities.

[0085] The community containing the predetermined illegal text messages whose number meets a preset standard is determined as a suspicious community, and illegal text messages are determined from other text messages in the suspicious community except the predetermined illegal text messages.

[0086] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0087] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0088] The above are only embodiments of this specification and are not intended to limit this specification. For those skilled in the art, this specification may be subject to various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the scope of the claims of this specification. In addition, all other embodiments obtained by ordinary technicians in this field without creative work shall fall within the scope of protection of this document.

Claims

1. A method for identifying illegal text messages, characterized in that: include: Performing semantic recognition on the text messages in the target text message set to determine entities and entity relationships of the text messages in the target text message set, where some of the text messages in the target text message set are established illegal text messages; Constructing a first SMS relationship graph corresponding to the target SMS set, wherein the nodes of the first SMS relationship graph are the SMS in the target SMS set, the edges of the first SMS relationship graph are the similarities between the SMS, and the similarities between the SMS in the target SMS set are determined based on common entities and corresponding entity relationships; Classifying the nodes of the first SMS relationship graph into communities based on a graph clustering algorithm to obtain at least two communities; The community containing the predetermined illegal text messages whose number meets a preset standard is determined as a suspicious community, and illegal text messages are determined from other text messages in the suspicious community except the predetermined illegal text messages.

2. The method according to claim 1, characterized in that Constructing a first SMS relationship graph corresponding to the target SMS set includes: Based on the entities and entity relationships of the SMS in the target SMS set, a second SMS relationship graph corresponding to the target SMS set is constructed, wherein the nodes of the second SMS relationship graph include the SMS in the target SMS set and the entities corresponding to the SMS, and the edges of the second SMS relationship graph include the entity relationships between entities and the heterogeneous relationships between SMS and entities; Determining the similarity between the text messages in the target text message set based on the second text message relationship graph; Based on the similarity between the short messages in the target short message set, the second short message relationship graph is converted into a first short message relationship graph.

3. The method according to claim 1, characterized in that The similarity between the short messages in the target short message set is determined based on the number of occurrences of entity relationships between common entities in the target short message set.

4. The method according to claim 1, characterized in that: The nodes of the first SMS relationship graph are classified into communities based on a graph clustering algorithm, including: The first short message relationship graph is iterated for multiple rounds until the modularity of the first short message relationship graph no longer changes: Determine each node in the first SMS relationship graph as an independent community; Continuously reassign each current node to the community where the neighbor node with the largest positive modularity gain is located until the community no longer changes; All nodes in the same community are compressed into a new node to convert the edge weights between nodes in the community into the ring weights of the new node, and the edge weights between communities are converted into the edge weights between new nodes; wherein the modularity of the first SMS relationship graph is associated with the edge weights between nodes in the community and the edge weights between communities.

5. The method according to claim 1, characterized in that Identify illegal text messages from other text messages in the suspicious community except the established illegal text messages, including: All other text messages in the suspicious community except the established illegal text messages are determined as illegal text messages.

6. The method according to claim 5, characterized in that After determining the community containing the predetermined illegal short message that meets the preset criteria as a suspicious community, the method further includes: Based on the text messages in the suspicious community, determining the illegal means corresponding to the suspicious community; The SMS number, SMS content, SMS source, community ID and illegal means of the suspicious community are associated and stored as a knowledge sample of illegal SMS.

7. The method according to claim 1, characterized in that Performing semantic recognition on the text messages in the target text message set to determine entities and entity relationships of the text messages in the target text message set includes: Setting the large language model to extract prompt words for entities and entity relationships from the text messages, so that the large language model performs semantic recognition on the text messages in the target text message set according to the prompt words, and extracts entities and entity relationships in the semantic dimension; The prompt word includes the information structure of the extracted entities and entity relationships, and the information structure includes at least one of semantic attributes, text content and description annotations.

8. A device for identifying illegal short messages, characterized in that: include: An entity analysis module, used for performing semantic recognition on the text messages in the target text message set, determining the entities and entity relationships of the text messages in the target text message set, and some of the text messages in the target text message set are established illegal text messages; A graph generation module, used to construct a first SMS relationship graph corresponding to the target SMS set, wherein the nodes of the first SMS relationship graph are the SMS in the target SMS set, and the edges of the first SMS relationship graph are the similarities between the SMS, and the similarities between the SMS in the target SMS set are determined based on common entities and corresponding entity relationships; A community classification module, used to classify the nodes of the first short message relationship graph into communities based on a graph clustering algorithm to obtain at least two communities; The violation identification module is used to determine the community containing the predetermined violation text messages in a number that meets a preset standard as a suspicious community, and to determine the violation text messages from other text messages in the suspicious community except the predetermined violation text messages.

9. An electronic device, comprising: processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to perform the method according to any one of claims 1 to 7.

10. A computer program product, comprising a computer-readable storage medium storing a computer program, characterized in that: The computer program is operable to cause a computer to perform the method according to any one of claims 1 to 7.