A spam screening method and device based on large language model

By using a pre-trained large language model for email semantic analysis and feature extraction, combined with a fine-tuned classifier and user feedback mechanism, the problems of insufficient semantic understanding and high false positive rates in the existing technology are solved, and the spam screening effect with high accuracy and adaptability is achieved.

CN119788635APending Publication Date: 2025-04-08DEQING ALPHA INNOVATION RES INST
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411921109.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

Existing spam filtering techniques cannot accurately understand the context and semantics in emails, and the false positive rate is high, making it difficult to deal with complex semantics and dynamically changing spam.

Method used

A pre-trained large language model is used to perform semantic analysis and feature extraction of email content, combined with a fine-tuned spam classifier for classification and judgment, and a user feedback and model adaptive update mechanism are introduced.

Benefits of technology

It improves the accuracy and adaptability of spam screening, reduces the false positive rate, can effectively identify spam with complex semantics, and quickly deal with new forms of spam.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788635A_ABST
    Figure CN119788635A_ABST
Patent Text Reader

Abstract

The present invention is a method and device for filtering spam based on a large language model, and the method comprises the following steps: 1) email preprocessing to extract the content of received emails, including the body, attachments and metadata; 2) feature extraction and vectorization: converting the email content into a high-dimensional semantic vector through a large language model to capture the semantic information and contextual relationship of the email content; 3) classification and screening: using the large language model combined with a fine-tuned spam classifier to classify emails into spam and non-spam, and the classifier makes a comprehensive judgment based on contextual semantics, sending behavior patterns and metadata features; 4) feedback mechanism: introducing user feedback and model adaptive update mechanism to improve model performance through feedback learning. The present invention improves the accuracy and adaptability of spam filtering by introducing a pre-trained large language model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of mail filtering, and in particular relates to a method and a device for filtering junk mails based on a large language model. Background Art

[0002] Current spam filtering methods rely primarily on the following two technologies: 1. Rule-based screening technology: Screen email content through predefined rule sets, such as keyword matching, regular expressions, and blacklists and whitelists. This method is simple to operate, but it is difficult to deal with complex and changeable spam content, and there are problems such as high false positive rate and high maintenance cost.

[0003] 2. Machine learning-based screening technology: Use traditional machine learning models (such as Naive Bayes, SVM) to classify emails. This type of method can adapt to a certain degree of content changes, but it lacks the ability to understand complex semantics and context, and is particularly difficult to distinguish carefully disguised spam emails.

[0004] The above existing technologies have the following problems when dealing with large-scale and highly complex spam filtering scenarios: 1. Unable to accurately understand the context and semantics of the email.

[0005] 2. When the disguise of spam increases, the screening accuracy of the existing model decreases significantly.

[0006] 3. It requires frequent manual updates of rules or training samples, which is inefficient.

[0007] Therefore, a spam filtering method and device based on a large language model are designed to overcome the above problems. Summary of the invention

[0008] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method and device for spam screening based on a large language model. The present invention can well solve the problems of insufficient semantic understanding, high false alarm rate and difficulty in coping with dynamic changes in the existing spam screening technology. The present invention improves the accuracy and adaptability of spam screening by introducing a pre-trained large language model.

[0009] The present invention is implemented by the following technical solution: a spam screening method based on a large language model, the method comprising the following steps: 1) Email preprocessing extracts the content of received emails, including the body, attachments, and metadata; 2) Feature extraction and vectorization: The email content is converted into a high-dimensional semantic vector through a large language model to capture the semantic information and contextual relationship of the email content; 3) Classification and screening: Use a large language model combined with a fine-tuned spam classifier to classify emails into spam and non-spam. The classifier makes a comprehensive judgment based on contextual semantics, sending behavior patterns, and metadata features; 4) Feedback mechanism: Introduce user feedback and model adaptive update mechanism to improve model performance through feedback learning.

[0010] Preferably, the content extraction in the email preprocessing in step 1 includes keyword extraction, voice extraction, and image extraction, and the extracted content includes the main text, attachments, and metadata.

