Junk message identification model training method, junk message identification method and electronic equipment

Through the supervision and fine-tuning of the pre-trained AI model and multimodal data processing, the problem of spam message recognition in free dialogue scenarios is solved, and the effective recognition of complex and adversarial spam messages is achieved, and the recognition rate is improved.

CN120448480APending Publication Date: 2025-08-08HANGZHOU ALIBABA INT INTERNET IND CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510199631.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing spam message recognition methods are not effective in systems targeting Class B buyers, especially in free dialogue scenarios, spam messages are complex and diverse and have confrontational detection methods, making them difficult to effectively identify.

Method used

The pre-trained AI model is used for supervised and fine-tuning training, marking by obtaining historical dialogue records, adaptive sampling, generating training data sets, and using multimodal AI model to process image content to improve recognition accuracy.

Benefits of technology

Effectively identifying a variety of complex spam messages, including adversarial content, improves recognition rates and reduces evasion of adversarial detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448480A_ABST
    Figure CN120448480A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a junk message recognition model training method, a junk message recognition method and electronic equipment. The training method comprises the steps of obtaining dialogue text data in a historical dialogue record and corresponding annotation information; according to the occurrence proportion of the junk message category and / or the adversity intensity to the junk message detection means, adaptive sampling of the corresponding category is carried out on the dialogue text data to obtain a training data set; performing supervised fine tuning training on a pre-trained artificial intelligence AI model by using the training data set; wherein in the fine tuning training process, whether the dialogue text data is a junk message or not and the junk message category to which the junk message belongs are identified through the AI model, and the training process is supervised by utilizing the annotation information corresponding to the dialogue text data. According to the embodiment of the invention, the recognition rate of the spam message can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of message identification technology, and in particular to spam message identification model training, spam message identification methods and electronic equipment. Background Art

[0002] For product information service systems (generally referred to as e-commerce platforms), communication is a crucial link throughout the entire pre-sales and post-sales process. This is especially true for systems targeting Class B buyers (who are also merchants and purchase goods for resale or production). Because buyers often have customized needs and product prices are often not fixed but vary based on the purchase quantity, buyers and sellers typically require multiple rounds of dialogue to align their needs. The importance of communication in the entire transaction chain is self-evident.

[0003] However, in the communication between buyers and sellers, third parties often send spam messages to sellers, significantly impacting the platform's information purity and directly affecting the merchant's Net Promoter Score (NPS). The so-called "third party" is usually a service provider that provides relevant services within the e-commerce chain, from the perspective of a specific e-commerce platform. For example, a seller is a registered user on an e-commerce platform that itself provides related logistics services. The seller's original intention was to use the logistics services provided by the e-commerce platform to ship the goods to the buyer. However, a third party may also provide similar logistics services. In this case, the seller sends messages to seller users on the current e-commerce platform, hoping to guide them to use the third-party services. In this case, such messages are considered advertising spam to seller users. Obviously, the presence of such spam messages can have a negative impact on seller users. Therefore, how to effectively identify and clean up this spam is a problem that needs to be considered.

[0004] For systems targeting Category C (individual consumers), since the product information in the scenario is relatively certain and transactions can be made directly, conversations tend to focus on inquiries about product details and after-sales service. Spam identification primarily focuses on prohibited or restricted sales content, as well as high-risk red-line content. Therefore, spam identification strategies primarily rely on traditional keyword packages, account characteristics, and user behavior characteristics, resulting in a relatively high recognition rate. However, for systems targeting Category B buyers, since buyers and sellers typically engage in free dialogue, the conversations involve numerous rounds and a long time span. The content of the conversations may also cover multiple aspects, including customization requirements, logistics, pricing, and so on. Consequently, the spam involved is complex and diverse. Existing identification methods are ineffective against such complex and diverse spam. Summary of the Invention

[0005] The present application provides a spam message identification model training, a spam message identification method, and an electronic device, which can effectively identify spam messages in the presence of multiple complex spam messages, or even spam messages containing adversarial content used to counter detection methods.

[0006] This application provides the following solutions:

[0007] A spam identification model training method, comprising:

[0008] Obtaining conversation text data from historical conversation records and corresponding annotation information, the annotation information including whether the conversation text data is spam and the spam category to which it belongs; wherein the conversation text data that is spam includes content that is antagonistic to spam detection methods;

[0009] Adaptively sampling the conversation text data for the corresponding category based on the occurrence ratio of the spam category and / or the strength of the adversarial approach to spam detection to obtain a training dataset;

[0010] The pre-trained artificial intelligence (AI) model is fine-tuned in a supervised manner using the training data set, so that the trained spam recognition model can recognize spam messages in conversation text data containing the adversarial content. During the fine-tuning training process, the AI model is used to identify whether the conversation text data is spam and the spam category to which the spam message belongs, and the training process is supervised using the annotation information corresponding to the conversation text data.

[0011] The prompt information template also includes identification rule information about the spam message category, so that the AI model can identify the input conversation text data and determine the category in combination with the identification rule information.

[0012] Among them, the conversation text data is: the text conversation data in the message sent by the first user to the second user, wherein the second user is the seller user in the commodity information service system, and the first user is the user who uses the buyer user account in the commodity information service system to communicate with the seller user.

[0013] A method for identifying spam messages based on the spam message identification model described above includes:

[0014] During a conversation between a first user and a second user, obtaining conversation content to be detected;

[0015] Determining text data to be detected based on the conversation content, identifying whether the text data is spam using the spam identification model, and outputting a spam category if the text data is identified as spam;

[0016] If the conversation content corresponding to the text data is identified as junk messages, the conversation content is intercepted or marked.

[0017] Wherein, the conversation content to be detected is the conversation content sent by the first user to the second user;

[0018] The method further comprises:

[0019] The conversation contents in a plurality of historical conversation rounds that the first user has sent to the second user are obtained, and provided to the spam identification model as reference information.

[0020] Among them, also include:

[0021] If the spam identification model identifies the conversation content as spam, the spam identification model is further used to extract contact information from the conversation content and save the contact information so that conversation content containing the contact information obtained again in other conversation processes can be intercepted and processed.

[0022] The intercepting and processing of the conversation content includes:

[0023] The conversation content is unidirectionally intercepted on the receiving side, and the conversation content is displayed as a successfully sent state on the sending side.

[0024] Wherein, determining the text data to be detected according to the conversation content includes:

[0025] If the conversation content is picture-based, the AI model with multimodal data processing capabilities performs text recognition on the picture-based conversation content and outputs the recognized text content in semantic order;

[0026] The text content output by the AI model with the multimodal data processing capability is determined as the text data to be detected.

[0027] A method for identifying image-based spam messages, comprising:

[0028] Obtaining a target image to be detected; wherein the target image contains adversarial text content used for detecting spam messages;

[0029] Performing text recognition on the target image using an AI model with multimodal data processing capabilities;

[0030] The AI model outputs the identified text content in a semantic order, so as to obtain a spam identification result for the target image by performing spam identification on the output text content.

[0031] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any of the aforementioned methods.

[0032] An electronic device, comprising:

[0033] one or more processors; and

[0034] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of any of the aforementioned methods.

[0035] A computer program product comprises a computer program / computer executable instructions, wherein the computer program / computer executable instructions are capable of implementing the steps of any of the aforementioned methods when executed by a processor in an electronic device.

[0036] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0037] Through the embodiments of the present application, a pre-trained AI model can be used as a base to mark the conversation text data in the historical conversation records to mark whether it is a spam message and the category of the spam message. Afterwards, adaptive sampling by category can be performed according to the proportion of spam message categories and / or the strength of the adversarial detection method, and then the pre-trained AI model can be supervised and fine-tuned using these data to obtain a spam message recognition model so that it has the ability to recognize conversation text data containing adversarial content. Through this model, even if there are multiple complex spam messages in the free conversation scenario, or even if there is adversarial content in the spam messages that is used to counter the detection method, effective recognition can be performed.

[0038] Of course, any product implementing the present application does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0040] Figure 1It is a schematic diagram of the system architecture provided by an embodiment of the present application;

[0041] Figure 2 It is a flowchart of the first method provided by an embodiment of the present application;

[0042] Figure 3 It is a flowchart of the second method provided by an embodiment of the present application;

[0043] Figure 4 It is a flowchart of the third method provided by an embodiment of the present application;

[0044] Figure 5 It is a schematic diagram of the electronic device provided by an embodiment of the present application. Detailed implementation manners

[0045] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art shall fall within the protection scope of the present application.

[0046] First of all, it should be noted that for the conversation content in the free conversation scenario, it is difficult to effectively identify it through traditional spam message identification methods. In addition to the large number of conversation turns, the conversation content covering many aspects, and the complex and diverse spam messages, there is also a situation that some third parties will counter the traditional identification methods when sending messages. For example, for the spam message identification method of keyword identification, it may adopt methods such as mutating the text or semantics to counter, so that the keyword detection method may fail. For example, keywords such as "freight forwarder" in the message may mutate into "huo dai", "Huo Dai", "cross-border porter", and so on. Or, some recognition algorithms may stop tracking after a certain number of turns of tracking the conversation between two users if no abnormality is found. Therefore, some third parties may use this feature to first disguise as a normal buyer, have some normal conversations with the seller, and then insert spam messages of the nature of advertisements, etc., to avoid the detection of the algorithm. Furthermore, some third parties may also send picture-like advertisements to the seller instead of directly sending text, and can also distort the text in the picture (using non-standard fonts), or disrupt the arrangement order of the text, or add complex picture backgrounds (including setting the text color to be similar or the same as the main color of the background, making the text blend in with the background), etc., to avoid the detection of the algorithm, and so on. In short, the specific countermeasures emerge in an endless stream. Even if a certain mutated method is identified, other mutated methods will also be developed, making it difficult for traditional spam message detection means to identify.

