Mail attachment sending method and electronic equipment

By calculating the optimal shard size of mail attachments based on network and device performance and uploading them in pieces, the problem of slow attachment upload speed affecting email efficiency is solved, and the effect of improving email sending efficiency is achieved.

CN119254739AInactive Publication Date: 2025-01-03BEIJING EETRUST TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411756507.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-01-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When sending emails, larger attachments are uploaded to the server slowly, which affects the efficiency of sending emails. The existing technology has not effectively solved this problem.

Method used

After receiving the upload command, calculate the optimal shard size of the mail attachment based on network performance and device performance, and upload it to the server. Considerations include network speed, network stability, CPU usage, memory usage, and I /O performance and determine the weight based on these factors to calculate the optimal shard size.

Benefits of technology

It improves the speed of uploading mail attachments to the server, thereby improving the efficiency of sending mails, and solving the problem that slow attachment upload speed affects mail efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254739A_ABST
    Figure CN119254739A_ABST
Patent Text Reader

Abstract

The invention relates to a mail attachment sending method and electronic equipment. The method comprises the following steps: receiving a first instruction for uploading a mail attachment to a server; in response to the first instruction, calculating the optimal fragmentation size for fragmenting the mail attachment according to the network performance and the performance of the equipment for operating the mail client; and fragmenting the email attachments according to the optimal fragmentation size, and uploading the fragmented email attachments to a server in sequence. The technical problem that the mail sending efficiency is affected due to the fact that the mail attachment is large and the speed of uploading the attachment to the server is slow is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a method for sending an email attachment and an electronic device. Background Art

[0002] When sending an email, you sometimes need to add an attachment. When the attached file is large, the speed of uploading the attachment to the server will be slow, which will affect the efficiency of sending the email.

[0003] To address the above problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a method for sending an email attachment and an electronic device, which at least solves the problem that the speed of uploading the attachment to the server is slow due to the large size of the email attachment, thereby affecting the efficiency of email sending.

[0005] According to one aspect of an embodiment of the present application, a method for sending an email attachment is provided, including: receiving a first instruction to upload an email attachment to a server; in response to the first instruction, calculating an optimal fragment size for fragmenting the email attachment based on network performance and performance of a device running an email client; fragmenting the email attachment according to the optimal fragment size, and uploading the fragmented email attachment to the server in sequence.

[0006] Optionally, the optimal fragment size for fragmenting the email attachment is calculated based on the network performance and the performance of the device running the email client, including: determining factors that affect the fragment size when fragmenting the email attachment based on the network performance and the performance of the device running the email client, wherein the factors include at least: network speed, network stability, CPU usage of the device, memory usage of the device, and I / O performance of the device; determining the weight of each factor; and calculating the optimal fragment size based on the weight of each factor.

[0007] Optionally, the weight of each factor is determined, including: when the indicators used to characterize the network speed, network stability, the CPU usage of the device, the memory usage of the device, and the I / O performance of the device meet preset conditions, corresponding weights are assigned to the network speed, network stability, the CPU usage of the device, the memory usage of the device, and the I / O performance of the device, respectively.

[0008] Optionally, the optimal fragment size is calculated according to the weight of each factor, including: summing the weight of each factor to obtain a weighted score; and calculating the optimal fragment size according to the weighted score and the size of the email attachment.

[0009] Optionally, before slicing the email attachment according to the optimal slice size, the method further includes: determining the maximum number of slices for slicing the email attachment according to the processing capacity of the server and the network bandwidth; if the email attachment is sliced ​​according to the optimal slice size and the determined number of slices exceeds the maximum number of slices, then slicing the email attachment according to the maximum number of slices.

[0010] Optionally, before receiving a first instruction to upload an email attachment to a server, the method further includes: receiving a second instruction to add an email attachment; in response to the second instruction, storing the email attachment in a virtualized storage area of ​​the email client; encrypting the email attachment in the virtualized storage area, and performing process protection on the email attachment.

[0011] Optionally, process protection is performed on email attachments, including: detecting through the file system of the operating system whether the process performing read and write operations on the email attachments in the virtualized storage area is a process of the email client; if it is a process of the email client, allowing the process to perform read and write operations on the email attachments in the virtualized storage area; if it is not a process of the email client, denying the process from performing read and write operations on the email attachments in the virtualized storage area.

