CN108768835B - Mail analysis method, device, server and storage medium - Google Patents

Mail analysis method, device, server and storage medium Download PDF

Info

Publication number
CN108768835B
CN108768835B CN201810541554.0A CN201810541554A CN108768835B CN 108768835 B CN108768835 B CN 108768835B CN 201810541554 A CN201810541554 A CN 201810541554A CN 108768835 B CN108768835 B CN 108768835B
Authority
CN
China
Prior art keywords
mail
information
attachment
mime
attachment block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810541554.0A
Other languages
Chinese (zh)
Other versions
CN108768835A (en
Inventor
杨良志
汪志新
丁德平
邵正军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Richinfo Technology Co ltd
Original Assignee
Richinfo Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Richinfo Technology Co ltd filed Critical Richinfo Technology Co ltd
Priority to CN201810541554.0A priority Critical patent/CN108768835B/en
Publication of CN108768835A publication Critical patent/CN108768835A/en
Application granted granted Critical
Publication of CN108768835B publication Critical patent/CN108768835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/08Annexed information, e.g. attachments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/42Mailbox-related aspects, e.g. synchronisation of mailboxes

Abstract

The embodiment of the invention discloses a mail analysis method, a mail analysis device, a server and a storage medium. Wherein, the method comprises the following steps: when receiving the mail, determining each attachment block information in the MIME mail data according to the boundary identifier in the multipurpose Internet mail extension MIME mail data; when a mail analysis instruction acted by a user is received, analyzing the other mail information except the information of each attachment block in the MIME mail data according to the mail analysis instruction; and generating an analyzed mail page according to the analyzed other mail information and the information of each attachment block. According to the technical scheme of the embodiment of the invention, when the mail is analyzed, only the other mail information except the information of each attachment block is analyzed, so that the time consumption and the memory occupation in the mail loading and analyzing process are reduced, the mail analyzing performance is improved, and the user experience is improved.

Description

Mail analysis method, device, server and storage medium
Technical Field
The embodiment of the invention relates to the field of data processing, in particular to a mail analysis method, a mail analysis device, a server and a storage medium.
Background
With the rapid development of internet technology, mail exchange has become an indispensable communication mode in the process of personal communication and enterprise office. The existing Mail generally adopts Multipurpose Internet Mail Extensions (MIME) protocol for transmission, MIME message is used as a carrier of Mail content, and can simultaneously contain various information such as rich text, in-line pictures, attachments, conference correlation and the like, the MIME message content of the existing Mail is larger and larger, a plurality of non-standardized situations exist for a plurality of character sets and codes corresponding to characters, and a higher requirement also exists for Mail analysis capability.
At present, in the prior art, when a mail is received, a MIME message representing mail data is stored in a system disk in advance, when the mail is analyzed, the corresponding MIME message is loaded into a memory from the system disk, and is scanned line by line or even character by character to obtain different text blocks, picture blocks, attachment blocks and the like contained in the mail message, and then, the data blocks of the different blocks are analyzed, and information such as the analyzed attachment blocks and pictures is stored on the disk. At this time, for the mail containing 20M or more attachments, the time consumed for mail analysis is long, the occupied memory is also large, and the analysis efficiency of the local mail is seriously reduced.
Disclosure of Invention
The embodiment of the invention provides a mail analysis method, a mail analysis device, a server and a storage medium, which are used for analyzing the mail information except the information of each attachment block in the mail, so that the time consumption and the memory occupation in the mail analysis process are reduced, the mail analysis performance is improved, and the user experience is improved.
In a first aspect, an embodiment of the present invention provides a method for analyzing an email, where the method includes:
when receiving the mail, determining each attachment block information in the MIME mail data according to the boundary identifier in the multipurpose Internet mail extension MIME mail data;
when a mail analysis instruction acted by a user is received, analyzing the other mail information except the information of each attachment block in the MIME mail data according to the mail analysis instruction;
and generating mail display data according to the analyzed other mail information and the information of each attachment block.
In a second aspect, an embodiment of the present invention provides an email parsing apparatus, where the apparatus includes:
the attachment determining module is used for determining each attachment block information in the MIME mail data according to the boundary identifier in the multipurpose Internet mail extension MIME mail data when receiving the mail;
the first analysis module is used for analyzing the rest mail information except the information of each attachment block in the MIME mail data according to the mail analysis instruction when receiving the mail analysis instruction acted by a user;
and the analysis page generation module is used for generating mail display data according to the analyzed other mail information and the information of each attachment block.
In a third aspect, an embodiment of the present invention provides a server, where the server includes:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the mail parsing method of any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the mail parsing method according to any embodiment of the present invention.
According to the mail analyzing method, the mail analyzing device, the server and the storage medium provided by the embodiment of the invention, the attachment block information in the MIME mail data is determined when the mail is received, and only the rest mail information except the attachment block information is analyzed when the mail is analyzed, so that the time consumption and the memory occupation in the mail loading and analyzing process are reduced, the mail analyzing performance is improved, and the user experience is improved.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1A is a flowchart of an email parsing method according to an embodiment of the present invention;
fig. 1B is a flowchart illustrating determining information of each attachment block in MIME mail data in a method according to an embodiment of the present invention;
fig. 2 is a flowchart of an email parsing method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a mail parsing apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1A is a flowchart of a mail parsing method according to an embodiment of the present invention, which is applicable to any mail client performing mail forwarding and receiving. The mail parsing method provided in this embodiment may be executed by the mail parsing apparatus provided in the embodiment of the present invention, and the apparatus may be implemented in a software and/or hardware manner and integrated in a server executing the method, where the server executing the method in this embodiment may be any one of a tablet computer, a desktop computer, a notebook computer, a mobile phone, and other intelligent devices including a mail client. Specifically, referring to fig. 1A, the method may include the steps of:
s110, when receiving the mail, determining each attachment block information in the MIME mail data according to the boundary mark in the MIME mail data.
The existing mail data generally follows a certain format requirement to analyze and extract information such as a sender, a receiver, a subject, an attachment and the like from the mail data, and the basic format and the specific details of the mail data are respectively defined by the standard format RFC 822 and the MIME protocol of the e-mail. The RFC 822 standard can only send basic ASCII text information, while the MIME protocol can also add a variety of different rich texts, in-line pictures, attachments, etc. in the mail, with different character sets and encoded mail contents. At this time, mail data defined by the MIME protocol in which a variety of different encoded files can be attached is MIME mail data. Specifically, MIME mail data can be composed of a mail header and a mail body. The mail body may include at least one of plain text, hypertext, embedded resources (such as pictures embedded in the hypertext), or a combination of attachments, so as to represent specific contents in the mail, and at this time, the mail body may specifically represent each content in the mail by a plurality of segments including a segment header and a segment body, respectively. It should be noted that the specific content of the mail contained in the mail body in this embodiment can be distinguished by the mail type in the mail header.
Further, the boundary identifiers in the MIME mail data can be used to distinguish and determine different mail contents in the MIME mail data, such as plain text, hypertext, inline pictures and attachments, etc. The boundary identifier can be customized by a user according to specific mail content, and the boundary identifier can distinguish each mail content from a plurality of mail contents and determine the specific position of a field corresponding to each mail content in a mail body. Specifically, the boundary identifier in this embodiment may be determined by boundary field information in the MIME mail data. The boundary identifier may include the mail type in the mail header, so as to determine the different mail contents contained in the MIME mail data.
Optionally, in order to improve the performance of mail parsing, the time for loading the mail on the disk needs to be reduced, in this embodiment, when the mail is received, first determining that the received mail is a MIME mail, and then preprocessing the MIME mail in the process of receiving the MIME mail, that is, searching each boundary field information in the MIME mail data, to determine each corresponding boundary identifier, and determining a boundary identifier corresponding to the attachment block information in all the boundary identifiers, to specifically determine each attachment block information in the MIME mail data. Wherein, each attachment block information can include all attachments carried in the received MIME mail data. Specifically, the receiving of the mail in this embodiment may be receiving a new mail sent by another account, or directly opening a new mail that has not been opened before the current mail client in the desktop, for example, a mail copied by the local user from another user and not opened by the local mail client.
Further, the boundary identifier in this embodiment may include a boundary type and a boundary parameter. The boundary type can determine the specific mail content in the MIME mail data, which is equivalent to the mail type in the mail header, and when the mail is received, whether the MIME mail data includes the attachment can be directly determined by analyzing the mail type in the mail header. Meanwhile, the boundary parameter can determine the specific position of the field corresponding to each attachment block in the MIME mail data, thereby directly determining the information of each attachment block in the MIME mail data.
Specifically, the boundary Type in the boundary identifier, i.e., the mail Type, may be determined by a Content-Type field in the mail header, where the mail Content includes only plain text, the Content-Type field is a text/plane representation, and where the mail Content further includes various mixed other contents, the Content-Type field is a multipart Type, including a multipart/mixed Type, a multipart/related Type, and a multipart/Alternative Type. The multipart/mixed type represents the information of the first-level block, and an attachment exists in MIME mail data; multipart/related type represents secondary block information, there are embedded resources in MIME mail data, such as pictures embedded in hypertext, etc.; the multipart/alternate type indicates that there are multiple text blocks in the MIME mail data.
Specifically, the boundary parameters in the boundary identifier may be specific boundary parameters respectively corresponding to the mail types in the mail headers, and the corresponding mail content positions may be determined in the mail body according to the specific boundary parameters. For example, upon receiving a mail, the mail header in the MIME mail data includes:
“Content-Type:multipart/mixed;
boundary="----=_Part_217443_152692695.1495196666093"”;
the boundary type is multipart/mixed, which indicates that there are attachments in the MIME mail data, and the boundary parameter is "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (217443- -152692695.1495196666093", and the specific information of each attachment can be determined in the mail body according to the boundary parameter.
If the mail header in the MIME mail data includes:
“Content-Type:multipart/alternative;
boundary="----=_Part_214835_1240140699.1495194691872"”;
the boundary type is multipart/alternative, which indicates that a text block exists in MIME mail data, and the boundary parameter is "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -214835- -1240140699.1495194691872", and may determine the specific information of the text block in the mail body according to the boundary parameter.
On the basis of the above embodiment, as shown in fig. 1B, determining each attachment block information in the MIME mail data according to the boundary identifier in the MIME mail data may include:
s111, at least one boundary identification in the MIME mail data is obtained.
Specifically, the MIME mail is preprocessed, that is, each boundary field information is found in the MIME mail data, so as to determine each corresponding boundary identifier. When the MIME mail data includes a plurality of items of specific mail contents, a plurality of different boundary identifiers may be set, respectively corresponding to different mail contents. When receiving the mail, at least one boundary identifier in the MIME mail data is obtained first, and the boundary Type and the boundary parameter in the boundary identifier, namely the Content-Type field and boundary field information.
And S112, if the attachment exists in the MIME mail data according to the boundary type in each boundary identifier, determining the information of each attachment block according to the boundary parameters in each boundary identifier corresponding to the attachment.
Specifically, after at least one boundary identifier is obtained, whether the Content-Type field corresponding to the boundary Type in each boundary identifier has multipart/mixed Type information is judged firstly, if yes, it is determined that an attachment exists in the MIME mail data, at this time, a boundary parameter in each boundary identifier corresponding to the attachment, that is, a boundary field parameter corresponding to the multipart/mixed field is obtained, and each attachment block information is determined in the mail body according to the boundary field parameter.
Illustratively, when the boundary field parameter corresponding to the multipart/mixed field in the mail header of the MIME mail data is "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -217443- -152692695.1495196666093", the field information included in the boundary field, that is, each attachment block information, is determined only in the mail body. For example: in the body of the mail
“------=_Part_217443_152692695.1495196666093
Content-Type:text/plain;name="first1.txt"
Content-Transfer-Encoding:base64
Content-Disposition:attachment;filename="first1.txt"
MTIzNA==
------=_Part_217443_152692695.1495196666093
Content-Type:text/plain;name="first2.txt"
Content-Transfer-Encoding:base64
Content-Disposition:attachment;filename="first2.txt"
MTIzNA==
------=_Part_217443_152692695.1495196666093--”;
Wherein two attachments are present in the body of the mail piece and the content is designated for encoded transmission by means of base 64. In addition, each accessory block information in the present embodiment may include: the information of the name and the size of each attachment block can be obtained in advance by analyzing the information of each attachment block, so as to determine the specific information of each attachment block in the MIME mail data for subsequent use.
And S120, when receiving a mail analysis instruction acted by a user, analyzing the other mail information except the attachment block information in the MIME mail data according to the mail analysis instruction.
When a user needs to open a mail, the mail client receives a mail analysis instruction acted by the user, wherein the mail analysis instruction can indicate a specific name of the opened mail or a corresponding command when the mail is automatically analyzed and relevant information of the mail is extracted, so that the corresponding specified mail is analyzed.
Optionally, when receiving a mail parsing instruction acted by a user, the mail client may determine whether a mail corresponding to a designated opening is preprocessed according to the mail parsing instruction, and after determining corresponding attachment block information in the MIME mail data, filter the attachment block information in the MIME mail data, only load and parse other mail information except the attachment block information, and do not parse the attachment blocks, thereby improving mail loading and parsing efficiency. Wherein, the rest mail information may include the text information and the inline picture in the MIME mail data.
And S130, generating mail display data according to the analyzed other mail information and the analyzed attachment block information.
Specifically, after analyzing the rest of the mail information except the attachment block information in the MIME mail data, it is necessary to display the analysis result for the user, and generate mail display data according to the text or picture information in the analyzed rest of the mail information and the attachment block information that is not analyzed, where the mail display data may be displayed through a mail page, or the mail display data after the analysis may be stored for subsequent use. The mail display data defines the content of the MIME mail, the mail text, the in-line pictures, the carried attachment blocks and the like. Alternatively, only the names and sizes of the attachment blocks may be displayed by previously parsing the names and sizes of the attachment blocks, and the specific content of each attachment block is not parsed.
According to the technical scheme, when the mail is received, the attachment block information in the MIME mail data is determined, and when the mail is analyzed, only the rest mail information except the attachment block information is analyzed, so that time consumption and memory occupation in the mail loading and analyzing process are reduced, the mail analyzing performance is improved, and the user experience is improved.
Example two
Fig. 2 is a flowchart of an email parsing method according to a second embodiment of the present invention. The embodiment is optimized on the basis of the embodiment. Specifically, referring to fig. 2, the present embodiment may include the following steps:
s210, when receiving the mail, determining each attachment block information in the MIME mail data according to the boundary mark in the MIME mail data.
And S220, storing the information of each attachment block into an attachment table.
Specifically, after determining the start position, the attachment block length, and the attachment block name of the attachment block in each piece of attachment block information, the corresponding piece of attachment block information may be stored in the attachment table as a data record. The attachment table can be stored in a mode of referring to a data table in a database, and a keyword identifier is set for each data record, so that corresponding attachment block information can be searched in the attachment table in time when the corresponding attachment block needs to be analyzed subsequently, and the analysis efficiency is improved.
And S230, when receiving a mail analysis instruction acted by a user, analyzing the other mail information except the attachment block information in the MIME mail data according to the mail analysis instruction.
And S240, determining text information and/or inline picture information in the mail and a corresponding display position in the mail display data according to the analyzed rest mail information.
In this embodiment, the remaining mail information in the MIME mail data, except for the attachment block information, may include text information of the mail body and/or inline picture information, where the text information may include plain text, hypertext, and the like. Optionally, when displaying the analyzed remaining email information, text information and/or inline picture information in the email and a corresponding display position of the text information and/or inline picture information in the email display data need to be determined.
And S250, displaying the text information and/or the inline picture information at the corresponding display position, and generating mail display data by combining the information of each attachment block.
Optionally, when the corresponding display position of the text information and/or the inline picture information in the email page is determined, the text information and/or the inline picture information may be displayed at the corresponding display position in the email display data, and corresponding email display data is generated according to each piece of attachment block information determined in the MIME email data, in combination with the name and size of the attachment block of each attachment block, for displaying an email parsing result.
S260, judging whether an accessory analysis instruction acted by a user is received, and if so, executing S270; if not, go to step S280.
Specifically, after the mail analysis result is displayed for the user on the mail display data, if the user needs to check the corresponding attachment block, the corresponding attachment block is analyzed by double-clicking the name of the corresponding attachment block on the mail display data, and when the user double-clicks the attachment block on the mail display data, the mail client receives an attachment analysis instruction acted by the user, so that the corresponding attachment block is analyzed.
S270, acquiring target attachment block information corresponding to the attachment analysis instruction in the attachment table, and analyzing the target attachment data in the MIME mail data based on the target attachment block information.
Specifically, when an attachment analysis instruction acted by a user is received, target attachment data required to be analyzed by the user can be determined according to the attachment analysis instruction, a corresponding data recording position is determined in an attachment table in time through a keyword identifier corresponding to the target attachment data, so that target attachment block information stored in the attachment table is searched, information such as a starting position, an attachment block length and an attachment block name of a target attachment block in MIME mail data is determined, corresponding MIME field information of the target attachment data in the MIME mail data is read according to the starting position of the target attachment block in the MIME mail data, and the MIME field information corresponding to the target attachment data is decoded according to a corresponding transmission coding mode in a field to obtain an analyzed target attachment. Optionally, the parsed target attachment data may be stored in a temporary directory and then opened, so as to display the corresponding target attachment content for the user.
And S280, ending the process.
According to the technical scheme, when the mail is received, the attachment block information in the MIME mail data is determined, so that the attachment information and other mail information except the attachment are analyzed respectively, the disk space is not occupied additionally, the time consumption and memory occupation in the mail loading and analyzing process are reduced, the mail analyzing performance is improved, and the user experience is improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a mail parsing apparatus according to a third embodiment of the present invention, and specifically, as shown in fig. 3, the apparatus may include:
an attachment determining module 310, configured to determine, when receiving a mail, information of each attachment block in the MIME mail data according to the boundary identifier in the MIME mail data;
the mail analysis module 320 is used for analyzing the rest mail information except the information of each attachment block in the MIME mail data according to the mail analysis instruction when receiving the mail analysis instruction acted by the user;
and the mail display generation module 330 is configured to generate mail display data according to the analyzed remaining mail information and each attachment block information.
According to the technical scheme, when the mail is received, the attachment block information in the MIME mail data is determined, and when the mail is analyzed, only the rest mail information except the attachment block information is analyzed, so that time consumption and memory occupation in the mail loading and analyzing process are reduced, the mail analyzing performance is improved, and the user experience is improved.
Further, the boundary identifier may include a boundary type and a boundary parameter, and accordingly, the accessory determining module 310 may include: an identifier acquiring unit 3101 for acquiring at least one boundary identifier in the MIME mail data; an attachment determining unit 3102, configured to determine, if it is determined that an attachment exists in the MIME mail data according to the boundary type in each boundary identifier, each attachment block information according to the boundary parameter in each boundary identifier corresponding to the attachment.
Further, the accessory block information may include: the starting location of the attachment block, the attachment block length, and the attachment block name.
Further, the above apparatus may further include: the attachment storage module 340 is configured to store each attachment block information in the MIME mail data into the attachment table after determining each attachment block information.
Correspondingly, the above apparatus may further include: the attachment parsing module 350 is configured to, when an attachment parsing instruction acted by a user is received, obtain target attachment block information corresponding to the attachment parsing instruction in the attachment table, and parse target attachment data in the MIME mail data based on the target attachment block information.
Further, the mail display generating module 330 may include: a display determining unit 3301, configured to determine, according to the parsed remaining email information, text information and/or inline picture information in the email, and a corresponding display position in the email display data; and a mail display generating unit 3302, configured to display the text information and/or the inline picture information at the corresponding display position, and generate mail display data by combining each attachment block information.
The mail analysis device provided by the embodiment can be applied to the mail analysis method provided by any embodiment, and has corresponding functions and beneficial effects.
Example four
Fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention, as shown in fig. 4, the server includes a processor 40, a memory 41, a communication device 42, an input device 43, and an output device 44; the number of the processors 40 in the server may be one or more, and one processor 40 is taken as an example in fig. 4; the processor 40, the memory 41, the communication device 42, the input device 43 and the output device 44 in the server may be connected by a bus or other means, and the bus connection is exemplified in fig. 4.
The memory 41, which is a computer-readable storage medium, may be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the mail parsing method in the embodiment of the present invention (for example, the attachment determining module 310, the mail parsing module 320, and the parsed page generating module 330 in the mail parsing apparatus). The processor 40 executes various functional applications of the server and data processing by running software programs, instructions, and modules stored in the memory 41, thereby implementing the mail parsing method described above.
The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 41 may further include memory located remotely from processor 40, which may be connected to a server over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The communication means 42 may be used for network connection or mobile data connection of the server.
The input device 43 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the server. The output device 44 may include a display device such as a display screen.
The server provided by the embodiment can be used for executing the mail analysis method provided by any embodiment, and has corresponding functions and beneficial effects.
EXAMPLE five
Fifth, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, can implement the mail parsing method in any of the above embodiments. The method specifically comprises the following steps:
when receiving the mail, determining each attachment block information in the MIME mail data according to the boundary identifier in the multipurpose Internet mail extension MIME mail data;
when a mail analysis instruction acted by a user is received, analyzing the other mail information except the information of each attachment block in the MIME mail data according to the mail analysis instruction;
and generating mail display data according to the analyzed other mail information and the information of each attachment block.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the mail parsing method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the mail parsing apparatus, each included unit and module are only divided according to functional logic, but are not limited to the above division as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A mail parsing method, comprising:
when receiving the mail, determining each attachment block information in the MIME mail data according to the boundary identifier in the multipurpose Internet mail extension MIME mail data;
acquiring at least one boundary identifier in the multipurpose Internet mail extension MIME mail data, wherein the boundary identifier comprises a boundary type and a boundary parameter;
if the attachment exists in the MIME mail data according to the boundary type in each boundary identifier, determining the information of each attachment block according to the boundary parameters in each boundary identifier corresponding to the attachment;
when a mail analysis instruction acted by a user is received, analyzing the other mail information except the information of each attachment block in the MIME mail data according to the mail analysis instruction;
generating mail display data according to the analyzed other mail information and the information of each attachment block, wherein the mail display data comprises the following steps:
determining text information and/or inline picture information in the mail and a corresponding display position in mail display data according to the analyzed other mail information;
displaying the text information and/or the inline picture information at the corresponding display position, and generating mail display data by combining the information of each attachment block;
storing the accessory block information into an accessory table;
correspondingly, when an attachment analysis instruction acted by a user is received, target attachment block information corresponding to the attachment analysis instruction is obtained in the attachment table, and target attachment data in the MIME mail data is analyzed based on the target attachment block information.
2. The method of claim 1, wherein the attachment block information comprises: the starting location of the attachment block, the attachment block length, and the attachment block name.
3. A mail parsing apparatus, comprising:
the attachment determining module is used for determining each attachment block information in the MIME mail data according to the boundary identifier in the multipurpose Internet mail extension MIME mail data when receiving the mail;
the accessory determining module comprises an identification obtaining unit and an accessory determining unit;
the identification acquiring unit is used for acquiring at least one boundary identification in the multipurpose Internet mail extension MIME mail data, wherein the boundary identification comprises a boundary type and a boundary parameter;
an attachment determining unit, configured to determine, if an attachment exists in the MIME mail data according to a boundary type in each boundary identifier, information of each attachment block according to a boundary parameter in each boundary identifier corresponding to the attachment;
the mail analysis module is used for analyzing the other mail information except the information of each attachment block in the MIME mail data according to the mail analysis instruction when receiving the mail analysis instruction acted by a user;
the analysis page generation module is used for generating mail display data according to the analyzed other mail information and the information of each attachment block;
wherein, the analysis page generation module comprises: the display determining unit is used for determining text information and/or inline picture information in the mail and corresponding display positions in the mail display data according to the analyzed other mail information;
the mail display generation unit is used for displaying the text information and/or the inline picture information at the corresponding display position and generating mail display data by combining the information of each attachment block;
the accessory storage module is used for storing the accessory block information into an accessory table;
and the attachment analysis module is used for acquiring target attachment block information corresponding to the attachment analysis instruction in the attachment table when the attachment analysis instruction acted by a user is received, and analyzing target attachment data in the MIME mail data based on the target attachment block information.
4. The apparatus of claim 3, wherein the attachment block information comprises: the starting location of the attachment block, the attachment block length, and the attachment block name.
5. A server, characterized in that the server comprises:
one or more processors;
storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the mail parsing method of any of claims 1-2.
6. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the mail parsing method according to any one of claims 1-2.
CN201810541554.0A 2018-05-30 2018-05-30 Mail analysis method, device, server and storage medium Active CN108768835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810541554.0A CN108768835B (en) 2018-05-30 2018-05-30 Mail analysis method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810541554.0A CN108768835B (en) 2018-05-30 2018-05-30 Mail analysis method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN108768835A CN108768835A (en) 2018-11-06
CN108768835B true CN108768835B (en) 2022-03-18

Family

ID=64004584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810541554.0A Active CN108768835B (en) 2018-05-30 2018-05-30 Mail analysis method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN108768835B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213987B (en) * 2018-11-13 2023-05-19 自然资源部第一海洋研究所 Ice buoy satellite data processing method
CN109284444A (en) * 2018-11-29 2019-01-29 彩讯科技股份有限公司 A kind of recommended method of good friend, device, server and storage medium
CN111917632B (en) * 2020-07-31 2022-09-16 北京明朝万达科技股份有限公司 Method and device for analyzing mail, nonvolatile storage medium and electronic device
CN114157734A (en) * 2021-12-06 2022-03-08 北京天融信网络安全技术有限公司 Data analysis method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001052081A1 (en) * 1999-08-30 2001-07-19 Zaplet, Inc. Methods and systems to manage and track the states of electronic media
CN101155153A (en) * 2006-09-26 2008-04-02 国际商业机器公司 Method and apparatus for managing e-mail attachments
CN102368753A (en) * 2011-12-02 2012-03-07 山东大学 Mail receiving and sending processing method under thin client mode
CN103188128A (en) * 2011-12-29 2013-07-03 盈世信息科技(北京)有限公司 Preview method of mail attachment and mail system
CN105827511A (en) * 2016-04-28 2016-08-03 乐视控股(北京)有限公司 System and method for processing email with large attachments

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1889106B (en) * 2005-06-30 2011-04-06 腾讯科技(深圳)有限公司 Method for separately keeping mail appendix
CN1838645A (en) * 2006-02-27 2006-09-27 宇龙计算机通信科技(深圳)有限公司 E-mail receiving method
CN101136870A (en) * 2006-08-29 2008-03-05 国际商业机器公司 Symbol based message transferring method and system
CN101937530A (en) * 2010-08-26 2011-01-05 惠州Tcl移动通信有限公司 Method and device for displaying information of email
CN102567274A (en) * 2010-12-08 2012-07-11 比亚迪股份有限公司 Method and system for realizing transfer of mail data between mobile terminal and computer

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001052081A1 (en) * 1999-08-30 2001-07-19 Zaplet, Inc. Methods and systems to manage and track the states of electronic media
CN101155153A (en) * 2006-09-26 2008-04-02 国际商业机器公司 Method and apparatus for managing e-mail attachments
CN102368753A (en) * 2011-12-02 2012-03-07 山东大学 Mail receiving and sending processing method under thin client mode
CN103188128A (en) * 2011-12-29 2013-07-03 盈世信息科技(北京)有限公司 Preview method of mail attachment and mail system
CN105827511A (en) * 2016-04-28 2016-08-03 乐视控股(北京)有限公司 System and method for processing email with large attachments

Also Published As

Publication number Publication date
CN108768835A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
CN108768835B (en) Mail analysis method, device, server and storage medium
US9619119B2 (en) Information prompt method, apparatus and terminal device
KR101863981B1 (en) Using text messages to interact with spreadsheets
CA3061623C (en) File sending in instant messaging applications
CN102984050A (en) Method, client and system for searching voices in instant messaging
US20060168044A1 (en) System and method for display of chained messages in a single email in different orders
CN102769687B (en) Mass texting system and method
CN112162965B (en) Log data processing method, device, computer equipment and storage medium
US20080270559A1 (en) Mobile Device and Method for Sending a Message from a Mobile Device
US20140082007A1 (en) Method, system and storage medium for pushing user's personal label dynamically
EP3552376B1 (en) Card-based information management method and system
CN105760522A (en) Information search method and device based on application program
US9332406B2 (en) Method, apparatus, and system for updating contact information
WO2014114172A1 (en) Text message transmission method, device and terminal
CN103957306A (en) Method and device for sharing information between communication terminals
CN110011898B (en) Reply method and device of e-mail, storage medium and computer equipment
CN111641554B (en) Message processing method and device and computer readable storage medium
US10778627B2 (en) Centralized communications controller
CN114390137A (en) Short message processing method, device, equipment and storage medium
CN107666431B (en) Bookmark communication message acquisition method and device
WO2018166339A1 (en) Information processing method
CN109462538A (en) Electronic device, the mail sharing method based on level of confidentiality and storage medium
CN112235120B (en) Group combination method and electronic equipment
WO2016184165A1 (en) Method, transmitting terminal and receiving terminal for realizing information processing
CN104079469A (en) Information processing method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 518000 31st floor, Caixun technology building, 3176 Keyuan South Road, Gaoxin community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: RICHINFO TECHNOLOGY CO.,LTD.

Address before: 518057 unit 01-11, 4 / F, Changhong science and technology building, 18 Keji South 12 road, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: RICHINFO TECHNOLOGY CO.,LTD.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant