WO2021129228A1 - E-mail sending method and apparatus - Google Patents

E-mail sending method and apparatus Download PDF

Info

Publication number
WO2021129228A1
WO2021129228A1 PCT/CN2020/129122 CN2020129122W WO2021129228A1 WO 2021129228 A1 WO2021129228 A1 WO 2021129228A1 CN 2020129122 W CN2020129122 W CN 2020129122W WO 2021129228 A1 WO2021129228 A1 WO 2021129228A1
Authority
WO
WIPO (PCT)
Prior art keywords
sent
network interface
network
emails
sending
Prior art date
Application number
PCT/CN2020/129122
Other languages
French (fr)
Chinese (zh)
Inventor
何舢
卢道和
杨军
陈广胜
Original Assignee
深圳前海微众银行股份有限公司
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 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2021129228A1 publication Critical patent/WO2021129228A1/en

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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Definitions

  • the present invention relates to the field of communications, in particular to a method and device for sending emails.
  • this establishment method has problems such as high maintenance cost and low connection efficiency.
  • the prior art generally reduces costs by renting a third-party mail server and the third-party mail server completes the mail sending work.
  • the user only needs to select an interface from the interface provided by the third-party mail server every time an email is sent. After the client establishes a connection with the interface, the user can send the outgoing email to The third-party mail server, in turn, the third-party mail server performs subsequent sending work.
  • the sending work is performed according to the above method, if the sending email account is different each time, the connection between the client and the interface will also be closed after each email is sent. Therefore, when using the new sending email account to send emails Sometimes the connection needs to be established again. It can be seen that the above method has the technical problem of low mail sending efficiency.
  • the invention provides a method and device for sending emails, which are used to improve the efficiency of sending emails.
  • the present invention provides an email sending method, which includes: the client first determines the Simple Mail Transfer Protocol (SMTP) long connection pool corresponding to the sending email account in the email to be sent , And then obtain the historical sending information of the sent emails within the first set time period before the current time, and then determine from the N network interfaces of the M network operators according to the historical sending information of the sent emails The target network interface of the target network operator corresponding to the sending email account, so that the client can send the to-be-sent email to the SMTP server through the long connection on the target network interface of the target network operator.
  • the SMTP persistent connection pool includes K persistent connections of N network interfaces of M network operators, and sent emails correspond to different persistent connections of different network interfaces of different network operators.
  • M, N, and K are all positive integers greater than or equal to 1.
  • the above design first establishes a long connection between the server and the client, and then calculates the available probability of each interface according to the historical sending information of the sent emails, that is, the information of the email sending records, and then selects the interface according to the probability.
  • the e-mail is sent to the server through the connection of this interface, and finally the server completes the follow-up work.
  • the technical solution can overcome the problems existing in the prior art, help improve the efficiency of e-mail sending, and make the interface selection strategy more flexible.
  • the historical sending information of sent emails may include the number of sent emails under N network interfaces of M network operators, the indication information of whether the sent emails were sent successfully, and The time it takes for the sent email to complete sending.
  • the client determines the target network interface of the target network operator corresponding to the sending mailbox account from the N network interfaces of the M network operators according to the historical sending information of the sent emails, including: For any network interface of any network operator, the client can firstly according to the number of sent emails under each interface of each network operator, the indication information of whether the sent emails are sent successfully, and the sent electronic The time required for the mail to be sent, the available probability of the network interface is calculated, and then the target network interface of the target network operator corresponding to the sending mailbox account is determined according to the available probability of the N network interfaces of the M network operators .
  • the client can calculate the historical sending information of the sent emails corresponding to each interface (that is, the number of sent emails, whether it is successful, the time taken to complete the sending, etc.) to
  • the client can first calculate the weight value of the network interface according to the following formula 1, and then calculate the weight value according to the following formula 2.
  • Availability probability of network interface :
  • Weight value
  • Available probability weight value of the network interface/sum of the weight value of the N network interfaces of the M network operators..........Formula 2.
  • a is the number of e-mails sent successfully by the network interface within the first set duration and the time-consuming period falls within the period 1;
  • b is the number of emails sent successfully by the network interface within the first set duration and the time-consuming The number of e-mails sent in period 2;
  • c is the number of e-mails sent successfully by the network interface within the first set time period and time-consuming in period 3;
  • d is the number of e-mails that the network interface is in the first setting The number of e-mails that have been sent successfully within a certain period of time and the time-consuming exceeds the set threshold;
  • e is the number of e-mails that have failed to be sent by the network interface within the first set period of time.
  • K 1 is the weight corresponding to the duration interval one
  • K 2 is the weight corresponding to the duration interval two
  • K 3 is the weight corresponding to the duration interval three
  • K 4 is the weight corresponding to the duration interval three
  • K 5 is to set the first constant
  • C is to set the second constant.
  • the above design further introduces how the client calculates the available probability corresponding to each network interface according to the above formula 1 and formula 2. This design can ensure the flexibility of selecting the network interface and also has the advantages of simplicity and feasibility.
  • the client determines that the first network interface of the first network operator has not sent emails within the second set period of time according to the historical sending information of the sent emails, and determines the first network operator
  • the first network interface of is the target network interface of the target network operator corresponding to the sending email account.
  • the first network interface of the first network operator is one of the N network interfaces of M network operators.
  • the client can improve the network interface selection strategy, and then give priority to the interface that has not sent emails for a long time to send emails, which helps to prevent the interface from being used by a third-party mail server because it has not been used for a long time. That is, the SMTP server is disconnected.
  • This design can make the technical scheme of the present invention more perfect and more flexible.
  • the client determines that no email is sent within the third set time period, it closes the persistent connection in the SMTP persistent connection pool.
  • the present invention provides an e-mail sending device.
  • the technical effects of the device can be referred to the above method embodiments.
  • the device includes: a processing unit for determining the SMTP corresponding to the sending email account in the email to be sent
  • the long connection pool obtains the historical sending information of the sent emails within the first set time before the current moment, and according to the historical sending information of the sent emails, from the N network interfaces of M network operators, Determine the target network interface of the target network operator corresponding to the sending email account.
  • the sending unit is used to send to the SMTP server the to-be-sent emails related to the sending mailbox account through the persistent connection on the target network interface of the target network operator.
  • the SMTP persistent connection pool includes K persistent connections of N network interfaces of M network operators, and sent emails correspond to different persistent connections of different network interfaces of different network operators.
  • M, N, and K are all positive integers greater than or equal to 1.
  • the historical sending information of sent emails includes: the number of sent emails under N network interfaces of M network operators, indication information about whether the sent emails are sent successfully, and The time it takes for the sent email to complete sending.
  • the processing unit can also target any network interface of any network operator, according to the number of sent emails under each interface of each network operator, and whether the sent emails are sent successfully.
  • the instruction information and the time required to complete the sending of the sent e-mail are calculated, the available probability of the network interface is calculated, and then the available probability of the N network interface of the M network operators is determined to determine the target network operator's corresponding to the sending mailbox account Target network interface.
  • the processing unit may be directed to any network interface of any network operator, according to the number of sent emails under each interface of each network operator, and whether the sent emails are sent or not.
  • the time required for successful and sent emails to be sent calculate the available probability of the network interface, and determine the target network interface of the target network operator corresponding to the sending mailbox account according to the available probability of the N network interfaces of the M network operators .
  • the processing unit can calculate the weight value of the network interface according to the following formula 1 for any network interface of any network operator, and then calculate the usable probability of the network interface according to the following formula 2 according to the weight value :
  • Weight value
  • Available probability the weight value of the network interface/the sum of the weight values of the N network interfaces of the M network operators..........Formula 2;
  • a is the number of e-mails sent successfully by the network interface within the first set duration and the time-consuming period falls within the period 1;
  • b is the number of e-mails sent successfully by the network interface within the first set duration and the time-consuming The number of e-mails sent in period 2;
  • c is the number of e-mails sent successfully by the network interface within the first set time period and time-consuming in period 3;
  • d is the number of e-mails that the network interface is in the first setting The number of e-mails that have been sent successfully within a certain period of time and the time-consuming exceeds the set threshold;
  • e is the number of e-mails that have failed to be sent by the network interface within the first set period of time.
  • K 1 is the weight corresponding to the duration interval one
  • K 2 is the weight corresponding to the duration interval two
  • K 3 is the weight corresponding to the duration interval three
  • K 4 is the weight corresponding to the duration interval three
  • K 5 is to set the first constant
  • C is to set the second constant.
  • the processing unit may also select a network interface that is not selected within the second set time period, connect to the SMTP server, and send emails.
  • the processing unit may close the persistent connection in the SMTP persistent connection pool when it is determined that the email is not sent within the third set time period.
  • the present invention provides a computing device including at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing The unit executes the mail sending method described in any of the above-mentioned first aspect.
  • the present invention provides a computer-readable storage medium that stores a computer program executable by a computing device.
  • the program runs on the computing device, the computing device executes the above-mentioned first aspect. Any of the described mail sending methods.
  • FIG. 1 is a structural diagram of an email sending system provided by an embodiment of the application
  • FIG. 2 is a structural diagram of an email sending system provided by an embodiment of the application
  • FIG. 3 is a schematic flowchart of an email sending method provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of an email sending device provided by an embodiment of this application.
  • Fig. 5 is a schematic structural diagram of a computing device provided by an embodiment of the application.
  • FIG. 1 is a structural diagram of an email sending system, which includes a JAVA (a computer programming language) client 101 and an SMTP (Simple Mail Transfer Protocol) server 103.
  • the JAVA client 101 is provided with a JAVA MAIL (a programming interface related to email processing) component 102
  • the JAVA client 101 establishes a long connection with the SMTP server 103
  • the JAVA client 101 sends the email through the long connection
  • the email is sent to the SMTP server 103
  • the SMTP server 103 processes the email and sends it to the corresponding recipient email account.
  • connection pool 104, the connection pool 105, and the connection pool 106 are generated in the JAVA MAIL component 102 in combination with the email sending system shown in FIG. 2.
  • each sending email account corresponds to a connection pool
  • connection pool 104 corresponds to sending email account a@.com
  • connection pool 105 corresponds to sending email account b@.com
  • connection pool 106 corresponds to sending email account c@ .com.
  • the JAVA MAIL component 102 sends an email to the SMTP server 103.
  • the network interfaces corresponding to the connection pool 104 include: a network interface 107, a network interface 108, a network interface 109, a network interface 110, a network interface 111, and a network interface 112.
  • the network interfaces corresponding to the connection pool 105 include: a network interface 107, a network interface 108, a network interface 109, a network interface 110, a network interface 111, and a network interface 112.
  • the network interfaces corresponding to the connection pool 106 include: a network interface 107, a network interface 108, a network interface 109, a network interface 110, a network interface 111, and a network interface 112.
  • Figures 1 and 2 are only an exemplary simple description, and do not constitute a limitation on the solution.
  • the number of connection pools and the structure and function of the client and server can be determined by the field The technicians can set up as needed, and the specifics are not limited.
  • FIG. 3 is a schematic flowchart of an email sending method.
  • the method can be executed by the device where the JAVA client 101 is located.
  • the method specifically includes the following steps:
  • Step 301 Determine the SMTP persistent connection pool corresponding to the sending mailbox account of the email to be sent, where the SMTP persistent connection pool includes K persistent connections of N network interfaces of M network operators, and M, N, and K are all Is a positive integer greater than or equal to 1.
  • the corresponding SMTP long connection pool is the connection pool 104.
  • the connection pool 104 establishes a long connection with the network interface 107, the network interface 108, the network interface 109, the network interface 110, the network interface 111, and the network interface 112 correspondingly.
  • Step 302 Acquire historical sending information of sent emails corresponding to each persistent connection of each network interface of each network operator within a set time period before the current time.
  • the historical sending information of the sent emails may include: the number of sent emails under each network interface of each network operator, whether the sent emails are sent successfully, and the sent emails The time required for the mail to be sent.
  • the historical sending information of the sent emails corresponding to each long connection of each network interface of the connection pool where the email to be sent is located within 5 minutes before the current time is obtained. For example, obtain the historical sending information of the sent emails corresponding to the network interface 107, the network interface 108, the network interface 109, the network interface 110, the network interface 111, and the network interface 112 in the connection pool 104. Further, the available probabilities corresponding to the network interface 107, the network interface 108, the network interface 109, the network interface 110, the network interface 111, and the network interface 112 are calculated.
  • Step 303 Determine the target network interface of the target network operator corresponding to the sending email account from the N network interfaces of the M network operators according to the historical sending information of the sent emails.
  • the client terminal can be based on the number of sent emails under each network interface of each network operator and whether the sent emails are sent or not. The time required for the successful transmission and the completion of the transmission of the sent email is calculated, and the available probability of the network interface is calculated. Further, the client terminal may determine the target network interface of the target network operator corresponding to the sending email account according to the available probabilities of the N network interfaces of the M network operators.
  • the JAVA client 101 calculates the availability probability of the network interface 107 according to the number of sent emails of the network interface 107, whether the sent emails are successfully sent, and the time required for the sent emails to be sent. Further, the target network interface is determined according to the available probabilities of the network interface 107, the network interface 108, the network interface 109, the network interface 110, the network interface 111, and the network interface 112.
  • the client first calculates the weight value of the network interface according to the following formula 1 for any network interface of any network operator, and then according to the weight value, according to the following formula 2 Calculate the available probability of the network interface:
  • Weight value
  • Available probability weight value of the network interface/sum of the weight value of the N network interfaces of the M network operators..........Formula 2.
  • a is the number of emails sent successfully by the network interface within the first set time period and the time-consuming period falls within the period one;
  • b is the network interface in the first set time period The number of e-mails that were successfully sent within the period of time 2;
  • c is the number of e-mails that were successfully sent by the network interface within the first set period of time and fell within the period of time 3
  • D is the number of e-mails sent by the network interface that are successfully sent within the first set time period and the time-consuming exceeds the set threshold;
  • e is the network interface in the first set The number of e-mails that failed to be sent within the duration.
  • K 1 is the weight corresponding to the duration interval one
  • K 2 is the weight corresponding to the duration interval two
  • K 3 is the weight corresponding to the duration interval three
  • K 4 is the weight corresponding to the duration interval three
  • K To set the first constant
  • C to set the second constant.
  • the JAVA client 101 may also periodically calculate the available probability of each network interface according to the e-mail sending information of a set duration.
  • the JAVA client 101 calculates the combination of the weight values of the network interface 107, the network interface 108, the network interface 109, the network interface 110, the network interface 111 and the network interface 112 every 2 minutes according to the e-mail sending information within the current 5 minutes. Get the available probability of each network interface.
  • the network interface 107, the network interface 108, the network interface 109, the network interface 110, the network interface 111, and the network interface 112 provided by the network operator of the SMTP server 103 have sent email information in the current 5 minutes as shown in Table 1. Shown:
  • the JAVA client 101 calculates the weight value of the network interface 107 according to the following formula 1:
  • Weight value
  • the network interface 110 has not connected within 5 minutes, so the weight value is 0.
  • the network interface 111 failed to deliver within 5 minutes, and the weight value calculation result is 1.
  • the network interface 112 is connected normally.
  • the JAVA client 101 calculates the available probability of the network interface 107 according to formula 2:
  • Available probability weight value of the network interface/sum of the weight value of the N network interfaces of the M network operators..........Formula 2.
  • the probability of sending through the network interface 110 is 0;
  • the JAVA client 101 selects the target network interface according to the available probability corresponding to each network interface.
  • the JAVA client 101 determines that the first network interface of the first network operator has not sent emails within the second set period of time according to the historical sending information of the sent emails, and then determines The first network interface of the first network operator is the target network interface of the target network operator corresponding to the sending email account. Wherein, the first network interface of the first network operator is one of the N network interfaces of the M network operators.
  • the JAVA client 101 when the JAVA client 101 determines that no email is sent within the third set time period, it can close the persistent connection in the SMTP persistent connection pool. Exemplarily, there is no email sending task in the current 20 minutes, and the JAVA client 101 closes the connection with the network interface 107, the network interface 108, the network interface 109, the network interface 110, the network interface 111 and the network interface 112 in the SMTP server 103 . The JAVA client 101 actively closes the connection with the SMTP server to save communication resources and control various network interfaces.
  • the client optimizing the group weight according to the historical sending information of the sent emails includes: the client adjusting any one of K 1 , K 2 , K 3 , and K 4, Then, the group weight is optimized according to the average duration of the sent emails within the fourth set duration.
  • the JAVA client 101 obtains the email information sent within the current 5 minutes, selects an instance, and adjusts the weight of any group in the instance, for example, increase the weight of the group that takes 0-300ms from 100 to 200; Then obtain the historical sending information of the sent emails of the set period, determine the average time consumption of emails based on this information, and adjust the grouping weight. For example, when the average time consumption becomes lower, increase the group weight.
  • Step 304 Send the to-be-sent e-mail related to the outgoing mailbox account to the SMTP server through the persistent connection on the target network interface of the target network operator.
  • the JAVA client 101 may select a target network interface after obtaining the available probabilities corresponding to each network interface. Further, the JAVA client 101 sends an email to the SMTP server 103 through a long connection with the target interface. Optionally, the JAVA client 101 records this mail sending information.
  • the JAVA client 101 establishes and retains long connections with all network interfaces.
  • connection pools there may be more than one SMTP server serving as a third-party mail server at the same time.
  • multiple types of connection pools are grouped and managed according to SMTP servers, that is, connection pools corresponding to different SMTP servers can be different.
  • an embodiment of the present invention also provides an email sending device, which can execute the embodiment of the email sending method in FIG. 3.
  • the device provided by the embodiment of the present invention is shown in FIG. 4 and includes:
  • the processing unit 401 is configured to determine the SMTP persistent connection pool corresponding to the outgoing mailbox account in the to-be-sent e-mail, and obtain the SMTP persistent connection pool corresponding to each persistent connection of each network interface within the first set time period before the current time. Based on the historical sending information of the sent emails, the target network interface of the target network operator corresponding to the sending mailbox account is determined from the N network interfaces of the M network operators according to the historical sending information of the sent emails. Among them, the SMTP persistent connection pool includes K persistent connections of N network interfaces of M network operators. The sent emails correspond to different persistent connections of different network interfaces of different network operators. M, N, and K are all greater than Or a positive integer equal to 1;
  • the sending unit 402 is configured to send to the SMTP server 103 the to-be-sent email related to the sending mailbox account through the persistent connection on the target network interface of the target network operator.
  • the historical sending information of the sent emails includes: the number of sent emails under the network interface, whether the sent emails are sent successfully, and the time required for the sent emails to complete sending.
  • the processing unit 401 is specifically configured to: for any network interface of any network operator, according to the number of sent emails under each interface of each network operator, whether the sent emails are sent successfully, and the sent emails The time required for the mail to be sent is calculated, the available probability of the network interface is calculated, and the target network interface of the target network operator corresponding to the sending mailbox account is determined according to the available probability of the N network interfaces of the M network operators.
  • the processing unit 401 is specifically configured to: for any network interface of any network operator, calculate the weight value of the network interface according to the following formula 1:
  • Weight value
  • Available probability the weight value of the network interface/the sum of the weight values of the N network interfaces of the M network operators..........Formula 2;
  • a is the number of e-mails sent successfully by the network interface within the first set duration and the time-consuming period falls within the period 1;
  • b is the number of emails sent successfully by the network interface within the first set duration and the time-consuming The number of e-mails sent in period 2;
  • c is the number of e-mails sent successfully by the network interface within the first set time period and time-consuming in period 3;
  • d is the number of e-mails that the network interface is in the first setting The number of e-mails that have been sent successfully within a certain period of time and the time-consuming exceeds the set threshold;
  • e is the number of e-mails that have failed to be sent by the network interface within the first set period of time.
  • K 1 is the weight corresponding to the duration interval one
  • K 2 is the weight corresponding to the duration interval two
  • K 3 is the weight corresponding to the duration interval three
  • K 4 is the weight corresponding to the duration interval three
  • K 5 is to set the first constant
  • C is to set the second constant.
  • the processing unit 401 is further configured to select a network interface that is not selected within the second set time period, connect to the SMTP server, and send emails.
  • the processing unit 401 closes the persistent connection in the SMTP persistent connection pool when it is determined that the email is not sent within the third set time period.
  • an optimization unit is further included, configured to optimize the group weight according to the historical sending information of the sent emails.
  • the optimization unit is specifically configured to adjust any one of K 1 , K 2 , K 3 , and K 4 , and weight the group according to the average duration of the sent mail within the fourth set duration optimize.
  • an embodiment of the present invention provides a computing device. As shown in FIG. 5, it includes at least one processor 501 and a memory 502 connected to the at least one processor.
  • the embodiment of the present invention does not limit the processor.
  • the connection between the processor 501 and the memory 502 in FIG. 5 is taken as an example.
  • the bus can be divided into address bus, data bus, control bus and so on.
  • the memory 502 stores instructions that can be executed by at least one processor 501, and the at least one processor 501 can execute the steps included in the foregoing settlement method by executing the instructions stored in the memory 502.
  • the processor 501 is the control center of the terminal device, which can use various interfaces and lines to connect various parts of the terminal device, and process data by running or executing instructions stored in the memory 502 and calling data stored in the memory 502. .
  • the processor 501 may include one or more processing units, and the processor 501 may integrate an application processor and a modem processor.
  • the application processor mainly processes the operating system, user interface, and application programs.
  • the adjustment processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 501.
  • the processor 501 and the memory 502 may be implemented on the same chip, and in some embodiments, they may also be implemented on separate chips.
  • the processor 501 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application specific integrated circuit (ASIC), a field programmable gate array or other programmable logic devices, discrete gates or transistors Logic devices and discrete hardware components can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention.
  • the general-purpose processor may be a microprocessor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present invention may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • the memory 502 as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules.
  • the memory 502 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), magnetic memory, disk , CD, etc.
  • the memory 502 is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
  • the memory 502 in the embodiment of the present invention may also be a circuit or any other device capable of realizing a storage function for storing program instructions and/or data.
  • the embodiment of the present invention provides a computer-readable medium that stores a computer program executable by a terminal device.
  • the terminal device executes the settlement method. step.
  • the embodiments of the present invention can be provided as a method or a computer program product. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

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

Abstract

An e-mail sending method and apparatus, which are used to improve the efficiency of sending mail. The method comprises: a device of a Java client firstly determining an SMTP long connection pool corresponding to a sending mail account in an e-mail to be sent; then acquiring historical sending information of a sent e-mail within a first set duration prior to the current moment; then, according to the historical sending information of the sent e-mail and K long connections of N network interfaces of M network operators comprised in the SMTP long connection pool, and from the N network interfaces of the M network operators, determining a target network interface of a target network operator corresponding to the sending mail account; and finally, by means of a long connection on the target network interface of the target network operator, sending, to an SMTP server, the e-mail to be sent. The method can save on mail system construction costs, and can achieve the aim of sending mail quickly.

Description

一种电子邮件的发送方法及装置Method and device for sending email
相关申请的交叉引用Cross references to related applications
本申请要求在2019年12月25日提交中国专利局、申请号为201911360822.X、申请名称为“一种电子邮件的发送方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 201911360822.X, and the application name is "a method and device for sending emails" on December 25, 2019, the entire content of which is incorporated by reference In this application.
技术领域Technical field
本发明涉及通信领域,尤其涉及一种电子邮件的发送方法及装置。The present invention relates to the field of communications, in particular to a method and device for sending emails.
背景技术Background technique
随着计算机技术的发展,电子邮件技术越来越普及。然而,由于金融行业的安全性、实时性要求,金融行业也对电子邮件技术也提出了更高的要求。With the development of computer technology, e-mail technology is becoming more and more popular. However, due to the security and real-time requirements of the financial industry, the financial industry also puts forward higher requirements on e-mail technology.
目前,若想建立自己的电子邮件系统,通常要搭建专门的服务器集群做邮件服务器,且还需要建立防火墙拦截系统以及垃圾邮件识别系统等。因此,这种建立方式存在维护成本较高、连接效率低等问题。为了解决这些问题,现有技术一般通过租借第三方邮件服务器并由第三方邮件服务器来完成邮件发送工作的方式来降低成本。这种情况下,用户只需在每次发送邮件的时候,从第三方邮件服务器提供的接口中选择一个接口,待客户端与接口建立连接后,用户即可通过该连接将待发邮件发送到该第三方邮件服务器,进而由第三方邮件服务器进行后续的发送工作。At present, if you want to build your own email system, you usually need to build a dedicated server cluster as a mail server, and you also need to build a firewall interception system and a spam identification system. Therefore, this establishment method has problems such as high maintenance cost and low connection efficiency. In order to solve these problems, the prior art generally reduces costs by renting a third-party mail server and the third-party mail server completes the mail sending work. In this case, the user only needs to select an interface from the interface provided by the third-party mail server every time an email is sent. After the client establishes a connection with the interface, the user can send the outgoing email to The third-party mail server, in turn, the third-party mail server performs subsequent sending work.
但是,按照上述方式执行发送工作,如果每次发送的发件邮箱账号不同,那么每次邮件发送完成后客户端和接口的连接也会被关闭,因此,当使用新的发件邮箱账号发送邮件时往往需要再次建立连接。可见,上述方法存在邮件的发送效率较低的技术问题。However, if the sending work is performed according to the above method, if the sending email account is different each time, the connection between the client and the interface will also be closed after each email is sent. Therefore, when using the new sending email account to send emails Sometimes the connection needs to be established again. It can be seen that the above method has the technical problem of low mail sending efficiency.
发明内容Summary of the invention
本发明提供一种电子邮件的发送方法及装置,用以提高邮件的发送效率。The invention provides a method and device for sending emails, which are used to improve the efficiency of sending emails.
第一方面,本发明提供一种电子邮件的发送方法,该方法包括:客户端先确定与待发送电子邮件中发件邮箱帐号对应的简单邮件传输协议(Simple Mail Transfer Protocol,SMTP)长连接池,再获取距离当前时刻之前的第一设定时长内的已发送电子邮件的历史发送信息,之后,根据已发送电子邮件的历史发送信息,从M个网络运营商的N个网络接口中确定 出与发件邮箱帐号对应的目标网络运营商的目标网络接口,如此,客户端即可通过目标网络运营商的目标网络接口上的长连接,向SMTP服务器发送待发送电子邮件。其中,SMTP长连接池中包括M个网络运营商的N个网络接口的K个长连接,已发送电子邮件分别对应不同网络运营商的不同网络接口的不同长连接。其中,M、N和K均为大于或等于1的正整数。In the first aspect, the present invention provides an email sending method, which includes: the client first determines the Simple Mail Transfer Protocol (SMTP) long connection pool corresponding to the sending email account in the email to be sent , And then obtain the historical sending information of the sent emails within the first set time period before the current time, and then determine from the N network interfaces of the M network operators according to the historical sending information of the sent emails The target network interface of the target network operator corresponding to the sending email account, so that the client can send the to-be-sent email to the SMTP server through the long connection on the target network interface of the target network operator. Among them, the SMTP persistent connection pool includes K persistent connections of N network interfaces of M network operators, and sent emails correspond to different persistent connections of different network interfaces of different network operators. Wherein, M, N, and K are all positive integers greater than or equal to 1.
上述设计首先建立服务器与客户端之间的长连接,再根据已发送电子邮件的历史发送信息,也就是电子邮件发送记录的信息,计算出每个接口的可用概率,再根据该概率选择接口,通过该接口的连接发送电子邮件到服务器,最后由服务器完成后续工作。该技术方案能够克服现有技术所存在的问题,有助于提高电子邮件发送的效率,并能使对接口的选择策略更加灵活。The above design first establishes a long connection between the server and the client, and then calculates the available probability of each interface according to the historical sending information of the sent emails, that is, the information of the email sending records, and then selects the interface according to the probability. The e-mail is sent to the server through the connection of this interface, and finally the server completes the follow-up work. The technical solution can overcome the problems existing in the prior art, help improve the efficiency of e-mail sending, and make the interface selection strategy more flexible.
在一种可能的设计中,已发送电子邮件的历史发送信息中可以包括M个网络运营商的N个网络接口下的已发送电子邮件的个数、已发送电子邮件是否发送成功的指示信息和已发送电子邮件完成发送所需时长。再这种情况下,客户端根据已发送电子邮件的历史发送信息,从M个网络运营商的N个网络接口中确定出与发件邮箱帐号对应的目标网络运营商的目标网络接口,包括:针对任意一个网络运营商的任意一个网络接口,客户端可以先根据每个网络运营商的每个接口下的已发送电子邮件的个数、已发送电子邮件是否发送成功的指示信息和已发送电子邮件完成发送所需时长,计算出该网络接口的可用概率,然后再根据M个网络运营商的N个网络接口的可用概率,确定出与发件邮箱帐号对应的目标网络运营商的目标网络接口。在上述设计中,客户端能通过各个接口对应的已发送电子邮件的历史发送信息(即已发送邮件的个数、是否成功、完成发送耗时等电子邮件的历史发送信息)来计算对应接口的可用概率。In a possible design, the historical sending information of sent emails may include the number of sent emails under N network interfaces of M network operators, the indication information of whether the sent emails were sent successfully, and The time it takes for the sent email to complete sending. In this case, the client determines the target network interface of the target network operator corresponding to the sending mailbox account from the N network interfaces of the M network operators according to the historical sending information of the sent emails, including: For any network interface of any network operator, the client can firstly according to the number of sent emails under each interface of each network operator, the indication information of whether the sent emails are sent successfully, and the sent electronic The time required for the mail to be sent, the available probability of the network interface is calculated, and then the target network interface of the target network operator corresponding to the sending mailbox account is determined according to the available probability of the N network interfaces of the M network operators . In the above design, the client can calculate the historical sending information of the sent emails corresponding to each interface (that is, the number of sent emails, whether it is successful, the time taken to complete the sending, etc.) to calculate the corresponding interface Available probability.
在一种可能的设计中,针对任意一个网络运营商的任意一个网络接口,客户端可以先按照如下公式一计算出该网络接口的权重值,再根据该权重值,按照如下公式二计算出该网络接口的可用概率:In a possible design, for any network interface of any network operator, the client can first calculate the weight value of the network interface according to the following formula 1, and then calculate the weight value according to the following formula 2. Availability probability of network interface:
权重值=|(a×K 1+b×K 2+c×K 3+d×K 4)/(a+b+c+d)-K 5 e+C|..........公式一; Weight value=|(a×K 1 +b×K 2 +c×K 3 +d×K 4 )/(a+b+c+d)-K 5 e +C|........ .. Formula One;
可用概率=网络接口的权重值/所述M个网络运营商的N个网络接口的权重值之和..........公式二。Available probability=weight value of the network interface/sum of the weight value of the N network interfaces of the M network operators..........Formula 2.
其中,a为网络接口在第一设定时长内发送成功且耗时落在时长区间一的已发送电子邮件的个数;b为网络接口在第一设定时长内发送成功且耗时落在时长区间二的已发送电子邮件的个数;c为网络接口在第一设定时长内发送成功且耗时落在时长区间三的已发送 电子邮件的个数;d为网络接口在第一设定时长内发送成功且耗时超过设定阈值的已发送电子邮件的个数;e为网络接口在第一设定时长内发送失败的电子邮件个数。其中,K 1为与时长区间一对应的权重;K 2为与时长区间二对应的权重;K 3为耗时为与时长区间三对应的权重;K 4为与时长区间三对应的权重;K 5为设定第一常数;C为设定第二常数。 Among them, a is the number of e-mails sent successfully by the network interface within the first set duration and the time-consuming period falls within the period 1; b is the number of emails sent successfully by the network interface within the first set duration and the time-consuming The number of e-mails sent in period 2; c is the number of e-mails sent successfully by the network interface within the first set time period and time-consuming in period 3; d is the number of e-mails that the network interface is in the first setting The number of e-mails that have been sent successfully within a certain period of time and the time-consuming exceeds the set threshold; e is the number of e-mails that have failed to be sent by the network interface within the first set period of time. Among them, K 1 is the weight corresponding to the duration interval one; K 2 is the weight corresponding to the duration interval two; K 3 is the weight corresponding to the duration interval three; K 4 is the weight corresponding to the duration interval three; K 5 is to set the first constant; C is to set the second constant.
上述设计进一步介绍了客户端如何根据上述公式一和公式二计算各个网络接口对应的可用概率,该设计能保证选择网络接口的灵活性,且还具有简单可行的优点。The above design further introduces how the client calculates the available probability corresponding to each network interface according to the above formula 1 and formula 2. This design can ensure the flexibility of selecting the network interface and also has the advantages of simplicity and feasibility.
在一种可能的设计中,客户端根据已发送电子邮件的历史发送信息,确定第一网络运营商的第一网络接口在第二设定时长内未进行邮件发送,并确定第一网络运营商的第一网络接口为与发件邮箱帐号对应的目标网络运营商的目标网络接口。其中,第一网络运营商的第一网络接口为M个网络运营商的N个网络接口中的其中一个。在该设计中,客户端能对网络接口选择策略进行完善,进而优先选择长时间未发送邮件的接口进行邮件的发送,从而有助于避免出现接口因为长时间没有使用而被第三方邮件服务器,也就是该SMTP服务器断开连接的情况。该设计能使本发明的技术方案更加完善,更加灵活。In a possible design, the client determines that the first network interface of the first network operator has not sent emails within the second set period of time according to the historical sending information of the sent emails, and determines the first network operator The first network interface of is the target network interface of the target network operator corresponding to the sending email account. Wherein, the first network interface of the first network operator is one of the N network interfaces of M network operators. In this design, the client can improve the network interface selection strategy, and then give priority to the interface that has not sent emails for a long time to send emails, which helps to prevent the interface from being used by a third-party mail server because it has not been used for a long time. That is, the SMTP server is disconnected. This design can make the technical scheme of the present invention more perfect and more flexible.
在一种可能的设计中,客户端确定在第三设定时长内未发送电子邮件时,关闭SMTP长连接池中的长连接。In a possible design, when the client determines that no email is sent within the third set time period, it closes the persistent connection in the SMTP persistent connection pool.
第二方面,本发明提供一种电子邮件的发送装置,该装置的技术效果可以参照上述方法实施例,该装置包括:处理单元,用于确定与待发送电子邮件中发件邮箱帐号对应的SMTP长连接池,获取距离当前时刻之前的第一设定时长内的已发送电子邮件的历史发送信息,并根据已发送电子邮件的历史发送信息,从M个网络运营商的N个网络接口中,确定出与发件邮箱帐号对应的目标网络运营商的目标网络接口。发送单元,用于通过目标网络运营商的目标网络接口上的长连接,向SMTP服务器发送与发件邮箱帐号相关的待发送电子邮件。其中,SMTP长连接池包括M个网络运营商的N个网络接口的K个长连接,已发送电子邮件分别对应不同网络运营商的不同网络接口的不同长连接。其中,M、N和K均为大于或等于1的正整数。In the second aspect, the present invention provides an e-mail sending device. The technical effects of the device can be referred to the above method embodiments. The device includes: a processing unit for determining the SMTP corresponding to the sending email account in the email to be sent The long connection pool obtains the historical sending information of the sent emails within the first set time before the current moment, and according to the historical sending information of the sent emails, from the N network interfaces of M network operators, Determine the target network interface of the target network operator corresponding to the sending email account. The sending unit is used to send to the SMTP server the to-be-sent emails related to the sending mailbox account through the persistent connection on the target network interface of the target network operator. Among them, the SMTP persistent connection pool includes K persistent connections of N network interfaces of M network operators, and sent emails correspond to different persistent connections of different network interfaces of different network operators. Wherein, M, N, and K are all positive integers greater than or equal to 1.
在一种可能的实施例中,已发送电子邮件的历史发送信息包括:M个网络运营商的N个网络接口下的已发送电子邮件的个数、已发送电子邮件是否发送成功的指示信息和已发送电子邮件完成发送所需时长。在这种情况下,处理单元还可以针对任意一个网络运营商的任意一个网络接口,根据每个网络运营商的每个接口下的已发送电子邮件的个数、已发送电子邮件是否发送成功的指示信息和已发送电子邮件完成发送所需时长,计算网络接口的可用概率,进而根据M个网络运营商的N个网络接口的可用概率,确定出与发件邮箱帐号对应的目标网络运营商的目标网络接口。In a possible embodiment, the historical sending information of sent emails includes: the number of sent emails under N network interfaces of M network operators, indication information about whether the sent emails are sent successfully, and The time it takes for the sent email to complete sending. In this case, the processing unit can also target any network interface of any network operator, according to the number of sent emails under each interface of each network operator, and whether the sent emails are sent successfully. The instruction information and the time required to complete the sending of the sent e-mail are calculated, the available probability of the network interface is calculated, and then the available probability of the N network interface of the M network operators is determined to determine the target network operator's corresponding to the sending mailbox account Target network interface.
在一种可能的实施例中,处理单元可以针对任意一个网络运营商的任意一个网络接口,根据每个网络运营商的每个接口下的已发送电子邮件的个数、已发送电子邮件是否发送成功和已发送电子邮件完成发送所需时长,计算网络接口的可用概率,根据M个网络运营商的N个网络接口的可用概率,确定与发件邮箱帐号对应的目标网络运营商的目标网络接口。In a possible embodiment, the processing unit may be directed to any network interface of any network operator, according to the number of sent emails under each interface of each network operator, and whether the sent emails are sent or not. The time required for successful and sent emails to be sent, calculate the available probability of the network interface, and determine the target network interface of the target network operator corresponding to the sending mailbox account according to the available probability of the N network interfaces of the M network operators .
在一种可能的实施例中,处理单元可以针对任意一个网络运营商的任意一个网络接口,按照如下公式一计算网络接口的权重值,进而根据权重值,按照如下公式二计算网络接口的可用概率:In a possible embodiment, the processing unit can calculate the weight value of the network interface according to the following formula 1 for any network interface of any network operator, and then calculate the usable probability of the network interface according to the following formula 2 according to the weight value :
权重值=|(a×K 1+b×K 2+c×K 3+d×K 4)/(a+b+c+d)-K 5 e+C|..........公式一; Weight value=|(a×K 1 +b×K 2 +c×K 3 +d×K 4 )/(a+b+c+d)-K 5 e +C|........ .. Formula One;
可用概率=网络接口的权重值/M个网络运营商的N个网络接口的权重值之和..........公式二;Available probability = the weight value of the network interface/the sum of the weight values of the N network interfaces of the M network operators..........Formula 2;
其中,a为网络接口在第一设定时长内发送成功且耗时落在时长区间一的已发送电子邮件的个数;b为网络接口在第一设定时长内发送成功且耗时落在时长区间二的已发送电子邮件的个数;c为网络接口在第一设定时长内发送成功且耗时落在时长区间三的已发送电子邮件的个数;d为网络接口在第一设定时长内发送成功且耗时超过设定阈值的已发送电子邮件的个数;e为网络接口在第一设定时长内发送失败的电子邮件个数。其中,K 1为与时长区间一对应的权重;K 2为与时长区间二对应的权重;K 3为耗时为与时长区间三对应的权重;K 4为与时长区间三对应的权重;K 5为设定第一常数;C为设定第二常数。 Among them, a is the number of e-mails sent successfully by the network interface within the first set duration and the time-consuming period falls within the period 1; b is the number of e-mails sent successfully by the network interface within the first set duration and the time-consuming The number of e-mails sent in period 2; c is the number of e-mails sent successfully by the network interface within the first set time period and time-consuming in period 3; d is the number of e-mails that the network interface is in the first setting The number of e-mails that have been sent successfully within a certain period of time and the time-consuming exceeds the set threshold; e is the number of e-mails that have failed to be sent by the network interface within the first set period of time. Among them, K 1 is the weight corresponding to the duration interval one; K 2 is the weight corresponding to the duration interval two; K 3 is the weight corresponding to the duration interval three; K 4 is the weight corresponding to the duration interval three; K 5 is to set the first constant; C is to set the second constant.
在一种可能的实施例中,处理单元还可以选择第二设定时长内没有被选中的网络接口,连接所述SMTP服务器,发送电子邮件。In a possible embodiment, the processing unit may also select a network interface that is not selected within the second set time period, connect to the SMTP server, and send emails.
在一种可能的实施例中,处理单元在确定第三设定时长内未发送电子邮件时,可以关闭SMTP长连接池中的长连接。In a possible embodiment, the processing unit may close the persistent connection in the SMTP persistent connection pool when it is determined that the email is not sent within the third set time period.
第三方面,本发明提供一种计算设备,包括至少一个处理单元以及至少一个存储单元,其中,所述存储单元存储有计算机程序,当所述程序被所述处理单元执行时,使得所述处理单元执行如上述第一方面任意所述的邮件发送方法。In a third aspect, the present invention provides a computing device including at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing The unit executes the mail sending method described in any of the above-mentioned first aspect.
第四方面,本发明提供一种计算机可读存储介质,其存储有可由计算设备执行的计算机程序,当所述程序在所述计算设备上运行时,使得所述计算设备执行如上述第一方面任意所述的邮件发送方法。In a fourth aspect, the present invention provides a computer-readable storage medium that stores a computer program executable by a computing device. When the program runs on the computing device, the computing device executes the above-mentioned first aspect. Any of the described mail sending methods.
本发明的这些方面或其它方面在以下实施例的描述中会更加简明易懂。These or other aspects of the present invention will be more concise and understandable in the description of the following embodiments.
附图说明Description of the drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present invention more clearly, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative work, other drawings can be obtained based on these drawings.
图1为本申请实施例提供的一种电子邮件发送系统构架图;FIG. 1 is a structural diagram of an email sending system provided by an embodiment of the application;
图2为本申请实施例提供的一种电子邮件发送系统构架图;FIG. 2 is a structural diagram of an email sending system provided by an embodiment of the application;
图3为本申请实施例提供的一种电子邮件的发送方法流程示意图;FIG. 3 is a schematic flowchart of an email sending method provided by an embodiment of the application;
图4为本申请实施例提供的一种电子邮件发送装置示意图;FIG. 4 is a schematic diagram of an email sending device provided by an embodiment of this application;
图5为本申请实施例提供的一种计算设备结构示意图。Fig. 5 is a schematic structural diagram of a computing device provided by an embodiment of the application.
具体实施方式Detailed ways
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
图1为一种电子邮件发送系统构架图,包括JAVA(一种计算机编程语言)客户端101和SMTP(Simple Mail Transfer Protocol,简单邮件传输协议)服务器103。其中,JAVA客户端101设有JAVA MAIL(一种处理电子邮件相关的编程接口)组件102,JAVA客户端101与SMTP服务器103建立长连接,进一步地,JAVA客户端101通过该长连接将电子邮件发送给SMTP服务器103,SMTP服务器103对该电子邮件进行处理后发送给对应的收件邮箱帐号。FIG. 1 is a structural diagram of an email sending system, which includes a JAVA (a computer programming language) client 101 and an SMTP (Simple Mail Transfer Protocol) server 103. Among them, the JAVA client 101 is provided with a JAVA MAIL (a programming interface related to email processing) component 102, the JAVA client 101 establishes a long connection with the SMTP server 103, and further, the JAVA client 101 sends the email through the long connection The email is sent to the SMTP server 103, and the SMTP server 103 processes the email and sends it to the corresponding recipient email account.
在一种可能的实施例中,结合如图2所示的电子邮件发送系统,在JAVA MAIL组件102中生成连接池104、连接池105、连接池106。其中,每个发件邮箱帐号对应一个连接池,比如连接池104对应发件邮箱账号a@.com;连接池105对应发件邮箱账号b@.com;连接池106对应发件邮箱账号c@.com。进一步地,连接池104、连接池105和连接池106与SMTP服务器103中的各个网络接口建立好连接之后,JAVA MAIL组件102发送电子邮件给SMTP服务器103。其中,连接池104可以对应的网络接口包括:网络接口107、网络接口108、网络接口109、网络接口110、网络接口111和网络接口112。连接池105可以对应的网络接口包括:网络接口107、网络接口108、网络接口109、网络接口110、网络接口111和网络接口112。连接池106可以对应的网络接口包括:网络接口107、网络接口108、网络接口109、网络接口110、网络接口111和网络接口112。In a possible embodiment, the connection pool 104, the connection pool 105, and the connection pool 106 are generated in the JAVA MAIL component 102 in combination with the email sending system shown in FIG. 2. Among them, each sending email account corresponds to a connection pool, for example, connection pool 104 corresponds to sending email account a@.com; connection pool 105 corresponds to sending email account b@.com; connection pool 106 corresponds to sending email account c@ .com. Further, after the connection pool 104, the connection pool 105, and the connection pool 106 have established a connection with each network interface in the SMTP server 103, the JAVA MAIL component 102 sends an email to the SMTP server 103. The network interfaces corresponding to the connection pool 104 include: a network interface 107, a network interface 108, a network interface 109, a network interface 110, a network interface 111, and a network interface 112. The network interfaces corresponding to the connection pool 105 include: a network interface 107, a network interface 108, a network interface 109, a network interface 110, a network interface 111, and a network interface 112. The network interfaces corresponding to the connection pool 106 include: a network interface 107, a network interface 108, a network interface 109, a network interface 110, a network interface 111, and a network interface 112.
需要说明的是,图1和图2仅是一种示例性的简单说明,并不构成对方案的限定,在具体实施中,连接池的数量以及客户端、服务器的结构及功能均可以由本领域技术人员根据需要进行设置,具体不作限定。It should be noted that Figures 1 and 2 are only an exemplary simple description, and do not constitute a limitation on the solution. In specific implementation, the number of connection pools and the structure and function of the client and server can be determined by the field The technicians can set up as needed, and the specifics are not limited.
为了进一步地解释本发明实施例,图3为一种电子邮件的发送方法流程示意图,该方法可以由上述JAVA客户端101所在的设备执行,该方法具体包括如下步骤:In order to further explain the embodiments of the present invention, FIG. 3 is a schematic flowchart of an email sending method. The method can be executed by the device where the JAVA client 101 is located. The method specifically includes the following steps:
步骤301:确定与待发送电子邮件中发件邮箱帐号对应的SMTP长连接池,其中,SMTP长连接池包括M个网络运营商的N个网络接口的K个长连接,M、N和K均为大于或等于1的正整数。Step 301: Determine the SMTP persistent connection pool corresponding to the sending mailbox account of the email to be sent, where the SMTP persistent connection pool includes K persistent connections of N network interfaces of M network operators, and M, N, and K are all Is a positive integer greater than or equal to 1.
示例性地,若待发送电子邮件的发件邮箱账号为a@.com,则与之对应的SMTP长连接池为连接池104。可选地,连接池104对应与网络接口107、网络接口108、网络接口109、网络接口110、网络接口111和网络接口112建立了长连接。Exemplarily, if the sending email account of the email to be sent is a@.com, the corresponding SMTP long connection pool is the connection pool 104. Optionally, the connection pool 104 establishes a long connection with the network interface 107, the network interface 108, the network interface 109, the network interface 110, the network interface 111, and the network interface 112 correspondingly.
步骤302:获取距离当前时刻之前的设定时长内,与每个网络运营商的每个网络接口的每个长连接对应的已发送电子邮件的历史发送信息。Step 302: Acquire historical sending information of sent emails corresponding to each persistent connection of each network interface of each network operator within a set time period before the current time.
在一种可能的实施例中,该已发送电子邮件的历史发送信息可以包括:各个网络运营商的各个网络接口下的已发送电子邮件的个数、已发送电子邮件是否发送成功和已发送电子邮件完成发送所需时长。In a possible embodiment, the historical sending information of the sent emails may include: the number of sent emails under each network interface of each network operator, whether the sent emails are sent successfully, and the sent emails The time required for the mail to be sent.
示例性地,获取当前时刻之前的5分钟内,待发送电子邮件所在的连接池的每个网络接口的每个长连接对应的已发送电子邮件的历史发送信息。如获取连接池104中网络接口107、网络接口108、网络接口109、网络接口110、网络接口111和网络接口112对应的已发送电子邮件的历史发送信息。进一步地,计算网络接口107、网络接口108、网络接口109、网络接口110、网络接口111和网络接口112对应的可用概率。Exemplarily, the historical sending information of the sent emails corresponding to each long connection of each network interface of the connection pool where the email to be sent is located within 5 minutes before the current time is obtained. For example, obtain the historical sending information of the sent emails corresponding to the network interface 107, the network interface 108, the network interface 109, the network interface 110, the network interface 111, and the network interface 112 in the connection pool 104. Further, the available probabilities corresponding to the network interface 107, the network interface 108, the network interface 109, the network interface 110, the network interface 111, and the network interface 112 are calculated.
步骤303:根据已发送电子邮件的历史发送信息,从M个网络运营商的N个网络接口中,确定与发件邮箱帐号对应的目标网络运营商的目标网络接口。Step 303: Determine the target network interface of the target network operator corresponding to the sending email account from the N network interfaces of the M network operators according to the historical sending information of the sent emails.
在一种可能的实施例中,针对任意一个网络运营商的任意一个网络接口,客户端可以根据每个网络运营商的每个网络接口下的已发送电子邮件的个数、已发送电子邮件是否发送成功和已发送电子邮件完成发送所需时长,计算所述网络接口的可用概率。进一步地,客户端可以根据M个网络运营商的N个网络接口的可用概率,确定与发件邮箱帐号对应的目标网络运营商的目标网络接口。In a possible embodiment, for any network interface of any network operator, the client terminal can be based on the number of sent emails under each network interface of each network operator and whether the sent emails are sent or not. The time required for the successful transmission and the completion of the transmission of the sent email is calculated, and the available probability of the network interface is calculated. Further, the client terminal may determine the target network interface of the target network operator corresponding to the sending email account according to the available probabilities of the N network interfaces of the M network operators.
可选地,JAVA客户端101根据网络接口107的已发送电子邮件的个数、已发送电子邮件是否发送成功和已发送电子邮件完成发送所需时长,计算网络接口107的可用概率。 进一步地,根据网络接口107、网络接口108、网络接口109、网络接口110、网络接口111和网络接口112的可用概率,确定出目标网络接口。Optionally, the JAVA client 101 calculates the availability probability of the network interface 107 according to the number of sent emails of the network interface 107, whether the sent emails are successfully sent, and the time required for the sent emails to be sent. Further, the target network interface is determined according to the available probabilities of the network interface 107, the network interface 108, the network interface 109, the network interface 110, the network interface 111, and the network interface 112.
其中,在一种可能的实施例中,客户端首先针对任意一个网络运营商的任意一个网络接口,按照如下公式一计算所述网络接口的权重值,进而根据所述权重值,按照如下公式二计算所述网络接口的可用概率:Wherein, in a possible embodiment, the client first calculates the weight value of the network interface according to the following formula 1 for any network interface of any network operator, and then according to the weight value, according to the following formula 2 Calculate the available probability of the network interface:
权重值=|(a×K 1+b×K 2+c×K 3+d×K 4)/(a+b+c+d)-K 5 e+C|..........公式一; Weight value=|(a×K 1 +b×K 2 +c×K 3 +d×K 4 )/(a+b+c+d)-K 5 e +C|........ .. Formula One;
可用概率=所述网络接口的权重值/所述M个网络运营商的N个网络接口的权重值之和..........公式二。Available probability=weight value of the network interface/sum of the weight value of the N network interfaces of the M network operators..........Formula 2.
其中,a为所述网络接口在所述第一设定时长内发送成功且耗时落在时长区间一的已发送电子邮件的个数;b为所述网络接口在所述第一设定时长内发送成功且耗时落在时长区间二的已发送电子邮件的个数;c为所述网络接口在所述第一设定时长内发送成功且耗时落在时长区间三的已发送电子邮件的个数;d为所述网络接口在所述第一设定时长内发送成功且耗时超过设定阈值的已发送电子邮件的个数;e为所述网络接口在所述第一设定时长内发送失败的电子邮件个数。其中,K 1为与时长区间一对应的权重;K 2为与时长区间二对应的权重;K 3为耗时为与时长区间三对应的权重;K 4为与时长区间三对应的权重;K为设定第一常数;C为设定第二常数。 Wherein, a is the number of emails sent successfully by the network interface within the first set time period and the time-consuming period falls within the period one; b is the network interface in the first set time period The number of e-mails that were successfully sent within the period of time 2; c is the number of e-mails that were successfully sent by the network interface within the first set period of time and fell within the period of time 3 D is the number of e-mails sent by the network interface that are successfully sent within the first set time period and the time-consuming exceeds the set threshold; e is the network interface in the first set The number of e-mails that failed to be sent within the duration. Among them, K 1 is the weight corresponding to the duration interval one; K 2 is the weight corresponding to the duration interval two; K 3 is the weight corresponding to the duration interval three; K 4 is the weight corresponding to the duration interval three; K To set the first constant; C to set the second constant.
在一种可能的实施例中,JAVA客户端101还可以定期根据设定时长的电子邮件发送信息计算各个网络接口的可用概率。示例性地,JAVA客户端101每2分钟根据当前5分钟内的电子邮件发送信息计算网络接口107、网络接口108、网络接口109、网络接口110、网络接口111和网络接口112的权重值并的得到各个网络接口的可用概率。In a possible embodiment, the JAVA client 101 may also periodically calculate the available probability of each network interface according to the e-mail sending information of a set duration. Exemplarily, the JAVA client 101 calculates the combination of the weight values of the network interface 107, the network interface 108, the network interface 109, the network interface 110, the network interface 111 and the network interface 112 every 2 minutes according to the e-mail sending information within the current 5 minutes. Get the available probability of each network interface.
示例性地,SMTP服务器103的网络运营商提供的网络接口107、网络接口108、网络接口109、网络接口110、网络接口111和网络接口112在当前5分钟内的已发送电子邮件信息如表1所示:Exemplarily, the network interface 107, the network interface 108, the network interface 109, the network interface 110, the network interface 111, and the network interface 112 provided by the network operator of the SMTP server 103 have sent email information in the current 5 minutes as shown in Table 1. Shown:
表1Table 1
Figure PCTCN2020129122-appb-000001
Figure PCTCN2020129122-appb-000001
Figure PCTCN2020129122-appb-000002
Figure PCTCN2020129122-appb-000002
根据表1中的已发送电子邮件的历史发送信息,结合表2所示的初始分组权重,计算网络接口107、网络接口108、网络接口109、网络接口110、网络接口111和网络接口112的权重值。Calculate the weights of network interface 107, network interface 108, network interface 109, network interface 110, network interface 111, and network interface 112 according to the historical sending information of sent emails in Table 1 and the initial packet weights shown in Table 2. value.
表2Table 2
耗时time consuming 分组权重Group weight
0-300ms0-300ms 100100
300ms-800ms300ms-800ms 5050
800ms–1500ms800ms–1500ms 1515
超过1500msMore than 1500ms 55
示例性地,JAVA客户端101根据如下公式一计算网络接口107的权重值:Exemplarily, the JAVA client 101 calculates the weight value of the network interface 107 according to the following formula 1:
权重值=|(a×100+b×50+c×15+d×5)/(a+b+c+d)-5 e+1|..........公式一; Weight value=|(a×100+b×50+c×15+d×5)/(a+b+c+d)-5 e +1|..........Formula one;
可选地,a为网络接口107在当前5分钟内发送成功且耗时为0-300ms的已发送电子邮件的个数;b为网络接口107在当前5分钟内发送成功且耗时为300ms-800ms的已发送电子邮件的个数;c为网络接口107在当前5分钟内发送成功且耗时为800ms-1500ms的已发送电子邮件的个数;d为网络接口107在当前5分钟内发送成功且耗时为超过1500ms的已发送电子邮件的个数;e为网络接口107在当前5分钟内发送失败的电子邮件个数,其中超时没有结果返回的请求也算失败。Optionally, a is the number of emails sent successfully by the network interface 107 within the current 5 minutes and the time-consuming is 0-300ms; b is the number of emails sent successfully by the network interface 107 within the current 5 minutes and the time-consuming is 300ms- The number of emails sent in 800ms; c is the number of emails sent successfully by the network interface 107 in the current 5 minutes and the time is 800ms-1500ms; d is the number of emails sent by the network interface 107 in the current 5 minutes And the time-consuming is the number of e-mails sent that exceed 1500ms; e is the number of e-mails that the network interface 107 fails to send within the current 5 minutes, and the requests that are returned without a result after the timeout period are counted as failed.
进一步地,网络接口107的权重值=(1*100+3*50)/(1+3)–50+1=62.5。网络接口110在5分钟内没有进行连接,所以权重值为0。网络接口111因5分钟内有失败投递,权重值计算结果为1。网络接口112连接正常。Further, the weight value of the network interface 107=(1*100+3*50)/(1+3)-50+1=62.5. The network interface 110 has not connected within 5 minutes, so the weight value is 0. The network interface 111 failed to deliver within 5 minutes, and the weight value calculation result is 1. The network interface 112 is connected normally.
进一步地,JAVA客户端101根据公式二计算网络接口107的可用概率:Further, the JAVA client 101 calculates the available probability of the network interface 107 according to formula 2:
可用概率=所述网络接口的权重值/所述M个网络运营商的N个网络接口的权重值之和..........公式二。Available probability=weight value of the network interface/sum of the weight value of the N network interfaces of the M network operators..........Formula 2.
邮件通过网络接口107发送的概率为:62.5/(62.5+38.3+50+1+32.5)=33.9%;The probability that the mail is sent through the network interface 107 is: 62.5/(62.5+38.3+50+1+32.5)=33.9%;
通过网络接口108发送的概率为:38.3/(62.5+38.3+50+1+32.5)=20.8%;The probability of sending through the network interface 108 is: 38.3/(62.5+38.3+50+1+32.5)=20.8%;
通过网络接口109发送的概率为:50/(62.5+38.3+50+1+32.5)=27.1%;The probability of sending through the network interface 109 is: 50/(62.5+38.3+50+1+32.5)=27.1%;
通过网络接口110发送的概率为0;The probability of sending through the network interface 110 is 0;
通过网络接口111发送的概率为1/(62.5+38.3+50+1+32.5)=0.54%;The probability of sending through the network interface 111 is 1/(62.5+38.3+50+1+32.5)=0.54%;
通过网络接口112发送的概率为:32.5/(62.5+38.3+50+1+32.5)=17.6%;The probability of sending through the network interface 112 is: 32.5/(62.5+38.3+50+1+32.5)=17.6%;
进一步地,JAVA客户端101根据各个网络接口对应的可用概率来选择目标网络接口。Further, the JAVA client 101 selects the target network interface according to the available probability corresponding to each network interface.
在一种可能的实施例中,JAVA客户端101根据所述已发送电子邮件的历史发送信息,确定第一网络运营商的第一网络接口在第二设定时长内未进行邮件发送,再确定所述第一网络运营商的第一网络接口为与所述发件邮箱帐号对应的目标网络运营商的目标网络接口。其中,所述第一网络运营商的第一网络接口为所述M个网络运营商的N个网络接口中的其中一个。In a possible embodiment, the JAVA client 101 determines that the first network interface of the first network operator has not sent emails within the second set period of time according to the historical sending information of the sent emails, and then determines The first network interface of the first network operator is the target network interface of the target network operator corresponding to the sending email account. Wherein, the first network interface of the first network operator is one of the N network interfaces of the M network operators.
可选地,设定在15分钟内优先选择网络接口110发送一次电子邮件。Optionally, it is set to preferentially select the network interface 110 to send an email once within 15 minutes.
在一种可能的实施例中,JAVA客户端101确定在第三设定时长内未发送电子邮件时,可以关闭SMTP长连接池中的长连接。示例性地,当前20分钟内无任何电子邮件发送任务,JAVA客户端101关闭与SMTP服务器103中网络接口107、网络接口108、网络接口109、网络接口110、网络接口111和网络接口112的连接。JAVA客户端101通过主动关闭与SMTP服务器的连接,能够实现节省通信资源和对各个网络接口的控制。In a possible embodiment, when the JAVA client 101 determines that no email is sent within the third set time period, it can close the persistent connection in the SMTP persistent connection pool. Exemplarily, there is no email sending task in the current 20 minutes, and the JAVA client 101 closes the connection with the network interface 107, the network interface 108, the network interface 109, the network interface 110, the network interface 111 and the network interface 112 in the SMTP server 103 . The JAVA client 101 actively closes the connection with the SMTP server to save communication resources and control various network interfaces.
在一种可能的实施例中,客户端根据所述已发送电子邮件的历史发送信息对所述分组权重进行优化,包括:客户端调整K 1、K 2、K 3、K 4中任意一个,然后根据第四设定时长内的所述已发送电子邮件的平均时长,对所述分组权重进行优化。示例性地,JAVA客户端101获取当前5分钟内的已发送电子邮件信息,选择一个实例,对实例中任意一项分组权重进行调节,比如,将耗时0-300ms的分组权重由100提高到200;然后获取设定周期的已发送电子邮件的历史发送信息,根据该信息确定电子邮件的平均耗时,对分组权重进行调节。比如当平均耗时变低时,提高该分组权重。 In a possible embodiment, the client optimizing the group weight according to the historical sending information of the sent emails includes: the client adjusting any one of K 1 , K 2 , K 3 , and K 4, Then, the group weight is optimized according to the average duration of the sent emails within the fourth set duration. Exemplarily, the JAVA client 101 obtains the email information sent within the current 5 minutes, selects an instance, and adjusts the weight of any group in the instance, for example, increase the weight of the group that takes 0-300ms from 100 to 200; Then obtain the historical sending information of the sent emails of the set period, determine the average time consumption of emails based on this information, and adjust the grouping weight. For example, when the average time consumption becomes lower, increase the group weight.
步骤304:通过目标网络运营商的目标网络接口上的长连接,向SMTP服务器发送与发件邮箱帐号相关的待发送电子邮件。Step 304: Send the to-be-sent e-mail related to the outgoing mailbox account to the SMTP server through the persistent connection on the target network interface of the target network operator.
在一种可能的实施例中,JAVA客户端101在得到各个网络接口对应的可用概率后,可以选择一个目标网络接口。进一步地,JAVA客户端101通过与该目标接口之间的长连接向SMTP服务器103发送电子邮件。可选地,JAVA客户端101记录此次邮件发送信息。In a possible embodiment, the JAVA client 101 may select a target network interface after obtaining the available probabilities corresponding to each network interface. Further, the JAVA client 101 sends an email to the SMTP server 103 through a long connection with the target interface. Optionally, the JAVA client 101 records this mail sending information.
在另外一种可能的实施例中,JAVA客户端101与所有网络接口建立并保留长连接。In another possible embodiment, the JAVA client 101 establishes and retains long connections with all network interfaces.
在另外一种可能的实施例中,可以有超过一个SMTP服务器同时作为第三方邮件服务器。可选地,根据SMTP服务器分组管理多种类型的连接池,也就是说,不同的SMTP服务器对应的连接池可以不同。In another possible embodiment, there may be more than one SMTP server serving as a third-party mail server at the same time. Optionally, multiple types of connection pools are grouped and managed according to SMTP servers, that is, connection pools corresponding to different SMTP servers can be different.
基于相同的技术构思,本发明实施例还提供一种电子邮件发送装置,该装置可执行图3中电子邮件的发送方法的实施例。本发明实施例提供的装置如图4所示,包括:Based on the same technical concept, an embodiment of the present invention also provides an email sending device, which can execute the embodiment of the email sending method in FIG. 3. The device provided by the embodiment of the present invention is shown in FIG. 4 and includes:
处理单元401,用于确定与待发送电子邮件中发件邮箱帐号对应的SMTP长连接池,获取距离当前时刻之前的第一设定时长内,与每个网络接口的每个长连接对应的已发送电子邮件的历史发送信息,根据该已发送电子邮件的历史发送信息,从M个网络运营商的N个网络接口中,确定与发件邮箱帐号对应的目标网络运营商的目标网络接口。其中,SMTP长连接池包括M个网络运营商的N个网络接口的K个长连接,已发送电子邮件分别对应不同网络运营商的不同网络接口的不同长连接,M、N和K均为大于或等于1的正整数;The processing unit 401 is configured to determine the SMTP persistent connection pool corresponding to the outgoing mailbox account in the to-be-sent e-mail, and obtain the SMTP persistent connection pool corresponding to each persistent connection of each network interface within the first set time period before the current time. Based on the historical sending information of the sent emails, the target network interface of the target network operator corresponding to the sending mailbox account is determined from the N network interfaces of the M network operators according to the historical sending information of the sent emails. Among them, the SMTP persistent connection pool includes K persistent connections of N network interfaces of M network operators. The sent emails correspond to different persistent connections of different network interfaces of different network operators. M, N, and K are all greater than Or a positive integer equal to 1;
发送单元402,用于通过目标网络运营商的目标网络接口上的长连接,向SMTP服务器103发送与发件邮箱帐号相关的待发送电子邮件。The sending unit 402 is configured to send to the SMTP server 103 the to-be-sent email related to the sending mailbox account through the persistent connection on the target network interface of the target network operator.
在一种可能的实施例中,已发送电子邮件的历史发送信息包括:网络接口下的已发送电子邮件的个数、已发送电子邮件是否发送成功和已发送电子邮件完成发送所需时长。In a possible embodiment, the historical sending information of the sent emails includes: the number of sent emails under the network interface, whether the sent emails are sent successfully, and the time required for the sent emails to complete sending.
处理单元401具体用于:针对任意一个网络运营商的任意一个网络接口,根据每个网络运营商的每个接口下的已发送电子邮件的个数、已发送电子邮件是否发送成功和已发送电子邮件完成发送所需时长,计算网络接口的可用概率,根据M个网络运营商的N个网络接口的可用概率,确定与发件邮箱帐号对应的目标网络运营商的目标网络接口。The processing unit 401 is specifically configured to: for any network interface of any network operator, according to the number of sent emails under each interface of each network operator, whether the sent emails are sent successfully, and the sent emails The time required for the mail to be sent is calculated, the available probability of the network interface is calculated, and the target network interface of the target network operator corresponding to the sending mailbox account is determined according to the available probability of the N network interfaces of the M network operators.
在一种可能的实施例中,处理单元401具体用于:针对任意一个网络运营商的任意一个网络接口,按照如下公式一计算网络接口的权重值:In a possible embodiment, the processing unit 401 is specifically configured to: for any network interface of any network operator, calculate the weight value of the network interface according to the following formula 1:
权重值=|(a×K 1+b×K 2+c×K 3+d×K 4)/(a+b+c+d)-K 5 e+C|..........公式一; Weight value=|(a×K 1 +b×K 2 +c×K 3 +d×K 4 )/(a+b+c+d)-K 5 e +C|........ .. Formula One;
根据权重值,按照公式二计算网络接口的可用概率:According to the weight value, calculate the available probability of the network interface according to formula 2:
可用概率=网络接口的权重值/M个网络运营商的N个网络接口的权重值之和..........公式二;Available probability = the weight value of the network interface/the sum of the weight values of the N network interfaces of the M network operators..........Formula 2;
其中,a为网络接口在第一设定时长内发送成功且耗时落在时长区间一的已发送电子邮件的个数;b为网络接口在第一设定时长内发送成功且耗时落在时长区间二的已发送电子邮件的个数;c为网络接口在第一设定时长内发送成功且耗时落在时长区间三的已发送电子邮件的个数;d为网络接口在第一设定时长内发送成功且耗时超过设定阈值的已发送电子邮件的个数;e为网络接口在第一设定时长内发送失败的电子邮件个数。其中,K 1为与时长区间一对应的权重;K 2为与时长区间二对应的权重;K 3为耗时为与时长区间三对应的权重;K 4为与时长区间三对应的权重;K 5为设定第一常数;C为设定第二常数。 Among them, a is the number of e-mails sent successfully by the network interface within the first set duration and the time-consuming period falls within the period 1; b is the number of emails sent successfully by the network interface within the first set duration and the time-consuming The number of e-mails sent in period 2; c is the number of e-mails sent successfully by the network interface within the first set time period and time-consuming in period 3; d is the number of e-mails that the network interface is in the first setting The number of e-mails that have been sent successfully within a certain period of time and the time-consuming exceeds the set threshold; e is the number of e-mails that have failed to be sent by the network interface within the first set period of time. Among them, K 1 is the weight corresponding to the duration interval one; K 2 is the weight corresponding to the duration interval two; K 3 is the weight corresponding to the duration interval three; K 4 is the weight corresponding to the duration interval three; K 5 is to set the first constant; C is to set the second constant.
在一种可能的实施例中,处理单元401还用于选择第二设定时长内没有被选中的网络接口,连接SMTP服务器,发送电子邮件。In a possible embodiment, the processing unit 401 is further configured to select a network interface that is not selected within the second set time period, connect to the SMTP server, and send emails.
在一种可能的实施例中,处理单元401在确定第三设定时长内未发送电子邮件时,关闭SMTP长连接池中的长连接。In a possible embodiment, the processing unit 401 closes the persistent connection in the SMTP persistent connection pool when it is determined that the email is not sent within the third set time period.
在一种可能的实施例中,还包括优化单元,用于根据已发送电子邮件的历史发送信息对分组权重进行优化。In a possible embodiment, an optimization unit is further included, configured to optimize the group weight according to the historical sending information of the sent emails.
在一种可能的实施例中,优化单元具体用于调整K 1、K 2、K 3、K 4中任意一个,根据第四设定时长内的已发送邮件的平均时长,对所述分组权重进行优化。 In a possible embodiment, the optimization unit is specifically configured to adjust any one of K 1 , K 2 , K 3 , and K 4 , and weight the group according to the average duration of the sent mail within the fourth set duration optimize.
基于相同的技术构思,本发明实施例提供了一种计算设备,如图5所示,包括至少一个处理器501,以及与至少一个处理器连接的存储器502,本发明实施例中不限定处理器501与存储器502之间的具体连接介质,图5中处理器501和存储器502之间通过总线连接为例。总线可以分为地址总线、数据总线、控制总线等。Based on the same technical concept, an embodiment of the present invention provides a computing device. As shown in FIG. 5, it includes at least one processor 501 and a memory 502 connected to the at least one processor. The embodiment of the present invention does not limit the processor. For the specific connection medium between the 501 and the memory 502, the connection between the processor 501 and the memory 502 in FIG. 5 is taken as an example. The bus can be divided into address bus, data bus, control bus and so on.
在本发明实施例中,存储器502存储有可被至少一个处理器501执行的指令,至少一个处理器501通过执行存储器502存储的指令,可以执行前述的结算方法中所包括的步骤。In the embodiment of the present invention, the memory 502 stores instructions that can be executed by at least one processor 501, and the at least one processor 501 can execute the steps included in the foregoing settlement method by executing the instructions stored in the memory 502.
其中,处理器501是终端设备的控制中心,可以利用各种接口和线路连接终端设备的各个部分,通过运行或执行存储在存储器502内的指令以及调用存储在存储器502内的数据,从而处理数据。可选的,处理器501可包括一个或多个处理单元,处理器501可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器501中。在一些实施例中,处理器501和存储器502可以在同一芯片上实现,在一些实施例中,它们也可以在独立的芯片上分别实现。Among them, the processor 501 is the control center of the terminal device, which can use various interfaces and lines to connect various parts of the terminal device, and process data by running or executing instructions stored in the memory 502 and calling data stored in the memory 502. . Optionally, the processor 501 may include one or more processing units, and the processor 501 may integrate an application processor and a modem processor. The application processor mainly processes the operating system, user interface, and application programs. The adjustment processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 501. In some embodiments, the processor 501 and the memory 502 may be implemented on the same chip, and in some embodiments, they may also be implemented on separate chips.
处理器501可以是通用处理器,例如中央处理器(CPU)、数字信号处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本发明实施例中 公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。The processor 501 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application specific integrated circuit (ASIC), a field programmable gate array or other programmable logic devices, discrete gates or transistors Logic devices and discrete hardware components can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present invention may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
存储器502作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块。存储器502可以包括至少一种类型的存储介质,例如可以包括闪存、硬盘、多媒体卡、卡型存储器、随机访问存储器(Random Access Memory,RAM)、静态随机访问存储器(Static Random Access Memory,SRAM)、可编程只读存储器(Programmable Read Only Memory,PROM)、只读存储器(Read Only Memory,ROM)、带电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、磁性存储器、磁盘、光盘等等。存储器502是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本发明实施例中的存储器502还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。The memory 502, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory 502 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), magnetic memory, disk , CD, etc. The memory 502 is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 502 in the embodiment of the present invention may also be a circuit or any other device capable of realizing a storage function for storing program instructions and/or data.
基于相同的技术构思,本发明实施例提供了一种计算机可读介质,其存储有可由终端设备执行的计算机程序,当所述程序在终端设备上运行时,使得所述终端设备执行结算方法的步骤。Based on the same technical concept, the embodiment of the present invention provides a computer-readable medium that stores a computer program executable by a terminal device. When the program runs on the terminal device, the terminal device executes the settlement method. step.
本领域内的技术人员应明白,本发明的实施例可提供为方法、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention can be provided as a method or a computer program product. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are used to generate It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个 方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. In this way, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.