[0047] In response to the above situation, the embodiment of the present application provides an implementation scheme for detecting spam messages using an AI (Artificial Intelligence) model. Among them, the so-called AI model refers to a deep learning model containing a large number of parameters. Due to its large scale, this AI model can store and process a large amount of information, thereby achieving higher performance in various tasks, and is therefore also called a "big model". The embodiment of the present application can rely on the powerful natural language text understanding and logical thinking ability of the pre-trained AI model to analyze the conversation data between the buyer and the seller to identify spam messages. Of course, since the free conversation scenario described in the embodiment of the present application is complex and diverse, and there are many different variants of spam messages, if a general AI model is used directly for identification, there is also the problem of a relatively low recognition rate. Therefore, in the embodiment of the present application, a supervised fine-tuning training based on the pre-trained AI model is adopted to improve the AI model's recognition of spam messages in the free conversation scenario, so that the trained AI model can become a spam recognition model.

[0048] Specifically, when performing supervised fine-tuning, it is necessary to first obtain a training data set. Specifically, in an embodiment of the present application, the conversation text data sent by the buyer user to the seller user can be first obtained from the historical conversation records. Of course, the "buyer user" here may refer to a user who sends a message to the seller user in the name of a buyer user account registered in the commodity information system. The user may be a real buyer user, or a third party who disguises himself as a buyer user or borrows or steals the buyer user account.

[0049] The acquired conversation text data may be multiple pieces, and these conversation text data may be labeled. The labeling operation may be completed manually or by an AI model. The AI model may be different from the aforementioned supervised fine-tuned AI model. The AI model used for labeling the conversation text data may be an existing pre-trained AI model, such as an existing LLM (Large Language Model) model, etc.

[0050] When labeling conversational text data, it is possible to indicate whether the text is spam and, if so, the specific category it belongs to. Specifically, because spam in free conversation scenarios is complex and diverse, multiple spam categories can be defined in advance to improve training effectiveness. For example, in a cross-border commodity information service system, specific spam messages may include freight forwarding, account rentals, offline or off-site communication, data manipulation, inventory clearance, and other different categories. This allows for labeling conversational text data, not only to indicate whether it is spam but also to identify the specific type of spam. When labeling conversational text data using a large model such as LLM, the aforementioned task information can be provided in a prompt. Spam identification rules can also be input into the large model, which then performs the labeling. Of course, after the large model completes the labeling, manual verification can be performed to ensure the accuracy of the labeling results.

[0051] After obtaining multiple conversation text data and their labeling results, these conversation text data can also be sampled. The reason for this is that when fine-tuning an AI model through supervision, the more training data used, the better. For example, for a "7B" model (i.e., a model with 7 billion trainable parameters), if supervised fine-tuning is required, 3,000 to 5,000 training data are sufficient. The amount of conversation text data initially collected and labeled is usually much larger. Therefore, the required amount of conversation text data and its labeling results can be sampled from multiple conversation text data as a training data set.

[0052] Since spam messages are divided into multiple categories in the embodiments of this application, sampling methods also need to be considered. For example, a simple approach is to perform uniform sampling. Assuming a total of 3,000 training data items are required and there are 6 spam categories, 500 conversation text data items can be sampled for each category. However, in the embodiments of this application, different categories have different occurrence proportions in the actual market, and different spam categories also have different resistance strengths against detection methods. For example, spam messages related to "freight forwarding logistics" are often more common in cross-border logistics, as cargo is often collected and shipped overseas via containers. This process offers significant profit margins, and therefore, third parties will employ more diverse methods to resist detection. Other spam categories may not have as high a proportion, and accordingly, their resistance strength against detection methods is also relatively low. In this case, performing uniform sampling may be unreasonable, as it may result in some categories with relatively high occurrences being unable to achieve more comprehensive learning due to insufficient training sample data.

[0053] Therefore, in the embodiments of the present application, the sampling process can be completed by adaptively sampling the conversation text data based on the occurrence ratio of the spam category and / or the strength of the spam detection method. In other words, if the total number of samples is preset, a higher sampling ratio can be used for categories with a higher proportion or a higher strength of the spam detection method, and a lower sampling ratio can be used for categories with a higher proportion.

[0054] After the sampling is completed, a training data set can be obtained, and then the data in the training data set can be used to supervise and fine-tune the pre-trained AI model. Specifically, during training, since the AI model usually requires Prompt (prompt information) as input information, in the embodiment of the present application, the Prompt template can also be configured in advance, and then the dialogue text data in the training data set can be assembled into the Prompt template to generate a specific Prompt, which is then input to the AI model. The Prompt template can also include content that describes the role that the AI model needs to play, the tasks that need to be completed, etc., and these contents can all exist in the form of text, for example,

[0055] “You are a quality inspector, and your task is to check whether the following conversation text is spam:

[0056] ****(Dialogue text data)

[0057] If yes, please determine which of the following categories it belongs to:

[0058] **** (List several predefined categories of spam messages and provide information on the meaning of each category)

[0059] Furthermore, because some conversational text data may be misclassified, in a preferred implementation, the prompt template can also include prompt information for identifying specific spam categories, along with examples for the AI model to learn from or reference. For example, in the case of "offline or off-site solicitation," some normal communication between buyers and sellers may involve offline or off-site communication. In these cases, messages should not be identified as spam. Determining whether buyers and sellers are communicating normally is a key issue. In this case, corresponding identification rules can be added to the prompt template. For example, "If the communication does not mention any content related to the seller's products or expresses no willingness to collaborate, but simply invites the seller to communicate offline or off-site, it may be spam. Otherwise, if the communication involves products related to the seller or both parties express some willingness to collaborate, it may be a normal offline or off-site invitation and should not be considered spam." Adding these identification rules to the prompt template can help improve the AI model's recognition accuracy.

