Instant messaging message processing methods, devices, electronic devices, and storage media

By acquiring the attributes and content of instant messaging messages and utilizing a pre-trained classification model combined with indexing technology, the problem of high false recognition rate and high cost in existing technologies for identifying micro-business users has been solved, achieving automatic, real-time, and accurate detection of micro-business users.

CN116248622BActive Publication Date: 2026-03-10KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-20
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing instant messaging message recognition methods cannot accurately and efficiently identify specific users (such as micro-business users), and suffer from problems such as high false recognition rate, high cost, and poor real-time performance.

Method used

By acquiring the attributes and content of instant messaging messages, a pre-trained classification model is used to classify the messages. Combining forward indexes and account inverted indexes, instant messaging messages of specific users such as micro-business owners can be identified.

Benefits of technology

It achieves automatic, real-time, and highly accurate detection of specific users without human intervention, improving the efficiency and accuracy of instant messaging message processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116248622B_ABST
    Figure CN116248622B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, electronic device, and readable storage medium for processing instant messaging messages. In one embodiment, the instant messaging message processing method includes: acquiring and parsing a first instant messaging message to obtain attributes of the first instant messaging message, the attributes including a session identifier and message content; parsing the message content of the first instant messaging message to obtain predetermined communication tool account information of the first instant messaging message, and adding the predetermined communication tool account information to the attributes of the first instant messaging message; acquiring the message content of processed instant messaging messages in the same session and concatenating the message content of the first instant messaging message with the message content of the processed instant messaging messages to obtain a first text to be identified; processing the first text to be identified using a pre-trained classification model to obtain category information of the first instant messaging message; and adding the category information of the first instant messaging message to the attributes of the first instant messaging message. This disclosure can automatically and in real-time detect specific users, such as micro-business owners, in instant messaging messages without human intervention, and with high accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to a method, apparatus, electronic device, and storage medium for processing instant messaging messages. Background Technology

[0002] With the widespread use of instant messaging, many internet platforms have developed instant messaging (IM) functions to improve user experience and online communication efficiency. However, some malicious users (e.g., micro-business users, black market users, users maliciously seeking revenge) use the IM functions of internet platforms to send advertisements or harassing messages, causing significant disruption to recipients. These spam messages are numerous (sent in bulk), widespread (indiscriminately pushed), and have low conversion rates. Taking real estate agents as an example, these spam messages not only cause significant harassment but also consume their time, reduce their work experience, and even negatively impact their booth exposure, lower the quality of their commercial products, and increase complaints. Therefore, the identification and processing of instant messaging messages on internet platforms is crucial.

[0003] Taking the identification of WeChat business users as an example, internet platforms can identify WeChat business-related accounts based on the behavioral characteristics of the account's instant messaging messages (such as the frequency and content of instant messaging messages), and then take corresponding actions, such as banning WeChat business C-end accounts, not assessing the WeChat business indicators of real estate agents, and automating the processing of WeChat business work orders.

[0004] Currently, the main methods for identifying instant messaging messages include: identification based on business opportunity thresholds, identification based on message text frequency, and identification based on malicious WeChat associated accounts. These methods all suffer from drawbacks such as being unsuitable for specific users (e.g., WeChat business users), high false positive rates, high costs, and poor real-time performance. Therefore, a new instant messaging message processing solution is needed to achieve accurate and efficient identification of specific users (e.g., WeChat business users). Summary of the Invention

[0005] To address at least one of the aforementioned technical problems, this disclosure provides a method, apparatus, electronic device, and storage medium for processing instant messaging messages.

[0006] According to a first aspect of this disclosure, a method for processing instant messaging messages is provided, comprising: acquiring a first instant messaging message and parsing it to obtain attributes of the first instant messaging message, the attributes including a session identifier and message content;

[0007] Parse the message content of the first instant messaging message to obtain the predetermined communication tool account information of the first instant messaging message, and add the predetermined communication tool account information to the attributes of the first instant messaging message;

[0008] The message content of processed instant messaging messages in the same session is obtained based on the session identifier of the first instant messaging message, and the message content of the first instant messaging message is concatenated with the message content of the processed instant messaging messages to obtain the first text to be identified.

[0009] The first text to be identified is processed using a pre-trained classification model to obtain the category information of the first instant messaging message;

[0010] Add the category information of the first instant messaging message to the attributes of the first instant messaging message.

[0011] In some possible implementations of the first aspect of this disclosure, the message content of processed instant messaging messages in the same session is obtained based on the session identifier of the first instant messaging message, and the message content of the first instant messaging message is concatenated with the message content of the processed instant messaging messages to obtain the first text to be identified, including:

[0012] Create a first forward index, which includes the session identifier and message content of the first instant messaging message;

[0013] Query an existing forward index that contains the session identifier from the first forward index;

[0014] The message content in the first forward index is concatenated with the message content in the existing forward index to obtain the first text to be recognized.

[0015] Some possible implementations of the first aspect of this disclosure also include: filtering the existing forward index according to a pre-set message validity period window.

[0016] In some possible implementations of the first aspect of this disclosure, before processing the first text to be identified using a pre-trained classification model to obtain the category information of the first instant messaging message, the method further includes: determining whether the length of the first text to be identified is greater than or equal to a first predetermined threshold.

[0017] The step of processing the first text to be identified using a pre-trained classification model to obtain the category information of the first instant messaging message includes: in response to the length of the first text to be identified being greater than or equal to the first predetermined threshold, processing the first text to be identified using the classification model to obtain the category information of the first instant messaging message.

[0018] In some possible implementations of the first aspect of this disclosure, the step of processing the first text to be identified using a pre-trained classification model to obtain category information of the first instant messaging message includes: preprocessing the first text to be identified, wherein the preprocessing includes one or more of the following: word segmentation, filtering stop words; and processing the preprocessed first text to be identified using the classification model to obtain category information of the first instant messaging message.

[0019] In some possible implementations of the first aspect of this disclosure, the step of processing the first text to be identified using a pre-trained classification model to obtain category information of the first instant messaging message includes:

[0020] The classification model is used to process the first text to be identified in order to obtain a score for the first text to be identified.