[0012] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including: a processor, and a memory storing a program, wherein the program includes instructions, and when the instructions are executed by the processor, the processor executes the above method.

[0013] According to another aspect of an embodiment of the present application, a non-transitory machine-readable medium storing computer instructions is also provided, where the computer instructions are used to enable a computer to execute the above method.

[0014] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, which is used to enable the computer to execute the above method when the computer program is executed by a processor of the computer.

[0015] Beneficial effects of the embodiments of the present application: In an embodiment of the present application, a first instruction to upload an email attachment to a server is received; in response to the first instruction, an optimal fragment size for fragmenting the email attachment is calculated according to network performance and the performance of a device running the email client; the email attachment is fragmented according to the optimal fragment size, and the fragmented email attachments are uploaded to the server in sequence. By fragmenting the email attachment according to network performance and the performance of a device running the email client, and then uploading the email attachment fragments to the server, the purpose of increasing the speed of uploading email attachments to the server is achieved, thereby achieving the technical effect of improving the efficiency of sending emails, and further solving the technical problem that the speed of uploading the attachments to the server is slow due to the large size of the email attachments, thereby affecting the efficiency of sending emails.

[0016] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can be obtained based on these drawings without creative work.

[0018] Figure 1 is a flow chart of a method for sending an email attachment according to an embodiment of the present application; Figure 2 It is a flow chart of a method for calculating an optimal fragment size for fragmenting an email attachment according to an embodiment of the present application; Figure 3 It is a structural block diagram of a device for sending an email attachment according to an embodiment of the present application; Figure 4 Schematic diagram of the structure of the electronic device of this embodiment. DETAILED DESCRIPTION

[0019] Embodiments of the present embodiment will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present embodiment are shown in the accompanying drawings, it should be understood that the present embodiment can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein, which are instead provided for a more thorough and complete understanding of the present embodiment. It should be understood that the drawings and embodiments of the present embodiment are only for exemplary purposes and are not intended to limit the scope of protection of the present embodiment.

[0020] In the related art, when sending an email, if the attached attachment is large, the speed of uploading the attachment to the server will be slow, thereby affecting the efficiency of sending the email. In order to solve this problem, the embodiment of the present application provides a relevant solution, which is described in detail below.

[0021] Figure 1 is a flow chart of a method for sending an email attachment according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps: Step S102: receiving a first instruction to upload an email attachment to a server.

[0022] In this step, the user selects the attachment to be uploaded in the mail client, and then clicks the "Upload Attachment" button to trigger the upload process. When the user clicks the "Upload Attachment" button, the above-mentioned first instruction is generated.

[0023] Step S104, in response to the first instruction, calculating the optimal fragment size for fragmenting the email attachment according to the network performance and the performance of the device running the email client.

[0024] After receiving the first instruction, the email client performs intelligent analysis based on the current network speed and device performance, and reasonably calculates the optimal fragment size based on the size of the current email attachment.

[0025] Step S106, segmenting the email attachment according to the optimal segment size, and uploading the segmented email attachment to the server in sequence.

[0026] When executing step S106, the email client segments the email attachment according to the optimal segment size calculated in step S104 and uploads the segments to the server.

[0027] The above-mentioned scheme provided in the embodiment of the present application segments the email attachments according to the network performance and the performance of the device running the email client, and then uploads the email attachment segments to the server, thereby achieving the purpose of increasing the speed of uploading email attachments to the server, thereby realizing the technical effect of improving the efficiency of email sending.

[0028] Figure 2 is a flow chart of a method for calculating an optimal fragment size for fragmenting an email attachment according to an embodiment of the present application. Figure 2 As shown, the following steps are included: Step S10401, determining factors affecting the fragment size when fragmenting the email attachment based on network performance and the performance of the device running the email client, wherein the factors include at least: network speed, network stability, device CPU usage, device memory usage, and device I / O performance.

[0029] When designing a strategy for uploading large attachments in pieces, in addition to considering network speed, central processing unit (CPU), and memory usage, you can also consider factors such as network stability and I / O performance. These factors together affect the size of the pieces, and thus affect the upload efficiency and success rate of the attachment.

