CN112134789A - Method and device for sending and receiving mails - Google Patents

Method and device for sending and receiving mails Download PDF

Info

Publication number
CN112134789A
CN112134789A CN202011039202.9A CN202011039202A CN112134789A CN 112134789 A CN112134789 A CN 112134789A CN 202011039202 A CN202011039202 A CN 202011039202A CN 112134789 A CN112134789 A CN 112134789A
Authority
CN
China
Prior art keywords
compressed
attachments
mail
files
attachment
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.)
Pending
Application number
CN202011039202.9A
Other languages
Chinese (zh)
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202011039202.9A priority Critical patent/CN112134789A/en
Publication of CN112134789A publication Critical patent/CN112134789A/en
Pending legal-status Critical Current

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/42Mailbox-related aspects, e.g. synchronisation of mailboxes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for sending and receiving a mail, wherein the method for sending the mail comprises the following steps: acquiring the size and the number of attachments of a mail to be sent; according to the size and the number of the attachments, the attachments are divided and compressed by a preset file size threshold value to generate a plurality of compressed files; combining the plurality of compressed files to obtain a plurality of compressed file groups; and generating a plurality of mails by taking each compressed file group as a mail attachment and sending the mails. The invention can divide and compress the attachments into a plurality of attachments to be sent respectively, compared with the prior art, the invention solves the problem of mail sending failure caused by overlarge mail attachments, breaks through the limitation of different mail servers on the size of the mail attachments, improves the communication effectiveness, can be adapted to different mail servers and improves the applicability.

Description

Method and device for sending and receiving mails
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for sending and receiving a mail.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
In the process of daily e-mail operation, there is always a need to automatically forward e-mails according to preset conditions. Different mail servers are usually set with different restrictions regarding the size of attachments when sending mail. And when the attachment size exceeds the limit, it will result in a signaling failure. For example, when an email containing a large attachment is automatically forwarded, due to the limitation of mailbox servers of different recipients, a situation of sending failure may occur, and the communication effectiveness is impaired. Meanwhile, in the prior art, an Outlook express mailbox exists, which has a function of automatically splitting a large mail attachment, but an Outlook express mailbox needs to be used by a receiver, and the use limitation exists.
Disclosure of Invention
The embodiment of the invention provides a method for sending a mail, which is used for solving the problem of failure in sending the mail due to overlarge mail attachment and comprises the following steps:
acquiring the size and the number of attachments of a mail to be sent;
according to the size and the number of the attachments, the attachments are divided and compressed by a preset file size threshold value to generate a plurality of compressed files;
combining the plurality of compressed files to obtain a plurality of compressed file groups;
and generating a plurality of mails by taking each compressed file group as a mail attachment and sending the mails.
The embodiment of the invention also provides a device for sending the mail, which is used for solving the problem of failure in sending the mail due to overlarge mail attachment and comprises the following components:
the attachment acquisition module is used for acquiring the size and the number of attachments of the mail to be sent;
the compressed file generation module is used for carrying out segmentation and compression processing on the attachments according to the sizes and the number of the attachments and a preset file size threshold value to generate a plurality of compressed files;
the grouping module is used for combining the plurality of compressed files to obtain a plurality of compressed file groups;
and the sending module is used for generating a plurality of mails to be sent by taking each compressed file group as a mail attachment respectively.
The embodiment of the invention also provides a mail receiving method, which is used for solving the problem of mail receiving failure caused by overlarge mail attachments and comprises the following steps:
receiving a plurality of mails transmitted by the mail transmission method;
acquiring a plurality of attachments in a plurality of mails;
grouping a plurality of compressed files in a plurality of attachments, decompressing and merging to obtain merged attachments; the merged attachment is the original attachment that was not segmented and compressed.
The embodiment of the invention also provides a device for receiving the mails, which is used for solving the problem of mail receiving failure caused by overlarge mail attachments and comprises the following components:
a mail receiving module for receiving a plurality of mails transmitted by the mail transmitting method;
the attachment acquisition module is used for acquiring a plurality of attachments in a plurality of mails;
the merging processing module is used for grouping a plurality of compressed files in a plurality of attachments, decompressing and merging the compressed files to obtain merged attachments; the combined attachment is the original attachment without being divided and compressed.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the method for sending and receiving the mails when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the above method for sending and receiving emails is stored in the computer-readable storage medium.
In the embodiment of the invention, the size and the number of attachments of a mail to be sent are obtained; according to the size and the number of the attachments, the attachments are divided and compressed by a preset file size threshold value to generate a plurality of compressed files; combining the plurality of compressed files to obtain a plurality of compressed file groups; each compressed file group is respectively used as a mail attachment, a plurality of mails are generated and sent, so that the attachments can be divided and compressed into a plurality of attachments to be sent respectively.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a schematic flow chart of a method for sending a mail according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an exemplary method of sending a mail according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for sending a mail according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for receiving a mail according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating an exemplary method of receiving a mail according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an apparatus for receiving mails according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Fig. 1 is a schematic flow diagram of a method for sending an email in an embodiment of the present invention, and as shown in fig. 1, the method for sending an email provided in the embodiment of the present invention may include:
step 101: acquiring the size and the number of attachments of a mail to be sent;
step 102: according to the size and the number of the attachments, the attachments are divided and compressed by a preset file size threshold value to generate a plurality of compressed files;
step 103: combining the plurality of compressed files to obtain a plurality of compressed file groups;
step 104: and generating a plurality of mails by taking each compressed file group as a mail attachment and sending the mails.
In the embodiment of the invention, the size and the number of attachments of a mail to be sent are obtained; according to the size and the number of the attachments, the attachments are divided and compressed by a preset file size threshold value to generate a plurality of compressed files; combining the plurality of compressed files to obtain a plurality of compressed file groups; each compressed file group is respectively used as a mail attachment, a plurality of mails are generated and sent, so that the attachments can be divided and compressed into a plurality of attachments to be sent respectively.
In specific implementation, the size and the number of attachments of the mail to be sent are obtained first. After the size and the number of the attachments of the mail to be sent are obtained, the attachments are segmented and compressed according to the size and the number of the attachments and a preset file size threshold value, and a plurality of compressed files are generated.
In an embodiment, the method for generating a plurality of compressed files by dividing and compressing the attachment according to the size and the number of the attachments and using a preset file size threshold includes: dividing each attachment with the size larger than the preset file size threshold value into a plurality of files to be compressed with the size smaller than or equal to the preset file size threshold value; and compressing a plurality of files to be compressed with the size smaller than or equal to a preset file size threshold value to generate a plurality of compressed files.
In the above embodiment, based on the specified configuration, for example, according to the difference between the recipient mail domain and the recipient address, the attachment may be automatically divided and compressed according to the size and the number of the attachment and the preset file size threshold, so as to generate a plurality of compressed files. For example, if the size of a single attachment exceeds a preset file size threshold K, the attachment is divided and compressed into a plurality of compressed files, such as a plurality of zip split files.
In an embodiment, the method for generating a plurality of compressed files by dividing and compressing the attachment according to the size and the number of the attachments and using a preset file size threshold includes: calling a segmentation program, segmenting the attachments according to the sizes and the number of the attachments and a preset file size threshold value, and generating a plurality of files to be compressed; a plurality of files to be compressed are compressed by an LZ77 compression algorithm to generate a plurality of compressed files.
The compression algorithm (compression algorithm) refers to an algorithm for data compression, also commonly referred to as signal encoding in the electronic and communication fields, and includes two steps of compression and recovery (or decoding and encoding). While the LZ77 compression algorithm belongs to one of the compression algorithms, the LZ77 algorithm was invented by Lempel-Ziv in 1977, with many derivatives. The principle is basically the same, and regardless of the algorithm, the LZ77 algorithm always comprises a dynamic Window (Sliding Window) and a Read Ahead Buffer (Read Ahead Buffer).
In the above embodiment, the mail attachment is first intelligently analyzed, the size of the attachment is analyzed, and the number of attachments is identified. And then, according to the size and the number of the attachments, the attachments are divided and compressed by a preset file size threshold value to generate a plurality of compressed files. The compression processing method adopted by the embodiment of the invention can compress the divided attachments without distortion, is beneficial to carrying out data reconstruction on the compressed file in the subsequent steps and is beneficial to accurately restoring the data of the original attachment.
In specific implementation, the attachment is divided and compressed according to the size and the number of the attachment and a preset file size threshold value, a plurality of compressed files are generated, and then the plurality of compressed files are combined to obtain a plurality of compressed file groups.
In an embodiment, there are multiple methods for combining multiple compressed files to obtain multiple compressed file packets, for example, the methods may include: and combining the plurality of compressed files to obtain a plurality of compressed file groups under the condition that the total number of the compressed file groups is minimum and the size of each compressed file group does not exceed a preset file size threshold.
In the above embodiment, under the condition that the total number of compressed file packets is minimum and the size of each compressed file packet does not exceed the preset file size threshold, a plurality of compressed files are combined to obtain a plurality of compressed file packets. All compressed files are grouped. After receiving all zip split groups, the receiver can decompress the zip split groups by self to obtain a complete file.
In specific implementation, after a plurality of compressed files are combined to obtain a plurality of compressed file groups, each compressed file group is respectively used as a mail attachment to generate and send a plurality of mails.
In the embodiment, each compressed file group is respectively sent as a mail attachment, so that the problem of failure in mail sending caused by overlarge mail attachments is solved.
In specific implementation, the method for sending the email provided in the embodiment of the present invention may further include: after the size and the number of the attachments of the mail to be sent are obtained, if the size of each attachment does not exceed a preset file size threshold and the sum of the sizes of all the attachments does not exceed the preset file size threshold, the mail to be sent is directly sent.
In the embodiment, if there are multiple attachments in the mail to be sent, and the total size of the multiple attachments exceeds the preset file size threshold K, but the size of each attachment does not exceed the preset file size threshold K, the mail can be intelligently reassembled into multiple packets, and the size of each packet does not exceed the preset file size threshold K. Here multiple attachments can be placed in a group, not requiring a separate group for each attachment. The overall principle is to ensure that each packet meets the threshold requirement while ensuring as few partitions as possible.
In the embodiment, the division sending of each attachment with the size not exceeding the preset file size threshold K can be realized, and the problem of mail sending failure caused by overlarge mail attachments is also solved.
In specific implementation, the segmenting and compressing the attachment to generate a plurality of compressed files may include: generating an MD5 check code for each compressed file through an MD5 algorithm; storing the MD5 check code corresponding to each compressed file into the compressed file; combining the plurality of compressed files to obtain a plurality of compressed file groups may include: combining a plurality of compressed files carrying the same MD5 check code to obtain a plurality of compressed file groups; the compressed file packet carries the MD5 check code corresponding to the compressed file packet.
In the embodiment, a 128-bit (16-byte) hash value can be generated by using an MD5 Algorithm (Message-Digest Algorithm, a widely used cryptographic hash function) to ensure the integrity and consistency of information transmission, and ensure the integrity and consistency of information transmission of a plurality of compressed files after being divided. And combining a plurality of compressed files carrying the same MD5 check code to obtain a plurality of compressed file groups, wherein the compressed file groups can carry the MD5 check code corresponding to the compressed file groups.
In the above embodiment, the MD5 algorithm is used to generate the MD5 check code and store the check code in the compressed file, so that the integrity of the compressed file packet can be ensured in the subsequent decompression process, which is beneficial to complete transmission of the attachment.
As an example, as shown in fig. 2, a specific example of a method for sending a mail in the embodiment of the present invention may include the following steps:
1. after receiving the mail, the mail sending system acquires logic according to the size and the number of the attachments preset by the user and judges whether to start an automatic forwarding program. The preset attachment size and quantity obtaining logic can be set by a user according to the use requirement, and for example, the preset attachment size and quantity obtaining logic can include: recipient domain, recipient, file size threshold, etc.;
2. when a mail to be sent is sent, intelligent analysis can be carried out on the mail attachment, and whether the attachment needs to be segmented during sending is judged:
2.1, if the attachment does not need to be divided, directly forwarding the attachment according to the original mail;
2.2, if the attachments need to be segmented, firstly judging the size of each attachment, and if the size of each attachment is not larger than a preset file size threshold value K (namely the size of each attachment is less than K), turning to the step 3; if the size of any attachment is larger than K, calling a split compression program, applying an LZ77 algorithm, and splitting the attachment into a plurality of compressed files with the size smaller than or equal to K, such as zip split volumes; meanwhile, a check code is generated for each zip sub-volume through an MD5 algorithm, so that completeness and no tampering are guaranteed;
3. intelligently analyzing compressed files after being divided and compressed, intelligently combining different compressed files into a plurality of groups, and ensuring the minimum number of the groups of the compressed files on the premise of ensuring that the group size of each compressed file is less than or equal to K;
4. and grouping each compressed file to form a sub-mail respectively, and sending the sub-mails in the sequence after the compressed files are cut.
In the embodiment of the invention, the size and the number of attachments of a mail to be sent are obtained; according to the size and the number of the attachments, the attachments are divided and compressed by a preset file size threshold value to generate a plurality of compressed files; combining the plurality of compressed files to obtain a plurality of compressed file groups; each compressed file group is respectively used as a mail attachment, a plurality of mails are generated and sent, so that the attachments can be divided and compressed into a plurality of attachments to be sent respectively.
As described above, the embodiment of the invention can intelligently analyze the attachments in the mails, divide, compress, combine and send the attachments of the mails, and determine whether to divide or not and how to divide the attachments; with the MD5 algorithm for encryption, complete circulation of information is ensured. The embodiment of the invention can avoid the limitation of different recipients and recipient servers, thereby improving the communication effectiveness and improving the office automation and intellectualization.
The embodiment of the invention also provides a device for sending the mails, which is described in the following embodiment. Because the principle of solving the problem of the device is similar to the method of sending the mail, the implementation of the device can refer to the implementation of the method of sending the mail, and repeated details are not repeated.
Fig. 3 is a schematic structural diagram of an apparatus for sending a mail in an embodiment of the present invention, and as shown in fig. 3, the apparatus for sending a mail provided in an embodiment of the present invention may include:
an attachment obtaining module 301, configured to obtain the size and the number of attachments of a mail to be sent;
a compressed file generation module 302, configured to perform segmentation and compression processing on the attachments according to the sizes and the number of the attachments and according to a preset file size threshold, so as to generate a plurality of compressed files;
a grouping module 303, configured to combine the multiple compressed files to obtain multiple compressed file groups;
and a sending module 304, configured to generate and send a plurality of mails by using each compressed file packet as a mail attachment.
In an embodiment, the apparatus for sending a mail provided in the embodiment of the present invention may further include: a mail direct sending module for: after the size and the number of the attachments of the mail to be sent are obtained, if the size of each attachment does not exceed a preset file size threshold and the sum of the sizes of all the attachments does not exceed the preset file size threshold, the mail to be sent is directly sent.
In one embodiment, the compressed file generation module is specifically configured to: dividing each attachment with the size larger than the preset file size threshold value into a plurality of files to be compressed with the size smaller than or equal to the preset file size threshold value; and compressing a plurality of files to be compressed with the size smaller than or equal to a preset file size threshold value to generate a plurality of compressed files.
In one embodiment, the compressed file generation module is specifically configured to: calling a segmentation program, segmenting the attachments according to the sizes and the number of the attachments and a preset file size threshold value, and generating a plurality of files to be compressed; a plurality of files to be compressed are compressed by an LZ77 compression algorithm to generate a plurality of compressed files.
In one embodiment, the grouping module is specifically configured to: and combining the plurality of compressed files to obtain a plurality of compressed file groups under the condition that the total number of the compressed file groups is minimum and the size of each compressed file group does not exceed a preset file size threshold.
In one embodiment, the compressed file generation module is specifically configured to: generating an MD5 check code for each compressed file through an MD5 algorithm; storing the MD5 check code corresponding to each compressed file into the compressed file; a grouping module specifically configured to: combining a plurality of compressed files carrying the same MD5 check code to obtain a plurality of compressed file groups; the compressed file packet carries the MD5 check code corresponding to the compressed file packet.
Fig. 4 is a schematic flowchart of a method for receiving an email in an embodiment of the present invention, and as shown in fig. 4, the method for receiving an email provided in the embodiment of the present invention may include:
step 401: receiving a plurality of mails transmitted by the mail transmission method;
step 402: acquiring a plurality of attachments in a plurality of mails;
step 403: grouping a plurality of compressed files in a plurality of attachments, decompressing and merging to obtain merged attachments; the merged attachment is the original attachment that was not segmented and compressed.
In specific implementation, the method for receiving the email provided by the embodiment of the present invention may further include: acquiring MD5 check codes of a plurality of compressed file groups in a plurality of attachments; grouping a plurality of compressed files in a plurality of attachments, decompressing and merging to obtain merged attachments: and when the MD5 check codes of the multiple compressed file groups are successfully matched, decompressing and merging the multiple compressed file groups in the multiple attachments to obtain merged attachments.
In the embodiment, after receiving a plurality of mails sent by the mail sending method, the received sub-mails can be automatically combined, and the MD5 checks the codes to confirm that the data is correct.
In the embodiment, the multiple compressed files in the multiple attachments can be directly grouped without the intervention of a user, and the decompression and combination processing is carried out to obtain the original attachments which are not subjected to the segmentation and compression processing, so that the use experience of the user is optimized.
As an example, as shown in fig. 5, a specific example of a method for receiving a mail in the embodiment of the present invention may include the following steps:
1. after receiving the mail, if the mail receiving end uses the method for receiving the mail provided by the embodiment of the invention, the received multiple sub-mails can be automatically combined, and the data is confirmed to be correct by MD5 check codes;
2. if the mail receiving end does not use the method for receiving mails provided by the embodiment of the invention, a user can download all the attachments in a plurality of mails by self, and can obtain complete attachments after each compressed file group (such as a segmented zip packet) is decompressed by self.
In the embodiment of the invention, a plurality of mails sent by the mail sending method are received; acquiring a plurality of attachments in a plurality of mails; grouping a plurality of compressed files in a plurality of attachments, decompressing and merging to obtain merged attachments; compared with the prior art, the problem of mail receiving failure caused by overlarge mail attachments is solved, the limitation of different mail servers on the size of the mail attachments is broken through, the communication effectiveness is improved, the method can be adapted to different mail servers, and the applicability is improved.
The embodiment of the invention also provides a mail receiving device, which is described in the following embodiment. Because the principle of solving the problem of the device is similar to the method for receiving the mail, the implementation of the device can refer to the implementation of the method for receiving the mail, and repeated details are not repeated.
Fig. 6 is a schematic structural diagram of an apparatus for receiving mails in an embodiment of the present invention, and as shown in fig. 6, an apparatus for receiving mails in an embodiment of the present invention may include:
a mail receiving module 601, configured to receive multiple mails sent by the mail sending method;
an attachment obtaining module 602, configured to obtain multiple attachments in multiple mails;
a merge processing module 603, configured to perform decompression and merge processing on multiple compressed files in multiple attachments to obtain merged attachments; the combined attachment is the original attachment without being divided and compressed.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the method for sending and receiving the mails when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the above method for sending and receiving emails is stored in the computer-readable storage medium.
In the embodiment of the invention, the size and the number of attachments of a mail to be sent are obtained; according to the size and the number of the attachments, the attachments are divided and compressed by a preset file size threshold value to generate a plurality of compressed files; combining the plurality of compressed files to obtain a plurality of compressed file groups; each compressed file group is respectively used as a mail attachment, a plurality of mails are generated and sent, so that the attachments can be divided and compressed into a plurality of attachments to be sent respectively.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (12)