[0011] Preferably, the large language model in step 2 needs to be trained first, the trained large language model is optimized, and the optimized large language model is converted into a high-dimensional semantic vector.

[0012] As a preferred embodiment: the method for training the large model is: a new large model foundation is created, some basic word semantics or pictures are set within the foundation, and then a large number of emails are analyzed and acquired, such words are linguistically classified, the classified word meanings are summarized and concluded, and manual screening and fine-tuning are also required to finally determine the email classification words.

[0013] As a preferred embodiment, the classification screening in step 3 is to establish an email classifier through a large language model combined with fine-tuning, and the basis for establishing the email classifier is the word class classification in the large language model.

[0014] A spam filtering device based on a large language model, the device comprising: Data collection module: responsible for real-time collection of email data, including text content, attachments, metadata, etc.; Preprocessing module: realizes email content cleaning and standardization, and removes noise data; Large language model module: calls the pre-trained large language model to perform email semantic analysis and feature extraction; Classification module: contains a fine-tuned large language model classifier, combined with contextual understanding to determine spam; Feedback learning module: Adaptively optimize the model based on user feedback to improve classification accuracy.

[0015] Preferably, the device is integrated into an internal mail server of an enterprise.

[0016] Preferably, the large language module in the device can also support multiple languages.

[0017] The beneficial effects of the present invention are as follows: 1. Strong semantic understanding ability: The large language model can capture the complex semantics and implicit contextual relationships in emails, and improve the ability to identify disguised spam.

[0018] 2. High screening accuracy: Experiments show that the classification accuracy of this method on a standard spam dataset can reach over 98%, which is more than 10% higher than traditional methods.

[0019] 3. Strong adaptability: By introducing user feedback mechanism and model dynamic update function, it can quickly respond to new forms of spam.

[0020] 4. High deployment flexibility: The system supports cloud deployment and local deployment, and can be seamlessly integrated with existing mail servers.

[0021] 5. Save maintenance costs: No need to frequently update rules or training samples manually, rely on model adaptive optimization to reduce manual intervention. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is an overall framework diagram of the present invention.

[0023] Figure 2 It is a schematic diagram of the structure of the screening device in the present invention. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to more clearly understand the objectives, technical solutions and advantages of the present invention, the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0025] In the description of the present invention, it is necessary to understand that the orientation or position relationship indicated by the terms such as "up", "down", "left", "right", "inside", "outside", "horizontal" and "vertical" is based on the orientation or position relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention, rather than indicating or implying that the device or original referred to must have a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0026] The present invention will be described in detail below with reference to the accompanying drawings: Figure 1 As shown, a spam filtering method based on a large language model comprises the following steps: 1) Email preprocessing extracts the content of received emails, including the body, attachments, and metadata; 2) Feature extraction and vectorization: The email content is converted into a high-dimensional semantic vector through a large language model to capture the semantic information and contextual relationship of the email content; 3) Classification and screening: Use a large language model combined with a fine-tuned spam classifier to classify emails into spam and non-spam. The classifier makes a comprehensive judgment based on contextual semantics, sending behavior patterns, and metadata features; 4) Feedback mechanism: Introduce user feedback and model adaptive update mechanism to improve model performance through feedback learning.

[0027] The extraction of content in the email preprocessing in step 1 includes keyword extraction, voice extraction, and image extraction, and the extracted content includes text, attachments, and metadata.

[0028] Preferably, the large language model in step 2 needs to be trained first, the trained large language model is optimized, and the optimized large language model is converted into a high-dimensional semantic vector.

[0029] The method for training the large model is: a new large model foundation is created, some basic word semantics or pictures are set within the foundation, and then a large number of emails are analyzed and acquired, such words are linguistically classified, the classified word meanings are summarized and concluded, and manual screening and fine-tuning are also required to finally determine the email classification words.

[0030] The classification screening in step 3 is to establish an email classifier by combining the large language model with fine-tuning, and the basis for establishing the email classifier is the word class classification in the large language model.