[0021] In response to the score of the first text to be identified being greater than or equal to a second predetermined threshold, first category information is generated, which is used to indicate that the first instant messaging message belongs to a first type.

[0022] In response to the score of the first text to be identified being less than the second predetermined threshold, second category information is generated, which is used to indicate that the first instant messaging message belongs to the second type.

[0023] In some possible implementations of the first aspect of this disclosure, the classification model is trained using a positive sample training set and a negative sample training set. The positive sample training set includes multiple positive samples, each of which includes text to be identified composed of the message content of at least one instant messaging message belonging to a first type and having the same session identifier. The negative sample training set includes multiple negative samples, each of which includes text to be identified composed of the message content of at least one instant messaging message belonging to a second type and having the same session identifier.

[0024] In some possible implementations of the first aspect of this disclosure, the predetermined communication tool account information contained in the text to be identified in the positive sample belongs to a risky account; and / or, the predetermined communication tool account information contained in the text to be identified in the negative sample belongs to a non-risky account or the text to be identified in the negative sample does not contain any predetermined communication tool account information.

[0025] The determination of whether the pre-ordered communication tool account information is a risky account or a non-risky account is based on the account inverted index containing the pre-ordered communication tool account information. The account inverted index is created based on the pre-ordered communication tool account information and session identifier of the processed instant messaging information.

[0026] In some possible implementations of the first aspect of this disclosure, the pre-defined communication tool account information is considered a risky account if one or more of the following conditions are met:

[0027] The frequency of occurrence of the pre-defined communication tool account information is greater than a pre-defined frequency threshold;

[0028] The number of users associated with the pre-defined communication tool account information is greater than the pre-defined user threshold.

[0029] The number of associated sessions for the pre-defined communication tool account information is greater than the pre-defined session number threshold;

[0030] The frequency of occurrence, number of associated users, and / or number of associated sessions of the predetermined communication tool account information are determined based on the existing account inverted index containing the predetermined communication tool account information.

[0031] In some possible implementations of the first aspect of this disclosure, the probability of using negative samples containing pre-defined communication tool account information belonging to non-risk accounts during the training process of the classification model remains the same as the probability of using positive samples.

[0032] In some possible implementations of the first aspect of this disclosure, the method further includes: generating a sample containing the first text to be identified and adding it to the corresponding sample candidate set of the classification model, wherein the sample candidate set is used to update the sample training set of the classification model.

[0033] In some possible implementations of the first aspect of this disclosure, generating a sample containing the first text to be identified and adding it to the corresponding sample candidate set of the classification model includes:

[0034] Create an account inverted index for the first instant messaging message, the account inverted index including the predefined communication tool account information and session identifier of the first instant messaging message;

[0035] Based on the account inverted index of the first instant messaging information and the existing account inverted index containing the pre-ordered communication tool account information in the first instant messaging information, determine whether the pre-ordered communication tool account information of the first instant messaging information belongs to a risky account or a non-risky account.

[0036] When the type information of the first instant messaging information is the first type information and the predetermined communication tool account information of the first instant messaging information belongs to a risky account, a positive sample containing the first text to be identified is generated and added to the positive sample candidate set.

[0037] When the type information of the first instant messaging message is the second type information and the predetermined communication tool account information of the first instant messaging message belongs to a non-risk account, a negative sample containing the first text to be identified is generated and added to the negative sample candidate set.

[0038] The positive sample candidate set is used to update the positive sample training set of the classification model, and the negative sample candidate set is used to update the negative sample training set of the classification model.

[0039] In some possible implementations of the first aspect of this disclosure, the method further includes: adding a first predetermined proportion of samples from the candidate sample set to the training set of the classification model.

[0040] Some possible implementations of the first aspect of this disclosure also include: periodically training the classification model using the latest sample training set at predetermined time intervals to update the model data of the classification model periodically.

[0041] In some possible implementations of the first aspect of this disclosure, parsing the message content of the first instant messaging message to obtain the predetermined communication tool account information of the first instant messaging message includes: preprocessing the message content of the first instant messaging message, the preprocessing including one or more of the following: symbol mapping, noise removal, and fragment splicing; parsing the preprocessed message content to obtain the predetermined communication tool account information of the first instant messaging message.

[0042] According to a second aspect of this disclosure, an electronic device is provided, comprising:

[0043] Memory, the memory storing execution instructions; and

[0044] A processor that executes the execution instructions stored in the memory, causing the processor to perform the above-described instant messaging message processing method.

[0045] According to a third aspect of this disclosure, a readable storage medium is provided, wherein executable instructions are stored therein, which, when executed by a processor, are used to implement the above-described method for processing instant messaging messages.

[0046] According to a fourth aspect of this disclosure, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the above-described method for processing instant messaging messages.

[0047] The instant messaging message processing method of this disclosure can automatically and in real time detect instant messaging messages from specific users, such as micro-business owners, without human intervention, and has a high accuracy rate. Attached Figure Description

[0048] The accompanying drawings illustrate exemplary embodiments of the present disclosure and, together with the description thereof, serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0049] Figure 1 This is a flowchart illustrating an instant messaging message processing method according to some embodiments of the present disclosure.

[0050] Figure 2 This is a schematic diagram illustrating the specific processing procedure of instant messaging messages in a micro-business scenario according to some embodiments of this disclosure.

[0051] Figure 3 This is a schematic diagram of a process for generating a sample containing a first text to be identified, according to some embodiments of the present disclosure.

[0052] Figure 4 This is a schematic block diagram of an instant messaging message processing device that employs a hardware implementation of a processing system, according to one embodiment of this disclosure.

[0053] Explanation of reference numerals in the attached figures

[0054] 400 Instant Messaging Message Processing Device

[0055] 500 bus

[0056] 600 processor

[0057] 700 memory

[0058] 800 Other circuits. Detailed Implementation

[0059] The present disclosure will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the disclosure. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present disclosure are shown in the accompanying drawings.