1. A method of mail transmission, comprising:
acquiring the size and the number of attachments of a mail to be sent;
according to the size and the number of the attachments, the attachments are divided and compressed by a preset file size threshold value to generate a plurality of compressed files;
combining the plurality of compressed files to obtain a plurality of compressed file groups;
and generating a plurality of mails by taking each compressed file group as a mail attachment and sending the mails.
2. The method of claim 1, further comprising: after the size and the number of the attachments of the mail to be sent are obtained, if the size of each attachment does not exceed a preset file size threshold and the sum of the sizes of all the attachments does not exceed the preset file size threshold, the mail to be sent is directly sent.
3. The method of claim 1, wherein the step of dividing and compressing the attachment according to the size and number of the attachment by a preset file size threshold to generate a plurality of compressed files comprises:
dividing each attachment with the size larger than the preset file size threshold value into a plurality of files to be compressed with the size smaller than or equal to the preset file size threshold value;
and compressing a plurality of files to be compressed with the size smaller than or equal to a preset file size threshold value to generate a plurality of compressed files.
4. The method of claim 1, wherein the step of dividing and compressing the attachment according to the size and number of the attachment by a preset file size threshold to generate a plurality of compressed files comprises:
calling a segmentation program, segmenting the attachments according to the sizes and the number of the attachments and a preset file size threshold value, and generating a plurality of files to be compressed;
a plurality of files to be compressed are compressed by an LZ77 compression algorithm to generate a plurality of compressed files.
5. The method of claim 1, wherein combining the plurality of compressed files to obtain a plurality of compressed file packets comprises:
and combining the plurality of compressed files to obtain a plurality of compressed file groups under the condition that the total number of the compressed file groups is minimum and the size of each compressed file group does not exceed a preset file size threshold.
6. The method of claim 1, wherein partitioning and compressing the attachment to generate a plurality of compressed files comprises: generating an MD5 check code for each compressed file through an MD5 algorithm; storing the MD5 check code corresponding to each compressed file into the compressed file;
combining the plurality of compressed files to obtain a plurality of compressed file groups, comprising: combining a plurality of compressed files carrying the same MD5 check code to obtain a plurality of compressed file groups; the compressed file packet carries an MD5 check code corresponding to the compressed file packet.
7. An apparatus for mail transmission, comprising:
the attachment acquisition module is used for acquiring the size and the number of attachments of the mail to be sent;
the compressed file generation module is used for carrying out segmentation and compression processing on the attachments according to the sizes and the number of the attachments and a preset file size threshold value to generate a plurality of compressed files;
the grouping module is used for combining the plurality of compressed files to obtain a plurality of compressed file groups;
and the sending module is used for generating a plurality of mails to be sent by taking each compressed file group as a mail attachment respectively.
8. A method of mail reception, applied to a mail transmitted by the method of any one of claims 1 to 6, comprising:
receiving a plurality of mails transmitted by the method of any of claims 1-6;
acquiring a plurality of attachments in a plurality of mails;
grouping a plurality of compressed files in a plurality of attachments, decompressing and merging to obtain merged attachments; the merged attachment is the original attachment that was not segmented and compressed.
9. The method of claim 8, further comprising: acquiring MD5 check codes of a plurality of compressed file groups in a plurality of attachments;
grouping a plurality of compressed files in a plurality of attachments, decompressing and merging to obtain merged attachments:
and when the MD5 check codes of the multiple compressed file groups are successfully matched, decompressing and merging the multiple compressed file groups in the multiple attachments to obtain merged attachments.
10. An apparatus for receiving a mail, applied to a mail transmitted by the method of any one of claims 1 to 6, comprising:
a mail receiving module for receiving a plurality of mails transmitted by the method of any one of claims 1 to 6;
the attachment acquisition module is used for acquiring a plurality of attachments in a plurality of mails;
the merging processing module is used for grouping a plurality of compressed files in a plurality of attachments, decompressing and merging the compressed files to obtain merged attachments; the combined attachment is the original attachment without being divided and compressed.
11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 6 and 8 to 9 when executing the computer program.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 6 and 8 to 9.
CN202011039202.9A 2020-09-28 2020-09-28 Method and device for sending and receiving mails Pending CN112134789A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011039202.9A CN112134789A (en) 2020-09-28 2020-09-28 Method and device for sending and receiving mails

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011039202.9A CN112134789A (en) 2020-09-28 2020-09-28 Method and device for sending and receiving mails