[0030] Network stability refers to the quality of the network's ability to continuously provide the expected service within a given period of time, which is critical to ensuring the reliability of data transmission. Indicators for measuring network stability can be considered from multiple perspectives, including but not limited to the following aspects: Packet Loss: refers to the ratio of the number of data packets lost during network transmission to the total number of data packets sent.

[0031] Latency: The time required to transmit data from one point to another.

[0032] Jitter: refers to the difference in the arrival time of data packets.

[0033] Throughput: The amount of data successfully transmitted per unit time.

[0034] Error Rate: The ratio of the number of erroneous data bits to the total number of transmitted bits during data transmission.

[0035] Input / Output (I / O) performance refers to the speed and efficiency with which a computer system processes data input and output operations. This includes processes such as reading or writing data from a storage device, sending or receiving data over a network, etc. Good I / O performance is critical to improving application responsiveness, reducing latency, and ensuring overall system performance. The main indicators for measuring I / O performance are as follows: Throughput: The total amount of data that can be transmitted per unit time, usually expressed in megabytes per second (MB / s) or kilobytes per second (KB / s).

[0036] Latency: The time it takes from initiating an I / O request to receiving a response.

[0037] IOPS (Input / Output Operations Per Second): is the number of I / O operations that can be performed per second.

[0038] Bandwidth: The maximum amount of data that can be transmitted over a communication path within a specific time interval.

[0039] Bandwidth limits the maximum possible throughput.

[0040] Concurrency: Measures the system's ability to handle multiple I / O requests simultaneously.

[0041] Queue Depth: In some cases, especially when using SSDs, queue depth can affect I / O performance. A higher queue depth allows more commands to be buffered and waiting to be executed, thereby optimizing overall performance.

[0042] The following describes how the above factors affect the size of the attachment fragment: When the network speed is fast, you can choose a larger fragment size to reduce the number of transmissions and improve efficiency. When the network speed is slow, you should choose a smaller fragment size to reduce the risk of a single transmission failure.

[0043] When network stability is poor, a smaller shard size should be chosen so that only a small portion of the data needs to be re-uploaded when the network is interrupted.

[0044] When CPU usage is high, a smaller shard size should be selected to avoid excessive CPU usage.

[0045] When memory usage is high, a smaller shard size should be chosen to avoid memory overflow.

[0046] When I / O performance is poor, a smaller shard size should be selected to avoid I / O bottlenecks.

[0047] Step S10402, determine the weight of each factor.

[0048] In an embodiment of the present application, before calculating the optimal shard size, a weight needs to be assigned to each factor.

[0049] As some optional embodiments of the present application, the weights of various factors are determined by the following method: when the indicators used to characterize the network speed, network stability, the CPU utilization rate of the device, the memory utilization rate of the device, and the I / O performance of the device meet the preset conditions, corresponding weights are assigned to the network speed, network stability, the CPU utilization rate of the device, the memory utilization rate of the device, and the I / O performance of the device, respectively.

[0050] As mentioned above, factors that affect the size of shards include network speed, network stability, CPU usage, memory usage, and I / O performance. Assign weights to each factor, and then calculate the optimal shard size based on the assigned weights. The weights of these factors are 0.4, 0.2, 0.2, 0.1, and 0.1, respectively.

[0051] When actually calculating the optimal shard size, weights are assigned to the corresponding factors only when the indicators used to characterize each factor meet the preset conditions. For example, when the network speed is higher than the preset threshold, it is assigned a weight of 0.4. When the indicator characterizing network stability (such as packet loss rate) is lower than the preset threshold, a weight of 0.2 is assigned to network stability. When the CPU usage is lower than the preset threshold, it is assigned a weight of 0.2. When the memory usage is lower than the preset threshold, it is assigned a weight of 0.1. When the indicator characterizing I / O performance (such as throughput) is higher than the preset threshold, it is assigned a weight of 0.1.

[0052] Step S10403, calculating the optimal shard size according to the weights of various factors.

[0053] According to an optional embodiment of the present application, the optimal fragment size is calculated according to the weight of each factor, which is achieved by the following method: summing the weight of each factor to obtain a weighted score; and calculating the optimal fragment size according to the weighted score and the size of the email attachment.