[0060] It should be noted that, where there is no conflict, the embodiments and features described in this disclosure can be combined with each other. The technical solutions of this disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0061] Unless otherwise stated, the exemplary implementations / embodiments shown are to be understood as providing exemplary features of various details that provide ways in which the technical concepts of this disclosure can be implemented in practice. Therefore, unless otherwise stated, the features of various implementations / embodiments may be additionally combined, separated, interchanged and / or rearranged without departing from the technical concepts of this disclosure.

[0062] The use of crosshairs and / or shading in the accompanying drawings is generally used to clarify the boundaries between adjacent components. Thus, unless otherwise stated, the presence or absence of crosshairs or shading does not convey or indicate any preference or requirement for the specific material, material properties, dimensions, proportions, commonalities between the illustrated components, or any other characteristics, properties, etc., of the components. Furthermore, in the accompanying drawings, the dimensions and relative dimensions of components may be exaggerated for clarity and / or descriptive purposes. When exemplary embodiments can be implemented differently, a specific process sequence may be performed in a different order than that described. For example, two consecutively described processes may be performed substantially simultaneously or in the reverse order of their description. Furthermore, the same reference numerals denote the same components.

[0063] When a component is referred to as being "on" or "above" another component, "connected to," or "joined to" another component, the component may be directly on, directly connected to, or directly joined to the other component, or there may be intermediate components. However, when a component is referred to as being "directly on" another component, "directly connected to," or "directly joined to" another component, there are no intermediate components. Therefore, the term "connection" can refer to a physical connection, an electrical connection, etc., and may or may not have intermediate components.

[0064] The terminology used herein is for the purpose of describing particular embodiments and is not intended to be limiting. As used herein, unless the context clearly indicates otherwise, the singular forms “a” and “the” are intended to include the plural forms as well. Furthermore, when the terms “comprising” and / or “including” and variations thereof are used in this specification, it indicates the presence of the stated features, integrals, steps, operations, parts, components, and / or groups thereof, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, parts, components, and / or groups thereof. It should also be noted that, as used herein, the terms “substantially,” “about,” and other similar terms are used as approximate terms rather than as terms of degree, thus explaining the inherent biases in measurements, calculated values, and / or provided values ​​that would be recognized by one of ordinary skill in the art.

[0065] Terminology Explanation:

[0066] Forward index: A mapping between documents and keywords. By inputting document information such as document number, you can find document content, document keywords, and other information.

[0067] Inverted index: A mapping between keywords and documents. By entering keywords, you can find document information such as document number and document content.

[0068] It should be noted that in this article, "first instant messaging message" refers to any instant messaging message sent by a user to another user within a session, and also refers to any IM message in the IM message stream. The first file to be identified, the first ascending index, and the first account inverted index all correspond to the first instant messaging message. The following text combines... Figures 1 to 4 The specific embodiments of this disclosure will be described in detail.

[0069] Figure 1 A flowchart illustrating an instant messaging message processing method according to some embodiments of the present disclosure is shown. Figure 2 The diagram illustrates an example of an instant messaging message processing method using micro-business identification as an example in some embodiments of this disclosure.

[0070] like Figure 1 As shown, instant messaging message processing methods may include:

[0071] Step S102: Obtain and parse the first instant messaging message to obtain the attributes of the first instant messaging message, including the session identifier and message content;

[0072] In some implementations, a session identifier is used to distinguish different sessions. The session identifier can be, but is not limited to, a session ID, session name, or other similar information. In some implementations, the attributes of the first instant messaging message may also include a user identifier, a message identifier, etc. The message identifier is used to distinguish different instant messaging messages, that is, to uniquely identify an instant messaging message. The message identifier can be, but is not limited to, a message ID, message number, or other similar information. The user identifier is used to distinguish different users sending the message. In specific applications, the user identifier of the first instant messaging message can be, but is not limited to, the consumer user's ID (UCID), username, IP address, or other similar information.

[0073] It should be noted that the terms "session ID" and "UCID" used in the following description refer to "session identifier" and "user identifier" in a broad sense. Those skilled in the art should understand that the session ID and UICD mentioned below can be replaced by any other information with the same function.

[0074] In some implementations, in step S102, the IM message stream can be continuously and in real time monitored. After a certain instant messaging message in the current session is processed, the next instant messaging message to be processed is sequentially extracted from the IM message stream. This instant messaging message to be processed is the first instant messaging message.

[0075] by Figure 2 For example, the attributes of the first instant messaging message obtained by parsing the first instant messaging message in step S102 may include the following detailed information: Session ID-Message ID (Convid-Msgid), the C-end user ID that sent the message (UCID), and the message content. In addition, the attributes of the first instant messaging message obtained by parsing in step S102 may also include other detailed information, such as the message sending time (Timestamp).

[0076] Step S104: Parse the message content of the first instant messaging message to obtain the pre-defined communication tool account information of the first instant messaging message, and add the pre-defined communication tool account information to the attributes of the first instant messaging message.

[0077] The reserved communication tool account can be, but is not limited to, registered accounts for instant messaging software such as WeChat numbers and QQ numbers, communication identification numbers such as mobile phone numbers, and registered accounts for communication software such as email addresses. Taking WeChat merchant identification as an example, the reserved communication tool account can be set to a WeChat number. In specific applications, the type of reserved communication tool account can be pre-configured and can also be flexibly adjusted according to different needs or scenarios. This disclosure does not limit the specific type of reserved communication tool account or its setting method.

[0078] In some cases, users may obfuscate the pre-defined communication tool account information in instant messaging messages by adding spaces, symbols, or using emojis instead of numbers, making it difficult or prone to errors to extract the account information directly from the message content. Therefore, in some embodiments of this disclosure, step S104 may include: preprocessing the message content of the first instant messaging message and parsing the preprocessed message content to obtain the pre-defined communication tool account information. For example, the preprocessing of the message content of the first instant messaging message may include, but is not limited to, symbol mapping, noise removal, and fragment splicing. Thus, after preprocessing such as filtering obfuscated characters, splicing account fragments, and mapping special characters, the text of the message content has strong anti-interference capabilities, effectively improving the accuracy of the pre-defined communication tool account information.