Publications (1)

Publication Number Publication Date
CN112134789A true CN112134789A (en) 2020-12-25

Family

ID=73840405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011039202.9A Pending CN112134789A (en) 2020-09-28 2020-09-28 Method and device for sending and receiving mails

Country Status (1)

Country Link
CN (1) CN112134789A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112600941A (en) * 2021-01-20 2021-04-02 广东金赋科技股份有限公司 Method, device and storage medium for automatically updating transmission data size optimization
CN113592461A (en) * 2021-08-10 2021-11-02 平安普惠企业管理有限公司 Mail processing method, device and storage medium
CN113645125A (en) * 2021-08-13 2021-11-12 江苏赛索飞生物科技有限公司 Fixed format mail automatic sending system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103532986A (en) * 2013-11-01 2014-01-22 深圳中兴网信科技有限公司 Terminal as well as server and file transmission system and method
WO2014066597A1 (en) * 2012-10-26 2014-05-01 Google Inc. Improving attachment handling during email delivery
CN104753856A (en) * 2013-12-26 2015-07-01 北京东方通科技股份有限公司 File receiving and sending method and system
CN104935493A (en) * 2014-03-18 2015-09-23 中国移动通信集团安徽有限公司 Method, device and system for transmitting mail
CN106656759A (en) * 2016-12-27 2017-05-10 维沃移动通信有限公司 Mail sending method, mail receiving method and mobile terminal
US20180219813A1 (en) * 2017-01-30 2018-08-02 Airwatch, Llc Handling of oversized email attachments
CN111414334A (en) * 2020-02-21 2020-07-14 平安科技(深圳)有限公司 File fragment uploading method, device, equipment and storage medium based on cloud technology

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014066597A1 (en) * 2012-10-26 2014-05-01 Google Inc. Improving attachment handling during email delivery
CN103532986A (en) * 2013-11-01 2014-01-22 深圳中兴网信科技有限公司 Terminal as well as server and file transmission system and method
CN104753856A (en) * 2013-12-26 2015-07-01 北京东方通科技股份有限公司 File receiving and sending method and system
CN104935493A (en) * 2014-03-18 2015-09-23 中国移动通信集团安徽有限公司 Method, device and system for transmitting mail
CN106656759A (en) * 2016-12-27 2017-05-10 维沃移动通信有限公司 Mail sending method, mail receiving method and mobile terminal
US20180219813A1 (en) * 2017-01-30 2018-08-02 Airwatch, Llc Handling of oversized email attachments
CN111414334A (en) * 2020-02-21 2020-07-14 平安科技(深圳)有限公司 File fragment uploading method, device, equipment and storage medium based on cloud technology

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112600941A (en) * 2021-01-20 2021-04-02 广东金赋科技股份有限公司 Method, device and storage medium for automatically updating transmission data size optimization
CN112600941B (en) * 2021-01-20 2023-04-18 广东金赋科技股份有限公司 Method, device and storage medium for automatically updating transmission data size optimization
CN113592461A (en) * 2021-08-10 2021-11-02 平安普惠企业管理有限公司 Mail processing method, device and storage medium
CN113645125A (en) * 2021-08-13 2021-11-12 江苏赛索飞生物科技有限公司 Fixed format mail automatic sending system