[0054] In the embodiment of the present application, when calculating the optimal fragment size, the weights assigned to each factor are added together to obtain a weighted score, and then the optimal fragment size is calculated based on the weighted score and the total size of the email attachments.

[0055] For example, suppose an email attachment (size 15MB) is uploaded, and the weights of the factors affecting the fragment size (network speed, network stability, CPU usage, memory usage, and I / O performance) are 0.4, 0.2, 0.2, 0.1, and 0.1 respectively. Based on the current system and network conditions, the calculated weighted score is 0.8 (for example, the network stability does not meet the requirements, and no weight is assigned to the factor of network stability). Then the optimal fragment size can be calculated by the following formula: Optimal shard size = (weighted score / sum of weights) * total attachment size = (0.8 / 1.0) *15MB = 12MB The above calculations show that under the current system and network conditions, dividing large attachments into 12MB fragments may be the best option.

[0056] In some optional embodiments of the present application, before executing step S106 to fragment the email attachment according to the optimal fragment size, the above method also includes: determining the maximum number of fragments for fragmenting the email attachment according to the processing capacity of the server and the network bandwidth; if the email attachment is fragmented according to the optimal fragment size and the determined number of fragments exceeds the maximum number of fragments, then fragmenting the email attachment according to the maximum number of fragments.

[0057] In an optional embodiment of the present application, the maximum number of fragments can also be determined according to the processing capacity of the server and the network bandwidth limitation. The maximum number of fragments limits the number of fragments uploaded at the same time, affecting the concurrent upload capability.

[0058] The measurement of server processing power usually involves multiple dimensions, including CPU performance, memory capacity and speed, and storage I / O performance.

[0059] Network bandwidth refers to the maximum amount of data that can be transmitted over a network connection in a unit of time, usually measured in bits per second (bps). More common units include kilobits per second (Kbps), megabits per second (Mbps), and gigabits per second (Gbps).

[0060] When sharding email attachments, taking the maximum number of shards into account can ensure that the attachment upload process does not exceed the server's processing capacity. The optimal number of shards can be adjusted through experiments to achieve efficient data transmission.

[0061] For an email attachment, if the number of fragments determined by the method for calculating the optimal fragment size mentioned above is A, and the maximum number of fragments for fragmenting the email attachment is B according to the processing capacity of the server and the network bandwidth, and A>B, the email attachment should be fragmented based on the maximum number of fragments B. This solution can prevent the number of fragments from exceeding the maximum allowed number of fragments, exceeding the processing capacity of the server, and thus affecting the upload of the attachment.

[0062] According to an optional embodiment of the present application, before executing step S102 to receive a first instruction to upload an email attachment to a server, it is also necessary to receive a second instruction to add an email attachment; in response to the second instruction, the email attachment is stored in a virtualized storage area of ​​the email client; the email attachment is encrypted in the virtualized storage area, and the email attachment is process protected.

[0063] In this embodiment, the user selects the attachment to be added, and then clicks the "Add Attachment" button to trigger the attachment adding process. When the user clicks the "Add Attachment" button, the above second instruction is generated.

[0064] After receiving the second instruction, the email client copies the attachment to the virtualized storage area of ​​the email client, isolates and protects the email attachment, and avoids interruption caused by accidental deletion during the sending process.

[0065] As an optional embodiment of the present application, sandbox technology can be used to isolate and protect email attachments. Sandbox technology is a security mechanism for running code or programs in an isolated environment. This environment is separate from the rest of the host system, so even if malicious activities occur in the sandbox, it will not affect the rest of the system. Sandbox technology is widely used in many fields, including network security, software development and testing, etc.

[0066] The sandbox creates a virtualized environment where you can control the allocation of resources such as memory, CPU time, and network connections. Strict permission management is imposed on programs within the sandbox, such as not allowing modification of system settings or access to sensitive information. All actions that occur within the sandbox are recorded, and anomalies can be detected in real time. When a task is completed, the sandbox state can be quickly reset to the initial configuration to prepare for the next task.

[0067] In conclusion, sandbox technology is a very effective tool that helps improve the overall security of the system and allows for more flexibility in dealing with unknown risk factors.