Claims (12)

  1. 一种电子邮件的发送方法,其特征在于,包括:An email sending method, characterized in that it comprises:
    确定与待发送电子邮件中发件邮箱帐号对应的简单邮件传输协议SMTP长连接池,其中,所述SMTP长连接池包括M个网络运营商的N个网络接口的K个长连接,M、N和K均为大于或等于1的正整数;Determine the Simple Mail Transfer Protocol SMTP persistent connection pool corresponding to the sending mailbox account in the email to be sent, where the SMTP persistent connection pool includes K persistent connections of N network interfaces of M network operators, M, N And K are both positive integers greater than or equal to 1;
    获取距离当前时刻之前的第一设定时长内的已发送电子邮件的历史发送信息,所述已发送电子邮件分别对应不同网络运营商的不同网络接口的不同长连接;Acquiring historical sending information of sent emails within a first set time period before the current time, where the sent emails correspond to different long connections of different network interfaces of different network operators;
    根据所述已发送电子邮件的历史发送信息,从所述M个网络运营商的N个网络接口中,确定与所述发件邮箱帐号对应的目标网络运营商的目标网络接口;Determine the target network interface of the target network operator corresponding to the sending email account from among the N network interfaces of the M network operators according to the historical sending information of the sent emails;
    通过所述目标网络运营商的目标网络接口上的长连接,向SMTP服务器发送所述待发送电子邮件。The e-mail to be sent is sent to the SMTP server through the long connection on the target network interface of the target network operator.
  2. 根据权利要求1所述的方法,其特征在于,所述已发送电子邮件的历史发送信息包括:各个网络运营商的各个网络接口下的已发送电子邮件的个数、已发送电子邮件是否发送成功,已发送电子邮件完成发送所需时长;The method according to claim 1, wherein the historical sending information of the sent emails comprises: the number of sent emails under each network interface of each network operator, and whether the sent emails are sent successfully , The time required for the sent email to be sent;
    根据所述已发送电子邮件的历史发送信息,从所述M个网络运营商的N个网络接口中,确定与所述发件邮箱帐号对应的目标网络运营商的目标网络接口,包括:According to the historical sending information of the sent emails, from the N network interfaces of the M network operators, determining the target network interface of the target network operator corresponding to the sending email account includes:
    针对任意一个网络运营商的任意一个网络接口,根据各个网络运营商的各个网络接口下的已发送电子邮件的个数、已发送电子邮件是否发送成功,已发送电子邮件完成发送所需时长,计算所述网络接口的可用概率;For any network interface of any network operator, calculate based on the number of sent emails under each network interface of each network operator, whether the sent emails are successfully sent, and the time required to complete the sending of the sent emails. The available probability of the network interface;
    根据所述M个网络运营商的N个网络接口的可用概率,确定与所述发件邮箱帐号对应的目标网络运营商的目标网络接口。According to the available probabilities of the N network interfaces of the M network operators, the target network interface of the target network operator corresponding to the sending email account is determined.
  3. 根据权利要求2所述的方法,其特征在于,所述根据各个网络运营商的各个接口下的已发送电子邮件的个数、已发送电子邮件是否发送成功,已发送电子邮件完成发送所需时长,计算所述网络接口的可用概率,包括:The method according to claim 2, characterized in that, according to the number of sent emails under each interface of each network operator, and whether the sent emails are sent successfully, the time required for the sent emails to be sent is completed , Calculate the available probability of the network interface, including:
    针对任意一个网络运营商的任意一个网络接口,按照公式一计算所述网络接口的权重值;并根据所述权重值,按照公式二计算所述网络接口的可用概率;For any network interface of any network operator, calculate the weight value of the network interface according to formula 1; and calculate the available probability of the network interface according to formula 2 according to the weight value;
    权重值=|(a×K 1+b×K 2+c×K 3+d×K 4)/(a+b+c+d)-K 5 e+C|..........公式一; Weight value=|(a×K 1 +b×K 2 +c×K 3 +d×K 4 )/(a+b+c+d)-K 5 e +C|........ .. Formula One;
    可用概率=所述网络接口的权重值/所述M个网络运营商的N个网络接口的权重值之和..........公式二;Available probability = the weight value of the network interface/the sum of the weight values of the N network interfaces of the M network operators..........Formula 2;
    其中,a为所述网络接口在所述第一设定时长内发送成功且耗时落在时长区间一的已发送电子邮件的个数;b为所述网络接口在所述第一设定时长内发送成功且耗时落在时长区间二的已发送电子邮件的个数;c为所述网络接口在所述第一设定时长内发送成功且耗时落在时长区间三的已发送电子邮件的个数;d为所述网络接口在所述第一设定时长内发送成功且耗时超过设定阈值的已发送电子邮件的个数;e为所述网络接口在所述第一设定时长内发送失败的电子邮件个数;Wherein, a is the number of emails sent successfully by the network interface within the first set time period and the time-consuming period falls within the period one; b is the network interface in the first set time period The number of emails that were successfully sent within the period of time 2; c is the number of emails that were successfully sent by the network interface within the first set period of time and fell within the period of time 3 D is the number of e-mails sent by the network interface that are successfully sent within the first set time period and the time-consuming exceeds the set threshold; e is the network interface in the first set The number of emails that failed to be sent within a period of time;
    其中,K 1为与时长区间一对应的权重;K 2为与时长区间二对应的权重;K 3为耗时为与时长区间三对应的权重;K 4为与时长区间三对应的权重;K 5为设定第一常数;C为设定第二常数。 Among them, K 1 is the weight corresponding to the duration interval one; K 2 is the weight corresponding to the duration interval two; K 3 is the weight corresponding to the duration interval three; K 4 is the weight corresponding to the duration interval three; K 5 is to set the first constant; C is to set the second constant.
  4. 根据权利要求1所述的方法,其特征在于,所述根据所述已发送电子邮件的历史发送信息,从所述M个网络运营商的N个网络接口中,确定与所述发件邮箱帐号对应的目标网络运营商的目标网络接口,包括:The method according to claim 1, characterized in that, according to the historical sending information of the sent emails, from the N network interfaces of the M network operators, it is determined to be the same as the sending email account The corresponding target network interface of the target network operator, including:
    根据所述已发送电子邮件的历史发送信息,确定第一网络运营商的第一网络接口在第二设定时长内未进行邮件发送,其中,所述第一网络运营商的第一网络接口为所述M个网络运营商的N个网络接口中的其中一个;According to the historical sending information of the sent emails, it is determined that the first network interface of the first network operator has not sent emails within a second set time period, where the first network interface of the first network operator is One of the N network interfaces of the M network operators;
    确定所述第一网络运营商的第一网络接口为与所述发件邮箱帐号对应的目标网络运营商的目标网络接口。It is determined that the first network interface of the first network operator is the target network interface of the target network operator corresponding to the sending email account.
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 4, wherein the method further comprises:
    确定在第三设定时长内未发送电子邮件时,关闭所述SMTP长连接池中的长连接。When it is determined that no email is sent within the third set time period, the persistent connection in the SMTP persistent connection pool is closed.
  6. 一种电子邮件的发送装置,其特征在于,所述装置包括:An e-mail sending device, characterized in that the device comprises:
    处理单元,用于确定与待发送电子邮件中发件邮箱帐号对应的简单邮件传输协议SMTP长连接池,其中,所述SMTP长连接池包括M个网络运营商的N个网络接口的K个长连接,M、N和K均为大于或等于1的正整数;获取距离当前时刻之前的第一设定时长内的已发送电子邮件的历史发送信息,所述已发送电子邮件分别对应不同网络运营商的不同网络接口的不同长连接;根据所述已发送电子邮件的历史发送信息,从所述M个网络运营商的N个网络接口中,确定与所述发件邮箱帐号对应的目标网络运营商的目标网络接口;The processing unit is configured to determine the Simple Mail Transfer Protocol SMTP persistent connection pool corresponding to the sending mailbox account in the email to be sent, wherein the SMTP persistent connection pool includes K lengths of N network interfaces of M network operators Connected, M, N, and K are all positive integers greater than or equal to 1; to obtain historical sending information of sent emails within the first set period of time before the current moment, the sent emails correspond to different network operations respectively Different long connections of different network interfaces of the provider; according to the historical sending information of the sent emails, from the N network interfaces of the M network operators, determine the target network operation corresponding to the sending mailbox account The target network interface of the supplier;
    发送单元,用于通过所述目标网络运营商的目标网络接口上的长连接,向SMTP服务器发送所述待发送电子邮件。The sending unit is configured to send the to-be-sent email to the SMTP server through the persistent connection on the target network interface of the target network operator.
  7. 根据权利要求6所述的装置,其特征在于,所述已发送电子邮件的历史发送信息包括:各个网络运营商的各个网络接口下的已发送电子邮件的个数、已发送电子邮件是否发送成功,已发送电子邮件完成发送所需时长;The device according to claim 6, wherein the historical sending information of the sent emails comprises: the number of sent emails under each network interface of each network operator, and whether the sent emails are successfully sent , The time required for the sent email to be sent;
    所述处理单元具体用于:The processing unit is specifically used for:
    针对任意一个网络运营商的任意一个网络接口,根据各个网络运营商的各个网络接口下的已发送电子邮件的个数、已发送电子邮件是否发送成功,已发送电子邮件完成发送所需时长,计算所述网络接口的可用概率;For any network interface of any network operator, calculate based on the number of sent emails under each network interface of each network operator, whether the sent emails are successfully sent, and the time required to complete the sending of the sent emails. The available probability of the network interface;
    根据所述M个网络运营商的N个网络接口的可用概率,确定与所述发件邮箱帐号对应的目标网络运营商的目标网络接口。According to the available probabilities of the N network interfaces of the M network operators, the target network interface of the target network operator corresponding to the sending email account is determined.
  8. 根据权利要求7所述的装置,其特征在于,所述处理单元具体用于:The device according to claim 7, wherein the processing unit is specifically configured to:
    针对任意一个网络运营商的任意一个网络接口,按照公式一计算所述网络接口的权重值;并根据所述权重值,按照公式二计算所述网络接口的可用概率;For any network interface of any network operator, calculate the weight value of the network interface according to formula 1; and calculate the available probability of the network interface according to formula 2 according to the weight value;
    权重值=|(a×K 1+b×K 2+c×K 3+d×K 4)/(a+b+c+d)-K 5 e+C|..........公式一; Weight value=|(a×K 1 +b×K 2 +c×K 3 +d×K 4 )/(a+b+c+d)-K 5 e +C|........ .. Formula One;
    可用概率=所述网络接口的权重值/所述M个网络运营商的N个网络接口的权重值之和..........公式二;Available probability = the weight value of the network interface/the sum of the weight values of the N network interfaces of the M network operators..........Formula 2;
    其中,a为所述网络接口在所述第一设定时长内发送成功且耗时落在时长区间一的已发送电子邮件的个数;b为所述网络接口在所述第一设定时长内发送成功且耗时落在时长区间二的已发送电子邮件的个数;c为所述网络接口在所述第一设定时长内发送成功且耗时落在时长区间三的已发送电子邮件的个数;d为所述网络接口在所述第一设定时长内发送成功且耗时超过设定阈值的已发送电子邮件的个数;e为所述网络接口在所述第一设定时长内发送失败的电子邮件个数;Wherein, a is the number of emails sent successfully by the network interface within the first set time period and the time-consuming period falls within the period one; b is the network interface in the first set time period The number of emails that were successfully sent within the period of time 2; c is the number of emails that were successfully sent by the network interface within the first set period of time and fell within the period of time 3 D is the number of e-mails sent by the network interface that are successfully sent within the first set time period and the time-consuming exceeds the set threshold; e is the network interface in the first set The number of emails that failed to be sent within a period of time;
    其中,K 1为与时长区间一对应的权重;K 2为与时长区间二对应的权重;K 3为耗时为与时长区间三对应的权重;K 4为与时长区间三对应的权重;K 5为设定第一常数;C为设定第二常数。 Among them, K 1 is the weight corresponding to the duration interval one; K 2 is the weight corresponding to the duration interval two; K 3 is the weight corresponding to the duration interval three; K 4 is the weight corresponding to the duration interval three; K 5 is to set the first constant; C is to set the second constant.
  9. 根据权利要求6所述的装置,其特征在于,所述处理单元具体用于:The device according to claim 6, wherein the processing unit is specifically configured to:
    根据所述已发送电子邮件的历史发送信息,确定第一网络运营商的第一网络接口在第二设定时长内未进行邮件发送,其中,所述第一网络运营商的第一网络接口为所述M个网络运营商的N个网络接口中的其中一个;According to the historical sending information of the sent emails, it is determined that the first network interface of the first network operator has not sent emails within a second set time period, where the first network interface of the first network operator is One of the N network interfaces of the M network operators;
    确定所述第一网络运营商的第一网络接口为与所述发件邮箱帐号对应的目标网络运营商的目标网络接口。It is determined that the first network interface of the first network operator is the target network interface of the target network operator corresponding to the sending email account.
  10. 根据权利要求6至9任一项所述的装置,其特征在于,所述处理单元还用于:The device according to any one of claims 6 to 9, wherein the processing unit is further configured to:
    确定在第三设定时长内未发送电子邮件时,关闭所述SMTP长连接池中的长连接。When it is determined that no email is sent within the third set time period, the persistent connection in the SMTP persistent connection pool is closed.
  11. 一种计算设备,其特征在于,包括至少一个处理单元以及至少一个存储单元,其中,所述存储单元存储有计算机程序,当所述程序被所述处理单元执行时,使得所述处理单元执行权利要求1-5任一权利要求所述的方法。A computing device, characterized by comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the right The method of any one of claims 1-5.
  12. 一种计算机可读存储介质,其特征在于,其存储有可由计算设备执行的计算机程序,当所述程序在所述计算设备上运行时,使得所述计算设备执行权利要求1-5任一权利要求所述的方法。A computer-readable storage medium, characterized in that it stores a computer program executable by a computing device, and when the program runs on the computing device, the computing device executes any one of claims 1-5 Require the described method.