Similar Documents

Publication Publication Date Title
CN112134789A (en) Method and device for sending and receiving mails
CN108134775B (en) Data processing method and equipment
CN101552652A (en) A document transmission method and transmission device
CN112399479B (en) Method, electronic device and storage medium for data transmission
CN106453249B (en) network mail service monitoring method
CN112437060B (en) Data transmission method and device, computer equipment and storage medium
US20130262601A1 (en) Method and device for sending and receiving emails
CN101902701B (en) Mail relay device
CN108833443B (en) Message transmission method and system and computer equipment
CN111464635B (en) Dictionary index transmission method and device
CN108737353B (en) Data encryption method and device based on data analysis system
US20120005280A1 (en) Message thread management using dynamic pointers
CN104683213A (en) A mail sending method and device
CN103020157A (en) High-reliability real-time file generation method spanning physical isolation
CN105262491A (en) Data compression method, data compression system, data decompression method, data decompression system and communication equipment
CN115022275B (en) Distributed mail circulation method, device, system, equipment and storage medium
CA2535282A1 (en) A method and system for message thread compression
CN111355793A (en) Large file uploading method based on HTML5 and Python
CN115757624A (en) Data processing method and device, electronic equipment and storage medium
CN114070801A (en) Message processing method, message transmission method, device and electronic equipment
CN105574053B (en) The compression method and device of FPGA configuration file
CN115190182B (en) Data lossless compression method, device and equipment suitable for Beidou system
CN102891732A (en) Data sending method and device and data receiving method and device
CN104935493A (en) Method, device and system for transmitting mail
CN111865756A (en) Qt-based cross-multi-platform instant messaging method and system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201225