Method for mining threat figure in chat group and related equipment
By preprocessing and clustering the historical information of Telegram chat groups, and combining it with the correlation algorithm to identify threat persons, the problem of poor threat identification in Telegram in the existing technology is solved, and fast and efficient threat discovery is achieved. .
Patent Information
- Application Number
- CN202410549827.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-06
- Publication Date
- 2024-09-10
AI Technical Summary
The existing threat mining technology does not work well in Telegram and cannot effectively identify threat persons, mainly due to the anonymity and the characteristics of the message content caused by a large number of spam advertisements that are not taken into account.
By preprocessing, clustering, information text similarity calculation and correlation algorithm analysis of the historical chat information of Telegram chat groups, the user's identity representative text and threat person are determined, and the thematic characteristics of the message are used without obvious user association. Quickly match keywords to improve threat discovery efficiency.
It realizes the rapid identification of threat persons in Telegram without the need for obvious user relationships, improves message processing speed and threat person discovery efficiency, is suitable for structured short text data, and reduces the need for massive data annotation.
Smart Images

Figure CN118626641A
Abstract
Description
Technical Field
[0001] The present application relates to the field of data mining technology, and in particular to a method for mining threatening persons in a chat group and related equipment. Background Art
[0002] Over the years, instant messaging tools have become the main way for people to communicate. However, for some of the instant messaging tools currently used (such as WeChat and QQ), security threats occur from time to time, and there is a risk that user information may be monitored or modified. At this time, more and more people choose encrypted instant messaging tools (such as Telegram), which ensure that users can achieve end-to-end encrypted chats and data is not stored in the cloud, while also supporting users to manage messages and accounts, thereby achieving the purpose of secure communication.
[0003] Unlike traditional instant messaging tools, groups in Telegram are generally built for a specific topic, and each group has a group profile to describe the main content of the group. Discussions within the group revolve around the topic, so the short texts in Telegram have obvious themes. At the same time, group chats in Telegram are generally managed by administrators, but due to the anonymity of the software itself, there is no obvious relationship between group members, and the management of administrators tends to gradually decline over time, resulting in a large number of spam advertisements in Telegram messages.
[0004] At present, the popular way to mine threatening figures is to use social relationships. However, in Telegram, although its messages and character information have structured information and can clarify its entities and attributes, due to the anonymity of Telegram, characters cannot be associated with each other, and thus it is impossible to analyze Telegram users through social relationships. In addition, the related technology of using social relationships does not take into account the characteristics of Telegram message content such as the subject matter and the large number of junk advertisements. Therefore, the existing technology has the problem of poor mining effect and inability to identify specific threatening figures. Summary of the invention
[0005] In view of this, the purpose of this application is to propose a method and related equipment for mining threatening characters in a chat group.
[0006] Based on the above purpose, the present application provides a method for mining threatening characters in a chat group, comprising:
[0007] Determine multiple historical chat messages of a target group, pre-process the multiple historical chat messages, and determine a historical information set;
[0008] Clustering the historical information set to determine a plurality of message topics and keywords of any of the message topics;
[0009] Determining a historical information group of any user in the target group according to the historical information set;
[0010] Calculating the similarity of the information texts in the historical information group, and determining the identity representative text of any of the users according to the similarity;
[0011] According to the plurality of information topics, keywords of any of the information topics and the user identity representative text, a target person is determined by a relevance algorithm, and the target person is determined as a threat task person.
[0012] Optionally, preprocessing the plurality of historical chat messages to determine a historical information set includes:
[0013] The historical message set is determined by segmenting any information text in the historical chat information and removing stop words through a word segmenter.
[0014] Optionally, clustering the historical information set to determine a plurality of message topics and keywords of any of the message topics includes:
[0015] Convert any word in the historical information set into a vector and then perform word embedding to obtain a word vector set;
[0016] Perform dimension reduction and clustering on any word vector in the word vector set to determine a plurality of message topics and keywords of any message topic.
[0017] Optionally, determining the historical information group of any user in the target group according to the historical information subset includes:
[0018] The user corresponding to any historical information in the historical information set is determined, the historical information in the historical information set is grouped according to the user, and a historical information group of any of the users is determined.
[0019] Optionally, calculating the similarity of the information texts in the historical information group and determining the identity representative text of any one of the users according to the similarity includes:
[0020] Calculating the word frequency-reverse document frequency value of any information text in the historical information group by using a word frequency-reverse document frequency algorithm;
[0021] Determine a preset time window, determine a plurality of information texts in the preset time window and a plurality of word frequency-inverse document frequency values of the information texts;
[0022] Merging a plurality of the information texts of any user and a plurality of word frequency-inverse document frequency values of the information texts to determine a plurality of fusion information;
[0023] The similarities of the plurality of fused information are calculated, and the identity representative text of any one of the users is determined according to the similarities.
[0024] Optionally, determining the target person by a relevance algorithm based on the plurality of information topics, keywords of any of the information topics, and the user identity representative text includes:
[0025] Determining a query string based on a plurality of the information topics and a keyword of any of the information topics;
[0026] Calculate the relevance between the query string and the user identity representative text according to a relevance algorithm, and determine the user identity representative word according to the relevance;
[0027] Determine the similarity between the user identity representative word and any keyword of the message subject, and determine the target person according to the similarity.
[0028] Based on the same inventive concept, the embodiment of the present application also provides a device for mining threatening characters in a chat group, comprising:
[0029] A preprocessing module is configured to determine a plurality of historical chat messages of a target group, preprocess the plurality of historical chat messages, and determine a historical information set;
[0030] A clustering module, configured to cluster the historical information set to determine a plurality of message topics and keywords of any of the message topics;
[0031] A user history information determination module, configured to determine a history information group of any user in the target group according to the history information set;
[0032] A user identity representative text determination module, configured to calculate the similarity of the information texts in the historical information group, and determine the identity representative text of any of the users according to the similarity;
[0033] The target person module is configured to determine the target person through a relevance algorithm based on the multiple information topics, keywords of any of the information topics and the user identity representative text, and determine the target person as a threat task person.
[0034] Based on the same inventive concept, an embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the program, a method for mining threatening characters in a chat group as described in any one of the above items is implemented.
[0035] Based on the same inventive concept, an embodiment of the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, characterized in that the computer instructions are used to enable a computer to execute any of the above-mentioned methods for mining threatening characters in a chat group.
[0036] Based on the same inventive concept, an embodiment of the present application also provides a computer program product, including computer program instructions. When the computer program instructions are executed on a computer, the computer executes any of the above-mentioned methods for mining threatening characters in a chat group.
[0037] As can be seen from the above, the method, device, electronic device, storage medium and program product for mining threatening characters in chat groups provided by the present application, the method for mining threatening characters in chat groups includes: determining multiple historical chat messages of the target group, preprocessing the multiple historical chat messages, and determining a historical information set; clustering the historical information set, determining multiple message topics and keywords of any of the message topics; determining the historical information group of any user in the target group according to the historical information set; calculating the similarity of the information text in the historical information group, and determining the identity representative text of any of the users according to the similarity; determining the target person through a relevance algorithm according to the multiple information topics, keywords of any of the information topics and the user identity representative text, and determining the target person as a threatening task person. The present application is applicable to structured short text data of Telegram, and there is no need for an obvious association relationship between users. At the same time, the method can apply the theme of the message, and potential topics can be discovered without annotating massive data. Finally, when faced with massive amounts of advertising messages, we can quickly match the text and map the keywords under the topic to the speech of the threatening person, which can greatly speed up the processing of messages and the efficiency of threatening person discovery. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are 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 these drawings without creative work.
[0039] Figure 1 A flowchart of a method for mining threatening characters in a chat group according to an embodiment of the present application;
[0040] Figure 2 A schematic diagram of the BERTopic algorithm flow in an embodiment of the present application;
[0041] Figure 3 A schematic diagram of a method for generating a user representative text according to an embodiment of the present application;
[0042] Figure 4 A schematic diagram of a device for mining threatening characters in a chat group according to an embodiment of the present application;
[0043] Figure 5 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0045] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0046] As mentioned in the background technology section, instant messaging tools have become the main way for people to communicate for many years. However, for some instant messaging tools currently used (such as WeChat and QQ), security threats occur from time to time, and there is a risk that user information may be monitored or modified. At this time, more and more people choose encrypted instant messaging tools (such as Telegram), which ensure that users can achieve end-to-end encrypted chats and data is not stored in the cloud, while also supporting users to manage messages and accounts, thereby achieving the purpose of secure communication.
[0047] Unlike traditional instant messaging tools, groups in Telegram are generally built for a specific topic, and each group has a group profile to describe the main content of the group. Discussions within the group revolve around the topic, so the short texts in Telegram have obvious themes. At the same time, group chats in Telegram are generally managed by administrators, but due to the anonymity of the software itself, there is no obvious relationship between group members, and the management of administrators tends to gradually decline over time, resulting in a large number of spam advertisements in Telegram messages.
[0048] At present, the popular way to mine threatening figures is to use social relationships. However, in Telegram, although its messages and character information have structured information and can clarify its entities and attributes, due to the anonymity of Telegram, characters cannot be associated with each other, and thus it is impossible to analyze Telegram users through social relationships. In addition, the related technology of using social relationships does not take into account the characteristics of Telegram message content such as the subject matter and the large number of junk advertisements. Therefore, the existing technology has the problem of poor mining effect and inability to identify specific threatening figures.
[0049] In view of this, the embodiment of the present application provides a method, device, electronic device, storage medium and program product for mining threatening characters in a chat group, including: determining multiple historical chat messages of a target group, preprocessing multiple historical chat messages, and determining a historical information set; clustering the historical information set, determining multiple message topics and keywords of any of the message topics; determining a historical information group of any user in the target group according to the historical information set; calculating the similarity of the information text in the historical information group, and determining the identity representative text of any of the users according to the similarity; determining the target person through a relevance algorithm according to multiple information topics, keywords of any of the information topics and the user identity representative text, and determining the target person as a threatening task person. This application is applicable to structured short text data of Telegram, and there is no need for an obvious association relationship between users. At the same time, the method can apply the theme of the message, and potential topics can be discovered without annotating massive data. Finally, when facing a large number of advertising messages, the keywords under the topic can be mapped to the speech of the threatening person through fast text matching, thereby greatly speeding up the processing speed of the message and the efficiency of threatening person discovery.
[0050] like Figure 1 As shown, the method for mining threatening persons in a chat group includes:
[0051] Step S102: determining multiple historical chat messages of the target group, pre-processing the multiple historical chat messages, and determining a historical information set;
[0052] Step S104: clustering the historical information set to determine a plurality of message topics and keywords of any of the message topics;
[0053] Step S106: determining a historical information group of any user in the target group according to the historical information set;
[0054] Step S108, calculating the similarity of the information texts in the historical information group, and determining the identity representative text of any of the users according to the similarity;
[0055] Step S110, determining a target person through a relevance algorithm according to the plurality of information topics, keywords of any of the information topics and the user identity representative text, and determining the target person as a threat task person.
[0056] In step S102, the plurality of historical chat messages are preprocessed to determine a historical information set, including: using a word segmenter to segment any information text in the historical chat messages and remove stop words to determine the historical information set.
[0057] In step S104, the historical information set is clustered to determine multiple message topics and keywords of any message topic, including: converting any vocabulary in the historical information set into a vector and then performing word embedding to form a vocabulary vector set; performing dimensionality reduction and clustering on any vocabulary vector in the vocabulary vector set to determine multiple message topics and keywords of any message topic.
[0058] In step S106, according to the historical information set, determining a historical information group of any user in the target group includes: determining a user corresponding to any historical information in the historical information set, grouping the historical information in the historical information set by user, and determining a historical information group of any user. The historical information group includes multiple historical information of the target user at historical time.
[0059] In step S108, the similarity of the information texts in the historical information group is calculated, and the identity representative text of any one of the users is determined according to the similarity, including: calculating the word frequency-reverse file frequency value of any one of the information texts in the historical information group by using a word frequency-reverse file frequency algorithm; determining a preset time window, determining multiple information texts in the preset time window and the word frequency-reverse file frequency values of multiple information texts; fusing multiple information texts of any one of the users and the word frequency-reverse file frequency values of multiple information texts to determine multiple fused information; calculating the similarity of multiple fused information, and determining the identity representative text of any one of the users according to the similarity.
[0060] In step S110, a target person is determined by a relevance algorithm based on the multiple information topics, keywords of any of the information topics, and the user identity representative text, including: determining a query string based on the multiple information topics and keywords of any of the information topics; calculating the relevance of the query string and the user identity representative text based on the relevance algorithm, and determining the user identity representative word based on the relevance; determining the similarity between the user identity representative word and the keyword of any of the message topics, and based on the similarity, determining the keyword whose similarity exceeds a preset threshold as the target person.
[0061] In some optional implementations, in Chinese groups on Telegram, topics such as black and gray industry transactions, data leakage, and politics are widely spread and pose a great threat to society, so they are defined as threat groups. At the same time, the standard for threat figures is defined as users who spread transaction-related information and make threatening remarks in groups of the above topics. After defining threat groups and threatening users, use Telegram's open source data crawling interface to crawl data, and store group messages and other content in the message storage middleware to facilitate subsequent acquisition of stock messages.
[0062] In some optional implementations, the Telegram message processing module is mainly divided into two parts: pulling messages and message preprocessing. In the message pulling module, a listener is set to listen to all speeches in each group and persist the messages in real time. In the message preprocessing module, data is taken from the storage middleware according to different requirements, and the message is segmented using the jieba word segmenter, and stop words are removed. After processing, the obtained data can be directly analyzed by the subsequent topic modeling module.
[0063] In some optional implementations, all messages of the user within a period of time are taken out from the message storage middleware, and the messages are preprocessed using a word segmenter and a stop word library to convert the messages into a set of words. The word set obtained by preprocessing is converted into a vector in the model and then embedded into a word. Then, the multidimensional vector space is reduced to a two-dimensional space through an NLP model (natural language processing model), and finally clustered in the two-dimensional space to obtain different topics and keywords under the topic. Finally, the topics and keywords such as black and gray production transactions and data leakage are manually listed to obtain a threat topic-threat theme word table for subsequent threat character mining. Among them, "all messages of the user" are all messages crawled from different groups within a period of time. In the process of generating threat topics-threat theme words, the topic obtained is the theme-theme word of the global chat. The "stop word library" is a data set containing words such as "ah, ouch" that have no actual meaning in the Chinese corpus. Specifically, the multidimensional vector space is generally determined by the model. The role of the model is to convert a word into a multidimensional vector form, and then put this multidimensional vector into the multidimensional space of the model. This process is word embedding. After word embedding, words can be correctly represented in the vector space as vectors. If you want to compare whether two words are similar, you can actually compare whether they are close in the vector space. Different models have different vector representations, and the distances between two similar words in different models will be different. If the distance represented is closer to the degree of similarity we think in reality, the model is considered to be more effective.
[0064] Furthermore, the Telegram group content analysis module is mainly divided into two parts: BERTopic (Bidirectional Encoder Representations from Transformers) topic modeling and topic-topic-representative word mapping. Figure 2 As shown in the figure, in BERTopic topic modeling, the group messages obtained by the message processing module are subject to topic modeling, so as to obtain potential topics and keywords in the group messages. Then, the topic-topic-representative word mapping is performed, and the generated topics are summarized into topics manually, and the representative words under the topics are matched with the topics. The topic-keywords finally obtained by this module will be used for relevance matching in subsequent modules.
[0065] In some optional implementations, when generating user identity representative texts, the crawled messages are separated according to whether they are from the same user, and in order to reduce the redundancy of messages, the speeches of the same user are deduplicated and merged. In the Telegram scenario, different users have great differences in the intervals and number of speeches. Group advertising users speak a lot and are similar, while real users speak relatively few speeches with low similarity. A large number of advertising messages and a small number of real speeches from the same user may be mixed together. If the similarity is directly deduplicated or the user representative text is filtered according to a simple weight, it is very likely that truly meaningful real speeches will be missed.
[0066] Furthermore, the user identity representation module is mainly divided into two parts: user message extraction and user message aggregation. In the Telegram message processing module, data within a certain period of time is obtained from the middleware according to the needs, and then the messages with the same user ID are extracted together according to the user ID. First, the TF-IDF algorithm is used to calculate the TF-IDF value in the speech vocabulary, and then the user speech is deduplicated and merged from the two dimensions of time window and similarity. Generally, threat figure mining is performed once every 24 hours, and a total of 48 time windows are set in 24 hours. In this half-hour time window, the Jaccard algorithm and the TF-IDF value in the message vocabulary are combined to perform similarity judgment on the messages in each other, and the similarity weight calculated by Jaccard is set to 0.5. When the similarity of two messages exceeds the threshold of 0.5, it is considered that the speech is repeated and can be removed. Finally, all non-repeated messages are aggregated to form a user identity representation. The user identity representation of this module will be used for relevance matching for subsequent threat figure discovery.
[0067] In some optional implementations, taking into account the factors of real speech intervals, speech frequency and number of speeches in Telegram, global text feature extraction is used to assist in selecting the most representative speeches of users, and the time window and similarity are used in combination to remove duplicates and merge user speeches. In the global text feature extraction, the vocabulary distribution of the message is taken into account, so not only the frequency of words is considered, but also the influence of common words on the feature weight is considered, so as to ensure that the real representative speeches of users are extracted. In the time dimension, considering that the complexity of similarity cyclic comparison of all speeches is too high, the user's speech time period is evenly divided to reduce the time complexity. In the similarity dimension, considering that advertising speeches have a high similarity compared to real speeches, a higher similarity threshold is set when comparing similarities, so as to ensure that the advertising text can be deduplicated as much as possible.
[0068] Furthermore, the similarity between a message and other messages is determined by the following formula:
[0069] Similarity(A,B)=α*|A∩B| / |A∪B|+(1-α)*TF(A)*log(N / DF(A))
[0070] Among them, Similarity(A, B) is the similarity between message A and message B. α is an adjustment parameter, |A∩B| is the number of elements in the intersection of message A and message B, |A∪B| is the number of elements in the union of message A and message B, N is the number of all messages of the user, DF is the number of documents containing specific words, and TF is the frequency of specific words. By integrating their text similarity and their text features, the similarity score of A and B is obtained. Even if a spam advertisement has a high text similarity with a high-quality speech, it will get a lower similarity score due to its lower text features. The final similarity score ranges from 0 to 1. The closer the value is to 1, the more representative the message is, and the closer the value is to 0, the less representative the message is.
[0071] Specifically, Figure 3 As shown in the figure, within the speech of the same user, the speech time period is first evenly divided into the same time windows, and then MapReduce is used to calculate the similarity of the messages in the time window. In Map, all messages in the time window are merged and handed over to Reduce for processing. In Reduce, the similarity of the Map messages is merged, and then Reduce is performed again externally to merge the messages in multiple windows, and finally a user identity representative text with low similarity is formed.
[0072] This application can quickly generate user representative text while removing massive amounts of advertising text. When generating user representative text, the global TF-IDF is used to calculate the text features of the vocabulary in the user message. When comparing the similarity of messages, the time complexity of simply performing a cyclic comparison is too high. Using a time window for segmentation and using MapReduce for calculation, and incorporating the TF-IDF of the message vocabulary when calculating the similarity, this method can greatly improve the time for similarity comparison, and can well distinguish between real speech and advertisements through text features.
[0073] In some optional implementations, the discovery of the target person includes: forming a query string with multiple topics and keywords under the topics, and considering the different threat levels of different topics, manually setting query weights for different topics, setting the highest weights for topics with greater threats such as dark web transactions, drugs, guns, and data leaks, setting lower weights for topics such as cryptocurrency and proxy sharing, and setting the lowest weights for advertising topics. Then, a relevance algorithm is used to calculate the relevance between the query string and the user identity representative text, and the relevance is weighted according to the topic of the query string. Finally, the similarity and matching degree between the subject words and the user identity representative are determined based on the weighted relevance, and the subject words are sorted according to the relevance score. These subject words will be used as user identity representative words, thereby obtaining the corresponding relationship between user-user identity representative words, and finally, the user is judged whether the user is a threatening user based on the user-user identity representative words.
[0074] Furthermore, the corresponding calculation of the relevance score is shown in the following formula:
[0075] Correlation=∑[IDF(t)*((tf(t,d)*(k1+1)) / (tf(t,d)+k1*(1-b+b*(L(d) / L_avg))))]
[0076] Among them, IDF(t) represents the inverse document frequency of the subject word t in the user identity representative text d, tf(t, d) represents the word frequency of the subject word t in the user identity representative text, k1 and b are adjustment parameters, and the commonly used default values are 1.2 and 0.75, L(d) represents the length of the user identity representative text, and L_avg represents the average length of the user identity representative text.
[0077] In some optional implementations, the identification of threatening persons includes: using a similarity algorithm to compare the similarity between the threatening topic-threatening subject words obtained by topic modeling and the user-user identity representative words. Considering that the threat levels between different subject words are different, the same weight is set for the threatening words according to the threat level of the threatening topic. Then, a similarity matching threshold is set, and if the user identity representative word exceeds a certain threshold, the user is determined to be a threatening person.
[0078] As can be seen from the above, the method for mining threatening characters in a chat group includes: determining multiple historical chat messages of a target group, preprocessing multiple historical chat messages, and determining a historical information set; clustering the historical information set, determining multiple message topics and keywords of any message topic; determining the historical information group of any user in the target group according to the historical information set; calculating the similarity of the information text in the historical information group, and determining the identity representative text of any user according to the similarity; determining the target person through a relevance algorithm according to multiple information topics, keywords of any information topic, and the user identity representative text, and determining the target person as a threatening task person. This application is applicable to structured short text data of Telegram, and there is no need for an obvious association relationship between users. At the same time, the method can apply the theme of the message, and potential topics can be discovered without annotating massive data. Finally, when facing a large number of advertising messages, the keywords under the topic can be mapped to the speech of the threatening person through fast text matching, thereby greatly speeding up the processing speed of the message and the efficiency of threatening person discovery.
[0079] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0080] It should be noted that the above describes some embodiments of the present application. 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 above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying 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.
[0081] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a device for mining threatening characters in a chat group.
[0082] refer to Figure 4 The device for mining threatening characters in the chat group includes:
[0083] A preprocessing module 402 is configured to determine a plurality of historical chat messages of a target group, preprocess the plurality of historical chat messages, and determine a historical information set;
[0084] A clustering module 404 is configured to cluster the historical information set to determine a plurality of message topics and keywords of any of the message topics;
[0085] The user history information determination module 406 is configured to determine a history information group of any user in the target group according to the history information set;
[0086] A user identity representative text determination module 408, configured to calculate the similarity of the information texts in the historical information group, and determine the identity representative text of any of the users according to the similarity;
[0087] The target person module 410 is configured to determine the target person through a relevance algorithm based on the multiple information topics, keywords of any of the information topics and the user identity representative text, and determine the target person as a threat task person.
[0088] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0089] The device of the above embodiment is used to implement the corresponding method for mining threatening characters in a chat group in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0090] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for mining threatening characters in a chat group described in any of the above embodiments is implemented.
[0091] Figure 5 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0092] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0093] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0094] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0095] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0096] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0097] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0098] The electronic device of the above embodiment is used to implement the method for mining threatening characters in the chat group corresponding to any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0099] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for mining threatening characters in a chat group as described in any of the above embodiments.
[0100] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0101] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the method for mining threatening characters in a chat group as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0102] Based on the same inventive concept, corresponding to the method for mining threatening characters in a chat group described in any of the above embodiments, the present disclosure also provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer so that the computer and / or the processor execute the method for mining threatening characters in a chat group. Corresponding to the execution subject corresponding to each step in each embodiment of the method for mining threatening characters in a chat group, the processor that executes the corresponding step can belong to the corresponding execution subject.
[0103] The computer program product of the above embodiment is used to enable the computer and / or the processor to execute the method for mining threatening characters in a chat group as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0104] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0105] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0106] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0107] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A method for mining threatening characters in a chat group, characterized in that: include: Determine multiple historical chat messages of a target group, pre-process the multiple historical chat messages, and determine a historical information set; Clustering the historical information set to determine a plurality of message topics and keywords of any of the message topics; Determining a historical information group of any user in the target group according to the historical information set; Calculating the similarity of the information texts in the historical information group, and determining the identity representative text of any of the users according to the similarity; According to the plurality of information topics, keywords of any of the information topics and the user identity representative text, a target person is determined by a relevance algorithm, and the target person is determined as a threatening person.
2. The method according to claim 1, characterized in that The preprocessing of the plurality of historical chat messages to determine a historical information set includes: The historical information set is determined by segmenting any information text in the historical chat information and removing stop words through a word segmenter.
3. The method according to claim 1, characterized in that The clustering of the historical information set to determine a plurality of message topics and keywords of any of the message topics includes: Convert any word in the historical information set into a vector and then perform word embedding to obtain a word vector set; Perform dimension reduction and clustering on any word vector in the word vector set to determine a plurality of message topics and keywords of any message topic.
4. The method according to claim 1, characterized in that: The determining, according to the historical information set, a historical information group of any user in the target group includes: The user corresponding to any historical information in the historical information set is determined, the historical information in the historical information set is grouped according to the user, and a historical information group of any of the users is determined.
5. The method according to claim 1, characterized in that The calculating the similarity of the information texts in the historical information group and determining the identity representative text of any one of the users according to the similarity comprises: Calculating the word frequency-reverse document frequency value of any information text in the historical information group by using a word frequency-reverse document frequency algorithm; Determine a preset time window, determine a plurality of information texts in the preset time window and a plurality of word frequency-inverse document frequency values of the information texts; Merging a plurality of the information texts of any user and a plurality of word frequency-inverse document frequency values of the information texts to determine a plurality of fusion information; The similarities of the plurality of fused information are calculated, and the identity representative text of any one of the users is determined according to the similarities.
6. The method according to claim 1, characterized in that The determining the target person by a relevance algorithm based on the plurality of information topics, keywords of any of the information topics, and the user identity representative text includes: Determining a query string based on a plurality of the information topics and a keyword of any of the information topics; Calculate the relevance between the query string and the user identity representative text according to a relevance algorithm, and determine the user identity representative word according to the relevance; Determine the similarity between the user identity representative word and any keyword of the message subject, and based on the similarity, determine the keyword whose similarity exceeds a preset threshold as the target person.
7. A device for mining threatening people in a chat group, characterized in that: include: A preprocessing module is configured to determine a plurality of historical chat messages of a target group, preprocess the plurality of historical chat messages, and determine a historical information set; A clustering module, configured to cluster the historical information set to determine a plurality of message topics and keywords of any of the message topics; A user history information determination module, configured to determine a history information group of any user in the target group according to the history information set; A user identity representative text determination module, configured to calculate the similarity of the information texts in the historical information group, and determine the identity representative text of any of the users according to the similarity; The target person module is configured to determine the target person through a relevance algorithm based on the multiple information topics, keywords of any of the information topics and the user identity representative text, and determine the target person as a threat task person.
8. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method according to any one of claims 1 to 6 when executing the computer program.
9. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method according to any one of claims 1 to 6.
10. A computer program product, comprising computer program instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Information pushing method and apparatus
CN108241667A
Information processing method, device, computer storage medium and terminal
CN108920675A
Threat intelligence theme detection method and device and computer storage medium
CN111581355A
Dispute solution intelligent question-answering system based on retrieval enhanced large language model
CN117874192A
Cited By
Research and development project repetition analysis method and device, electronic equipment and storage medium
CN120706430A