[0068] In addition, after the email attachment is copied to the virtualized storage area of ​​the email client, the email attachment can also be encrypted and protected to prevent content leakage.

[0069] Encrypting email attachments is an important way to protect sensitive information and ensure that only authorized recipients can access the contents of the attachments. Some common encryption algorithms include AES symmetric encryption algorithm, RSA asymmetric encryption algorithm, and hybrid encryption algorithm (combining the advantages of symmetric and asymmetric encryption, usually using asymmetric encryption to securely exchange symmetric encryption keys, and then using symmetric encryption to encrypt the actual data).

[0070] In some optional embodiments of the present application, in order to improve the security of email attachments, the attachments may also be protected from malicious modifications by third-party malicious programs.

[0071] According to an optional embodiment of the present application, process protection for email attachments includes the following steps: detecting through the file system of the operating system whether the process that performs read and write operations on the email attachments in the virtualized storage area is a process of the email client; if it is a process of the email client, allowing the process to perform read and write operations on the email attachments in the virtualized storage area; if it is not a process of the email client, denying the process from performing read and write operations on the email attachments in the virtualized storage area.

[0072] An advanced security measure is to protect email attachments through processes and restrict access rights through the operating system's file system driver monitoring. This mechanism ensures that only specific processes (such as email clients) can access files stored in the virtualized area, while other programs are blocked.

[0073] In an embodiment of the present application, a custom file system filter driver can be developed, which can intercept and check all file access requests to the specified virtualized storage area. Only processes from the mail client can obtain access rights. At the same time, a whitelist of processes allowed to access is maintained in the driver, and only processes included in the whitelist can read and write protected files.

[0074] Through the above method, high-level protection of email attachments can be achieved to ensure that only the email client process can access the files in the virtualized storage area.

[0075] The above technical solution provided in the embodiment of the present application solves the security problem before uploading the email attachment. Before uploading the email attachment to the server, it reasonably calculates the size of the attachment fragments and uploads them in segments based on the current network and terminal performance, which greatly improves the efficiency of uploading the attachment.

[0076] Based on the above-mentioned method for sending an email attachment provided in the embodiment of the present application, the embodiment of the present application also provides a device for sending an email attachment, such as Figure 3 As shown, the device comprises: The receiving module 30 is configured to receive a first instruction to upload an email attachment to a server.

[0077] The response module 32 is configured to respond to the first instruction and calculate the optimal fragment size for fragmenting the email attachment according to the network performance and the performance of the device running the email client.

[0078] The processing module 34 is configured to segment the email attachment according to the optimal segment size, and upload the segmented email attachment to the server in sequence.

[0079] The above-mentioned email attachment sending device provided in the embodiment of the present application achieves the purpose of increasing the speed of uploading email attachments to the server by segmenting the email attachments according to the network performance and the performance of the device running the email client, and then uploading the email attachment segments to the server, thereby achieving the technical effect of improving the efficiency of email sending.

[0080] It should be noted that Figure 3 The preferred implementation of the embodiment shown can be referred to Figure 1 The relevant description of the illustrated embodiment will not be repeated here.

[0081] The embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program executable by the at least one processor, and the computer program is used to enable the electronic device to perform the method of the embodiment of the present application when executed by the at least one processor.

[0082] An embodiment of the present application also provides a non-transitory machine-readable medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to execute the method of the embodiment of the present application.

[0083] The embodiment of the present application also provides a computer program product, including a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to execute the method of the embodiment of the present application.

[0084] refer to Figure 4, the structural block diagram of the electronic device that can be used as the server or client of the embodiment of the present application will now be described, which is an example of the hardware device that can be applied to various aspects of the present application. The electronic device is intended to represent various forms of digital electronic computer equipment, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples, and are not intended to limit the implementation of the present application described and / or required herein.