[0079] In some implementations, symbol mapping refers to converting Chinese characters, emoticons, and numerical symbols that actually represent numbers into their corresponding Arabic numerals.

[0080] In some implementations, noise removal may include removing content that may interfere with the parsing of the intended communication tool account information. Such content may include, but is not limited to, consecutive spaces, time segments, URLs, mini-program addresses, common WeChat code words, and industry-specific terms.

[0081] In some implementations, fragment splicing may include splicing adjacent segments of the message content, such as WeChat IDs, mobile phone numbers, or other predefined communication tool account information that may be segmented.

[0082] Step S104 can be executed in different ways depending on the business scenario. For example, it can involve multiple preprocessing and multiple parsing operations; that is, each time preprocessing is performed, the preprocessed message content is parsed once, and the predetermined communication tool account information obtained from multiple preprocessing and parsing operations is combined to obtain the complete predetermined communication tool account information. Another example is multiple preprocessing operations combined with a single parsing operation. In specific applications, the execution method of step S104 can be flexibly set according to actual needs.

[0083] In some implementations, step S104 can use a parsing tool containing predetermined parsing rules or by pre-configuring parsing rules to parse the predetermined communication tool account information. Taking WeChat merchants as an example, a WeChat parsing tool can be used to identify the message content and parse out the WeChat ID contained therein.

[0084] In some implementations, after step S104, the method may further include: adjusting the parsing rules of the message content using existing account inverted indexes and high-frequency instant messaging message content text under different time windows, so as to continuously improve the recognition rate and accuracy of the predetermined communication tool account information. For specific details regarding the account inverted index, please refer to the relevant description below, which will not be repeated here.

[0085] Taking WeChat-based e-commerce as an example, a text frequency index containing instant messaging message content can be established. Based on different time windows, high-frequency instant messaging message content can be queried from this index. The retrieved high-frequency instant messaging message content is likely to be advertising text from top WeChat-based e-commerce platforms (belonging to the first type below). Comparing this retrieved high-frequency instant messaging message content with the obtained inverted index of WeChat IDs allows verification of the WeChat ID recognition rate and accuracy by the WeChat parsing tool. Furthermore, the parsing rules of the WeChat parsing tool can be adjusted based on the high-frequency instant messaging message content that incorrectly identifies the WeChat IDs. In this way, by adjusting the parsing rules, the recognition rate and accuracy of WeChat IDs can be significantly improved, while optimization costs remain controllable.

[0086] In some implementations, in step S104, predetermined communication tool account information can be added as attribute information to the first instant messaging message. For example, a predetermined communication tool account field can be pre-configured in the instant messaging message, and this field is empty or has a default value before the predetermined communication tool account information of the first instant messaging message is obtained. After the predetermined communication tool account information of the first instant messaging message is determined, the predetermined communication tool account information of the first instant messaging message is filled into the predetermined communication tool account field of the first instant messaging message.

[0087] like Figure 2 As shown, taking WeChat merchants as an example, the parsed WeChat ID is added as a new attribute "Wechat" to the instant messaging message.

[0088] Step S106: Obtain the message content of processed instant messaging messages in the same session according to the session identifier of the first instant messaging message, and concatenate the message content of the first instant messaging message with the message content of the processed instant messaging messages to obtain the first text to be identified.

[0089] In some implementations, step S106 may include:

[0090] Step a1: Create a first forward index, which includes the session identifier and message content of the first instant messaging message;

[0091] In some implementations, the first ascending index may also include the message ID of the first instant messaging message. For example... Figure 2 As shown, taking WeChat e-commerce as an example, the first positive index can be represented as: ConvId-MsgId-Content, where ConvId represents the session ID of the first instant messaging message, MsgId represents the message ID of the first instant messaging message, and Content represents the message content of the first instant messaging message.

[0092] If other detailed information of the first instant messaging message is obtained in step S102, such as the message sending time (Timestamp), the first forward index may also include this other detailed information.

[0093] Step a2: Query the existing forward index that contains the session identifier from the first instant messaging message;

[0094] In practical applications, a forward index is created for each instant messaging message processed. If the first instant messaging message is the first instant messaging message, its existing forward index can be empty. If the first instant messaging message is not the first instant messaging message, the existing forward index should at least include the forward indexes of all processed instant messaging messages in the current session.

[0095] Step a3: Concatenate the message content in the first forward index with the message content in the existing forward index to obtain the first text to be recognized.

[0096] Since individual instant messaging messages are generally short texts, directly using the message content of a single instant messaging message for classification model processing results in significant errors. To address this issue, and considering that longer texts contain richer features, this embodiment uses the concatenated text of multiple instant messaging messages from the same session as the detection target of the classification model. This improves the processing performance of the classification model and the accuracy of instant messaging message type identification. Here, "same session" refers to sessions with the same session ID.

[0097] Furthermore, considering that user sessions may grow indefinitely, a message validity window for the forward index can be set, such as the last 7 days or the last 30 days. In some implementations, the instant messaging message processing method may also include filtering existing forward indexes according to a pre-set message validity window. This ensures that all forward indexes used to obtain the first text to be identified are valid, while facilitating the timely removal of expired forward indexes.

[0098] Step S108: The first text to be identified is processed using a pre-trained classification model to obtain category information of the first instant messaging message. The category information is used to indicate the type of the first instant messaging message.

[0099] To ensure the accuracy and reliability of the classification model's recognition results, the first text to be recognized needs to be sufficiently long. In some implementations, before step S108, the method may further include determining whether the length of the first text to be recognized is less than a first predetermined threshold. In step S108, in response to the length of the first text to be recognized being greater than or equal to the first predetermined threshold, the classification model is used to process the first text to be recognized to obtain the category information of the first instant messaging message. In response to the length of the first text to be recognized being less than the first predetermined threshold, step S108 may not be executed, i.e., the processing of the first instant messaging message may be stopped. In this way, the processing of the instant messaging message can be skipped when the text length of the instant messaging message is insufficient.

[0100] In some implementations, the first predetermined threshold can be flexibly set according to various factors such as the specific scenario, recognition requirements, the accuracy of the classification model, and the characteristics of various types of instant messaging information. Taking micro-businesses as an example, based on the characteristics of general advertising content, the first predetermined threshold can be set to a length of 30 to 40 characters.