[0060] After the AI model outputs the recognition result, the annotation information corresponding to the specific conversation text data can be used for supervised fine-tuning. That is, with the goal of making the AI model output result gradually close to the annotation result, the parameters of the AI model are adjusted so that the AI model meets the expectations in terms of accuracy in identifying spam messages.

[0061] After completing the supervised fine-tuning training described above, the AI model can be called a spam identification model. This model can be used to identify the content of specific conversations between buyers and sellers. If spam is identified, it can be intercepted or marked. Specifically, the conversation content that the buyer is about to send to the seller in the current round can be obtained during the buyer-seller conversation. If this content is text, it can be directly assembled into a prompt template to generate a prompt and input it into the spam identification model for identification.

[0062] If the current conversation content is an image, the embodiment of the present application adopts the method of first identifying the text content contained in the image content, and then assembling this text content into a prompt template to generate a prompt and input it into the spam message recognition model for recognition. Among them, when recognizing text in image content, a common method is to use OCR (Optical Character Recognition) to perform recognition. However, as mentioned above, since third parties may distort the text information in the image, add complex backgrounds, etc., the recognition rate of ordinary OCR recognition tools will be relatively low.

[0063] Based on the above situation, in the preferred embodiment of the present application, an AI model with multimodal information processing capabilities can be used to replace ordinary OCR recognition tools to complete the above-mentioned recognition tasks. Among them, the so-called AI model with multimodal information processing capabilities can itself be a large model, which has the ability to process information in multiple different modalities such as images and texts. In the embodiment of the present application, the ability of this AI model to recognize text content from pictures can be used to complete specific recognition tasks. Since the AI model is far superior to ordinary OCR recognition tools in terms of parameter quantity, even if the text in the picture is deformed, background interference is added, and other adversarial processing is performed, it can still have a high text recognition accuracy. In addition, since only a part of the capabilities of the above-mentioned AI model needs to be used in the embodiment of the present application, that is, it can recognize text from pictures, the parameter scale of the AI model does not need to be particularly large, and it is an AI model with a smaller parameter scale.

[0064] Of course, in actual applications, the text content in the image may also have adversarial methods such as broken arrangement order, multiple characters in the same word, phrase, or sentence being scattered in different positions. Therefore, in specific implementations, after the aforementioned AI model recognizes the specific text from the image, the recognized text and the original image can be re-input into the AI model, and the AI model outputs the text content in a semantic order. In other words, the AI model adjusts the order of the recognized text to restore its original meaning. Then, this text content with a semantic order is input into the aforementioned spam recognition model for recognition.

[0065] It should be noted here that for conversations involving images, another option for spam message identification is to directly use an AI model with multimodal information processing capabilities for identification. However, since such images may also present various adversarial methods, if you want to achieve a more ideal recognition effect, the parameter requirements of this AI model will be relatively high, which will correspondingly bring higher recognition costs.

[0066] In order to avoid the high cost brought by this multimodal model, the embodiment of the present application adopts the aforementioned method of first performing text recognition from the image, and then using the aforementioned spam message recognition model trained by supervised fine-tuning to perform spam message recognition. In this way, the same model can also be used to complete the recognition of text-based and image-based conversation content. In addition, although the multimodal AI model is also used in the process of text recognition from the image, since only its ability to recognize text from the image and output text in a semantic order is required, the parameter quantity requirement of the multimodal AI model is not high, and a model with a smaller parameter scale can be used to implement it. Compared with the method of directly using the multimodal AI model to identify spam messages from the image-based conversation content, the overall implementation cost is still relatively low.

[0067] Furthermore, spam messages often contain contact information, including phone numbers, email addresses, and instant messaging accounts, intended to encourage sellers to contact them. Furthermore, while a wide variety of countermeasures can be employed when sending conversational content, the frequency of changes in contact information is relatively low. In other words, if spam is sent by the same third party, while numerous countermeasures can be employed, such as keyword variations, character distortions, and the addition of noise, the frequency of contact information changes is relatively low compared to the variability of these countermeasures. Therefore, in an optional implementation, if a spam identification model identifies a conversation as spam, the spam identification model can further determine whether contact information exists in the conversation. If so, it can be extracted and recorded in the system. This way, if subsequent detection reveals that a conversation contains the contact information previously extracted from spam, it can be directly identified as spam, thereby improving efficiency.

[0068] The process of identifying the conversation content provided by the embodiments of the present application can be performed in real time during the conversation between the buyer and the seller. That is, each time the buyer user needs to send a conversation content to the seller user, the conversation content can be detected using the method provided by the embodiments of the present application. Conversation content that is determined to be spam can be intercepted, or a corresponding mark can be added to alert the seller user, etc. When intercepting, it can be a one-way interception on the seller user side. That is, the seller user will not be aware of the existence of the conversation content. However, on the buyer user side, such conversation content can be displayed as a successfully sent state. That is, the buyer user is prevented from being aware that the conversation content it sent has been intercepted, thereby preventing the buyer user from developing more forms of confrontation.