[0031] like Figure 2 As shown, a spam filtering device based on a large language model, the device comprising: Data collection module 1: responsible for real-time collection of email data, including text content, attachments, metadata, etc.; Preprocessing module: realizes email content cleaning and standardization, and removes noise data; Large language model module 2: calls the pre-trained large language model to perform email semantic analysis and feature extraction; Classification module 3: contains a fine-tuned large language model classifier that combines contextual understanding to determine spam; Feedback learning module: Adaptively optimize the model based on user feedback to improve classification accuracy.

[0032] The technical features of the present invention are as follows: 1. Semantic-based spam identification: Capture deep semantic features in email content through a large language model to improve the ability to identify complex spam.

[0033] 2. Multimodal information fusion: Combine email metadata (such as sending IP address, time, attachment type, etc.) with content semantic information to build a more comprehensive basis for judgment.

[0034] 3. Real-time update mechanism: Dynamically update the classifier model through incremental training and user feedback to ensure the long-term effectiveness of the screening system.

[0035] Example 1: Email classification scenario Environment setting: Integrate the present invention into the internal mail server of the enterprise.

[0036] Experimental results: After the initial deployment, the screening system achieved an accuracy rate of 97.5% and a false alarm rate of less than 1%. After one month of continuous operation, the accuracy rate was further improved to 98.3% through user feedback and learning.

[0037] Example 2: Multilingual Email Filtering Environment settings: For multilingual emails (such as English, French, Chinese, etc.), configure a large language model that supports multiple languages.

[0038] Experimental results: The system can accurately identify multilingual spam, and the classification performance is better than traditional methods in all tested languages.

[0039] Anyone familiar with the technology may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A spam filtering method based on a large language model, characterized in that: The method comprises the following steps: 1) Email preprocessing extracts the content of received emails, including the body, attachments, and metadata; 2) Feature extraction and vectorization: The email content is converted into a high-dimensional semantic vector through a large language model to capture the semantic information and contextual relationship of the email content; 3) Classification and screening: Use a large language model combined with a fine-tuned spam classifier to classify emails into spam and non-spam. The classifier makes a comprehensive judgment based on contextual semantics, sending behavior patterns, and metadata features; 4) Feedback mechanism: Introduce user feedback and model adaptive update mechanism to improve model performance through feedback learning.

2. The spam filtering method based on a large language model according to claim 1, characterized in that: The extraction of content in the email preprocessing in step 1 includes keyword extraction, voice extraction, and image extraction, and the extracted content includes text, attachments, and metadata.

3. The spam filtering method based on a large language model according to claim 1, characterized in that: In step 2, the large language model needs to be trained first, the trained large language model is optimized, and the optimized large language model is converted into a high-dimensional semantic vector.

4. The spam filtering method based on a large language model according to claim 3, characterized in that: The method for training the large model is: a new large model foundation is created, some basic word semantics or pictures are set within the foundation, and then a large number of emails are analyzed and acquired, such words are linguistically classified, the classified word meanings are summarized and concluded, and manual screening and fine-tuning are also required to finally determine the email classification words.

5. The spam filtering method based on a large language model according to claim 1, characterized in that: The classification screening in step 3 is to establish an email classifier by combining the large language model with fine-tuning, and the basis for establishing the email classifier is the word class classification in the large language model.

6. A spam filtering device based on a large language model, characterized in that: The device comprises: Data collection module: responsible for real-time collection of email data, including text content, attachments, and metadata; Preprocessing module: realizes email content cleaning and standardization, and removes noise data; Large language model module: calls the pre-trained large language model to perform email semantic analysis and feature extraction; Classification module: contains a fine-tuned large language model classifier, combined with contextual understanding to determine spam; Feedback learning module: Adaptively optimize the model based on user feedback to improve classification accuracy.

7. The junk mail screening device based on large language model according to claim 6, characterized in that: The device is integrated into the enterprise's internal mail server.

8. The junk mail screening device based on large language model according to claim 6, characterized in that: A large language module within the device may also support multiple languages.

Citation Information

Cited By

  • Policy game and large language model-based phishing mail detection method, apparatus and device, and medium

    CN121056235A