[0085] like Figure 4 As shown, the electronic device includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 to a random access memory (RAM) 403. In RAM 403, various programs and data required for the operation of the electronic device can also be stored. The computing unit 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0086] Multiple components in the electronic device are connected to the I / O interface 405, including: an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. The input unit 406 can be any type of device that can input information to the electronic device, and the input unit 406 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device. The output unit 407 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 408 can include but is not limited to a disk, an optical disk. The communication unit 409 allows the electronic device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0087] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a CPU, a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above. For example, in some embodiments, the method embodiments of the present application may be implemented as a computer program, which is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on an electronic device via ROM 402 and / or communication unit 409. In some embodiments, the computing unit 401 may be configured to perform the above method in any other appropriate manner (e.g., by means of firmware).

[0088] The computer program for implementing the method of the embodiment of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0089] In the context of the embodiments of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable signal medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, or infrared system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0090] It should be noted that the term "including" and its variations used in the embodiments of the present application are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". The modifications of "one" and "multiple" mentioned in the embodiments of the present application are illustrative and not restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0091] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0092] The various steps described in the method implementation methods provided in the embodiments of the present application can be performed in different orders and / or in parallel. In addition, the method implementation methods may include additional steps and / or omit the steps shown. The scope of protection of the present application is not limited in this respect.

[0093] The term "embodiment" in this specification refers to specific features, structures or characteristics described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. The various embodiments in this specification are described in a related manner, and the same or similar parts between the various embodiments refer to each other. In particular, for the device, equipment, and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts refer to the partial description of the method embodiment.

[0094] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A method for sending an email attachment, characterized in that: include: receiving a first instruction to upload an email attachment to a server; In response to the first instruction, calculating an optimal fragment size for fragmenting the email attachment according to network performance and performance of a device running the email client; The mail attachment is segmented according to the optimal segment size, and the segmented mail attachment is uploaded to the server in sequence.

2. The method according to claim 1, characterized in that The optimal fragment size for fragmenting the email attachment is calculated according to the network performance and the performance of the device running the email client, including: Determining factors affecting the size of fragments when fragmenting the email attachment according to network performance and performance of a device running the email client, wherein the factors at least include: network speed, network stability, CPU usage of the device, memory usage of the device, and I / O performance of the device; Determining the weight of each of the factors described; The optimal shard size is calculated according to the weights of the various factors.

3. The method according to claim 2, characterized in that Determine the weight of each of the factors described, including: When the indicators used to characterize the network speed, the network stability, the CPU usage of the device, the memory usage of the device and the I / O performance of the device meet the preset conditions, corresponding weights are assigned to the network speed, the network stability, the CPU usage of the device, the memory usage of the device and the I / O performance of the device respectively.

4. The method according to claim 2, characterized in that: The optimal shard size is calculated according to the weight of each of the factors, including: The weights of the various factors are summed up to obtain a weighted score; The optimal fragment size is calculated according to the weighted score and the size of the mail attachment.

5. The method according to claim 1, characterized in that Before fragmenting the mail attachment according to the optimal fragment size, the method further includes: Determining the maximum number of fragments for fragmenting the email attachment according to the processing capacity of the server and the network bandwidth; If the email attachment is fragmented according to the optimal fragment size and the determined number of fragments exceeds the maximum number of fragments, the email attachment is fragmented according to the maximum number of fragments.

6. The method according to claim 1, characterized in that Before receiving the first instruction to upload the email attachment to the server, the method further includes: Receiving a second instruction to add the email attachment; In response to the second instruction, storing the email attachment in a virtualized storage area of ​​the email client; The mail attachment is encrypted in the virtualized storage area, and process protection is performed on the mail attachment.

7. The method according to claim 6, characterized in that Process protection is performed on the email attachment, including: Detecting, through the file system of the operating system, whether the process performing the read and write operations on the email attachment in the virtualized storage area is the process of the email client; If it is a process of the mail client, allowing the process to perform read and write operations on the mail attachments in the virtualized storage area; If it is not the process of the mail client, the process is denied to perform read and write operations on the mail attachment in the virtualized storage area.

8. An electronic device, comprising: A processor and a memory storing a program, wherein the program comprises instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 7.

9. A non-transitory machine-readable medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor of a computer, the computer is used to cause the computer to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • A method for transferring specified file or directory structure

    CN111198844A

  • File uploading method and device, equipment and storage medium

    CN115987965A

  • File uploading method and computer equipment

    CN117857536A

  • Method and system for securing of e-mail data

    KR1020090123651A