[0069] From the perspective of system architecture, see Figure 1 In the embodiment of the present application, a spam identification service can be provided in the message system of the commodity information service system. The service can be run on the server side of the message system. Since the conversation content sent by the buyer and the seller usually needs to be uploaded to the server side first and then forwarded to the recipient by the server side, the server side can first identify the conversation content that the buyer user wants to send to the seller user through the pre-trained spam identification model each time it receives the conversation content. If it is a spam message, it can be intercepted or a relevant mark can be added to avoid or reduce the interference of spam messages on the seller user. Among them, the specific spam identification model can be obtained by performing supervised fine-tuning on the basis of a pre-trained AI model (which can be called a first AI model). In this process, the conversation text data in the historical conversation record can be marked by manual labeling or by an AI model (which can be called a second AI model) to mark whether it is a spam message and the category of the spam message. Afterwards, adaptive sampling by category can be performed according to the proportion of spam message categories and / or the strength of the adversarial detection method, and then the pre-trained AI model can be supervised and fine-tuned using these data to obtain the aforementioned spam identification model. Among them, when using the trained spam message recognition model to identify the content of the conversation, if it is text-based conversation content, it can be directly input into the model for identification. If it is a picture-based conversation content, you can first use a multimodal AI model (which can be called the third AI model) to identify the text content from the picture, and then output it in semantic order. After that, it is input into the spam message recognition model for identification. Among them, the first AI model and the second AI model can both use text-based AI models, such as large language models, and the third AI model can be a model with multimodal capabilities. Of course, the parameter scale of the model does not need to be particularly large, and it can complete the task of identifying text from pictures with adversarial content and outputting it in semantic order.

[0070] The following is an introduction to the solutions that need to be protected in the embodiments of this application.

[0071] Example 1

[0072] First, this embodiment provides a spam identification model training method for the model training process, see Figure 2 , the method may include:

[0073] S201: Acquire conversation text data from historical conversation records and corresponding annotation information, wherein the annotation information includes whether the conversation text data is spam and the spam category to which it belongs; wherein the conversation text data that is spam includes adversarial content used to counter spam detection methods.

[0074] In the embodiments of the present application, although the actual conversation content generated during the conversation may include text content and may also include image content, when training the model, only the text-based conversation content needs to be considered, and the image-based conversation content does not need to participate in the supervised fine-tuning of the model. Accordingly, the base model used in the embodiments of the present application can also be a large model that mainly generates natural language text or understands the meaning of natural language text, including LLM models.

[0075] When collecting conversation text data, it can be collected from historical conversation records in the system, which will include some conversation text data that belong to spam messages. The collected conversation text data can then be labeled by manual labeling or AI labeling. In an embodiment of the present application, it can be specifically marked whether specific conversation text data belongs to spam messages, and if it belongs to spam messages, what specific spam message category it belongs to. Among them, the spam message category can be pre-defined, and a variety of different spam message categories can be defined by classifying various spam messages that may be generated in the free conversation scenario between buyers and sellers in the commodity information service system. In the AI labeling method, the definitions, examples, etc. of the above-mentioned various spam message categories can be reflected in the prompt information, and then labeled by the AI model. The AI labeling results can also be verified manually to ensure the accuracy of the labeling results.

[0076] For conversational text data that is considered spam, the text can include adversarial content used to counter spam detection methods. The collected training sample data contains samples containing this adversarial content, allowing the model to learn the characteristics of this adversarial content. Adversarial content refers to content that attackers add to conversational text data to circumvent spam detection methods by modifying the content's feature values. For example, to circumvent keyword detection, content that mutates keywords can be added.

[0077] In a specific implementation, the collected conversation text data may include text conversation data in messages sent by a first user to a second user, where the second user may be a seller user in the product information service system, and the first user is a user using a buyer user account in the product information service system to engage in a conversation with the seller user. For example, this may be a conversation between a third party posing as a buyer user and a seller user.

[0078] S202: Based on the occurrence ratio of the spam message category and / or the strength of the adversarial measures against the spam message detection means, adaptively sample the conversation text data for the corresponding category to obtain a training data set.

[0079] After completing the annotation of the conversation text content, the conversation text data can also be adaptively sampled for corresponding categories based on the occurrence ratio of spam message categories and / or the strength of the adversarial measures against spam message detection methods, so that spam message categories with a higher proportion or stronger adversarial strength have a higher sampling ratio in the training data set, so that the specific model can have a stronger recognition ability for this category.

[0080] S203: Using the training data set, supervised fine-tuning training is performed on the pre-trained artificial intelligence (AI) generation model, so that the trained spam recognition model can identify spam messages on the conversation text data containing the adversarial content; wherein, during the fine-tuning training process, the AI model is used to identify whether the conversation text data is spam and the spam message category to which the spam message belongs, and the training process is supervised using the annotation information corresponding to the conversation text data.

[0081] After obtaining the training data set, the training data set can be used to perform supervised fine-tuning training on the pre-trained artificial intelligence AI model, so that the trained spam recognition model can identify spam messages for the conversation text data containing the adversarial content. Specifically, during the training process, the conversation text data in the training data set can be assembled into a preset prompt information (Prompt) template to generate prompt information, so that the AI model can identify whether the conversation text data is spam, and output the spam category to which it belongs if it is identified as spam. Then, the annotation information corresponding to the conversation text data can be used to supervise the training process. That is, by fine-tuning the parameters in the AI model, the AI model can acquire the ability to identify spam messages containing adversarial content, and thus the AI model can be called a spam recognition model.