PCT/CN2020/129122 2019-12-25 2020-11-16 E-mail sending method and apparatus WO2021129228A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911360822.XA CN111049740B (en) 2019-12-25 2019-12-25 Method and device for sending e-mail
CN201911360822.X 2019-12-25

Publications (1)

Publication Number Publication Date
WO2021129228A1 true WO2021129228A1 (en) 2021-07-01

Family

ID=70239875

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/129122 WO2021129228A1 (en) 2019-12-25 2020-11-16 E-mail sending method and apparatus

Country Status (2)

Country Link
CN (1) CN111049740B (en)
WO (1) WO2021129228A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111049740B (en) * 2019-12-25 2023-04-18 深圳前海微众银行股份有限公司 Method and device for sending e-mail

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101184268A (en) * 2005-05-20 2008-05-21 华为技术有限公司 Method of transmitting MM4 interface message in multimedia message system
CN102404698A (en) * 2010-09-15 2012-04-04 中国移动通信集团公司 Wireless mail pushing method, device and system
CN111049740A (en) * 2019-12-25 2020-04-21 深圳前海微众银行股份有限公司 Method and device for sending e-mail

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104092599B (en) * 2014-07-24 2018-03-06 广东欧珀移动通信有限公司 A kind of method and mobile terminal of mobile terminal detection mail outbox Service-Port
CN105451197A (en) * 2014-09-29 2016-03-30 阿里巴巴集团控股有限公司 Method and device of sending communication information
CN104363611B (en) * 2014-11-05 2018-02-23 中国联合网络通信集团有限公司 Handoff testing method and system
CN110611891B (en) * 2019-08-29 2022-05-20 深圳市梦网科技发展有限公司 Short message sending method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101184268A (en) * 2005-05-20 2008-05-21 华为技术有限公司 Method of transmitting MM4 interface message in multimedia message system
CN102404698A (en) * 2010-09-15 2012-04-04 中国移动通信集团公司 Wireless mail pushing method, device and system
CN111049740A (en) * 2019-12-25 2020-04-21 深圳前海微众银行股份有限公司 Method and device for sending e-mail

