Mail identification method, device, equipment and computer-readable storage medium
By acquiring and analyzing the page tag sequence of emails and combining content, attachments, and behavior information, and using machine learning models to optimize the recognition process, the problem of low accuracy in email type recognition in existing technologies is solved, and accurate recognition of emails with no or little text information is achieved.
Patent Information
- Application Number
- CN202110204331.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-23
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2041-02-23
AI Technical Summary
In the prior art, the accuracy of email type recognition is low. In particular, for emails containing no or little text information, the accuracy of recognition methods based on text information is low.
By obtaining the page label sequence of the email, extracting the label vector of each page label, constructing the label vector sequence, and identifying the email type based on the sequence, combining content, attachment and behavior information for multi-dimensional identification, and using machine learning models to optimize the identification process.
Improved the accuracy of email message type recognition, and can accurately identify email types with no or little text information.
Smart Images

Figure CN113592416B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to information processing technology in the field of artificial intelligence, and in particular to a mail recognition method, apparatus, device and computer-readable storage medium. Background Art
[0002] With the rapid development of computer communication technology, email has become one of the main ways for people to communicate on the Internet. However, in addition to personal emails, the emails received by users usually also include other types of emails, such as advertising emails, system emails, official emails, etc. Therefore, in order to improve the efficiency of email usage, it is usually necessary to identify the email type.
[0003] Generally speaking, in order to identify the email type, artificial intelligence technology is usually used to identify the email type based on the text information of the email; however, some emails do not include text information or include less text information. Therefore, when the email type is identified based on the text information of the email, the accuracy of the recognition result obtained is low. Summary of the Invention
[0004] Embodiments of the present application provide an email identification method, apparatus, device, and computer-readable storage medium, which can improve the accuracy of identifying the email type of an email.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] This embodiment of the present application provides a mail identification method, including:
[0007] Obtaining a mail to be identified, wherein the mail to be identified is an email received by a recipient;
[0008] Acquire a page tag sequence of the email to be identified, wherein the page tag sequence is used to display the email to be identified;
[0009] Obtaining a label vector of each page label in the page label sequence, thereby obtaining a label vector sequence corresponding to the page label sequence;
[0010] Identifying the mail type of the mail to be identified based on the label vector sequence;
[0011] Based on the identified mail type probability value, a mail identification result corresponding to the mail to be identified is determined, wherein the mail identification result is the mail type to which the mail to be identified belongs.
[0012] The present invention provides a mail identification device, including:
[0013] An email acquisition module is used to acquire emails to be identified, wherein the emails to be identified are emails received by a recipient;
[0014] a label acquisition module, configured to acquire a page label sequence of the email to be identified, wherein the page label sequence is used to display the email to be identified;
[0015] a vector acquisition module, configured to acquire a label vector of each page label in the page label sequence, thereby obtaining a label vector sequence corresponding to the page label sequence;
[0016] An email identification module, configured to identify the email type of the email to be identified based on the label vector sequence;
[0017] The result determination module is configured to determine a mail identification result corresponding to the mail to be identified based on the identified mail type probability value, wherein the mail identification result is the mail type to which the mail to be identified belongs.
[0018] In an embodiment of the present application, the mail identification device also includes an auxiliary identification module for obtaining at least one type of mail information of the mail to be identified, wherein the at least one type of mail information includes one or more of content information, attachment information, and behavior information; based on the at least one type of mail information, the mail type of the mail to be identified is identified to obtain a probability value of the mail type to be combined.
[0019] In the embodiment of the present application, the result determination module is further configured to determine the email recognition result corresponding to the email to be recognized by combining the email type probability value and the probability value of the email type to be combined.
[0020] In an embodiment of the present application, the result determination module is further used to identify the mail type of the mail to be identified in at least one manner for each mail information in the at least one mail information, and obtain at least one identification probability value; splice the at least one identification probability value to obtain the mail identification probability value corresponding to each mail information, thereby obtaining at least one mail identification probability value corresponding to the at least one mail information; splice the at least one mail identification probability value to obtain the probability value of the mail type to be combined.
[0021] In an embodiment of the present application, when the at least one email message includes the behavior information, the result determination module is further used to obtain the email sending entity of the email to be identified, wherein the email sending entity includes one or more of the email sending URL information, the sending object and the mailbox domain name; determine the entity scoring information based on the historical email type corresponding to the email sending entity; obtain the object portrait information of the receiving object; determine the interest tag based on the object portrait information; obtain the relationship chain between the receiving object and the email sending entity; and determine one or more of the entity scoring information, the interest tag information and the relationship chain as the behavior information in the at least one email message.
[0022] In an embodiment of the present application, the at least one email information includes the attachment information, and when the attachment information is one or both of document information and image information, the result determination module is further used to obtain the string vector of each text string in the document information when the attachment information is the document information, thereby obtaining a string vector sequence corresponding to the document information, and identifying the email type of the email to be identified based on the string vector sequence; when the attachment information is the image information, extracting features of the image information, and identifying the email type of the email to be identified based on the extracted features, wherein the extracted features are one or both of the text features of the image information and the image features of the image information.
[0023] In an embodiment of the present application, the result determination module is further used to splice the mail type probability value and the probability value of the mail type to be combined to obtain the mail type feature to be identified; based on the mail type feature to be identified, the mail type of the mail to be identified is identified to obtain the mail identification result.
[0024] In an embodiment of the present application, the email identification device further includes a normalization module for normalizing the label vector sequence to obtain label features of the page to be identified; and identifying the email type of the email to be identified based on the label features of the page to be identified.
[0025] In an embodiment of the present application, the email recognition device also includes a vector model training module for obtaining email samples; obtaining a set of page label sequence samples corresponding to the email samples; and using the set of page label sequence samples as a corpus to train a label vector model.
[0026] In an embodiment of the present application, the vector acquisition module is further configured to adopt the word vector model to acquire the label vector of each page label in the page label sequence.
[0027] In an embodiment of the present application, the email identification module is also used to use a label recognition model to identify the page label features to identify the email type of the email to be identified, wherein the label recognition model is used to predict the probability value of the email type corresponding to the email to be identified based on the page label features.
[0028] In an embodiment of the present application, the email identification device also includes a recognition model training module for obtaining model training samples, wherein the model training samples include email samples and recognition result annotation information; using the label recognition model to be trained, the email type of the email sample is identified to obtain recognition result prediction information, wherein the label recognition model to be trained is a model to be trained for identifying email types; based on the difference between the recognition result prediction information and the recognition result annotation information, the label recognition model to be trained is trained to obtain the label recognition model.
[0029] In an embodiment of the present application, the mail identification device further includes a model optimization module for obtaining new model training samples, wherein the new model training samples are obtained after the model training samples; and optimizing the label recognition model based on the new model training samples.
[0030] In the embodiment of the present application, the email identification module is further configured to use an optimized tag identification model to identify the page tag features.
[0031] In an embodiment of the present application, the email acquisition module is also used to obtain the email to be identified in response to an email identification request sent by a receiving device, wherein the receiving device corresponds to the receiving object, and the email identification request is generated when the receiving device receives the email to be identified.
[0032] In an embodiment of the present application, the mail identification apparatus further includes a result sending module for sending the mail identification result to the receiving device, so that the receiving device performs processing adapted to the mail identification result for the mail to be identified.
[0033] The present invention provides a mail identification device, including:
[0034] a memory for storing executable instructions;
[0035] The processor is used to implement the email identification method provided in the embodiment of the present application when executing the executable instructions stored in the memory.
[0036] An embodiment of the present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute instructions to implement the email identification method provided in the embodiment of the present application.
[0037] The embodiments of the present application have at least the following beneficial effects: since different types of emails have large differences in the display of content; therefore, when the result of the email type to be identified is determined by the features corresponding to the page tag sequence of the email to be identified, even if the email to be identified is an email that does not include text information or includes less text information, the email type to which the email to be identified belongs can be accurately identified; thereby, the recognition accuracy of the email type can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is an exemplary schematic diagram of the model structure;
[0039] Figure 2 is another exemplary model structure diagram;
[0040] Figure 3 is another exemplary schematic diagram of a model structure;
[0041] Figure 4 is a schematic diagram of an exemplary latent Dirichlet distribution model;
[0042] Figure 5 This is a schematic diagram of an optional architecture of the mail identification system provided in an embodiment of the present application;
[0043] Figure 6 This embodiment of the present application provides Figure 5 A schematic diagram of the composition structure of a server in FIG;
[0044] Figure 7 This is an optional flowchart of the email identification method provided in the embodiment of the present application;
[0045] Figure 8 This is another optional flowchart of the email identification method provided in the embodiment of the present application;
[0046] Figure 9 This is a schematic diagram of an exemplary method of identifying at least one method provided in an embodiment of the present application;
[0047] Figure 10 is another exemplary schematic diagram of performing at least one identification method provided in an embodiment of the present application;
[0048] Figure 11 This is a partial schematic diagram of an exemplary page tag sequence sample set provided in an embodiment of the present application;
[0049] Figure 12 is a schematic diagram of an exemplary label vector provided in an embodiment of the present application;
[0050] Figure 13 This is another optional flowchart of the mail identification method provided in the embodiment of the present application;
[0051] Figure 14 This is another optional flowchart of the mail identification method provided in the embodiment of the present application;
[0052] Figure 15 is a schematic diagram of an exemplary mail to be identified provided in an embodiment of the present application;
[0053] Figure 16 This is a schematic diagram of the process implementation of an exemplary email identification method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0055] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0057] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.
[0058] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0059] 1) Artificial Intelligence (AI): It is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to achieve the best results.
[0060] 2) Machine Learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills, and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning typically includes techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, and inductive learning.
[0061] 3) Artificial neural network is a mathematical model that imitates the structure and function of biological neural networks. Exemplary structures of artificial neural networks in the embodiments of the present application include deep neural networks (DNN), convolutional neural networks (CNN), recurrent neural networks (RNN), NSM (Neural State Machine), PFNN (Phase-Functioned Neural Network), etc.
[0062] 4) Natural Language Processing (NLP) is an important field in computer science and artificial intelligence. It studies various theories and methods that can enable effective communication between humans and computers using natural language. Natural Language Processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language (the language people use in daily life), so it is closely related to the study of linguistics. Natural Language Processing technologies generally include text processing, semantic understanding, machine translation, robot question answering, knowledge graphs, and other technologies.
[0063] 5) Word embedding, also known as word embedding, is a word vector obtained by converting words into dense vectors through word embedding technology. For similar words, their corresponding word vectors are also similar, that is, words with similar semantics are clustered together in the word vector space; for example, the label vector and string vector in the embodiment of this application. In addition, word vectors can be obtained through word2vec (word to vector), "glove", "Fast Text", BERT (Bidirectional Encoder Representations from Transformers), "XLNet", "GPT 3" trained word vector models. Among them:
[0064] word2vec is an embedded toolkit for training vector space models.
[0065] The BERT model is a Transformer model following the ELMo model and the OpenAI GPT model. The BERT model can be used for multiple tasks at the string and sentence levels. It can also be quickly fine-tuned using large-scale corpora to achieve downstream tasks such as text classification, semantic understanding, and sequence labeling.
[0066] 6) Classifier: A classification function or model constructed based on existing data; for example: Logistic Regression (LR), BERT classifier, "softmax" classifier, "ELMo" classifier, "OpenAI GPT" classifier, GBDT (Gradient Boosting Decision Tree), Random Forest classifier, Decision Tree, "XGBoost" classifier, Text Convolutional Neural Network (Text CNN), Bayesian classifier, and LDA (Latent Dirichlet Allocation) classifier. Among them:
[0067] See also Figure 1 , Figure 1 is an exemplary model structure diagram; Figure 1 As shown, model 1-1 is the "ELMo" model, which uses the LSTM (Long Short-Term Memory, LSTM) model, and is a bidirectional LSTM. Figure 2 , Figure 2 is another exemplary model structure diagram; Figure 2 As shown, model 2-1 is a BERT classifier, which uses the Transformer model (abbreviated as "Trm") as its basic model, and is a bidirectional Transformer model. Figure 3 , Figure 3 is another exemplary model structure diagram; Figure 3 As shown, model 3-1 is the "OpenAI GPT" classifier, and the basic model it uses is also the Transformer model, but it is a unidirectional Transformer model. Figures 1 to 3 In E1, E2, ..., E N For each string of text (e.g., word), T1, T2, ..., T NThe classification probability value corresponding to each output string.
[0068] The LDA classifier is a document topic generation model, also known as a three-layer Bayesian probability model, consisting of a three-layer structure: string, topic, and document. Based on the PLSI model, the document-to-topic distribution is a Dirichlet distribution, and the topic-to-string distribution is a Dirichlet distribution. When used for topic clustering in the LDA model, it is an unsupervised clustering algorithm. The document-to-topic distribution determines the distribution of article topics, while the topic-to-string distribution determines the content of the topic description, demonstrating its strong semantic expression capabilities.
[0069] For example, see Figure 4 , Figure 4 is a schematic diagram of an exemplary latent Dirichlet distribution model; Figure 4 As shown in the figure, α in model 4-1 is a hyperparameter, which is a K-dimensional vector. Based on α, we can obtain the topic distribution θ corresponding to the d-th document in M documents. d ; Here, the dth document includes N d For the nth word in the dth document, we can get the value from the topic distribution θ d Get the corresponding topic number Z d,n In addition, β is a hyperparameter, which is a V-dimensional vector, where V is the number of all strings in the string table; assuming that the number of topics K corresponds to any topic k, the corresponding word distribution is Based on subject number Z d,n The word distribution is Ability to determine the probability distribution w of the nth word in the dth document d,n Here, k∈[1,K], n∈[1,N d ], d∈[1,M].
[0070] 7) Page tags, which are used to display the basic units of a page, such as HTML (Hyper Text Markup Language) tags, ASP (Active Server Pages) tags, JSP (Java Server Pages) tags, and PHP (Hypertext Preprocessor) tags.
[0071] 8) Fully connected layer: Each node in the fully connected layer is connected to all nodes in the previous layer to integrate the features extracted previously.
[0072] 9) In response, it is used to indicate the conditions or states on which the executed processing depends. When the dependent conditions or states are met, one or more requests executed can be real-time or have a set delay; unless otherwise specified, there is no restriction on the order of execution of multiple requests.
[0073] It's important to note that artificial intelligence (AI) is a comprehensive technology within computer science that seeks to understand the essence of intelligence and create new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to perceive, reason, and make decisions.
[0074] Furthermore, artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0075] With the research and advancement of artificial intelligence technology, it has been studied and applied in many fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart healthcare, and smart customer service. As technology develops, artificial intelligence technology will be applied in more fields and play an increasingly important role. In this embodiment of the present application, the application of artificial intelligence in email recognition will be explained.
[0076] Generally speaking, in order to identify the email type, the email type is usually identified based on the text information of the email; for example, the text information of the email is identified through the LDA model or the BERT model;
[0077] However, some emails do not include text information or include less text information. Therefore, when identifying the email type based on the text information of the email, the amount of data used is small, resulting in low accuracy of the obtained recognition result.
[0078] In addition, in order to identify the email type, the email type can also be identified based on the behavioral data of the subject corresponding to the email; however, both of the above two email identification methods have identification problems; see Table 1:
[0079] Table 1
[0080]
[0081] Based on this, embodiments of the present application provide an email recognition method, apparatus, device, and computer-readable storage medium that can improve the recognition accuracy of emails.
[0082] The following describes exemplary applications of the mail identification device provided in the embodiments of the present application. The mail identification device provided in the embodiments of the present application can be implemented as various types of user terminals, such as laptop computers, tablet computers, desktop computers, set-top boxes, mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), and can also be implemented as a server. The following describes exemplary applications of the mail identification device when implemented as a server.
[0083] See also Figure 5 , Figure 5 This is an optional architectural diagram of the mail identification system provided in the embodiment of the present application; Figure 5 As shown, to support an email identification application, in an email identification system 100, terminals 400 include terminal 400-1 (a sending device) and terminal 400-2 (a receiving device). Terminal 400-2 is connected to server 200 (an email identification device) via network 300. Network 300 can be a wide area network (WAN), a local area network (LAN), or a combination of the two. Furthermore, email identification system 100 also includes a database 500, which is used to provide data support to server 200 when server 200 provides email identification services to terminal 400-2 via network 300.
[0084] Terminal 400 - 1 is used to send the mail to be identified to terminal 400 - 2 .
[0085] Terminal 400 - 2 is configured to receive the mail to be identified sent by terminal 400 - 1 , and send a mail identification request carrying the mail to be identified to server 200 via network 300 .
[0086] Server 200 is configured to obtain a to-be-identified email, where the to-be-identified email is an email received by a recipient; obtain a page tag sequence for the to-be-identified email, where the page tag sequence is used to display the to-be-identified email; obtain a tag vector for each page tag in the page tag sequence, thereby obtaining a tag vector sequence corresponding to the page tag sequence; identify the email type of the to-be-identified email based on the tag vector sequence; and determine an email identification result corresponding to the to-be-identified email based on the identified email type probability value, where the email identification result is the email type to which the to-be-identified email belongs. Server 200 is also configured to send the email identification result to terminal 400-2 via network 300.
[0087] In some embodiments, the server 200 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal 400 can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present invention.
[0088] See also Figure 6 , Figure 6 This embodiment of the present application provides Figure 5 A schematic diagram of the composition structure of a server in Figure 6 The server 200 shown includes: at least one processor 210, a memory 250, at least one network interface 220, and a user interface 230. The various components in the server 200 are coupled together via a bus system 240. It is understood that the bus system 240 is used to achieve connection and communication between these components. In addition to including a data bus, the bus system 240 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 240 is not described in detail. Figure 6 Various buses are labeled as bus system 240 .
[0089] The processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0090] The user interface 230 includes one or more output devices 231 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 230 also includes one or more input devices 232, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0091] The memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 250 may optionally include one or more storage devices that are physically remote from the processor 210.
[0092] The memory 250 includes volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 250 described in the embodiments of the present application is intended to include any suitable type of memory.
[0093] In some embodiments, the memory 250 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplified below.
[0094] Operating system 251, including system programs for processing various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, which are used to implement various basic services and process hardware-based tasks;
[0095] A network communication module 252 for reaching other computing devices via one or more (wired or wireless) network interfaces 220 , exemplary network interfaces 220 including Bluetooth, Wi-Fi, and Universal Serial Bus (USB);
[0096] a presentation module 253 for enabling presentation of information via one or more output devices 231 (e.g., a display screen, a speaker, etc.) associated with the user interface 230 (e.g., a user interface for operating peripheral devices and displaying content and information);
[0097] The input processing module 254 is configured to detect one or more user inputs or interactions from one of the one or more input devices 232 and to translate the detected inputs or interactions.
[0098] In some embodiments, the mail identification device provided in the embodiments of the present application can be implemented in software. Figure 6 The email recognition device 255 stored in the memory 250 is shown. This device can be software in the form of a program or plug-in, and includes the following software modules: an email acquisition module 2551, a label acquisition module 2552, a vector acquisition module 2553, an email recognition module 2554, a result determination module 2555, an auxiliary recognition module 2556, a normalization module 2557, a vector model training module 2558, a recognition model training module 2559, a model optimization module 25510, and a result sending module 25511. These modules are logical and can be arbitrarily combined or further separated according to the functions implemented. The functions of each module will be described below.
[0099] In other embodiments, the mail identification device provided in the embodiments of the present application can be implemented in hardware. As an example, the mail identification device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the mail identification method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0100] Below, the email identification method provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the server provided in the embodiment of the present application.
[0101] See also Figure 7 , Figure 7 This is an optional flow chart of the mail identification method provided in the embodiment of the present application, which will be combined with Figure 7 The steps shown are explained.
[0102] S701: Obtain the email to be identified.
[0103] In the embodiment of the present application, when the mail identification device performs a task of identifying a mail type, the obtained identification object is the mail to be identified.
[0104] It should be noted that the email to be identified is an email received by the recipient, which can be an email received in real time, an email in an unread state, etc., and the present embodiment does not make specific requirements on this. In addition, the recipient can be an email account, an email address, or the terminal website information corresponding to the email account, etc., and the present embodiment does not make specific restrictions on this.
[0105] S702: Obtain a page tag sequence of the email to be identified.
[0106] In the embodiment of the present application, the email identification device identifies the email type based on the page display information of the email to be identified, and the page display information of the email to be identified is displayed using page tags. Therefore, the email identification device obtains the page tags of the email page corresponding to the email to be identified, and thus obtains a page tag sequence. In other words, the page tag sequence is a sequence of the page tags used to display the email to be identified, according to the information display method corresponding to the email to be identified.
[0107] Here, when the mail identification device obtains the page label sequence of the mail to be identified, it can obtain the source file of the mail page corresponding to the mail to be identified, remove the non-label content (displayed pictures, text, etc.) in the source file, and the source file after removal is the page label sequence; or obtain the page label sequence by extracting each page label in the source file. The embodiment of the present application does not make specific limitations on this.
[0108] It should be noted that the page tag sequence is used to display the email to be identified to present the email page; wherein the email page presented can be an HTML page, in which case the corresponding page tag sequence is an HTML tag sequence; the email page presented can also be an ASP page, in which case the corresponding page tag sequence is an ASP tag sequence; the email page presented can also be an XML page, in which case the corresponding page tag sequence is an XML tag sequence; and so on. This embodiment of the present application does not specifically limit this. In addition, the order of the page tags in the page tag sequence is the order of the page tags used when displaying the email page.
[0109] S703 : Acquire a label vector of each page label in the page label sequence, thereby obtaining a label vector sequence corresponding to the page label sequence.
[0110] In an embodiment of the present application, after the mail identification device obtains the page tag sequence, it obtains the corresponding vector representation for each page tag in the page tag sequence, thereby obtaining the tag vector of each page tag; here, when the mail identification device obtains all the tag vectors of all the page tags in the page tag sequence, all the tag vectors constitute a tag vector sequence.
[0111] It should be noted that the page label sequence corresponds to the label vector sequence, that is, a page label in the page label sequence corresponds to a label vector in the label vector sequence; the label vector is the feature of the page label, and the label vector can be a string vector (word vector) obtained by treating each page label as a string and converting the string into a dense vector through string vector technology (word vector technology). For similar page labels, their corresponding label vectors are also similar, that is, page labels with similar semantics are clustered together in the label vector space.
[0112] S704: Identify the type of the email to be identified based on the label vector sequence.
[0113] In the embodiment of the present application, after obtaining the label vector sequence, the mail identification device uses the label vector sequence as a feature of the mail to be identified to identify the mail type of the mail to be identified, so as to identify the mail type probability value.
[0114] It should be noted that different types of emails have different page tags and the order in which they are displayed. For example, advertising emails usually use images and page renderings, and the order and rendering of page tags differ significantly from those of normal personal emails. Personal emails usually do not include page tags: ”, and advertising emails usually include multiple page tags: "Here, the label vector sequence can represent information such as the page labels used in the email and the display order of the page labels; the email type probability value is the probability value of the email to be identified belonging to each email type based on the page label sequence, and can also be an email type label determined based on the probability value of belonging to each email type, such as 0 or 1; it is easy to know that the probability value represents the probability of the email to be identified belonging to a email type, and the larger the probability value, the greater the possibility that the email to be identified belongs to the email type. In addition, the email type includes at least one type, such as: abnormal type (advertising type email, system type, etc.) or normal type (personal type); for example, abnormal type and personal type; for example: advertising type, system type, virus type, personal type, etc. Correspondingly, the email type probability value includes the probability value corresponding to at least one type.
[0115] S705: Determine an email recognition result corresponding to the email to be recognized based on the recognized email type probability value.
[0116] It should be noted that after the email identification device obtains the email type probability value, it compares the email type probability value with a preset probability threshold corresponding to the email type, such as 0.5, to determine whether the email belongs to that type. Here, the email identification result is the email type to which the email to be identified belongs.
[0117] For example, when the probability value of the mail type is 0.8 and the probability threshold is 0.5, since 0.8 is greater than 0.5, it is determined that the mail to be identified is an advertisement-type email.
[0118] It is understandable that due to the large differences in the display of content between different types of emails, when the result of determining the email type of the email to be identified is determined by the features corresponding to the page tag sequence of the email to be identified, even if the email to be identified does not include text information or includes less text information, the email type of the email to be identified can be accurately identified; thereby, the recognition accuracy of the email type can be improved.
[0119] See also Figure 8 , Figure 8 This is another optional flow chart of the mail identification method provided in the embodiment of the present application; Figure 8 As shown, in the embodiment of the present application, after S701 and before S705, S706 and S707 are also included; that is, after the mail identification device obtains the mail to be identified, and before determining the mail identification result corresponding to the mail to be identified based on the identified mail type probability value, the mail identification method also includes S706 and S707. Each step is explained below.
[0120] S706: Obtain at least one type of email information of the email to be identified.
[0121] It should be noted that at least one email information includes one or more of content information, attachment information and behavior information; wherein, content information is the email content of the email to be identified, such as the email subject and / or email body, etc.; attachment information is the information corresponding to the attachment of the email to be identified, such as document attachment and / or picture attachment, etc.; behavior information is the behavior information of the subject of the email to be identified, and the subject of the email to be identified includes the sender, recipient, sender address, recipient address, etc.
[0122] S707: Based on at least one piece of email information, identify the email type of the email to be identified, and obtain a probability value of the email type to be combined.
[0123] In an embodiment of the present application, after the mail identification device obtains at least one mail information, it identifies the mail type of the mail to be identified based on each mail information in the at least one mail information, and obtains the probability distribution of the mail type of the identified mail to be identified corresponding to the at least one mail information, which is referred to here as the probability value of the mail type to be combined.
[0124] Continue to see Figure 8 In the embodiment of the present application, S705 can be implemented through S7051; that is, the mail identification device determines the mail identification result corresponding to the mail to be identified based on the probability value of the identified mail type, including S7051. This step is explained below.
[0125] S7051. Determine the email recognition result corresponding to the email to be recognized by combining the email type probability value and the probability value of the email type to be combined.
[0126] It should be noted that the email identification device combines the email type probability value identified for the page tag sequence and the probability value of the email type to be combined identified for at least one email information to jointly determine the email type of the email to be identified; at this time, the email identification result is the email type of the email to be identified based on the page tag sequence and at least one email information.
[0127] It can be understood that the embodiment of the present application not only identifies the email type of the email to be identified based on the page tag sequence, but also identifies the email type of the email to be identified based on one or more of the content information, attachment information and behavior information; that is, the identification of the email type of the email to be identified is performed from multiple dimensions, thereby improving the identification accuracy and coverage of the email to be identified.
[0128] In the embodiment of the present application, S707 can be implemented through S7071-S7073; that is, the mail identification device identifies the mail type of the mail to be identified and obtains the probability value of the mail type to be combined, including S7071-S7073. Each step is explained below.
[0129] S7071. For each email information in at least one email information, identify the email type of the email to be identified in at least one manner to obtain at least one identification probability value.
[0130] In an embodiment of the present application, the mail identification device uses at least one method to identify the mail type of the mail to be identified for each of the at least one mail information. Thus, at least one identification probability value can be obtained for each mail information. Here, one of the at least one method corresponds to one of the at least one identification probability values.
[0131] It should be noted that at least one method includes clustering and classification methods, such as recognition methods using different network models. In addition, there are differences in the at least one method corresponding to each email message. For example, for content information, models based on naive Bayes, support vector machine (SVM), LDA model, "fast text", text convolutional neural network model, BERT model, "xlnet", "GPT 3" and other models can be used for recognition; for behavior information, expert classification model, decision tree, random forest, "XGBoost" and other classification models can be used for recognition; for attachment information, models based on naive Bayes, SVM, LDA, "fast text", text convolutional neural network model, BERT model, "xlnet", "GPT 3" and other models can be used for recognition, or CNN can be used for recognition. In addition, the number of at least one method corresponding to each email message can be equal or different, and the embodiments of the present application do not specifically limit this.
[0132] For example, see Figure 9 , Figure 9 This is a schematic diagram of an exemplary embodiment of the present application for performing at least one type of identification; Figure 9 As shown, when at least one email information includes behavioral information, the email identification device uses the expert classification model 9-21, decision tree 9-22, random forest 9-23 and extreme gradient boosting model (Extreme Gradient Boosting, XGBoost) 9-24 to perform email identification for the behavioral information 9-1 to obtain at least one identification probability value 9-3.
[0133] See also Figure 10 , Figure 10 is another exemplary schematic diagram of performing at least one mode of identification provided in an embodiment of the present application; Figure 10 As shown, when at least one email information includes content information, the email identification device uses maximum entropy, LDA or Bayesian model 10-21, clustering model 10-22 (for example, minimum hash clustering, word vector clustering, etc.), and neural network model 10-23 to perform email identification on the content information 10-1 to obtain at least one identification probability value 10-3.
[0134] S7072. Concatenate at least one recognition probability value to obtain an email recognition probability value corresponding to each email information, thereby obtaining at least one email recognition probability value corresponding to at least one email information.
[0135] It should be noted that after obtaining at least one identification probability value corresponding to each type of email information, the email identification device concatenates the at least one identification probability value. The concatenated result of the at least one identification probability value obtained is the email identification probability value corresponding to each type of email information. The email identification device combines the email identification probability values corresponding to each type of email information. The combined result of the email identification probability values obtained is the at least one email identification probability value corresponding to the at least one type of email information.
[0136] S7073. Concatenate at least one email recognition probability value to obtain a probability value of the email type to be combined.
[0137] In the embodiment of the present application, the mail identification device splices at least one mail identification probability value, and the splicing result of the at least one mail identification probability value obtained is the probability value of the mail type to be combined.
[0138] It is understandable that since the identification method of each mail type to be identified is different in the training data set, identification process and identification results, as well as the targetedness of the mail type, the mail identification device identifies the mail type of the mail to be identified by adopting at least one identification method, and then splices at least one identification probability value identified by at least one identification method to obtain a mail identification probability value; and then determines the mail identification result based on at least one mail identification probability value corresponding to at least one mail information, which can improve the recognition accuracy.
[0139] In an embodiment of the present application, when at least one email information includes behavior information, S706 can be implemented through S7061-S7066; that is, the email identification device obtains at least one email information of the email to be identified, including S7061-S7066, and each step is explained below.
[0140] S7061. Obtain the email sending entity of the email to be identified.
[0141] It should be noted that the email sending subject includes one or more of the email sending URL information, the sending object and the email domain name; among them, the email sending URL information can be the sender's email address, the sender's IP (Internet Protocol) address, the sender's IP network segment, etc.; the sending object can be the sender's name, the sender's account number, etc.
[0142] S7062. Determine entity rating information based on the historical email type corresponding to the email sending entity.
[0143] In an embodiment of the present application, the email identification device targets the email type of historical emails sent by the email sending entity, that is, the historical email type corresponding to the email sending entity; thereby, real-time scoring is performed based on the historical email type, and entity scoring information is obtained.
[0144] For example, in the identification scenario of advertising-type emails, if the email type of emails sent by a bank (sending object) in the past is personal emails, the score value corresponding to the bank's entity scoring information is higher; and if the email type of emails sent by the bank in the past is advertising emails, the square value corresponding to the bank's entity scoring information is lower.
[0145] S7063. Obtain the object portrait information of the receiving object.
[0146] In an embodiment of the present application, the mail identification device pre-stores the object portrait information of the receiving object, or the mail identification device can obtain the object portrait information of the receiving object from other devices; the object portrait information is a user portrait of the receiving object, including the behavior data of the receiving object, such as browsing, deleting and other operations on emails, and for example, operations on other information (recruitment websites, novel websites, etc.).
[0147] S7064. Determine interest tags based on object portrait information.
[0148] It should be noted that the email recognition device can determine the interest tags of the recipient based on the object portrait information, such as job application, advertising planning, finance, etc.
[0149] S7065. Obtain the relationship chain between the receiving object and the email sending subject.
[0150] In an embodiment of the present application, the email identification device is also used to obtain the email exchange records between the recipient and the email sender, thereby obtaining a relationship chain. For example, there have been multiple email exchanges between the recipient and the email sender, and the recipient has only unilaterally received emails sent by the email sender.
[0151] S7066: Determine one or more of the entity rating information, interest tag information, and relationship chain as behavioral information in at least one email message.
[0152] It should be noted that behavior information includes one or more of entity rating information, interest tag information, and relationship chain.
[0153] It is understandable that since different sending recipients have different behavioral data for emails of different email types, by identifying the electronic type of the email to be identified based on the behavioral data, targeted email identification can be achieved, thereby improving the recognition effect of the email type.
[0154] In an embodiment of the present application, when at least one email message includes attachment information, and the attachment information is one or both of document information (document attachment) and image information (picture attachment), S707 can also be implemented through S7074 or S7075; that is, the email identification device identifies the email type to be identified based on at least one email information, including S7074 or S7075, and each step is explained below.
[0155] S7074. When the attachment information is document information, obtain a string vector for each text string in the document information, thereby obtaining a string vector sequence corresponding to the document information, and identify the mail type of the mail to be identified based on the string vector sequence.
[0156] It should be noted that when the attachment is a document, the email recognition device extracts the corresponding features for each text string in the document's title, content, and other information, thereby obtaining a string vector. Here, the email recognition device combines the string vectors for each text string to obtain a string vector sequence corresponding to the document. Thus, the email recognition device identifies the type of the email to be identified based on the string vector sequence.
[0157] S7075. When the attachment information is image information, extract features of the image information, and identify the type of the email to be identified based on the extracted features.
[0158] It should be noted that when the attachment information is image information, the mail identification device may perform OCR (Optical Character Recognition) processing on the image information and perform text classification based on the obtained text information; in this case, the extracted features are text features of the image information.
[0159] The mail identification device can also directly extract image features corresponding to the image information and classify the image information through image processing technology; in this case, the extracted features are image features of the image information.
[0160] Here, the mail identification device identifies the mail type of the mail to be identified based on the features extracted from the image information, and the extracted features are one or both of text features of the image information and image features of the image information.
[0161] Continue to see Figure 8 In the embodiment of the present application, S7051 can be implemented through S70511 and S70512; that is, the mail identification device combines the mail type probability value and the probability value of the mail type to be combined to determine the mail identification result corresponding to the mail to be identified, including S70511 and S70512. Each step is explained below.
[0162] S70511. Concatenate the probability value of the email type and the probability value of the email type to be combined to obtain features of the email type to be identified.
[0163] It should be noted that the feature of the type of email to be identified is the concatenation of the probability value of the email type and the probability value of the type of email to be combined. Here, the email identification device can concatenate the probability value of the email type and the probability value of the type of email to be combined through a fully connected layer.
[0164] S70512. Based on the characteristics of the type of the email to be identified, identify the email type to obtain an email identification result.
[0165] It should be noted that the mail identification device further identifies the mail type of the mail to be identified based on the mail type features to determine the mail type to which the mail to be identified belongs, thereby obtaining a mail identification result. Here, the mail identification device can superimpose the mail type features of the mail to be identified using preset weight information to complete the identification of the mail type of the mail to be identified.
[0166] In the embodiment of the present application, S704 can be implemented through S7041 and S7042; that is, the mail identification device identifies the mail type of the mail to be identified based on the label vector sequence, including S7041 and S7042. Each step is explained below.
[0167] S7041. Normalize the tag vector sequence to obtain tag features of the page to be identified.
[0168] It should be noted that since different emails correspond to different pages, the number of corresponding page tags is also different. In order to achieve dimensionless quantization, the email recognition device normalizes the tag vector sequence. The normalized processing result obtained is the tag feature of the page to be identified.
[0169] Exemplarily, the mail identification device may obtain the label features of the page to be identified by acquiring average information of the label vector sequence.
[0170] S7042. Based on the tag features of the page to be identified, identify the email type of the email to be identified.
[0171] In an embodiment of the present application, the mail identification device identifies the mail type of the mail to be identified based on the normalized tag features of the page to be identified.
[0172] It can be understood that by normalizing the label vector sequence, the mail type of the mail to be identified is identified using unified features, thereby improving the recognition accuracy of the mail to be identified.
[0173] In the embodiment of the present application, before the email identification device obtains the tag vector of each page tag in the page tag sequence in S703, the email identification method further includes S708-S710, and each step is described below.
[0174] S708. Obtain an email sample.
[0175] It should be noted that the email samples are batches of emails used to train a network model capable of determining label vectors; and the email samples are emails that do not distinguish between email types.
[0176] S709: Obtain a page tag sequence sample set corresponding to the email sample.
[0177] It should be noted that the email recognition device obtains a corresponding page label sequence sample for each email in the email sample, and combines the page label sequence samples corresponding to each email in the email sample to obtain a set of page label sequence samples corresponding to the email sample. In other words, the set of page label sequence samples is a set consisting of the page label sequence samples corresponding to each email in the email sample.
[0178] For example, see Figure 11 , Figure 11 is a partial schematic diagram of an exemplary page tag sequence sample set provided in an embodiment of the present application; Figure 11 As shown, page 11-1 shows the various page labels; for example, page 11-1: " is a page tag, " " is a page tag, " " is a page tag, and so on.
[0179] S710: Use the page label sequence sample set as a corpus to train a label vector model.
[0180] In an embodiment of the present application, the email recognition device uses a sample set of page label sequences as a corpus to iteratively train the label vector model to be trained. When the training is completed, the label vector model is trained. Here, the label vector model is a trained label vector model to be trained. The label vector model to be trained can be Word2vec, "glove", "fast text" and BERT models, etc.
[0181] It should be noted that the label vector model is used to determine the vector representation of the page label. When a page label is given, the label vector model can determine the vector representation of the given page label, that is, the label vector.
[0182] For example, see Figure 12 , Figure 12 is a schematic diagram of an exemplary label vector provided in an embodiment of the present application; Figure 12 As shown, page 12-1 shows the label vectors corresponding to each page label; for example, Figure 11 Page tags in "The corresponding label vector is "0.093114", Figure 11 Page tags in ”The corresponding label vector is "0.455824", and so on.
[0183] Accordingly, in the embodiment of the present application, the mail identification device obtains the tag vector of each page tag in the page tag sequence in S703, including S7031, which is described below.
[0184] S7031. Use a word vector model to obtain a label vector for each page label in the page label sequence.
[0185] It should be noted that after the email recognition device obtains the word vector model, it uses the word vector model to obtain the label vector of each page label in the page label sequence. In this way, the efficiency of label vector acquisition can be improved.
[0186] See also Figure 13 , Figure 13 This is another optional flow chart of the mail identification method provided in the embodiment of the present application; Figure 13 As shown, in the embodiment of the present application, S704 can also be implemented through S7043; that is, the mail identification device identifies the mail type of the mail to be identified based on the label vector sequence, including S7043, and this step is explained below.
[0187] S7043. Use a tag recognition model to identify page tag features to identify the email type of the email to be identified.
[0188] It should be noted that the email identification device can identify the email type of the email to be identified through the network model; here, the email identification device has a label identification model pre-stored in it, or the email identification device can obtain the label identification model from other devices, and the label identification model is used to predict the probability value of the email type corresponding to the email to be identified based on the page label features.
[0189] It is understandable that by identifying page tag features through a network model, the accuracy of the identified email type probability value is higher, and the efficiency of obtaining the email type probability value can be improved.
[0190] In the embodiment of the present application, S7044-S7046 are also included before S7043; that is, the mail identification device adopts a label recognition model, and before identifying the page label features, the mail identification method also includes S7044-S7046. Each step is explained below.
[0191] S7044. Obtain model training samples.
[0192] It should be noted that model training samples include email samples and recognition result annotations; email samples also include positive and negative email samples. For example, in the advertising email recognition scenario, positive email samples may be advertising emails, while negative email samples may be personal emails.
[0193] S7045. Use the label recognition model to be trained to identify the email type of the email sample and obtain recognition result prediction information.
[0194] It should be noted that the "trained label recognition model" is a model to be trained for identifying email types; for example, a classification model such as a text convolutional neural network or BERT. Here, the recognition result prediction information is the email type of the email sample identified using the trained label recognition model. Furthermore, when the email recognition device uses the trained label recognition model to identify the email type of the email sample, the process is similar to that used for identifying emails: the individual page labels of the email sample are obtained, and then the email type is identified based on the label vectors corresponding to the individual page labels of the email sample.
[0195] S7046. Based on the difference between the recognition result prediction information and the recognition result annotation information, train the label recognition model to be trained to obtain a label recognition model.
[0196] It should be noted that after the mail recognition device obtains the recognition result prediction information and the recognition result annotation information, in order to determine the recognition effect of the label recognition model to be trained, the difference between the recognition result prediction information and the recognition result annotation information is obtained; it is easy to know that the difference between the recognition result prediction information and the recognition result annotation information characterizes the prediction accuracy of the label recognition model to be trained to a certain extent. When the difference between the recognition result prediction information and the recognition result annotation information is greater than the difference threshold, the label recognition model to be trained is iteratively trained until the training end condition is met (the difference between the recognition result prediction information and the recognition result annotation information is less than or equal to the difference threshold, or the number of training times is reached, etc.), the training is ended, and the label recognition model is obtained.
[0197] In the embodiment of the present application, after S7046, the mail identification method further includes S7047 and S7048; that is, after the mail identification device obtains the label identification model, the mail identification method further includes S7047 and S7048. Each step is described below.
[0198] S7047. Obtain new model training samples.
[0199] It should be noted that the new model training samples are obtained after the model training samples.
[0200] S7048. Optimize the label recognition model based on the new model training samples.
[0201] It should be noted that the process of the mail identification device optimizing the label recognition model based on the new model training sample is similar to the process of training the label recognition model to be trained based on the model training sample, and the embodiments of the present application will not be repeated here.
[0202] Accordingly, in the embodiment of the present application, the mail identification device in S7043 adopts a label recognition model to identify the page label features, including S70431, and this step is described below.
[0203] S70431. Use the optimized tag recognition model to identify page tag features.
[0204] It should be noted that after the mail identification device completes the optimization of the tag identification model and obtains the optimized tag identification model, it deploys the optimized tag identification model to identify page tag features based on the optimized tag identification model.
[0205] It is understandable that after obtaining the label recognition model, obtaining new model training samples again to train the label recognition model can achieve the effect of optimizing the label recognition model, which can improve the generalization ability of the optimized label recognition model and thus improve the accuracy of email recognition.
[0206] See also Figure 14 , Figure 14 This is another optional flow chart of the mail identification method provided in the embodiment of the present application; Figure 14 As shown, in the embodiment of the present application, S701 can be implemented through S7011; that is, the mail identification device obtains the mail to be identified, including S7011. This step is explained below. S7011, in response to the mail identification request sent by the receiving device, obtains the mail to be identified.
[0207] It should be noted that the recipient logs into the email client through the receiving device. When the recipient receives an email, the receiving device generates an email identification request, includes the received email as the email to be identified in the email identification request, and sends the email identification request to the email identification device. At this point, the email identification device also receives the email identification request and can respond to it to obtain the email to be identified. Here, the receiving device corresponds to the recipient, and the email identification request is generated by the receiving device when it receives the email to be identified.
[0208] Continue to see Figure 14 Accordingly, in the embodiment of the present application, S705 also includes S711; that is, after the mail identification device determines the mail identification result corresponding to the mail to be identified, the mail identification method also includes S711, and this step is explained below.
[0209] S711. Send the email recognition result to the receiving device.
[0210] It should be noted that after the mail identification device obtains the mail identification result, it sends the mail identification result to the receiving device to complete the response to the mail identification request; thereby enabling the receiving device to perform processing adapted to the mail identification result for the mail to be identified.
[0211] Exemplarily, when the email identification result shows that the email to be identified is an advertising email, the processing adapted to the email identification result is to put the email to be identified into the advertising folder; when the email identification result is a bill-type email, the processing adapted to the email identification result is to perform bill repayment and other processing based on the email to be identified; when the email identification result is an invoice-type email, the processing adapted to the email identification result is to bind the invoice information, etc.; when the email identification result is an order-type email such as train ticket reservation, etc., the processing adapted to the email identification result is to send weather reminder information, etc.
[0212] In an embodiment of the present application, the mail identification device can also be a device for the receiving object to log in to the email mailbox. At this time, after the mail identification device obtains the mail identification result, the mail identification device performs processing adapted to the mail identification result for the mail to be identified.
[0213] The following describes an exemplary application of the embodiments of the present application in a practical application scenario.
[0214] See also Figure 15 , Figure 15 is a schematic diagram of an exemplary mail to be identified provided in an embodiment of the present application; Figure 15 As shown, the mail to be identified 15-2 displayed on the mail page 15-1 is a received email.
[0215] When targeting Figure 15 When performing mail identification on the mail to be identified in 15-2, refer to Figure 16 , Figure 16 FIG. 1 is a schematic diagram of a process implementation of an exemplary mail identification method provided in an embodiment of the present application; Figure 16 As shown, first, on the one hand, for the email to be identified 15-2, the corresponding email subject and email body (content information) 16-11 are obtained, and different text classification models (at least one identification method, such as Naive Bayes, SVM, LDA, "fast text", text convolutional neural network, BERT, "xlnet", "GPT 3" and other models) are used to classify the email subject and email body 16-11 to obtain different content classification labels 16-21 (at least one identification probability value), and then the different content classification labels 16-21 are spliced to obtain content classification labels 16-31 (email identification probability value).
[0216] On the other hand, for the email to be identified 15-2, obtain the real-time score (entity score information) corresponding to the sending entity (email sending entity), such as the sending IP, sending object, sending mailbox domain name, and sending IP network segment, the interest tag corresponding to the user portrait of the recipient (receiving object), and the relationship chain between the recipient and the sender; and for the real-time score, interest tag and relationship chain 16-12, use different behavior classification models (at least one identification method, logistic regression, "XGBoost", etc.) to classify and obtain different behavior classification labels 16-22 (at least one identification probability value), and then splice the different behavior classification labels 16-22 to obtain behavior classification labels 16-32 (email identification probability value).
[0217] On the other hand, for the email 15-2 to be identified, the corresponding attachment information 16-13 is obtained. Different attachment classification models (at least one identification method) are used to classify the attachment information 16-13, obtaining different attachment classification labels 16-23 (at least one identification probability value). The different content classification labels 16-23 are then concatenated to obtain attachment classification labels 16-33 (email identification probability value). Here, when the attachment information 16-13 is document-type information (document information), different attachment classification models include, for example, Naive Bayes, SVM, LDA, "fast text", text convolutional neural network, BERT, "xlnet", "GPT 3", etc.; when the attachment information 16-13 is an image (image information), different attachment classification models include, for example, different CNN models.
[0218] On the other hand, for the email 15-2 to be identified, the corresponding HTML page is obtained, the HTML tag sequence 16-141 of the HTML page is extracted, and the vector representation of the HTML tag sequence 16-141 is obtained to obtain an HTML tag vector sequence 16-142 (tag vector sequence), and the HTML tag vector sequence 16-142 is averaged to obtain an HTML tag vector 16-143 (label feature of the page to be identified). Classification models such as text convolutional neural networks and BERT are used for classification to obtain different page classification labels 16-24. The different page classification labels 16-24 are then spliced to obtain page classification labels 16-34 (email type probability value).
[0219] Then, the content classification label 16-31, the behavior classification label 16-32, the attachment classification label 16-33 and the page classification label 16-34 are concatenated using a fully connected layer to obtain a digital vector 16-4 (features of the email type to be identified).
[0220] Finally, a classification model 16-5 such as "softmax" or "XGBoost" is used to classify the digital vector 16-4 to obtain a probability value corresponding to the advertisement type, and then a classification result 16-6 (email identification result) is determined based on the probability value corresponding to the advertisement type: the email type to be identified 15-2 is an advertisement type.
[0221] It is understandable that by combining the classification results of content information, behavior, HTML tags and attachments to obtain the final classification results, the coverage and accuracy of email recognition can be greatly improved, thereby improving the efficiency of email processing and the efficiency of email mailbox usage.
[0222] The following continues to describe the exemplary structure of the mail identification device 255 provided in the embodiment of the present application as a software module. In some embodiments, such as Figure 6 As shown, the software modules stored in the mail identification device 255 of the memory 250 may include:
[0223] The mail acquisition module 2551 is used to acquire mails to be identified, wherein the mails to be identified are emails received by a recipient;
[0224] The tag acquisition module 2552 is used to acquire a page tag sequence of the email to be identified, wherein the page tag sequence is used to display the email to be identified;
[0225] A vector acquisition module 2553 is configured to acquire a label vector of each page label in the page label sequence, thereby obtaining a label vector sequence corresponding to the page label sequence;
[0226] An email identification module 2554 is configured to identify the email type of the email to be identified based on the tag vector sequence;
[0227] The result determination module 2555 is configured to determine the mail identification result corresponding to the mail to be identified based on the identified mail type probability value, wherein the mail identification result is the mail type to which the mail to be identified belongs.
[0228] In an embodiment of the present application, the email identification device 255 also includes an auxiliary identification module 2556, which is used to obtain at least one email information of the email to be identified, wherein the at least one email information includes one or more of content information, attachment information and behavior information; based on the at least one email information, the email type of the email to be identified is identified to obtain a probability value of the email type to be combined.
[0229] In the embodiment of the present application, the result determination module 2555 is further configured to determine the email recognition result corresponding to the email to be recognized by combining the email type probability value and the probability value of the email type to be combined.
[0230] In an embodiment of the present application, the result determination module 2555 is further used to identify the email type of the email to be identified in at least one manner for each email information in the at least one email information, and obtain at least one identification probability value; splice the at least one identification probability value to obtain the email identification probability value corresponding to each email information, thereby obtaining at least one email identification probability value corresponding to the at least one email information; splice the at least one email identification probability value to obtain the probability value of the email type to be combined.
[0231] In an embodiment of the present application, when the at least one email message includes the behavior information, the result determination module 2555 is further used to obtain the email sending entity of the email to be identified, wherein the email sending entity includes one or more of the email sending URL information, the sending object and the mailbox domain name; determine the entity scoring information based on the historical email type corresponding to the email sending entity; obtain the object portrait information of the receiving object; determine the interest tag based on the object portrait information; obtain the relationship chain between the receiving object and the email sending entity; and determine one or more of the entity scoring information, the interest tag information and the relationship chain as the behavior information in the at least one email message.
[0232] In an embodiment of the present application, the at least one email information includes the attachment information, and when the attachment information is one or both of document information and image information, the result determination module 2555 is also used to obtain the string vector of each text string in the document information when the attachment information is the document information, thereby obtaining a string vector sequence corresponding to the document information, and identifying the email type of the email to be identified based on the string vector sequence; when the attachment information is the image information, extracting features of the image information, and identifying the email type of the email to be identified based on the extracted features, wherein the extracted features are one or both of the text features of the image information and the image features of the image information.
[0233] In an embodiment of the present application, the result determination module 2555 is further used to splice the email type probability value and the probability value of the email type to be combined to obtain the email type feature to be identified; based on the email type feature to be identified, the email type of the email to be identified is identified to obtain the email identification result.
[0234] In the embodiment of the present application, the email identification device 255 further includes a normalization module 2557 for normalizing the label vector sequence to obtain the label features of the page to be identified; and identifying the email type of the email to be identified based on the label features of the page to be identified.
[0235] In an embodiment of the present application, the email identification device 255 also includes a vector model training module 2558, which is used to obtain email samples; obtain a set of page label sequence samples corresponding to the email samples; and use the set of page label sequence samples as a corpus to train a label vector model.
[0236] In the embodiment of the present application, the vector acquisition module 2553 is further configured to adopt the word vector model to acquire the label vector of each page label in the page label sequence.
[0237] In an embodiment of the present application, the email identification module 2554 is also used to use a label recognition model to identify the page label features to identify the email type of the email to be identified, wherein the label recognition model is used to predict the probability value of the email type corresponding to the email to be identified based on the page label features.
[0238] In an embodiment of the present application, the email identification device 255 also includes a recognition model training module 2559, which is used to obtain model training samples, wherein the model training samples include email samples and recognition result annotation information; using the label recognition model to be trained to identify the email type of the email sample to obtain recognition result prediction information, wherein the label recognition model to be trained is a model to be trained for identifying email types; based on the difference between the recognition result prediction information and the recognition result annotation information, the label recognition model to be trained is trained to obtain the label recognition model.
[0239] In an embodiment of the present application, the email identification device 255 also includes a model optimization module 25510 for obtaining new model training samples, wherein the new model training samples are obtained after the model training samples; and based on the new model training samples, the label recognition model is optimized.
[0240] In the embodiment of the present application, the email identification module 2554 is further configured to use an optimized tag identification model to identify the page tag features.
[0241] In an embodiment of the present application, the email acquisition module 2551 is also used to obtain the email to be identified in response to an email identification request sent by a receiving device, wherein the receiving device corresponds to the receiving object, and the email identification request is generated when the receiving device receives the email to be identified.
[0242] In the embodiment of the present application, the email identification device 255 further includes a result sending module 25511 for sending the email identification result to the receiving device, so that the receiving device performs processing adapted to the email identification result for the email to be identified.
[0243] The present invention provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the email identification method described above in the present invention.
[0244] The embodiment of the present application provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the mail identification method provided by the embodiment of the present application, for example, Figure 7 The mail identification method shown.
[0245] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or various devices including one or any combination of the above memories.
[0246] In some embodiments, executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0247] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).
[0248] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0249] To sum up, through the embodiments of the present application, since different types of emails have large differences in the display of content; therefore, when the result of the email type to be identified is determined by the features corresponding to the page label sequence of the email to be identified, even if the email to be identified does not include text information or includes less text information, the email type to which the email to be identified belongs can be accurately identified; thereby, the recognition accuracy and coverage of the email type can be improved.
[0250] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.
Claims
1. A mail identification method, characterized in that: include: Obtaining a page of mails to be identified, wherein the mails to be identified are emails received by a recipient; Obtaining a page tag sequence of a page of the email to be identified, wherein the page tag sequence is used to display the email to be identified; the order of the page tags in the page tag sequence is the display order of the page tags of the page; the page tags include at least one of the following types: Hypertext Markup Language tags, Active Server Page tags, Java Server Page tags, and Hypertext Preprocessor tags; Obtaining a label vector of each page label in the page label sequence, thereby obtaining a label vector sequence corresponding to the page label sequence; Normalizing the tag vector sequence to obtain tag features of the page to be identified; Identifying the email type of the email to be identified based on the tag features of the page to be identified; Based on the identified mail type probability value, a mail identification result corresponding to the mail to be identified is determined, wherein the mail identification result is the mail type to which the mail to be identified belongs.
2. The method according to claim 1, characterized in that After obtaining the page of the email to be identified and before determining the email identification result corresponding to the email to be identified based on the identified email type probability value, the method further includes: Acquire at least one piece of email information of the email to be identified, wherein the at least one piece of email information includes one or more of content information, attachment information, and behavior information; Based on the at least one piece of mail information, the mail type of the mail to be identified is identified to obtain a probability value of the mail type to be combined; The determining of the mail identification result corresponding to the mail to be identified based on the identified mail type probability value includes: The mail type probability value and the probability value of the mail type to be combined are combined to determine the mail identification result corresponding to the mail to be identified.
3. The method according to claim 2, characterized in that The step of identifying the mail type of the mail to be identified based on the at least one piece of mail information and obtaining a probability value of the mail type to be combined includes: For each of the at least one piece of mail information, identify the mail type of the mail to be identified in at least one manner to obtain at least one recognition probability value; splicing the at least one recognition probability value to obtain the mail recognition probability value corresponding to each type of mail information, thereby obtaining the at least one mail recognition probability value corresponding to the at least one mail information; The at least one mail recognition probability value is concatenated to obtain the probability value of the mail type to be combined.
4. The method according to claim 2, characterized in that When the at least one piece of email information includes the behavior information, obtaining the at least one piece of email information of the email to be identified includes: Obtaining the email sending subject of the email to be identified, wherein the email sending subject includes one or more of email sending website information, sending recipient, and mailbox domain name; Determining entity rating information based on historical email types corresponding to the email sending entity; Obtaining object portrait information of the receiving object; Determining interest tags based on the object portrait information; Obtaining a relationship chain between the receiving object and the email sending subject; One or more of the entity rating information, the interest tag information, and the relationship chain is determined as the behavior information in the at least one email message.
5. The method according to claim 2, characterized in that When the at least one email information includes the attachment information, and the attachment information is one or both of document information and image information, the identifying the email type of the email to be identified based on the at least one email information includes: When the attachment information is the document information, obtaining a character string vector for each text character string in the document information, thereby obtaining a character string vector sequence corresponding to the document information, and identifying the mail type of the mail to be identified based on the character string vector sequence; When the attachment information is the image information, features of the image information are extracted, and the mail type of the mail to be identified is identified based on the extracted features, wherein the extracted features are one or both of text features of the image information and image features of the image information.
6. The method according to any one of claims 2 to 5, characterized in that The determining the mail identification result corresponding to the mail to be identified by combining the mail type probability value and the probability value of the mail type to be combined includes: Concatenate the probability value of the email type and the probability value of the email type to be combined to obtain the features of the email type to be identified; Based on the characteristics of the type of the mail to be identified, the mail type of the mail to be identified is identified to obtain the mail identification result.
7. The method according to any one of claims 1 to 5, characterized in that Before obtaining the tag vector of each page tag in the page tag sequence, the method further includes: Get email samples; Obtaining a page tag sequence sample set corresponding to the email sample; Using the page label sequence sample set as a corpus, training a label vector model; The obtaining of the label vector of each page label in the page label sequence includes: A word vector model is used to obtain the label vector of each page label in the page label sequence.
8. The method according to any one of claims 1 to 5, characterized in that Normalizing the tag vector sequence to obtain tag features of the page to be identified; Identifying the type of the email to be identified based on the tag feature of the page to be identified includes: A label recognition model is used to normalize the label vector sequence to obtain the label features of the page to be identified, so as to identify the email type of the email to be identified, wherein the label recognition model is used to predict the probability value of the email type corresponding to the email to be identified based on the page label features.
9. The method according to claim 8, characterized in that Before adopting the tag recognition model, the method further includes: Obtaining a model training sample, wherein the model training sample includes an email sample and recognition result annotation information; Using a label recognition model to be trained to identify the email type of the email sample, and obtaining recognition result prediction information, wherein the label recognition model to be trained is a model to be trained for identifying email types; Based on the difference between the recognition result prediction information and the recognition result annotation information, the label recognition model to be trained is trained to obtain the label recognition model.
10. The method according to claim 9, characterized in that After obtaining the tag recognition model, the method further includes: Acquire a new model training sample, wherein the new model training sample is obtained after the model training sample; Optimizing the label recognition model based on the new model training sample; The tag recognition model is used to identify the page tag features, including: The optimized tag recognition model is used to recognize the page tag features.
11. The method according to any one of claims 1 to 5, characterized in that The page for obtaining the email to be identified includes: Responding to an email identification request sent by a receiving device, obtaining a page of the email to be identified, wherein the receiving device corresponds to the receiving object, and the email identification request is generated when the receiving device receives the email to be identified; After determining the email identification result corresponding to the email to be identified, the method further includes: The mail identification result is sent to the receiving end device so that the receiving end device For the mail to be identified, a process adapted to the mail identification result is performed.
12. A mail identification device, characterized in that: include: An email acquisition module is used to acquire a page of emails to be identified, wherein the emails to be identified are emails received by a recipient; a tag acquisition module, configured to acquire a page tag sequence of the page of the email to be identified, wherein the page tag sequence is used to display the email to be identified; the order of the page tags in the page tag sequence is the display order of the page tags of the page; the page tags include at least one of the following types: hypertext markup language tags, dynamic server page tags, JAVA server page tags, and hypertext preprocessor tags; a vector acquisition module, configured to acquire a label vector of each page label in the page label sequence, thereby obtaining a label vector sequence corresponding to the page label sequence; An email recognition module is configured to normalize the tag vector sequence to obtain tag features of the page to be identified; and identify the type of the email to be identified based on the tag features of the page to be identified; The result determination module is configured to determine a mail identification result corresponding to the mail to be identified based on the identified mail type probability value, wherein the mail identification result is the mail type to which the mail to be identified belongs.
13. The device according to claim 12, wherein include: an auxiliary identification module, configured to obtain at least one piece of email information of the email to be identified, wherein the at least one piece of email information includes one or more of content information, attachment information, and behavior information; Based on the at least one piece of mail information, the mail type of the mail to be identified is identified to obtain a probability value of the mail type to be combined.
14. The device according to claim 12, wherein The result determination module is further configured to: The mail type probability value and the probability value of the mail type to be combined are combined to determine the mail identification result corresponding to the mail to be identified.
15. A mail identification device, characterized in that: include: a memory for storing executable instructions; The processor is configured to implement the mail identification method according to any one of claims 1 to 11 when executing the executable instructions stored in the memory.
16. A computer-readable storage medium, characterized in that Executable instructions are stored, and when executed by a processor, the method for identifying mail according to any one of claims 1 to 11 is implemented.
17. A computer program product comprising computer instructions, characterized in that When the computer program is executed by a processor, the mail identification method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Junk mail filtering method
CN103186845A
E-mail classification method and E-mail classification system according to user attribute
CN106230690A
Mail recognition method, device and equipment and storage medium
CN111222856A
Junk mail identification method and device
CN111753086A
Equipment state evaluation method and device, computer device and storage medium
CN112183994A