[0082] Specifically, the prompt information template may include text description information about the role that the AI needs to play, the tasks that need to be completed, etc. In addition, in an optional manner, the specific prompt information template may also include identification rule information about the spam message category, so that the AI model can combine the identification rule information to identify the input conversation text data and determine the category.

[0083] Specifically, as described above, in the embodiments of the present application, the second user may be a seller user in the product information service system, and the first user may be a user who uses a buyer user account in the product information service system to communicate with the seller user. In other words, the first user may be a normal buyer user, a buyer user registered by a third party, or a buyer user whose account has been rented or stolen by a third party, etc.

[0084] In short, through the embodiments of the present application, the pre-trained AI model can be used as the base to mark the conversation text data in the historical conversation records to mark whether it is a spam message and the category of the spam message. Afterwards, adaptive sampling by category can be performed according to the proportion of spam message categories and / or the strength of the adversarial detection method, and then the pre-trained AI model can be supervised and fine-tuned using these data to obtain a spam message recognition model so that it has the ability to recognize conversation text data containing adversarial content. Through this model, even if there are multiple complex spam messages in the free conversation scenario, or even if there is adversarial content in the spam messages that is used to counter the detection method, it can still be effectively identified.

[0085] Example 2

[0086] After completing the model training in the above embodiment 1, a spam message identification model can be obtained, and then the spam message identification model can be used to perform specific spam message identification. This embodiment 2 is a process of using the spam message identification model trained in the above embodiment 1 to perform spam message identification, and provides a spam message identification method, see Figure 3 , the method may include:

[0087] S301: During a conversation between a first user and a second user, obtaining conversation content to be detected;

[0088] S302: Determine text data to be detected based on the conversation content, identify whether the text data is spam using the spam identification model, and output the spam category if the text data is identified as spam;

[0089] If the conversation content itself is textual, the conversation content itself can be directly used as the text data to be detected. If the conversation content is image-based, an AI model with multimodal data processing capabilities can first perform text recognition on the image-based conversation content and output the recognized text content in a semantic order. Then, the text content output by the AI model with multimodal data processing capabilities can be determined as the text data to be detected.

[0090] S303: If the conversation content corresponding to the text data is identified as spam, the conversation content is intercepted or marked.

[0091] In specific implementation, the specific conversation content to be detected can be the conversation content sent by the first user to the second user. In order to help the spam message identification model perform more accurate identification, the conversation content in multiple historical conversation rounds that the first user has sent to the second user can also be obtained and provided to the spam message identification model as reference information.

[0092] In addition, in a preferred implementation, if the spam identification model identifies the conversation content as spam, the spam identification model can also extract contact information from the conversation content and save the contact information so that conversation content containing the contact information obtained again in other conversation processes can be intercepted and processed.

[0093] Specifically, when intercepting the conversation content, the conversation content can be unidirectionally intercepted on the receiving side, and the conversation content can be displayed as a successfully sent state on the sending side. That is, the sender can be prevented from perceiving that the message he sent was intercepted, so as to prevent the sender from continuing to make more confrontational variations.

[0094] If a conversation identified as spam needs to be tagged, this is done unilaterally on the receiving end and is not displayed to the sending user. Specifically, this tagging approach can be used to alert the receiving user to conversations identified as "offline or off-site solicitation." This is because, in normal conversations, buyers and sellers may also have legitimate "offline or off-site solicitation" needs. Therefore, there's a certain probability of misclassification of such messages, making it appropriate to address this with a warning tag.

[0095] Through this second embodiment, during a conversation between a first user and a second user, the conversation content to be detected can be obtained. Text data to be detected can then be determined from the content and input into a spam identification model to identify whether the text data is spam. If the text data is identified as spam, the spam category to which it belongs can be output. Furthermore, the conversation content identified as spam can be intercepted or marked.

[0096] Among them, there are many specific application scenarios applicable to the embodiments of the present application. For example, one scenario can be a free conversation scenario between buyers and sellers in a commodity information service system for Class B buyer users. Since the number of conversation rounds involved is usually relatively large, the content of the conversation involves multiple aspects, and the time span is often relatively long, in addition, this scenario for Class B buyers may also usually involve cross-border scenarios, and the "freight forwarding" and other links in cross-border scenarios often have high profit margins. Therefore, there will be many third parties, and these third parties will take advantage of the above-mentioned characteristics of the free conversation process between buyers and sellers to send advertising spam messages to seller users. The purpose is usually to guide seller users in the system to use their own services in order to profit from it, etc. Correspondingly, such third parties also have a variety of rich ways to fight against spam detection methods. Traditional spam detection methods may be difficult to effectively detect them. In this case, the solution provided by the embodiments of the present application can be used to identify spam messages.

[0097] Example 3

[0098] This embodiment 3 also provides a method for identifying image-based junk messages, see Figure 4 , the method may include:

[0099] S401: Acquire a target image to be detected; the target image contains adversarial text content used for spam detection;

[0100] S402: Performing text recognition on the target image using an AI model with multimodal data processing capabilities;

[0101] S403: Outputting the identified text content in a semantic order through the AI model, so as to obtain a spam identification result for the target image by performing spam identification on the output text content.

[0102] In this way, the AI model can be used to identify the text content in the image. It can also be sorted in semantic order and output to facilitate subsequent spam identification based on the identified text content. In this way, the text spam identification model can be used to identify image spam, which is conducive to cost savings.

[0103] For the parts not described in detail in the second and third embodiments, please refer to the description of the first embodiment and other parts of this specification, which will not be repeated here.

[0104] It should be noted that the embodiments of the present application may involve the use of user data. In actual applications, user-specific personal data can be used in the scheme described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the user is located (for example, with the user's explicit consent, effective notification to the user, etc.).

[0105] Corresponding to the first embodiment, the embodiment of the present application further provides a spam identification model training device, which may include:

[0106] a text data annotation information acquisition unit, configured to acquire conversation text data from historical conversation records and corresponding annotation information, wherein the annotation information includes whether the conversation text data is spam and the spam category to which it belongs; wherein the conversation text data that is spam includes content that is antagonistic to spam detection methods;

[0107] a training data set acquisition unit, configured to adaptively sample the conversation text data for the corresponding category based on the occurrence ratio of the spam category and / or the strength of the adversarial measures against the spam detection method, to obtain a training data set;

[0108] A fine-tuning training unit is used to use the training data set to perform supervised fine-tuning training on the pre-trained artificial intelligence (AI) model, so that the trained spam recognition model can identify spam messages on the conversation text data containing the adversarial content; wherein, during the fine-tuning training process, the AI model is used to identify whether the conversation text data is spam and the spam message category to which the spam message belongs, and the training process is supervised using the annotation information corresponding to the conversation text data.

[0109] In the fine-tuning training process, the conversation text data in the training data set is assembled into a preset prompt information template to generate prompt information; wherein, the prompt information template also includes identification rule information about the spam message category, so that the AI model can identify the input conversation text data and determine the category in combination with the identification rule information.

[0110] Specifically, the conversation text data includes: text conversation data in a message sent by a first user to a second user, wherein the second user is a seller user in the commodity information service system, and the first user is a user who uses a buyer user account in the commodity information service system to communicate with the seller user.

[0111] Corresponding to the second embodiment, the present embodiment further provides a device for identifying spam based on the spam identification model described in the first embodiment. The device may include:

[0112] A conversation content acquisition unit, configured to acquire the conversation content to be detected during a conversation between a first user and a second user;

[0113] a text data determination unit, configured to determine text data to be detected based on the conversation content, identify whether the text data is spam using the spam identification model, and output a spam category if the text data is identified as spam;

[0114] The spam message processing unit is configured to intercept or mark the conversation content if the conversation content corresponding to the text data is identified as spam.

[0115] Wherein, the conversation content to be detected is the conversation content sent by the first user to the second user;

[0116] At this time, the conversation content acquisition unit may also be used to:

[0117] The conversation contents in a plurality of historical conversation rounds that the first user has sent to the second user are obtained, and provided to the spam identification model as reference information.

[0118] In addition, the device may further include:

[0119] and a contact information extraction unit configured to extract contact information from the conversation content using the spam identification model if the spam identification model identifies the conversation content as spam, and to store the contact information so as to intercept conversation content containing the contact information that is obtained again during other conversations.

[0120] The spam message processing unit may be specifically configured to:

[0121] The conversation content is unidirectionally intercepted on the receiving side, and the conversation content is displayed as a successfully sent state on the sending side.

[0122] The text data acquisition unit may be specifically used for:

[0123] If the conversation content is picture-based, the AI model with multimodal data processing capabilities performs text recognition on the picture-based conversation content and outputs the recognized text content in semantic order;

[0124] The text content output by the AI model with the multimodal data processing capability is determined as the text data to be detected.

[0125] Corresponding to the third embodiment, this embodiment of the present application further provides a device for identifying image-based spam messages, which may include:

[0126] A target image acquisition unit is configured to acquire a target image to be detected; the target image contains adversarial text content used for detecting spam messages;

[0127] A text recognition unit, configured to perform text recognition on the target image using an AI model with multimodal data processing capabilities;

[0128] The semantic sorting unit is used to output the identified text content in a semantic order through the AI model, so as to obtain a spam identification result for the target image by performing spam identification on the output text content.

[0129] In addition, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of any one of the methods in the aforementioned method embodiments are implemented.

[0130] And an electronic device comprising:

[0131] one or more processors; and

[0132] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of the method described in any one of the aforementioned method embodiments.

[0133] A computer program product includes a computer program / computer executable instructions, which implement the steps of the method described in the above method embodiment when executed by a processor in an electronic device.

[0134] in, Figure 5The electronic device architecture is shown as an example, and may include a processor 510, a video display adapter 511, a disk drive 512, an input / output interface 513, a network interface 514, and a memory 520. The processor 510, the video display adapter 511, the disk drive 512, the input / output interface 513, the network interface 514, and the memory 520 may be communicatively connected via a communication bus 530.

[0135] Among them, the processor 510 can be implemented by a general-purpose CPU (Central Processing Unit, processor), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., to execute relevant programs to implement the technical solutions provided in this application.

[0136] The memory 520 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 520 can store an operating system 521 for controlling the operation of the electronic device 500 and a basic input and output system (BIOS) for controlling the low-level operations of the electronic device 500. In addition, a web browser 523, a data storage management system 524, and a spam message identification and processing system 525 can also be stored. The above-mentioned spam message identification and processing system 525 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided by the present application is implemented by software or firmware, the relevant program code is stored in the memory 520 and is called and executed by the processor 510.

[0137] The input / output interface 513 is used to connect input / output modules to implement information input and output. The input / output modules can be configured as components in the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.

[0138] The network interface 514 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WIFI, Bluetooth, etc.).