[0101] In this embodiment of the disclosure, the classification model can be a general text classification model, such as a binary text classification model. In some embodiments, the classification model can be, but is not limited to, a binary classification algorithm model based on Bayes' law of total probability.

[0102] In some implementations, step S108 may include: preprocessing the first text to be identified, the preprocessing may include one or more of the following: word segmentation, filtering stop words; and processing the preprocessed first text to be identified using a classification model to obtain category information of the first instant messaging message.

[0103] In some implementations, step S108, processing the first text to be identified using a classification model, may include:

[0104] Step b1: Use a classification model to process the first text to be identified in order to obtain a score for the first text to be identified.

[0105] Specifically, a classification model can be used to perform feature analysis on the preprocessed first text to be identified, thereby obtaining a score for the first text to be identified. This score can represent the probability that the first instant messaging message belongs to the first type or the probability that it belongs to the second type.

[0106] Step b2: When the score of the first text to be identified is greater than or equal to the second predetermined threshold, first category information is generated. The first category information is used to indicate that the first instant messaging message belongs to the first type.

[0107] Step b3: When the score of the first text to be identified is less than the second predetermined threshold, second category information is generated. The second category information is used to indicate that the first instant messaging message belongs to the second type.

[0108] Taking WeChat sellers as an example, the first type can be "WeChat seller" and the second type can be "non-WeChat seller". The first type of information can be an identifier code representing "WeChat seller" (for example, "true" below), and the second type of information can be an identifier code representing "non-WeChat seller" (for example, "common" below).

[0109] The second predetermined threshold can be determined during the training of the classification model. For example, the value of the second predetermined threshold can be determined by using the processing results of the positive and negative sample training sets of the classification model (i.e., using the classification model to perform criterion-call evaluation on the sample data in the positive and negative sample training sets).

[0110] When adjusting the value of the second predetermined threshold, high precision often results in low recall. Therefore, in some implementations, a suitable intermediate value can be selected as the second predetermined threshold by setting the weights of precision and recall. For example, if the score of the first text to be identified output by the classification model is 0.7, it means that the probability of the first instant messaging message belonging to the first type is 70%. Assuming the second predetermined threshold is 0.6, it can be determined that the first instant messaging message belongs to the first type.

[0111] In some implementations, in step S108, the classification model uses the obtained predetermined communication tool account information as a special named entity. Thus, in step S108, the classification model can process the first text to be identified using the obtained predetermined communication tool account information as a special named entity to obtain the category information of the first instant messaging message. This allows the predetermined communication tool account information to account for a certain weight in the score of the first text to be identified, thereby effectively improving the recognition performance of the classification model.

[0112] Taking "WeChat business identification" as an example, the parsed WeChat ID (i.e., the obtained pre-defined communication tool account information) can be used as a special named entity. The first text to be identified can be processed using a classification model, including: determining whether the first text to be identified contains the feature of a WeChat ID.

[0113] Step S110: Add the category information of the first instant messaging message to the attributes of the first instant messaging message.

[0114] In some implementations, the category information of the first instant messaging message can be added as detailed information to the attributes of the first instant messaging message. For example, a category attribute field can be pre-configured in the instant messaging message, and this category attribute field is empty or has a default value before the category information of the first instant messaging message is obtained. After the category information of the first instant messaging message is determined, the category information of the first instant messaging message is filled into the category attribute field of the first instant messaging message.

[0115] like Figure 2 As shown, taking WeChat merchants as an example, the category information is assigned to a new attribute "isPositive" for instant messaging messages. The value of "isPositive" is "true", which means that the instant messaging message belongs to WeChat merchants. The value of "isPositive" is "common", which means that the instant messaging message belongs to non-WeChat merchants.

[0116] In some embodiments of this disclosure, the classification model can be trained using a positive sample training set and a negative sample training set. The positive sample training set may include multiple positive samples, each positive sample comprising the text to be identified, which is composed of the message content of at least one instant messaging message belonging to a first type and having the same session identifier. The negative sample training set may include multiple negative samples, each negative sample comprising the text to be identified, which is composed of the message content of at least one instant messaging message belonging to a second type and having the same session identifier.

[0117] In some implementations, the training process of the classification model may include: first, selecting an appropriate number of positive and negative samples to train the classification model to obtain model data of the classification model (e.g., parameters of the classification model); then, calculating a second predetermined threshold based on the positive and negative sample training sets, and selecting the calculation result with reasonable accuracy and recall as the second predetermined threshold.

[0118] Without restrictions, the number of negative samples will likely far exceed the number of positive samples. Therefore, a data collection limiting strategy can be adopted to ensure a balanced ratio of positive to negative samples used in training the classification model, thereby enabling the model to achieve better recognition performance and output more accurate results. In some implementations, a certain number of positive samples can be selected in reverse chronological order to form a positive training set, and a certain number of negative samples can be selected in reverse chronological order to form a negative training set, while ensuring that the ratio of samples in the positive to negative training sets remains approximately 1:1.

[0119] In some implementations, the predetermined communication tool account information contained in the text to be identified in the positive sample belongs to a risky account, while the predetermined communication tool account information contained in the text to be identified in the negative sample belongs to a non-risky account, or the text to be identified in the negative sample does not contain any predetermined communication tool account information. Whether the predetermined communication tool account information belongs to a risky account or a non-risky account can be determined based on the account inverted index containing the predetermined communication tool account information, which can be created based on the predetermined communication tool account information and session identifier of the processed instant messaging information.

[0120] Taking "WeChat merchants" as an example, a risky account is a WeChat account that appears abnormally frequently within a certain time window. There are various rules for determining this. These include frequency of appearance (the appearance of the WeChat account in any conversation counts as one appearance), number of associated users (any message sent by any user containing the WeChat account counts as one message), and number of associated conversations (any conversation containing the WeChat account counts as one message). The time window can also be selected as needed, such as considering 10 minutes, 1 hour, 1 day, or 7 days.

[0121] In some implementations, a pre-defined communication tool account is considered a risky account if one or more of the following conditions are met:

[0122] 1) The frequency of the reserved communication tool account information appears greater than the reservation frequency threshold;

[0123] 2) The number of users associated with the pre-booked communication tool account information exceeds the pre-booked user threshold;

[0124] 3) The number of associated sessions for the pre-booked communication tool account information exceeds the pre-booked session number threshold;

[0125] The frequency of occurrence, number of associated users, and / or number of associated sessions of the pre-defined communication tool account information can be determined based on the existing account inverted index containing the pre-defined communication tool account information.

[0126] In some implementations, the number of positive samples with identical text content to be identified in the positive sample training set can be less than a third predetermined threshold. The value of this third predetermined threshold can be flexibly set as needed. Taking WeChat e-commerce as an example, considering the possibility of duplicate texts in the WeChat e-commerce text set, it is possible to globally record the number of text repetitions to ensure that the number of text repetitions in the sample set is within a controllable range. This is beneficial for further improving the recognition accuracy and recognition effect of the classification model.

[0127] In some implementations, the probability of using negative samples containing information about pre-defined communication tool accounts belonging to non-risk accounts during the training process of the classification model remains the same as the probability of using positive samples. Here, "remaining the same" means that the ratio of the two is approximately 1:1.

[0128] In the negative sample training set, negative samples containing information about pre-defined communication tool accounts that are not high-risk accounts have a random probability of being used during the training of the classification model. Thus, by randomly adding negative samples containing information about pre-defined communication tool accounts that are not frequently used (e.g., low-frequency WeChat accounts) to the negative sample training set, the possibility of errors can be reduced, thereby further improving the recognition accuracy and performance of the classification model.

[0129] Taking "WeChat merchants" as an example, text sets that do not contain WeChat IDs generally belong to normal users. If they do contain WeChat IDs, it is necessary to ensure that the WeChat IDs are not risky WeChat accounts, while also considering the statistical errors that may have occurred during the initial accumulation of high-frequency WeChat IDs. In other words, text sets that do not contain WeChat IDs can be used as negative samples, while text sets containing non-risky WeChat IDs can be used as negative samples with a certain probability.

[0130] In some implementations, after step S110, the instant messaging message processing method may further include: step S112, generating a sample containing the first text to be recognized and adding it to the corresponding sample candidate set of the classification model, wherein the sample candidate set is used to update the sample training set of the classification model. In this way, the training samples of the classification model can be updated in a timely manner while obtaining instant messaging message type information, allowing the classification model's recognition ability to improve as instant messaging messages change.

[0131] Taking WeChat merchants as an example, when they discover that the instant messaging function of their UCID is restricted or blocked, they generally update their instant messaging messages by changing to a new account, obfuscating their WeChat account, or slightly adjusting the advertising content. In response, this embodiment of the disclosure, by synchronously updating the training samples of the classification model and periodically training the classification model, can maintain high recognition accuracy, precision, and good recognition performance even when instant messaging messages are constantly changing and updated.

[0132] In some implementations, such as Figure 3 As shown, step S112 may include:

[0133] Step S302: Create an inverted account index for the first instant messaging message. The inverted account index includes the pre-defined communication tool account information and session identifier of the first instant messaging message. Similarly, if other detailed information of the first instant messaging message is obtained in step S102, such as user identifier (e.g., UCID), message sending time (Timestamp), etc., the first forward index may also include these other detailed information.

[0134] like Figure 2 As shown, taking WeChat merchants as an example, the account inverted index can include "Wechat-Timestamp-UcId" and "Wechat-Timestamp-ConvId".

[0135] Step S304: Based on the account inverted index of the first instant messaging information and the existing account inverted index containing the pre-ordered communication tool account information in the first instant messaging information, determine whether the pre-ordered communication tool account information of the first instant messaging information belongs to a risky account or a non-risky account.

[0136] The method for determining whether a pre-booked communication tool account is a risky account or a non-risky account can be found in the previous section and will not be repeated here.

[0137] Step S306: When the type information of the first instant messaging information is the first type information and the predetermined communication tool account information of the first instant messaging information belongs to a risky account, a positive sample containing the first text to be identified is generated and added to the positive sample candidate set.

[0138] Step S308: When the type information of the first instant messaging message is the second type information and the predetermined communication tool account information of the first instant messaging message belongs to a non-risk account, a negative sample containing the first text to be identified is generated and added to the negative sample candidate set.

[0139] The positive sample candidate set is used to update the positive sample training set of the classification model, and the negative sample candidate set is used to update the negative sample training set of the classification model.

[0140] In some implementations, after step S112, the method may further include: adding a first predetermined proportion of samples from the sample candidate set to the sample training set of the classification model. That is, adding a first predetermined proportion of positive samples from the positive sample candidate set to the sample training set of the classification model, and adding a first predetermined proportion of negative samples from the negative sample candidate set to the negative sample training set of the classification model. In this way, the sample data used to train the classification model can be updated in a timely manner using the latest obtained instant messaging messages and their type information.

[0141] In practical applications, the training of the classification model can be continuously executed to ensure that the classification model can reflect the characteristics of the latest instant messaging messages. In some embodiments, the instant messaging message processing method may further include: step S114, periodically training the classification model using the latest sample training set (e.g., the positive sample training set and negative sample training set mentioned above) at predetermined time intervals to periodically update the model data of the classification model. In this way, the training of the classification model can be automatically triggered at regular intervals, ensuring that the classification model is suitable for processing the latest instant messaging messages. In practical applications, the aforementioned predetermined time interval can be flexibly set according to actual needs. For example, the predetermined time interval can be set to 1 day, 1 week, or other durations.

[0142] Experimental results show that the classification model of this embodiment can achieve an accuracy and recall rate of 98%-99% or even higher.

[0143] The instant messaging message processing method of this disclosure can be triggered based on the instant messaging message stream for determining the type of instant messaging message and collecting samples for the classification model. The training of the classification model can be automatically executed by timed logic. These three processing flows are continuously and automatically executed, that is, the detection of users such as micro-businesses can be completed automatically and in real time without human intervention.

