Model training method and system, spam identification method and system and device
By using the hierarchical attention network model to train the target model for identifying spam on the OTA platform, the problem of low efficiency of manual spam filtering is solved, automated identification and efficient classification are achieved, and business process efficiency is improved.
Patent Information
- Application Number
- CN202010832607.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-18
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, it is unrealistic to manually formulate email distinction rules, manual spam filtering is inefficient and causes a lot of waste of manpower.
The model training method is adopted, by obtaining email samples, word segmentation processing, word vector conversion and sentence vector generation, and inputting them into the hierarchical attention network model for training, and obtaining the target model used to identify spam.
It has realized the automation of the OTA spam recognition process, improved the speed and accuracy of email classification recognition, and greatly improved the overall efficiency of business processes.
Smart Images

Figure CN111931499B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning, and in particular to a model training method and system, a spam identification method and system, and a device. Background Art
[0002] As domestic online travel agencies (OTA) platforms continue to expand their international markets, more and more overseas merchants are connecting to the platforms. The main way for OTA platforms to communicate with overseas hotels and suppliers is through emails. The volume of emails sent and received has increased with the rapid growth of overseas business, and the review and processing of these emails requires a lot of manpower. In the daily operation process, a large number of emails do not actually need to be reviewed manually, such as advertising and marketing emails, automatic reply emails without substantive content, and emails that do not require manual intervention in the business process. These emails are collectively referred to as "spam." The specific types of spam are determined by the relevant business departments. The content of the emails is complex, and it is not realistic to manually formulate the rules for distinguishing between spam and non-spam. Manual filtering of spam is not only inefficient, but also causes a lot of waste of manpower. Summary of the invention
[0003] The technical problem to be solved by the present invention is to overcome the defects that it is unrealistic to formulate email differentiation rules completely manually, that manual filtering of spam is inefficient and causes a large amount of manpower waste, and to provide a model training method and system, a spam identification method and system and equipment.
[0004] The present invention solves the above technical problems through the following technical solutions:
[0005] A model training method, comprising:
[0006] Acquire multiple email samples, wherein the email samples include spam emails and non-spam emails;
[0007] Perform word segmentation on the text of the email sample, sum up the segmented words, and set a unique and non-repeating digital number for each word, so as to obtain a data sample composed of the digital numbers corresponding to the words of the email sample;
[0008] Convert the digital number of each word into a word vector, and obtain the sentence vector of the data sample based on the word vector;
[0009] Each digitally numbered word vector and the sentence vector in the data sample are input into a hierarchical attention network model for training to obtain a target model for identifying spam.
[0010] Preferably, the text of the email sample includes Chinese and / or English.
[0011] and / or,
[0012] After obtaining the data sample, the model training method further includes:
[0013] The lengths of all data samples are counted, and a target text length is selected. Data samples longer than the target text length are truncated at the end, and data samples shorter than the target length are padded with 0 at the end to the target text length.
[0014] A spam identification method, comprising:
[0015] When a new email is received, the content of the new email is automatically obtained;
[0016] Performing word segmentation processing on the content of the new email to obtain a new email text, and converting the new email text into a new data text according to a preset correspondence between words and digital numbers;
[0017] Convert the digital number of the new data text into a word vector, and obtain a sentence vector of the new data text based on the word vector;
[0018] Inputting the word vector and sentence vector of the new data text into the target model obtained by the model training method using any combination of the above items to obtain the output value of the model;
[0019] The output value of the model is compared with a target threshold value, and if the output value of the model is greater than the target threshold value, the new email is identified as spam.
[0020] Preferably, after identifying the new email as spam, the spam identification method further comprises:
[0021] The new email is stored in the trash box of the email system.
[0022] Preferably, the spam identification method further comprises:
[0023] After the new email is marked as non-spam email, the new email is restored from the trash box of the email system and processed as non-spam email.
[0024] A model training system, comprising:
[0025] A sample acquisition module, used to acquire multiple email samples, wherein the email samples include spam emails and non-spam emails;
[0026] The preprocessing module is used to perform word segmentation on the text of the email sample, summarize the segmented words, and set a unique and non-repeating digital number for each word to obtain a data sample composed of the digital numbers corresponding to the words of the email sample;
[0027] A vectorization module, used to convert the digital number of each word into a word vector, and obtain the sentence vector of the data sample based on the word vector;
[0028] The training module is used to input each digitally numbered word vector and the sentence vector in the data sample into a hierarchical attention network model for training to obtain a target model for identifying spam.
[0029] Preferably, the text of the email sample includes Chinese and / or English.
[0030] and / or,
[0031] The preprocessing module also includes:
[0032] The length unification unit is used to count the lengths of all data samples, select a target text length, truncate data samples longer than the target text length at the end, and fill in 0 at the end of data samples shorter than the target length to the target text length.
[0033] A spam identification system, comprising:
[0034] A new email acquisition module, used to receive new emails and automatically acquire the content of the new emails;
[0035] A new mail preprocessing module, used for performing word segmentation processing on the content of the new mail to obtain a new mail text, and converting the new mail text into a new data text according to a preset correspondence between words and digital numbers;
[0036] A new email vectorization module, used to convert the digital number of the new data text into a word vector, and obtain the sentence vector of the new data text based on the word vector;
[0037] An output module, used to input the word vector and sentence vector of the new data text into a target model obtained by a model training system using any combination of the above items to obtain an output value of the model;
[0038] The identification module is used to compare the output value of the model with a target threshold value, and if the output value of the model is greater than the target threshold value, identify the new email as spam.
[0039] Preferably, the spam identification system further includes:
[0040] The spam mail processing module is used to store the new mail into the spam box of the mail system after the identification module identifies the new mail as spam mail.
[0041] Preferably, the spam identification system further includes:
[0042] The mail restoration module is used to restore the new mail from the trash box of the mail system and process it as a non-spam mail after the new mail is marked as a non-spam mail.
[0043] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any combination of the above-mentioned model training methods or spam identification methods is implemented.
[0044] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements any combination of the above-mentioned model training methods or spam identification methods.
[0045] The positive and progressive effects of the present invention are:
[0046] The present invention utilizes cutting-edge technologies related to deep learning and neuro-linguistic programming (NLP), such as word embedding and hierarchical attention networks (HAN), to overcome the defects in the prior art that the manually formulated email distinction rules are too complicated and the manual filtering of spam is inefficient, affecting the overall efficiency of the business process. It realizes the automation of the OTA spam identification process, speeds up the speed of email classification and identification, and further improves the accuracy of judging spam. At the same time, it filters out spam that does not require manual processing, greatly improving the overall efficiency of the business process. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is a flow chart of the model training method of Example 1 of the present invention.
[0048] Figure 2 This is a flow chart of a spam identification method according to Embodiment 2 of the present invention.
[0049] Figure 3 This is a schematic diagram of the hardware structure of an electronic device according to Embodiment 3 of the present invention.
[0050] Figure 4 This is a structural block diagram of the model training system of Example 5 of the present invention.
[0051] Figure 5 This is a structural block diagram of a spam identification system according to Embodiment 6 of the present invention. DETAILED DESCRIPTION
[0052] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.
[0053] Example 1
[0054] like Figure 1 As shown, a model training method includes:
[0055] Step 101: Acquire multiple email samples, where the email samples include spam emails and non-spam emails;
[0056] Step 102: Segment the text of the email sample, sum up the segmented words, and set a unique and non-repeating digital number for each word to obtain a data sample consisting of the digital numbers corresponding to the words of the email sample;
[0057] Step 103: convert the digital number of each word into a word vector, and obtain the sentence vector of the data sample based on the word vector;
[0058] Step 104: input each digitally numbered word vector and the sentence vector in the data sample into a hierarchical attention network model for training to obtain a target model for identifying spam.
[0059] In step 101, the business personnel sample and sort out a plurality of email samples, which cover almost all commonly occurring spam email categories and a batch of non-spam emails. Each email sample includes the email sender, email subject, and email body text.
[0060] Preferably, the text of the email sample includes Chinese and / or English.
[0061] In step 102, all punctuation marks in the sample email text are removed. The Chinese text is segmented using Jieba word segmentation; the English text is segmented by spaces and all are unified into lowercase letters. The sender, subject, and body text of the processed email sample are arranged in sequence. For example, the original text is "This is an apple. This is an apple.", which is changed to "this is an apple this is an apple" after processing.
[0062] Perform word segmentation on all email samples and sum up the segmented words. To limit the number of words, remove words that appear only once. Set a number for each word, which is unique and non-repeating. Replace each word in the above processed email sample text with the corresponding number. For example, the above text will become (the numbers are for example only): 3 5 9 18 25 37 62
[0064] Preferably, after obtaining the data sample, the model training method further comprises:
[0065] The lengths of all data samples are counted, and a target text length is selected. Data samples longer than the target text length are truncated at the end, and data samples shorter than the target length are padded with 0 at the end to the target text length.
[0066] For example, if 10 is selected as the target text length, the above text is adjusted to 3 5 9 18 25 37 62 0 0 0
[0068] After the above steps, the data samples required for model training are obtained.
[0069] In step 103, the present invention uses the open source tool gensim to obtain the word2vec word vector of each word. The training corpus is the above data sample. This process belongs to the pre-training process of model training, and the purpose is to obtain a more targeted vector representation of each word in the text expression of overseas emails in the OTA industry.
[0070] In step 104, the hierarchical attention network model combines the advantages of the gated recurrent unit and the attention mechanism, so that the machine can understand the semantics of the entire article from the sentence and word levels, thereby improving the classification accuracy. Each level uses the gated recurrent unit as an encoder, and after encoding, the overall information contained in the input sequence is numerically abstracted, and then the attention mechanism is used to extract the information with greater weight. The present invention uses the python language to implement the hierarchical attention network model, inputs the word2vec vector of each digital number of the sample data, completes the training process, and obtains the target model for identifying spam.
[0071] Naive neural network models are not much better than traditional machine learning models, as they do not make full use of hierarchical information. The use of hierarchical information plus the attention mechanism allows the model to ignore some interference information when making judgments. In this embodiment, the training model designs two different levels of attention mechanisms at the word and sentence levels, respectively. This allows these contents to be treated differently when constructing document representations. The combination of hierarchical information and attention mechanisms improves the model's ability to understand and analyze. This embodiment utilizes cutting-edge technologies related to deep learning and NLP such as word2vec word vectors and HAN to automate the OTA spam identification process and further improve the accuracy of spam identification.
[0072] Example 2
[0073] like Figure 2 As shown, a spam identification method includes:
[0074] Step 201: When a new email is received, automatically obtain the content of the new email;
[0075] Step 202: Perform word segmentation on the content of the new email to obtain a new email text, and convert the new email text into a new data text according to a preset correspondence between words and digital numbers;
[0076] Specifically, the new data text is obtained using the same method as step 102 in Example 1.
[0077] Step 203: convert the digital number of the new data text into a word vector, and obtain the sentence vector of the new data text based on the word vector;
[0078] Specifically, the word vector and sentence vector are obtained using the same method as step 103 in Example 1.
[0079] Step 204: input the word vector and sentence vector of the new data text into the target model obtained by the model training method using any combination of the above items to obtain the output value of the model;
[0080] Step 205: Compare the output value of the model with the target threshold. If the output value of the model is greater than the target threshold, identify the new email as spam.
[0081] Preferably, the output value is a fractional value between 0 and 1, and the target threshold value may be 0.9.
[0082] Preferably, after identifying the new email as spam, the spam identification method further comprises:
[0083] Step 206: Store the new email into the trash box of the email system.
[0084] Furthermore, after the new email is stored in the spam box of the email system, a notification email may be automatically sent to the sender of the new email, and the notification email is used to notify the sender that the new email is identified as spam.
[0085] Preferably, the spam identification method further comprises:
[0086] Step 207: After the new email is marked as non-spam, the new email is restored from the trash box of the email system and processed as non-spam.
[0087] In this embodiment, the target model can accurately distinguish between spam and non-spam, and the spam identification method identifies, processes or restores the new email according to the model output value, thereby realizing the automation of the OTA spam identification and processing process, speeding up the speed of email classification and identification, and filtering out spam that does not require manual processing, greatly improving the overall efficiency of the business process.
[0088] Example 3
[0089] Figure 3 A schematic diagram of the structure of an electronic device provided in Example 3 of the present invention. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the model training method of Example 1 or the spam identification method of Example 2 when executing the program. Figure 3 The electronic device 30 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0090] like Figure 3 As shown, the electronic device 30 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 30 may include, but are not limited to: at least one processor 31, at least one memory 32, and a bus 33 connecting different system components (including the memory 32 and the processor 31).
[0091] The bus 33 includes a data bus, an address bus, and a control bus.
[0092] The memory 32 may include a volatile memory, such as a random access memory (RAM) 321 and / or a cache memory 322 , and may further include a read-only memory (ROM) 323 .
[0093] The memory 32 may also include a program / utility 325 having a set (at least one) of program modules 324, such program modules 324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0094] The processor 31 executes various functional applications and data processing by running the computer programs stored in the memory 32, such as the model training method of embodiment 1 or the spam identification method of embodiment 2 of the present invention.
[0095] The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 35. Furthermore, the model-generated device 30 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 36. As shown, the network adapter 36 communicates with other modules of the model-generated device 30 via a bus 33. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the model-generated device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (RAID) systems, tape drives, and data backup storage systems.
[0096] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.
[0097] Example 4
[0098] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the model training method of Embodiment 1 or the spam identification method of Embodiment 2 are implemented.
[0099] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.
[0100] In a possible implementation, the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of the model training method of Example 1 or the spam identification method of Example 2.
[0101] The program code for executing the present invention may be written in any combination of one or more programming languages, and may be executed entirely on a user device, partially on a user device, as an independent software package, partially on a user device and partially on a remote device, or entirely on a remote device.
[0102] Example 5
[0103] like Figure 4 As shown, a model training system includes:
[0104] The sample acquisition module 11 is used to acquire a plurality of email samples, wherein the email samples include spam emails and non-spam emails; preferably, the texts of the email samples include Chinese and / or English.
[0105] The preprocessing module 12 is used to perform word segmentation on the text of the email sample, summarize the segmented words, and set a unique and non-repeating digital number for each word to obtain a data sample composed of the digital numbers corresponding to the words of the email sample;
[0106] The preprocessing module 12 is used to preprocess the email sample. All punctuation marks in the email sample text are removed. The Chinese text is segmented using Jieba word segmentation; the English text is segmented by spaces and all are unified into lowercase letters. The sender, subject and body text of the email sample processed as above are arranged in sequence. For example, the original text is "This is an apple. This is an apple.", which becomes "this is an apple this is an apple" after processing.
[0107] Perform word segmentation on all email samples and sum up the segmented words. To limit the number of words, remove words that appear only once. Set a number for each word, which is unique and non-repeating. Replace each word in the above processed email sample text with the corresponding number. For example, the above text will become (the numbers are for example only): 3 5 9 18 25 37 62
[0109] Preferably, the pre-processing module 12 further includes:
[0110] The length unification unit is used to count the lengths of all data samples, select a target text length, truncate data samples longer than the target text length at the end, and fill in 0 at the end of data samples shorter than the target length to the target text length.
[0111] The model training system also includes:
[0112] A vectorization module 13, used to convert the digital number of each word into a word vector, and obtain the sentence vector of the data sample based on the word vector;
[0113] The vectorization module 13 uses the open source tool gensim to obtain the word2vec word vector of each word. The training corpus is the above data sample. This process belongs to the pre-training process of model training, and the purpose is to obtain a more targeted vector representation of each word in the text expression of overseas emails in the OTA industry.
[0114] The training module 14 is used to input each digitally numbered word vector and the sentence vector in the data sample into a hierarchical attention network model for training to obtain a target model for identifying spam.
[0115] The training module 14 utilizes the hierarchical attention network model to combine the advantages of the gated recurrent unit and the attention mechanism, so that the machine can understand the semantics of the entire article from the sentence and word levels, thereby improving the classification accuracy. Each level uses the gated recurrent unit as an encoder, and after encoding, the overall information contained in the input sequence is numerically abstracted, and then the attention mechanism is used to extract the information with greater weight. The present invention uses the python language to implement the hierarchical attention network model, inputs the word2vec vector of each digital number of the sample data, completes the training process, and obtains the target model for identifying spam.
[0116] In this embodiment, the training module 14 designs two different levels of attention mechanisms at the word and sentence levels, respectively. This allows these contents to be treated differently when constructing document representations. The combination of hierarchical information and attention mechanisms improves the understanding and analysis capabilities of the target model. This embodiment utilizes cutting-edge technologies related to deep learning and NLP fields such as word2vec word vectors and HAN to automate the OTA spam identification process and further improve the accuracy of spam identification.
[0117] Example 6
[0118] like Figure 5 As shown, a spam identification system comprises:
[0119] A new email acquisition module 21, used to receive new emails and automatically acquire the content of the new emails;
[0120] A new mail preprocessing module 22, configured to perform word segmentation processing on the content of the new mail to obtain a new mail text, and convert the new mail text into a new data text according to a preset correspondence between words and digital numbers;
[0121] Specifically, the new data text is obtained in the same manner as the preprocessing module 12 in Example 5.
[0122] A new email vectorization module 23, used to convert the digital number of the new data text into a word vector, and obtain a sentence vector of the new data text based on the word vector;
[0123] Specifically, the word vector and sentence vector are obtained in the same manner as the vectorization module 13 in Example 5.
[0124] An output module 24 is used to input the word vector and sentence vector of the new data text into the target model obtained by the model training system using any combination of the above items to obtain the output value of the model;
[0125] The identification module 25 is used to compare the output value of the model with a target threshold value, and if the output value of the model is greater than the target threshold value, identify the new email as spam.
[0126] Preferably, the output value is a fractional value between 0 and 1, and the target threshold value may be 0.9.
[0127] Preferably, the spam identification system further includes:
[0128] The junk mail processing module 26 is used to store the new mail into the junk mail box of the mail system.
[0129] Furthermore, the spam processing module 26 is used to automatically reply a notification email to the sender of the new email after storing the new email in the spam box of the email system, wherein the notification email is used to notify the sender that the new email is identified as spam. Preferably, the spam identification system also includes:
[0130] The mail restoration module 27 is used to restore the new mail from the trash box of the mail system and process it as a non-spam mail after the new mail is marked as a non-spam mail.
[0131] In this embodiment, the target model can accurately distinguish between spam and non-spam. The spam identification system identifies, processes or restores the new email according to the model output value, thereby realizing the automation of OTA spam identification and processing, speeding up the speed of email classification and identification, and filtering out spam that does not require manual processing, greatly improving the efficiency of business processes.
[0132] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that this is only for illustration and the protection scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.
Claims
1. A model training method, characterized in that: The model training method comprises: Acquire multiple email samples, wherein the email samples include spam emails and non-spam emails; Perform word segmentation on the text of the email sample, sum up the segmented words, and set a unique and non-repeating digital number for each word, so as to obtain a data sample composed of the digital numbers corresponding to the words of the email sample; Convert the digital number of each word into a word vector, and obtain the sentence vector of the data sample based on the word vector; Inputting each digitally numbered word vector and the sentence vector in the data sample into a hierarchical attention network model for training to obtain a target model for identifying spam; After obtaining the data sample, the model training method further includes: Count the lengths of all data samples, select a target text length, truncate data samples longer than the target text length, and pad the end of data samples shorter than the target length with 0s to the target text length; Among them, the hierarchical attention network model designs two different levels of attention mechanisms at the word and sentence levels respectively, and understands the semantics of emails based on the word vector and sentence vector levels. Each level includes a gated recurrent unit and an attention mechanism. The gated recurrent unit acts as an encoder. After encoding, it numerically abstracts the overall information contained in the input sequence. The attention mechanism extracts information with greater weight from the numerical abstract results.
2. The model training method according to claim 1, characterized in that: The text of the email sample includes Chinese and / or English.
3. A spam identification method, characterized in that: The method comprises: When a new email is received, the content of the new email is automatically obtained; Performing word segmentation processing on the content of the new email to obtain a new email text, and converting the new email text into a new data text according to a preset correspondence between words and digital numbers; Convert the digital number of the new data text into a word vector, and obtain a sentence vector of the new data text based on the word vector; Inputting the word vector and sentence vector of the new data text into the target model obtained by the model training method according to any one of claims 1 to 2 to obtain the output value of the model; The output value of the model is compared with a target threshold value, and if the output value of the model is greater than the target threshold value, the new email is identified as spam.
4. The spam identification method according to claim 3, characterized in that: After identifying the new email as spam, the spam identification method further includes: The new email is stored in the trash box of the email system.
5. The spam identification method according to claim 4, characterized in that: The spam identification method further comprises: After the new email is marked as non-spam email, the new email is restored from the trash box of the email system and processed as non-spam email.
6. A model training system, characterized in that: The model training system comprises: A sample acquisition module, used to acquire multiple email samples, wherein the email samples include spam emails and non-spam emails; The preprocessing module is used to perform word segmentation on the text of the email sample, summarize the segmented words, and set a unique and non-repeating digital number for each word to obtain a data sample composed of the digital numbers corresponding to the words of the email sample; A vectorization module, used to convert the digital number of each word into a word vector, and obtain the sentence vector of the data sample based on the word vector; A training module, used for inputting each digitally numbered word vector and the sentence vector in the data sample into a hierarchical attention network model for training to obtain a target model for identifying spam; The hierarchical attention network model designs two different levels of attention mechanisms at the word and sentence levels, respectively, to understand the semantics of emails based on word vectors and sentence vectors. Each level includes a gated recurrent unit and an attention mechanism. The gated recurrent unit acts as an encoder, which numerically abstracts the overall information contained in the input sequence after encoding. The attention mechanism extracts the information with greater weight from the numerical abstract results. The preprocessing module also includes: The length unification unit is used to count the lengths of all data samples, select a target text length, truncate data samples longer than the target text length at the end, and fill in 0 at the end of data samples shorter than the target length to the target text length.
7. The model training system according to claim 6, characterized in that: The text of the email sample includes Chinese and / or English.
8. A spam identification system, characterized in that: The spam identification system comprises: A new email acquisition module, used to receive new emails and automatically acquire the content of the new emails; A new mail preprocessing module, used for performing word segmentation processing on the content of the new mail to obtain a new mail text, and converting the new mail text into a new data text according to a preset correspondence between words and digital numbers; A new email vectorization module, used to convert the digital number of the new data text into a word vector, and obtain the sentence vector of the new data text based on the word vector; An output module, used for inputting the word vector and sentence vector of the new data text into a target model obtained by using the model training system as described in any one of claims 6-7 to obtain an output value of the model; The identification module is used to compare the output value of the model with a target threshold value, and if the output value of the model is greater than the target threshold value, identify the new email as spam.
9. The spam identification system according to claim 8, characterized in that: The spam identification system also includes: The spam mail processing module is used to store the new mail into the spam box of the mail system after the identification module identifies the new mail as spam mail.
10. The spam identification system according to claim 9, characterized in that: The spam identification system also includes: The mail restoration module is used to restore the new mail from the trash box of the mail system and process it as a non-spam mail after the new mail is marked as a non-spam mail.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the model training method described in any one of claims 1 to 2 or the spam identification method described in any one of claims 3 to 5 is implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the model training method described in any one of claims 1 to 2 or the spam identification method described in any one of claims 3 to 5 is implemented.
Citation Information
Patent Citations
Junk mail judgment method and device
CN103744905A
Chinese spam recognition method based on chaos particle swarm optimization CNN
CN108647206A
Classification algorithm-based configurable spam filtering system and method
CN108694202A
Text classification method based on phrase vectors
CN110825848A