[0139] The bus 530 comprises a pathway for transmitting information between the various components of the device (eg, the processor 510 , the video display adapter 511 , the disk drive 512 , the input / output interface 513 , the network interface 514 , and the memory 520 ).

[0140] It should be noted that although the above device only shows a processor 510, a video display adapter 511, a disk drive 512, an input / output interface 513, a network interface 514, a memory 520, a bus 530, etc., in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may also include only the components necessary to implement the solution of the present application, and does not necessarily include all the components shown in the figure.

[0141] Through the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application or certain parts of the embodiments.

[0142] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.

[0143] The above describes in detail the spam identification model training, spam identification method, and electronic device provided by this application. Specific examples are used herein to illustrate the principles and implementation methods of this application. The above examples are intended only to help understand the method and core concepts of this application. Furthermore, those skilled in the art will appreciate that variations in the specific implementation methods and scope of application are possible based on the concepts of this application. In summary, this specification should not be construed as limiting this application.

Claims

1. A spam identification model training method, characterized in that: include: Obtaining conversation text data from historical conversation records and corresponding annotation information, the annotation information including whether the conversation text data is spam and the spam category to which it belongs; wherein the conversation text data that is spam includes content that is antagonistic to spam detection methods; Adaptively sampling the conversation text data for the corresponding category based on the occurrence ratio of the spam category and / or the strength of the adversarial approach to spam detection to obtain a training dataset; The pre-trained artificial intelligence (AI) model is fine-tuned in a supervised manner using the training data set, so that the trained spam recognition model can recognize spam messages in conversation text data containing the adversarial content. During the fine-tuning training process, the AI model is used to identify whether the conversation text data is spam and the spam category to which the spam message belongs, and the training process is supervised using the annotation information corresponding to the conversation text data.

2. The method according to claim 1, characterized in that During the fine-tuning training process, the conversation text data in the training data set is assembled into a preset prompt information template to generate prompt information; wherein, the prompt information template also includes identification rule information about the spam message category, so that the AI model can identify the input conversation text data and determine the category in combination with the identification rule information.

3. The method according to claim 1, characterized in that The conversation text data is: text conversation data in a message sent by a first user to a second user, wherein the second user is a seller user in the commodity information service system, and the first user is a user who uses a buyer user account in the commodity information service system to communicate with the seller user.

4. A method for identifying spam based on the spam identification model according to claim 1, characterized in that: include: During a conversation between a first user and a second user, obtaining conversation content to be detected; Determining text data to be detected based on the conversation content, identifying whether the text data is spam using the spam identification model, and outputting a spam category if the text data is identified as spam; If the conversation content corresponding to the text data is identified as junk messages, the conversation content is intercepted or marked.

5. The method according to claim 4, characterized in that The conversation content to be detected is the conversation content sent by the first user to the second user; The method further comprises: The conversation contents in a plurality of historical conversation rounds that the first user has sent to the second user are obtained, and provided to the spam identification model as reference information.

6. The method according to claim 4, characterized in that Also includes: If the spam identification model identifies the conversation content as spam, the spam identification model is further used to extract contact information from the conversation content and save the contact information so that conversation content containing the contact information obtained again in other conversation processes can be intercepted and processed.

7. The method according to claim 4, characterized in that The intercepting and processing of the conversation content includes: The conversation content is unidirectionally intercepted on the receiving side, and the conversation content is displayed as a successfully sent state on the sending side.

8. The method according to claim 4, characterized in that Determining the text data to be detected according to the conversation content includes: If the conversation content is picture-based, the AI model with multimodal data processing capabilities performs text recognition on the picture-based conversation content and outputs the recognized text content in semantic order; The text content output by the AI model with the multimodal data processing capability is determined as the text data to be detected.

9. A method for identifying image spam, characterized in that: include: Get the target image to be detected; The target image contains adversarial text content used to detect spam messages; Performing text recognition on the target image using an AI model with multimodal data processing capabilities; The AI model outputs the identified text content in a semantic order, so as to obtain a spam identification result for the target image by performing spam identification on the output text content.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

11. An electronic device, characterized in that: include: one or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of the method according to any one of claims 1 to 9.

12. A computer program product comprising a computer program / computer executable instructions, characterized in that When the computer program / computer executable instructions are executed by a processor in an electronic device, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Cited By

  • Message service processing method and device, equipment and storage medium

    CN121441873A