[0144] This disclosure is applicable not only to internet platforms but also to other scenarios prone to cybercrime, such as online forums, chat rooms, and game IM channels. Furthermore, this solution is not limited to text recognition; it is also feasible for images, audio, and video. For example, the methods of this disclosure can be reused for extracting text content from images using OCR and converting audio to text using ASR.

[0145] Figure 4 This is a schematic block diagram of an instant messaging message processing device that employs a hardware implementation of a processing system, according to one embodiment of this disclosure.

[0146] The apparatus may include corresponding modules that perform one or more steps in the flowchart above. Therefore, each or more steps in the flowchart above can be performed by a corresponding module, and the apparatus may include one or more of these modules. A module may be one or more hardware modules specifically configured to perform a corresponding step, or implemented by a processor configured to perform a corresponding step, or stored in a computer-readable medium for implementation by a processor, or implemented through some combination thereof.

[0147] This hardware architecture can be implemented using a bus architecture. The bus architecture can include any number of interconnect buses and bridges, depending on the specific application and overall design constraints of the hardware. Bus 500 connects various circuits, including one or more processors 600, memory 700, and / or hardware modules. Bus 500 can also connect various other circuits 800, such as peripherals, voltage regulators, power management circuits, external antennas, etc.

[0148] Bus 500 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, this diagram uses only one connection line, but this does not imply that there is only one bus or one type of bus.

[0149] Any process or method description in the flowcharts or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain. The processor performs the various methods and processes described above. For example, the method embodiments of this disclosure may be implemented as software programs tangibly contained in a machine-readable medium, such as memory. In some embodiments, part or all of the software program may be loaded and / or installed via memory and / or a communication interface. When the software program is loaded into memory and executed by the processor, one or more steps of the methods described above may be performed. Alternatively, in other embodiments, the processor may be configured to perform one of the methods described above by any other suitable means (e.g., by means of firmware).

[0150] The logic and / or steps represented in the flowchart or otherwise described herein may be specifically implemented in any readable storage medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).

[0151] For the purposes of this specification, a "readable storage medium" can be any means capable of containing, storing, communicating, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable read-only memory (CDROM). Furthermore, a readable storage medium can even be paper or other suitable media on which a program can be printed, since a program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in memory.

[0152] It should be understood that various parts of this disclosure can be implemented in hardware, software, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0153] Those skilled in the art will understand that all or part of the steps of the methods described above can be implemented by a program instructing related hardware. The program can be stored in a readable storage medium, and when executed, the program includes one or a combination of the steps of the method implementation.

[0154] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a single processing module, or each unit can exist physically separately, or two or more units can be integrated into a single module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a readable storage medium. The storage medium can be a read-only memory, a disk, or an optical disk, etc.

[0155] Figure 4 This is a schematic diagram of an instant messaging processing device according to one embodiment of the present disclosure. Figure 4 As shown, the instant messaging processing apparatus 400 according to this disclosure may include:

[0156] The message parsing unit 402 is used to obtain a first instant messaging message and parse it to obtain the attributes of the first instant messaging message, the attributes including a session identifier and message content;

[0157] The content parsing unit 404 is used to parse the message content of the first instant messaging message to obtain the predetermined communication tool account information of the first instant messaging message, and add the predetermined communication tool account information to the attributes of the first instant messaging message.

[0158] The text generation unit 406 is used to obtain the message content of processed instant messaging messages in the same session according to the session identifier of the first instant messaging message, and to concatenate the message content of the first instant messaging message with the message content of the processed instant messaging message to obtain the first text to be identified.

[0159] The recognition unit 408 is used to process the first text to be recognized using a pre-trained classification model to obtain the category information of the first instant messaging message;

[0160] The message update unit 410 is used to add the category information of the first instant messaging message to the attributes of the first instant messaging message.

[0161] In some embodiments, the instant messaging processing device 400 may further include: a sample update unit 412, used to generate a sample containing the first text to be identified and add it to the corresponding sample candidate set of the classification model, the sample candidate set being used to update the sample training set of the classification model.

[0162] In some embodiments, the instant messaging processing device 400 may further include: a model training unit 414, used to periodically train a classification model using the latest sample training set at predetermined time intervals, so as to update the model data of the classification model periodically.

[0163] This disclosure also provides an electronic device, including: a memory storing execution instructions; and a processor or other hardware module executing the execution instructions stored in the memory, causing the processor or other hardware module to execute the above-described instant messaging message processing method.

[0164] This disclosure also provides a readable storage medium storing executable instructions, which, when executed by a processor, are used to implement the above-described instant messaging message processing method.

[0165] This disclosure also provides a computer program product, including a computer program / instruction, characterized in that the computer program / instruction, when executed by a processor, implements the above-described method for processing instant messaging messages.

[0166] In the description of this specification, the references to terms such as "one embodiment / mode," "some embodiments / modes," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment / mode or example is included in at least one embodiment / mode or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment / mode or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments / modes or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments / modes or examples described in this specification, as well as the features of different embodiments / modes or examples.

[0167] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0168] Those skilled in the art should understand that the above embodiments are merely for illustrating the present disclosure and are not intended to limit the scope of the disclosure. Those skilled in the art can make other changes or modifications based on the above disclosure, and these changes or modifications still fall within the scope of the present disclosure.

Claims