Also Published As

Publication number Publication date
CN111049740A (en) 2020-04-21
CN111049740B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
US10659383B2 (en) System and method for latency-based queuing
CN111049756B (en) Request response method and device, electronic equipment and computer readable storage medium
CN104283643A (en) Message speed limiting method and device
JP7285699B2 (en) Program, method and terminal device
CN112104731B (en) Request processing method and device, electronic equipment and storage medium
WO2006044697A1 (en) Method, apparatus and computer software for controlling receipt of undesired electronic mail by limiting the number of connections and messages
WO2021129228A1 (en) E-mail sending method and apparatus
CN111245732B (en) Flow control method, device and equipment
CN113656176B (en) Cloud equipment distribution method, device and system, electronic equipment, medium and product
US10642585B1 (en) Enhancing API service schemes
WO2022267715A1 (en) Oracle machine node screening method and apparatus, and storage medium and electronic apparatus
CN112654003A (en) Method, device, storage medium and electronic equipment for sending message
CN111400039A (en) Control method and device of cloud platform, cloud platform system and electronic equipment
CN108023938B (en) Message sending method and server
CN112910987A (en) Message pushing method, system, device, equipment and storage medium
CN108989465B (en) Consensus method, server, storage medium and distributed system
CN114143196B (en) Instance configuration updating method, device, equipment, storage medium and program product
CN111488222B (en) Stream aggregation method and device and electronic equipment
CN113052691A (en) Distributed account checking system service balancing method, node and cluster
CN116166181A (en) Cloud monitoring method and cloud management platform
US20170192795A1 (en) Universal Computing Element (UCE) and the Mode of Computing with the Use of UCE
CN114531401A (en) Token bucket flow limiting method based on priority
CN106407307A (en) Interaction method and interaction device for node data of distributed database
CN106921607B (en) Password operation management method and system under password server cluster
CN106506394B (en) Load balancing method, system and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20905770

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 28.10.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20905770

Country of ref document: EP

Kind code of ref document: A1