1. A method for processing instant messaging messages, the method comprising: The method comprises the following steps: acquiring a first instant messaging message and parsing to obtain attributes of the first instant messaging message, the attributes comprising a session identifier and message content, the session identifier being used to distinguish different sessions, and the first instant messaging message being any instant messaging message sent by a user to another user in a certain session; parsing the message content of the first instant messaging message to obtain predetermined communication tool account information of the first instant messaging message, and adding the predetermined communication tool account information to the attributes of the first instant messaging message; acquiring the message content of a processed instant messaging message of the same session according to the session identifier of the first instant messaging message, and splicing the message content of the first instant messaging message with the message content of the processed instant messaging message to obtain first to-be-recognized text; processing the first to-be-recognized text by using a pre-trained classification model to obtain category information of the first instant messaging message; adding the category information of the first instant messaging message to the attributes of the first instant messaging message; the classification model is trained by a positive sample training set and a negative sample training set, the positive sample training set comprises a plurality of positive samples, each of the positive samples comprises to-be-recognized text spliced by the message content of at least one instant messaging message belonging to a first type and having the same session identifier; the negative sample training set comprises a plurality of negative samples, each of the negative samples comprises to-be-recognized text spliced by the message content of at least one instant messaging message belonging to a second type and having the same session identifier; the predetermined communication tool account information contained in the to-be-recognized text in the positive sample belongs to a risk account; and / or the predetermined communication tool account information contained in the to-be-recognized text in the negative sample belongs to a non-risk account or the to-be-recognized text in the negative sample does not contain any predetermined communication tool account information; wherein whether the predetermined communication tool account information belongs to a risk account or a non-risk account is determined according to an account inverted index containing the predetermined communication tool account information, and the account inverted index is created according to the predetermined communication tool account information and the session identifier of the processed instant messaging information.

2. The method of claim 1, wherein, acquiring the message content of a processed instant messaging message of the same session according to the session identifier of the first instant messaging message, and splicing the message content of the first instant messaging message with the message content of the processed instant messaging message to obtain first to-be-recognized text, comprising: creating a first forward index, the first forward index comprising the session identifier and the message content of the first instant messaging message; querying an existing forward index containing the session identifier in the first forward index; splicing the message content in the first forward index with the message content in the queried existing forward index to obtain the first to-be-recognized text. 3.The method of claim 2, wherein, Further comprising: filtering the existing forward index according to a pre-set message validity period window. 4.The method of claim 1, wherein, Before the step of processing the first to-be-recognized text by using the pre-trained classification model to obtain the category information of the first instant messaging message, further comprising: judging whether the length of the first to-be-recognized text is greater than or equal to a first predetermined threshold. The processing of the first to-be-recognized text by using the pre-trained classification model to obtain the category information of the first instant messaging message comprises: in response to the length of the first to-be-recognized text being greater than or equal to the first predetermined threshold, processing the first to-be-recognized text by using the classification model to obtain the category information of the first instant messaging message.

5. The method of claim 1 or 4, wherein, The processing of the first to-be-recognized text by using the pre-trained classification model to obtain the category information of the first instant messaging message comprises: The preprocessing of the first to-be-recognized text comprises one or more of the following: word segmentation, filtering stop words; The processing of the preprocessed first to-be-recognized text by using the classification model to obtain the category information of the first instant messaging message. 6.The method of claim 1, wherein, The processing of the first to-be-recognized text by using the pre-trained classification model to obtain the category information of the first instant messaging message comprises: Processing the first to-be-recognized text by using the classification model to obtain a score of the first to-be-recognized text; In response to the score of the first to-be-recognized text being greater than or equal to a second predetermined threshold, generating first category information, the first category information being used to indicate that the first instant messaging message belongs to a first type; In response to the score of the first to-be-recognized text being less than the second predetermined threshold, generating second category information, the second category information being used to indicate that the first instant messaging message belongs to a second type. 7.The method of claim 1, wherein, The predetermined communication tool account information belongs to a risk account when one or more of the following conditions are met: The occurrence frequency of the predetermined communication tool account information is greater than a predetermined frequency threshold; The number of associated users of the predetermined communication tool account information is greater than a predetermined user number threshold; The number of associated sessions of the predetermined communication tool account information is greater than a predetermined session number threshold; The occurrence frequency, the number of associated users, and / or the number of associated sessions of the predetermined communication tool account information are determined according to an existing account inverted index containing the predetermined communication tool account information. 8.The method of claim 1, wherein, The use probability of a negative sample containing predetermined communication tool account information belonging to a non-risk account in the training process of the classification model is the same as that of a positive sample. 9.The method of claim 1 or 6, wherein, The method further comprises: generating a sample containing the first to-be-recognized text and adding the sample to a corresponding sample candidate set of the classification model, the sample candidate set being used to update a sample training set of the classification model. 10.The method of claim 9, wherein, The generation of the sample containing the first to-be-recognized text and the addition of the sample to the corresponding sample candidate set of the classification model comprise: Creating an account inverted index for the first instant messaging message, the account inverted index comprising the predetermined communication tool account information and the session identifier of the first instant messaging message; Determining whether the predetermined communication tool account information of the first instant messaging message belongs to a risk account or a non-risk account according to the account inverted index of the first instant messaging message and an existing account inverted index containing the predetermined communication tool account information in the first instant messaging message; when the type information of the first instant messaging message is first type information and the predetermined communication tool account information of the first instant messaging message belongs to a risky account, generating a positive sample containing the first to-be-recognized text and adding the positive sample to a positive sample candidate set; when the type information of the first instant messaging message is second type information and the predetermined communication tool account information of the first instant messaging message belongs to a non-risky account, generating a negative sample containing the first to-be-recognized text and adding the negative sample to a negative sample candidate set; the positive sample candidate set is used to update a positive sample training set of the classification model, and the negative sample candidate set is used to update a negative sample training set of the classification model. 11.The method of claim 9, wherein, The method further includes: adding a first predetermined proportion of samples in the sample candidate set to a sample training set of the classification model. 12.The method of claim 1 or 1, wherein, Further comprising: periodically training the classification model by using the latest sample training set at a predetermined time interval, so as to update model data of the classification model in a timely manner. 13.The method of claim 1, wherein, The method further includes: preprocessing the message content of the first instant messaging message, the preprocessing including one or more of the following: symbol mapping, noise removal, and fragment splicing; parsing the preprocessed message content to obtain the predetermined communication tool account information of the first instant messaging message.

14. An electronic device, comprising: comprise: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the processing method of the instant messaging message in any one of claims 1 to 13.

15. A readable storage medium, characterized by, The readable storage medium stores execution instructions, and the execution instructions are executed by the processor to implement the processing method of the instant messaging message in any one of claims 1 to 13.

Citation Information

Patent Citations

  • Abnormal user identification method and device based on deep learning, and storage medium

    CN111666502A

  • Abnormal character string recognition method and device

    CN113420549A