Movatterモバイル変換


[0]ホーム

URL:


CN115589394B - A data processing method, device, equipment and storage medium based on mailbox - Google Patents

A data processing method, device, equipment and storage medium based on mailbox
Download PDF

Info

Publication number
CN115589394B
CN115589394BCN202211337442.6ACN202211337442ACN115589394BCN 115589394 BCN115589394 BCN 115589394BCN 202211337442 ACN202211337442 ACN 202211337442ACN 115589394 BCN115589394 BCN 115589394B
Authority
CN
China
Prior art keywords
email
processing
policy
strategy
mailbox
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211337442.6A
Other languages
Chinese (zh)
Other versions
CN115589394A (en
Inventor
黄梓枫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co LtdfiledCriticalBeijing Zitiao Network Technology Co Ltd
Priority to CN202211337442.6ApriorityCriticalpatent/CN115589394B/en
Publication of CN115589394ApublicationCriticalpatent/CN115589394A/en
Application grantedgrantedCritical
Publication of CN115589394BpublicationCriticalpatent/CN115589394B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The application discloses a data processing method based on a mailbox, which comprises the following steps: acquiring at least one mail from a mailbox server; determining whether the at least one email meets an email processing policy; responding to that a first mail in the at least one mail meets the mail processing strategy, sending the first mail to a processing server, and marking the first mail as a read mail at the mailbox server; and/or, in response to the second mail in the at least one mail not meeting the mail processing policy, marking the second mail as an unread mail at the mailbox server. By using the scheme, the number of the mails sent to the processing server side to be processed can be reduced, and the influence on the functions of the mailbox application program is correspondingly reduced. In one example, if the method is applied to gray scale testing of a mailbox application, the impact on functions that the mailbox application has published can be reduced.

Description

Translated fromChinese
一种基于邮箱的数据处理方法、装置、设备和存储介质A data processing method, device, equipment and storage medium based on mailbox

技术领域Technical Field

本申请涉及计算机技术领域,特别是涉及一种基于邮箱的数据处理方法及装置。The present application relates to the field of computer technology, and in particular to a mailbox-based data processing method and device.

背景技术Background technique

目前,邮箱应用程序得到了较为广泛的应用。邮箱应用程序可以具备邮件接收、邮件发送等功能。邮箱应用程序在投入使用之前,可以采用灰度测试的方式对该邮箱应用程序进行测试。At present, mailbox applications have been widely used. Mailbox applications can have functions such as mail receiving and mail sending. Before the mailbox application is put into use, the mailbox application can be tested in a grayscale test method.

当前对邮箱应用程序进行灰度测试的方式,可能会对邮箱应用已有的功能带来较大的影响,因此,急需一种方案,能够解决上述问题。The current method of grayscale testing of mailbox applications may have a significant impact on the existing functions of the mailbox application. Therefore, a solution is urgently needed to solve the above problems.

发明内容Summary of the invention

为了解决或者部分解决上述技术问题,本申请实施例提供了一种基于邮箱的数据处理方法及装置。In order to solve or partially solve the above technical problems, an embodiment of the present application provides a mailbox-based data processing method and device.

第一方面,本申请实施例提供了一种基于邮箱的数据处理方法,所述方法包括:In a first aspect, an embodiment of the present application provides a mailbox-based data processing method, the method comprising:

从邮箱服务端获取至少一封邮件;Get at least one email from the mailbox server;

确定所述至少一封邮件是否满足邮件处理策略;Determining whether the at least one email satisfies an email processing policy;

响应于所述至少一封邮件中的第一邮件满足所述邮件处理策略,向处理服务端发送所述第一邮件,并将所述第一邮件在所述邮箱服务端标记为已读邮件;和/或,响应于所述至少一封邮件中的第二邮件不满足所述邮件处理策略,将所述第二邮件在所述邮箱服务端标记为未读邮件。In response to a first email among the at least one email satisfying the email processing policy, sending the first email to a processing server and marking the first email as a read email on the mailbox server; and/or, in response to a second email among the at least one email not satisfying the email processing policy, marking the second email as an unread email on the mailbox server.

可选的,所述邮件处理策略包括以下其中一项:Optionally, the email processing strategy includes one of the following:

集群策略、白名单策略以及比例阈值策略;其中:Cluster strategy, whitelist strategy, and ratio threshold strategy; among them:

所述集群策略,用于指示具备处理邮件权限的集群;The cluster strategy is used to indicate a cluster that has the authority to process emails;

所述白名单策略,用于指示能够被处理的邮件的收件人;The whitelist policy is used to indicate recipients of emails that can be processed;

所述比例阈值策略,用于指示能够被处理的收件人与特定阈值之间的数量关系。The ratio threshold strategy is used to indicate the relationship between the number of recipients that can be processed and a specific threshold.

可选的,所述邮件处理策略包括多种策略,所述确定所述至少一封邮件是否满足邮件处理策略,包括:Optionally, the email processing strategy includes multiple strategies, and the determining whether the at least one email satisfies the email processing strategy includes:

按照所述多种策略的优先级确定所述第一邮件满足所述邮件处理策略。It is determined that the first email satisfies the email processing policy according to the priorities of the multiple policies.

可选的,所述多种邮件处理策略包括第一策略和第二策略,所述第一策略和所述第二策略均为所述集群策略、白名单策略以及比例阈值策略中的其中一项,所述第一策略的优先级高于所述第二策略的优先级,所述按照所述多种策略的优先级确定所述第一邮件满足所述邮件处理策略,包括:Optionally, the multiple email processing policies include a first policy and a second policy, the first policy and the second policy are both one of the cluster policy, the whitelist policy, and the ratio threshold policy, the priority of the first policy is higher than the priority of the second policy, and determining that the first email satisfies the email processing policy according to the priorities of the multiple policies includes:

判断所述第一邮件是否满足所述第一策略,若所述第一邮件满足所述第一策略,则确定所述第一邮件满足所述邮件处理策略;或者,Determine whether the first email satisfies the first policy, and if the first email satisfies the first policy, determine that the first email satisfies the email processing policy; or,

在所述第一邮件不满足所述第一策略的情况下,判断所述第一邮件是否满足所述第二策略,若所述第一邮件满足所述第二策略,则确定所述第一邮件满足所述邮件处理策略。In the case that the first email does not satisfy the first policy, it is determined whether the first email satisfies the second policy. If the first email satisfies the second policy, it is determined that the first email satisfies the email processing policy.

可选的,当所述邮件处理策略包括所述集群策略时,响应于所述至少一封邮件中的第一邮件满足所述邮件处理策略,向处理服务端发送所述第一邮件,包括:Optionally, when the email processing strategy includes the cluster strategy, in response to a first email in the at least one email satisfying the email processing strategy, sending the first email to the processing server includes:

响应于所述集群策略指示的集群包括运行邮箱客户端的设备所属的集群时,向处理服务端发送所述第一邮件。In response to the cluster indicated by the cluster policy including the cluster to which the device running the mailbox client belongs, the first email is sent to the processing server.

可选的,当所述邮件处理策略包括白名单策略时,响应于所述至少一封邮件中的第一邮件满足所述邮件处理策略,向处理服务端发送所述第一邮件,包括:Optionally, when the email processing policy includes a whitelist policy, in response to a first email in the at least one email satisfying the email processing policy, sending the first email to the processing server includes:

响应于所述白名单策略所指定的收件人包括所述第一邮件的收件人,向处理服务端发送所述第一邮件。In response to the recipients specified by the whitelist policy including the recipients of the first email, the first email is sent to a processing service end.

可选的,当所述邮件处理策略包括比例阈值策略时,响应于所述至少一封邮件中的第一邮件满足所述邮件处理策略,向处理服务端发送所述第一邮件,包括:Optionally, when the email processing policy includes a ratio threshold policy, in response to a first email in the at least one email satisfying the email processing policy, sending the first email to the processing server includes:

响应于所述第一邮件的收件人满足所述比例阈值策略所指定的所述数量关系,向处理服务端发送所述第一邮件。In response to the recipients of the first email satisfying the quantity relationship specified by the ratio threshold policy, the first email is sent to a processing server.

可选的,所述响应于所述第一邮件的收件人满足所述比例阈值策略所指定的所述数量关系,包括:Optionally, the recipients of the response to the first email satisfying the quantity relationship specified by the ratio threshold policy includes:

响应于根据所述第一邮件的收件人的邮箱地址得到的目标数字满足所述数量关系,向处理服务端发送所述第一邮件。In response to the target number obtained according to the email address of the recipient of the first email satisfying the quantitative relationship, the first email is sent to the processing server.

可选的,所述响应于根据所述第一邮件的收件人的邮箱地址得到的目标数字满足所述数量关系,包括:Optionally, the target number obtained in response to the email address of the recipient of the first email satisfying the quantity relationship includes:

响应于按照一定策略对由所述邮箱地址得到的数字进行处理得到的目标数字满足所述数量关系。In response to processing the number obtained from the email address according to a certain strategy, the target number satisfies the quantitative relationship.

可选的,所述邮件处理策略包括多种策略,所述至少一封邮件中的第二邮件不满足所述邮件处理策略,包括:Optionally, the email processing strategy includes multiple strategies, and the second email in the at least one email does not satisfy the email processing strategy, including:

所述第二邮件不满足所述多种策略中的每一种策略。The second email does not satisfy each of the multiple policies.

可选的,在向处理服务端发送所述第一邮件之前,所述方法还包括:Optionally, before sending the first email to the processing server, the method further includes:

获取所述邮件处理策略。Get the mail processing policy.

可选的,在向处理服务端发送所述第一邮件之前,所述方法还包括:Optionally, before sending the first email to the processing server, the method further includes:

获取所述设备的元数据,所述元数据包括所述设备所属的集群。Metadata of the device is obtained, where the metadata includes a cluster to which the device belongs.

第二方面,本申请实施例提供了一种基于邮箱的数据处理装置,所述装置包括:In a second aspect, an embodiment of the present application provides a mailbox-based data processing device, the device comprising:

第一获取单元,用于从邮箱服务端获取至少一封邮件;A first acquisition unit, used to acquire at least one email from a mailbox server;

确定单元,用于确定所述至少一封邮件是否满足邮件处理策略;A determination unit, configured to determine whether the at least one email satisfies an email processing policy;

发送单元,用于响应于所述至少一封邮件中的第一邮件满足所述邮件处理策略,向处理服务端发送所述第一邮件,并将所述第一邮件在所述邮箱服务端标记为已读邮件;和/或,标记单元,用于响应于所述至少一封邮件中的第二邮件不满足所述邮件处理策略,将所述第二邮件在所述邮箱服务端标记为未读邮件。A sending unit is used to send a first email among the at least one email to a processing server in response to the first email satisfying the email processing policy, and mark the first email as a read email on the mailbox server; and/or a marking unit is used to mark a second email among the at least one email as an unread email on the mailbox server in response to the second email not satisfying the email processing policy.

可选的,所述邮件处理策略包括以下其中一项:Optionally, the email processing strategy includes one of the following:

集群策略、白名单策略以及比例阈值策略;其中:Cluster strategy, whitelist strategy, and ratio threshold strategy; among them:

所述集群策略,用于指示具备处理邮件权限的集群;The cluster strategy is used to indicate a cluster that has the authority to process emails;

所述白名单策略,用于指示能够被处理的邮件的收件人;The whitelist policy is used to indicate recipients of emails that can be processed;

所述比例阈值策略,用于指示能够被处理的收件人与特定阈值之间的数量关系。The ratio threshold strategy is used to indicate the relationship between the number of recipients that can be processed and a specific threshold.

可选的,所述邮件处理策略包括多种策略,所述确定单元,用于:Optionally, the email processing strategy includes multiple strategies, and the determining unit is used to:

按照所述多种策略的优先级确定所述第一邮件满足所述邮件处理策略。It is determined that the first email satisfies the email processing policy according to the priorities of the multiple policies.

可选的,所述多种邮件处理策略包括第一策略和第二策略,所述第一策略和所述第二策略均为所述集群策略、白名单策略以及比例阈值策略中的其中一项,所述第一策略的优先级高于所述第二策略的优先级,所述确定单元,用于:Optionally, the multiple email processing strategies include a first strategy and a second strategy, the first strategy and the second strategy are both one of the cluster strategy, the whitelist strategy, and the ratio threshold strategy, the priority of the first strategy is higher than the priority of the second strategy, and the determining unit is used to:

判断所述第一邮件是否满足所述第一策略,若所述第一邮件满足所述第一策略,则确定所述第一邮件满足所述邮件处理策略;或者,Determine whether the first email satisfies the first policy, and if the first email satisfies the first policy, determine that the first email satisfies the email processing policy; or,

在所述第一邮件不满足所述第一策略的情况下,判断所述第一邮件是否满足所述第二策略,若所述第一邮件满足所述第二策略,则确定所述第一邮件满足所述邮件处理策略。In the case that the first email does not satisfy the first policy, it is determined whether the first email satisfies the second policy. If the first email satisfies the second policy, it is determined that the first email satisfies the email processing policy.

可选的,当所述邮件处理策略包括所述集群策略时,所述发送单元,用于:Optionally, when the mail processing strategy includes the cluster strategy, the sending unit is configured to:

响应于所述集群策略指示的集群包括运行邮箱客户端的设备所属的集群时,向处理服务端发送所述第一邮件。In response to the cluster indicated by the cluster policy including the cluster to which the device running the mailbox client belongs, the first email is sent to the processing server.

可选的,当所述邮件处理策略包括白名单策略时,所述发送单元,用于:Optionally, when the email processing strategy includes a whitelist strategy, the sending unit is configured to:

响应于所述白名单策略所指定的收件人包括所述第一邮件的收件人,向处理服务端发送所述第一邮件。In response to the recipients specified by the whitelist policy including the recipients of the first email, the first email is sent to a processing service end.

可选的,当所述邮件处理策略包括比例阈值策略时,所述发送单元,用于:Optionally, when the email processing strategy includes a ratio threshold strategy, the sending unit is configured to:

响应于所述第一邮件的收件人满足所述比例阈值策略所指定的所述数量关系,向处理服务端发送所述第一邮件。In response to the recipients of the first email satisfying the quantity relationship specified by the ratio threshold policy, the first email is sent to a processing server.

可选的,所述响应于所述第一邮件的收件人满足所述比例阈值策略所指定的所述数量关系,包括:Optionally, the recipients of the response to the first email satisfying the quantity relationship specified by the ratio threshold policy includes:

响应于根据所述第一邮件的收件人的邮箱地址得到的目标数字满足所述数量关系,向处理服务端发送所述第一邮件。In response to the target number obtained according to the email address of the recipient of the first email satisfying the quantitative relationship, the first email is sent to the processing server.

可选的,所述响应于根据所述第一邮件的收件人的邮箱地址得到的目标数字满足所述数量关系,包括:Optionally, the target number obtained in response to the email address of the recipient of the first email satisfying the quantity relationship includes:

响应于按照一定策略对由所述邮箱地址得到的数字进行处理得到的目标数字满足所述数量关系。In response to processing the number obtained from the email address according to a certain strategy, the target number satisfies the quantitative relationship.

可选的,所述邮件处理策略包括多种策略,所述至少一封邮件中的第二邮件不满足所述邮件处理策略,包括:Optionally, the email processing strategy includes multiple strategies, and the second email in the at least one email does not satisfy the email processing strategy, including:

所述第二邮件不满足所述多种策略中的每一种策略。The second email does not satisfy each of the multiple policies.

可选的,所述装置还包括:Optionally, the device further comprises:

第二获取单元,用于在向处理服务端发送所述第一邮件之前,获取所述邮件处理策略。The second acquisition unit is used to acquire the email processing policy before sending the first email to the processing server.

可选的,所述装置还包括:Optionally, the device further comprises:

第三获取单元,用于在向处理服务端发送所述第一邮件之前,获取所述设备的元数据,所述元数据包括所述设备所属的集群。The third acquisition unit is used to acquire metadata of the device before sending the first email to the processing server, where the metadata includes the cluster to which the device belongs.

第三方面,本申请实施例提供了一种设备,所述设备包括处理器和存储器;In a third aspect, an embodiment of the present application provides a device, the device comprising a processor and a memory;

所述处理器用于执行所述存储器中存储的指令,以使得所述设备执行如以上第一方面中任一项所述的方法。The processor is configured to execute instructions stored in the memory, so that the device performs the method as described in any one of the first aspects above.

第四方面,本申请实施例提供了一种计算机可读存储介质,包括指令,所述指令指示设备执行如以上第一方面中任一项所述的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, wherein the instructions instruct a device to execute a method as described in any one of the above first aspects.

第五方面,本申请实施例提供了一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得计算机执行以上第一方面任一项所述的方法。In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect above.

与现有技术相比,本申请实施例具有以下优点:Compared with the prior art, the embodiments of the present application have the following advantages:

本申请实施例提供了一种基于邮箱的数据处理方法,该方法包括:从邮箱服务端获取至少一封邮件,并确定所述至少一封邮件是否满足邮件处理策略。响应于所述至少一封邮件中的第一邮件满足所述邮件处理策略,向处理服务端发送所述第一邮件,并将所述第一邮件在所述邮箱服务端标记为已读邮件。和/或,响应于所述至少一封邮件中的第二邮件不满足所述邮件处理策略,将所述第二邮件在所述邮箱服务端标记为未读邮件。利用本方案,从邮箱服务端获取至少一封邮件之后,不是直接将所述至少一封邮件均发送给处理服务端,而是根据邮件处理策略,将满足所述邮件处理策略的第一邮件发送给所述处理服务端,对于不满足邮件处理策略的第二邮件,则不发送给处理服务端,这样一来,减少了发送给处理服务端的邮件的数量,相应的减少了对邮箱应用程序的功能的影响。在一个示例中,若将该方法应用于对邮箱应用程序的灰度测试,则能够减少对邮箱应用程序已经发布的功能的影响。The embodiment of the present application provides a data processing method based on a mailbox, the method comprising: obtaining at least one email from a mailbox service end, and determining whether the at least one email satisfies the email processing policy. In response to the first email in the at least one email satisfying the email processing policy, the first email is sent to the processing service end, and the first email is marked as a read email on the mailbox service end. And/or, in response to the second email in the at least one email not satisfying the email processing policy, the second email is marked as an unread email on the mailbox service end. Using this solution, after obtaining at least one email from the mailbox service end, the at least one email is not directly sent to the processing service end, but according to the email processing policy, the first email that satisfies the email processing policy is sent to the processing service end, and the second email that does not satisfy the email processing policy is not sent to the processing service end, so that the number of emails sent to the processing service end is reduced, and the impact on the functions of the mailbox application is correspondingly reduced. In one example, if the method is applied to the grayscale test of the mailbox application, the impact on the functions that have been released by the mailbox application can be reduced.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

图1为本申请实施例提供的一种邮件发送过程的交互示意图;FIG1 is an interactive schematic diagram of an email sending process provided by an embodiment of the present application;

图2为本申请实施例提供的一种基于邮箱的数据处理方法的流程示意图;FIG2 is a flow chart of a mailbox-based data processing method provided in an embodiment of the present application;

图3为本申请实施例提供的一种基于邮箱的数据处理装置的结构示意图。FIG3 is a schematic diagram of the structure of a mailbox-based data processing device provided in an embodiment of the present application.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

为方便理解,首先对邮件发送过程进行简单介绍。参见图1,该图为本申请实施例提供的一种邮件发送过程的交互示意图。如图1所示,邮件发送过程涉及的网络角色包括:发送端邮箱客户端101、发送端邮箱服务端102、接收端邮箱服务端103和接收端邮箱客户端104。邮件发送的过程如下:For ease of understanding, the email sending process is briefly introduced first. See Figure 1, which is an interactive schematic diagram of an email sending process provided by an embodiment of the present application. As shown in Figure 1, the network roles involved in the email sending process include: a sending end email client 101, a sending end email server 102, a receiving end email server 103, and a receiving end email client 104. The email sending process is as follows:

1.发件人在本地邮箱客户端(邮箱客户端101)写好邮件之后,通过简单邮件传输协议(Simple Mail Transfer Protocol,SMTP)将邮件发送至发送端邮箱服务端102。1. After the sender writes the email in the local email client (email client 101), the email is sent to the sending email server 102 via the Simple Mail Transfer Protocol (SMTP).

2.发送端邮箱服务端102在收到邮件以后,会根据邮件中收件人的邮箱地址找到接收端邮箱服务端103,并通过SMTP协议将邮件发送给接收端邮箱服务端103。2. After receiving the email, the sending mailbox server 102 will find the receiving mailbox server 103 according to the email address of the recipient in the email, and send the email to the receiving mailbox server 103 through the SMTP protocol.

3.收件人的邮箱客户端(邮箱客户端104)会通过因特网消息访问协议(InternetMessage Access Protocol,IMAP)定时询问接收端邮箱服务端103,查询是否有收件人为自身的新的邮件抵达,如果有则下载到本地客户端(邮箱客户端104)供收件人阅读。3. The recipient's mailbox client (mailbox client 104) will periodically query the receiving mailbox server 103 through the Internet Message Access Protocol (IMAP) to check whether there are new emails for the recipient. If there are, they will be downloaded to the local client (mailbox client 104) for the recipient to read.

在一些业务场景中,可以由大量的机器充当接收端邮箱客户端104,通过IMAP协议从接收端邮箱服务端103拉取邮件到本地处理。对于这种情况,这里的机器从接收端邮箱服务端103拉取的是所述接收端邮箱服务端103中所有未读的邮件,而不是特定某个收件人的邮件。In some business scenarios, a large number of machines can act as the receiving-end mailbox client 104, and pull emails from the receiving-end mailbox server 103 to local processing through the IMAP protocol. In this case, the machine pulls all unread emails in the receiving-end mailbox server 103 from the receiving-end mailbox server 103, rather than emails of a specific recipient.

在此场景中,若要对邮箱应用程序进行灰度测试,则前述各个机器均会从接收端邮箱服务端103拉取邮件,并且,会对所拉取的全部邮件均进行处理,从而导致在灰度测试过程中,待测试的功能的影响范围较大,涉及从接收端邮箱服务端103拉取的所有邮件,并且,涉及各个机器。这样一来,若被测试的新功能存在异常,则会对邮箱应用程序已经发布的功能带来较大的影响。In this scenario, if the mailbox application is to be grayscale tested, each of the aforementioned machines will pull emails from the receiving mailbox server 103, and will process all the pulled emails, resulting in a large impact range of the function to be tested during the grayscale test, involving all emails pulled from the receiving mailbox server 103, and involving each machine. In this way, if there is an abnormality in the new function being tested, it will have a greater impact on the functions that have been released by the mailbox application.

为了解决上述问题,本申请实施例提供了一种基于邮箱的数据处理方法及装置。In order to solve the above problems, the embodiments of the present application provide a data processing method and device based on a mailbox.

下面结合附图,详细说明本申请的各种非限制性实施方式。Various non-limiting implementations of the present application are described in detail below in conjunction with the accompanying drawings.

示例性方法Exemplary Methods

参见图2,该图为本申请实施例提供的一种基于邮箱的数据处理方法的流程示意图。在本实施例中,所述方法例如可以由邮箱客户端执行,此处提及的邮箱客户端,可以作为接收端邮箱客户端。在一个示例中,所述邮箱客户端可以集成由网关插件,本申请实施例提供的方法,可以由所述网关插件执行。See Figure 2, which is a flow chart of a mailbox-based data processing method provided in an embodiment of the present application. In this embodiment, the method can be executed by a mailbox client, for example, and the mailbox client mentioned here can be used as a receiving mailbox client. In one example, the mailbox client can be integrated with a gateway plug-in, and the method provided in an embodiment of the present application can be executed by the gateway plug-in.

在一个示例中,所述方法例如可以包括以下步骤:S101-S103。In an example, the method may include the following steps: S101 - S103 .

S101:从邮箱服务端获取至少一封邮件。S101: Obtain at least one email from the mailbox server.

在一个示例中,可以通过IMAP协议从所述邮箱服务端获取至少一封邮件。此处提及的至少一封邮件,可以是所述邮箱服务端中的所有未读邮件。此处提及的邮箱服务端,可以是接收端邮箱服务端。In one example, at least one email can be obtained from the mailbox server through the IMAP protocol. The at least one email mentioned here can be all unread emails in the mailbox server. The mailbox server mentioned here can be a receiving-end mailbox server.

S102:确定所述至少一封邮件是否满足邮件处理策略。S102: Determine whether the at least one email satisfies the email processing policy.

在一个示例中,在执行S102之前,可以获取所述邮件处理策略,以便于在从邮箱服务端获取至少一封邮件之后,进一步确定所述至少一封邮件是否满足所述邮件处理策略。In one example, before executing S102, the email processing policy may be obtained, so as to further determine whether the at least one email satisfies the email processing policy after obtaining at least one email from the mailbox service end.

在一个示例中,所述邮件处理策略可以预先配置在本地。因此,可以读取预先配置在本地的所述邮件处理策略。In one example, the mail processing policy may be pre-configured locally. Therefore, the mail processing policy pre-configured locally may be read.

本申请实施例不具体限定所述邮件处理策略,该邮件处理策略可以是用于对邮件进行处理的策略。当该邮件处理策略被用在对邮箱应用程序进行灰度测试的场景中时,该邮件处理策略可以是灰度测试策略。在一个示例中,所述邮件处理策略可以包括至少一种策略。The embodiments of the present application do not specifically limit the mail processing strategy, and the mail processing strategy may be a strategy for processing mails. When the mail processing strategy is used in a scenario of grayscale testing of a mailbox application, the mail processing strategy may be a grayscale testing strategy. In one example, the mail processing strategy may include at least one strategy.

作为一个示例,所述邮件处理策略可以包括集群策略,所述集群策略可以用于指示具备邮件处理权限的集群。其中,集群可以理解为包括多个独立设备的设备集合。在一个示例中,所述集群策略中可以包括至少一个集群的标识,该至少一个集群具备对邮件进行处理的权限,其它集群则不具备对邮件进行处理的权限。采用集群策略,可以对处理邮件的集群进行限制,从而避免所有集群均对邮件进行处理,从而节省了处理邮件的集群的数量,相应的,在灰度测试的场景中,减少了待测试的功能的影响范围。在本申请实施例中,对邮件进行处理,可以理解为将邮件发送给处理服务端进行处理。As an example, the email processing strategy may include a cluster strategy, and the cluster strategy may be used to indicate a cluster that has the authority to process emails. Among them, a cluster can be understood as a device set including multiple independent devices. In one example, the cluster strategy may include the identifier of at least one cluster, and the at least one cluster has the authority to process emails, while other clusters do not have the authority to process emails. By adopting a cluster strategy, clusters that process emails can be restricted, thereby avoiding all clusters from processing emails, thereby saving the number of clusters that process emails. Accordingly, in the grayscale testing scenario, the impact range of the function to be tested is reduced. In an embodiment of the present application, processing an email can be understood as sending the email to a processing server for processing.

作为又一个示例,所述邮件处理策略可以包括白名单策略,所述白名单策略用于指示能够被处理的邮件的收件人。在一个示例中,所述白名单策略中可以包括至少一个收件人,该收件人对应的邮件可以被处理。作为一个示例,不是所述白名单策略所指定的收件人的邮件不被处理。采用白名单策略,可以对能够被处理的邮件进行限制,从而避免所有邮件均被处理,相应的,在灰度测试的场景中,减少了待测试的功能的影响范围。As another example, the email processing policy may include a whitelist policy, and the whitelist policy is used to indicate the recipients of emails that can be processed. In one example, the whitelist policy may include at least one recipient, and the email corresponding to the recipient can be processed. As an example, emails to recipients that are not specified by the whitelist policy are not processed. By adopting a whitelist policy, it is possible to limit the emails that can be processed, thereby preventing all emails from being processed. Accordingly, in the grayscale testing scenario, the impact range of the function to be tested is reduced.

作为另一个示例,所述邮件处理策略可以包括比例阈值策略,所述比例阈值策略用于指示能够被处理的收件人与特定阈值之间的数量关系。在一个具体的示例中,该比例阈值策略可以是:将收件人的邮箱地址转换为数字之后,按照一定的策略对该数字进行处理,得到目标数字,若该目标数字小于或者等于所述特定阈值,则该收件人对应的邮件可以被处理。作为一个示例,若目标数字大于所述特定阈值,则该收件人对应的邮件不可以被处理。举例说明:将收件人转换为数字之后,与1000进行求模,得到目标数字,若该目标数字小于或者等于所述特定阈值(例如5),则该收件人对应的邮件可以被处理。采用比例阈值策略,可以对能够被处理的邮件进行限制,从而避免所有邮件均被处理,相应的,在灰度测试的场景中,从而减少了待测试的功能的影响范围。As another example, the email processing strategy may include a ratio threshold strategy, which is used to indicate the quantitative relationship between the recipients that can be processed and a specific threshold. In a specific example, the ratio threshold strategy may be: after converting the recipient's email address into a number, the number is processed according to a certain strategy to obtain a target number. If the target number is less than or equal to the specific threshold, the email corresponding to the recipient can be processed. As an example, if the target number is greater than the specific threshold, the email corresponding to the recipient cannot be processed. For example: after converting the recipient into a number, the target number is obtained by modulo 1000. If the target number is less than or equal to the specific threshold (for example, 5), the email corresponding to the recipient can be processed. By adopting the ratio threshold strategy, the emails that can be processed can be limited, thereby avoiding all emails from being processed. Accordingly, in the grayscale test scenario, the impact range of the function to be tested is reduced.

在一个示例中,所述至少一封邮件可以包括第一邮件,S102在具体实现时,可以包括:确定所述第一邮件满足所述邮件处理策略。In an example, the at least one email may include a first email, and S102 may include, when implemented specifically: determining that the first email satisfies the email processing policy.

在一个示例中,当所述邮件处理策略包括多种策略,例如包括前述集群策略、白名单策略以及比例阈值策略时,在一个示例中,可以在所述第一邮件满足其中一种或者多种策略的情况下,确定所述第一邮件满足所述邮件处理策略。In one example, when the email processing policy includes multiple policies, such as the aforementioned cluster policy, whitelist policy, and ratio threshold policy, in one example, it can be determined that the first email satisfies the email processing policy if the first email satisfies one or more of the policies.

在又一个示例中,所述多种策略之间可以具备一定的优先级。对于这种情况“确定所述第一邮件满足所述邮件处理策略”在具体实现时,可以按照所述多种策略的优先级确定所述第一邮件满足所述邮件处理策略。In another example, the multiple policies may have certain priorities. In this case, when “determining that the first email satisfies the email processing policy” is specifically implemented, it may be determined that the first email satisfies the email processing policy according to the priorities of the multiple policies.

现以所述多种邮件处理策略包括第一策略和第二策略,且所述第一策略的优先级高于所述第二策略的优先级为例,介绍“按照所述多种策略的优先级确定所述第一邮件满足所述邮件处理策略”的具体实现方式。Now, taking the example that the multiple email processing strategies include a first strategy and a second strategy, and the priority of the first strategy is higher than the priority of the second strategy, the specific implementation method of "determining whether the first email satisfies the email processing strategy according to the priorities of the multiple strategies" is introduced.

作为一个示例,可以首先判断所述第一邮件是否满足优先级高的第一策略,若所述第一邮件满足所述第一策略,则可以确定所述第一邮件满足所述邮件处理策略。即:高优先级的策略被满足,则第一邮件满足邮件处理策略。As an example, it can be determined whether the first email satisfies a first policy with a high priority. If the first email satisfies the first policy, it can be determined that the first email satisfies the email processing policy. That is, if the high priority policy is satisfied, the first email satisfies the email processing policy.

若所述第一邮件不满足所述第一策略,则继续判断所述第一邮件是否满足第二策略,若所述第一邮件满足所述第二策略,则确定所述第一邮件满足所述邮件处理策略。If the first email does not satisfy the first policy, then continue to determine whether the first email satisfies the second policy; if the first email satisfies the second policy, then determine that the first email satisfies the email processing policy.

以此类推,若第一邮件不满足所述第二策略,则继续判断所述第一邮件是否满足比第二策略的优先级更低的第三策略,直至所有策略均判断完成。Similarly, if the first email does not satisfy the second policy, it is continued to determine whether the first email satisfies a third policy having a lower priority than the second policy until all policies are determined.

关于第一策略和第二策略,其可以是前述集群策略、白名单策略以及比例阈值策略中的任意两种不同的策略。Regarding the first strategy and the second strategy, they may be any two different strategies among the aforementioned cluster strategy, whitelist strategy and ratio threshold strategy.

在一个示例中,当所述邮件处理策略包括集群策略时,第一邮件满足所述集群策略,例如可以是所述集群策略指示的集群包括运行邮箱客户端的设备所属的集群。对于这种情况,在确定第一邮件满足所述集群策略时,可以首先确定运行邮箱客户端的设备所属的集群,并确定所述集群策略指示的集群是否包括该设备所属的集群。在所述集群策略指示的集群包括该设备所属的集群时,确定第一邮件满足所述集群策略。在一个示例中,确定运行邮箱客户端的设备所属的集群在具体实现时,例如可以获取所述设备的元数据,所述设备的元数据中包括所述设备所属的集群。在又一个示例中,所述设备可以被预先配置其所属的集群,对于这种情况,可以获取预先配置的配置信息,从而确定所述设备所属的集群。In one example, when the email processing policy includes a cluster policy, the first email satisfies the cluster policy. For example, the cluster indicated by the cluster policy includes the cluster to which the device running the email client belongs. In this case, when determining that the first email satisfies the cluster policy, the cluster to which the device running the email client belongs can be first determined, and it can be determined whether the cluster indicated by the cluster policy includes the cluster to which the device belongs. When the cluster indicated by the cluster policy includes the cluster to which the device belongs, it is determined that the first email satisfies the cluster policy. In one example, when determining the cluster to which the device running the email client belongs, in a specific implementation, for example, metadata of the device can be obtained, and the metadata of the device includes the cluster to which the device belongs. In another example, the device can be pre-configured with the cluster to which it belongs. In this case, the pre-configured configuration information can be obtained to determine the cluster to which the device belongs.

在又一个示例中,若所述邮件处理策略包括白名单策略,则第一邮件满足所述白名单策略,例如可以是所述白名单策略所指定的收件人包括所述第一邮件的收件人。对于这种情况,在确定第一邮件满足所述白名单策略时,可以判断所述第一邮件的收件人是否存在于所述白名单策略所指定的收件人中,若所述第一邮件的收件人存在于所述白名单策略所指定的收件人中,则所述第一邮件满足所述白名单策略。In another example, if the email processing policy includes a whitelist policy, the first email satisfies the whitelist policy, for example, the recipients specified by the whitelist policy may include the recipient of the first email. In this case, when determining that the first email satisfies the whitelist policy, it may be determined whether the recipient of the first email exists in the recipients specified by the whitelist policy. If the recipient of the first email exists in the recipients specified by the whitelist policy, the first email satisfies the whitelist policy.

在另一个示例中,若所述邮件处理策略包括比例阈值策略,第一邮件满足所述比例阈值策略,例如可以是所述第一邮件的收件人满足所述比例阈值策略所指定的所述数量关系。对于这种情况,在确定第一邮件满足所述比例阈值策略时,可以首先提取所述第一邮件的收件人,并进一步判断所述第一邮件的收件人是否满足所述数量关系。In another example, if the email processing policy includes a ratio threshold policy, the first email satisfies the ratio threshold policy, for example, the recipients of the first email may satisfy the quantity relationship specified by the ratio threshold policy. In this case, when determining that the first email satisfies the ratio threshold policy, the recipients of the first email may be first extracted, and further judged whether the recipients of the first email satisfy the quantity relationship.

在一个示例中,可以根据所述第一邮件的收件人的邮箱地址得到目标熟悉,并进一步确定所述目标数字是否满足所述数量关系。所述目标数字满足所述数量关系,例如可以是所述目标数字小于或者等于特定阈值。关于所述目标数字,其可以是由所述第一邮件的收件人的邮箱地址直接转换得到的数字。目标数字也可以是按照一定的策略对前述数字进行处理得到的,例如,对由所述第一邮件的收件人的邮箱地址直接转换得到的数字和1000进行求模运算,将求模运算的结果作为所述目标数字。In one example, a target number can be obtained based on the email address of the recipient of the first email, and it can be further determined whether the target number satisfies the quantitative relationship. The target number satisfies the quantitative relationship, for example, the target number can be less than or equal to a specific threshold. Regarding the target number, it can be a number directly converted from the email address of the recipient of the first email. The target number can also be obtained by processing the aforementioned number according to a certain strategy, for example, a modulo operation is performed on the number directly converted from the email address of the recipient of the first email and 1000, and the result of the modulo operation is used as the target number.

在一个示例中,所述至少一封邮件可以包括第二邮件,S102在具体实现时,可以包括:确定所述第二邮件不满足所述邮件处理策略。In an example, the at least one email may include a second email, and S102 may include, when implemented specifically: determining that the second email does not satisfy the email processing policy.

在一个示例中,当所述邮件处理策略包括多种策略,例如包括前述集群策略、白名单策略以及比例阈值策略时,在一个示例中,可以在所述第二邮件不满足所述多种策略中的每一种策略的情况下,确定所述第二邮件不满足所述邮件处理策略。即:在所述第二邮件既不满足集群策略、又不满足白名单策略、也不满足比例阈值策略的情况下,可以确定所述第二邮件不满足邮件处理策略。其中:In one example, when the mail processing policy includes multiple policies, such as the aforementioned cluster policy, whitelist policy, and ratio threshold policy, in one example, when the second mail does not satisfy each of the multiple policies, it can be determined that the second mail does not satisfy the mail processing policy. That is, when the second mail neither satisfies the cluster policy, nor the whitelist policy, nor the ratio threshold policy, it can be determined that the second mail does not satisfy the mail processing policy. Wherein:

第二邮件不满足集群策略,可以是所述集群策略指示的集群不包括运行邮箱客户端的设备所属的集群。第二邮件不满足白名单策略,可以是所述白名单策略所指定的收件人不包括所述第二邮件的收件人。第二邮件不满足比例阈值策略,可以是所述第二邮件的收件人不满足所述比例阈值策略所指定的所述数量关系。The second email does not satisfy the cluster policy, which may be that the cluster indicated by the cluster policy does not include the cluster to which the device running the mailbox client belongs. The second email does not satisfy the whitelist policy, which may be that the recipients specified by the whitelist policy do not include the recipients of the second email. The second email does not satisfy the ratio threshold policy, which may be that the recipients of the second email do not satisfy the quantity relationship specified by the ratio threshold policy.

S103:响应于所述至少一封邮件中的第一邮件满足所述邮件处理策略,向处理服务端发送所述第一邮件,并将所述第一邮件在所述邮箱服务端标记为已读邮件;和/或,响应于所述至少一封邮件中的第二邮件不满足所述邮件处理策略,将所述第二邮件在所述邮箱服务端标记为未读邮件。S103: In response to a first email among the at least one email satisfying the email processing policy, sending the first email to a processing server and marking the first email as a read email on the mailbox server; and/or, in response to a second email among the at least one email not satisfying the email processing policy, marking the second email as an unread email on the mailbox server.

在一个示例中,若执行S102确定第一邮件满足邮件处理策略,则可以响应于所述第一邮件满足所述邮件处理策略,将所述第一邮件发送给处理服务端,以便于处理服务端对所述第一邮件进行处理。本申请实施例不具体限定处理服务端对第一邮件进行处理的具体方式,在一个示例中,所述处理服务端例如可以生成针对所述第一邮件的通知消息;在又一个示例中,所述处理服务端例如可以继续将所述第一邮件发送给下游应用进行处理,等等,此处不一一列举说明。In one example, if S102 is executed to determine that the first email satisfies the email processing policy, the first email can be sent to the processing server in response to the first email satisfying the email processing policy, so that the processing server can process the first email. The embodiment of the present application does not specifically limit the specific way in which the processing server processes the first email. In one example, the processing server can, for example, generate a notification message for the first email; in another example, the processing server can, for example, continue to send the first email to a downstream application for processing, etc., which are not listed one by one here.

另外,在将第一邮件发送给处理服务端之后,还可以将所述第一邮件在所述邮箱服务端标记为已读邮件,以避免其它邮箱客户端重新从邮箱服务端获取第一邮件、并将第一邮件发送给处理服务端,从而避免第一邮件重复被处理服务端处理。In addition, after sending the first email to the processing server, the first email can also be marked as a read email on the mailbox server to avoid other mailbox clients from re-obtaining the first email from the mailbox server and sending the first email to the processing server, thereby avoiding the first email being processed repeatedly by the processing server.

“将所述第一邮件在所述邮箱服务端标记为已读邮件”在具体实现时,例如可以向所述服务端发送所述第一邮件的第一标识和第一指示信息,该第一指示信息用于指示将所述第一标识对应的第一邮件标记为已读邮件。In the specific implementation of "marking the first email as a read email on the mailbox server", for example, a first identifier and first indication information of the first email can be sent to the server, and the first indication information is used to indicate that the first email corresponding to the first identifier is marked as a read email.

在一个示例中,若执行S102确定第二邮件不满足邮件处理策略,则可以响应于所述第二邮件不满足所述邮件处理策略,将所述第二邮件在所述邮箱服务端标记为未读邮件,以便于其它邮箱客户端从邮箱服务端获取第二邮件、并将第二邮件发送给处理服务端。In one example, if S102 is executed to determine that the second email does not satisfy the email processing policy, the second email can be marked as an unread email on the mailbox server in response to the second email not satisfying the email processing policy, so that other mailbox clients can obtain the second email from the mailbox server and send the second email to the processing server.

“将所述第二邮件在所述邮箱服务端标记为未读邮件”在具体实现时,例如可以向所述服务端发送所述第二邮件的第二标识和第二指示信息,该第二指示信息用于指示将所述第二标识对应的第二邮件标记为未读邮件。In the specific implementation of "marking the second email as an unread email on the mailbox server", for example, a second identifier and second indication information of the second email can be sent to the server, and the second indication information is used to indicate that the second email corresponding to the second identifier is marked as an unread email.

通过以上描述可知,利用本申请实施例的方案,从邮箱服务端获取至少一封邮件之后,不是直接将所述至少一封邮件均发送给处理服务端,而是根据邮件处理策略,将满足所述邮件处理策略的第一邮件发送给所述处理服务端,对于不满足邮件处理策略的第二邮件,则不发送给处理服务端,这样一来,减少了发送给处理服务端的邮件的数量,相应的减少了对邮箱应用程序的功能的影响。在一个示例中,若将该方法应用于对邮箱应用程序的灰度测试,则能够减少对邮箱应用程序已经发布的功能的影响。From the above description, it can be known that, using the solution of the embodiment of the present application, after obtaining at least one email from the mailbox server, the at least one email is not directly sent to the processing server, but according to the email processing policy, the first email that meets the email processing policy is sent to the processing server, and the second email that does not meet the email processing policy is not sent to the processing server. In this way, the number of emails sent to the processing server is reduced, and the impact on the functions of the mailbox application is correspondingly reduced. In one example, if this method is applied to the grayscale test of the mailbox application, the impact on the functions that have been released by the mailbox application can be reduced.

举例说明:for example:

一共有10个集群能够运行邮箱应用程序,在灰度测试时,我们采用1个集群对邮箱应用程序的新功能进行测试,然后通过白名单策略和比例阈值策略配置该集群处理千分之一的邮件流量,以对该新功能的运行情况进行测试,当该新功能出现异常时,可以将该集群处理的邮件流量设置为0,从而达到快速恢复邮箱应用程序已经发布的功能的效果。There are a total of 10 clusters that can run the mailbox application. During the grayscale test, we use 1 cluster to test the new function of the mailbox application, and then configure the cluster to process one thousandth of the email traffic through the whitelist strategy and the proportional threshold strategy to test the operation of the new function. When the new function has an abnormality, the email traffic processed by the cluster can be set to 0, so as to quickly restore the functions that have been released by the mailbox application.

示例性设备Exemplary Devices

基于以上实施例提供的方法,本申请实施例还提供了一种装置,以下结合附图介绍该装置。Based on the method provided in the above embodiment, the embodiment of the present application further provides a device, which is described below in conjunction with the accompanying drawings.

参见图3,该图为本申请实施例提供的一种基于邮箱的数据处理装置的结构示意图。所述装置300例如可以具体包括:第一获取单元301、确定单元302、以及、发送单元303和/或标记单元304。3 is a schematic diagram of a data processing device based on a mailbox provided in an embodiment of the present application. The device 300 may specifically include: a first acquisition unit 301 , a determination unit 302 , and a sending unit 303 and/or a marking unit 304 .

第一获取单元301,用于从邮箱服务端获取至少一封邮件;The first acquisition unit 301 is used to acquire at least one email from the mailbox server;

确定单元302,用于确定所述至少一封邮件是否满足邮件处理策略;A determination unit 302, configured to determine whether the at least one email satisfies an email processing policy;

发送单元303,用于响应于所述至少一封邮件中的第一邮件满足所述邮件处理策略,向处理服务端发送所述第一邮件,并将所述第一邮件在所述邮箱服务端标记为已读邮件;和/或,标记单元304,用于响应于所述至少一封邮件中的第二邮件不满足所述邮件处理策略,将所述第二邮件在所述邮箱服务端标记为未读邮件。The sending unit 303 is used to send the first email among the at least one email to the processing server in response to the first email satisfying the email processing policy, and mark the first email as a read email on the mailbox server; and/or, the marking unit 304 is used to mark the second email as an unread email on the mailbox server in response to the second email among the at least one email not satisfying the email processing policy.

可选的,所述邮件处理策略包括以下其中一项:Optionally, the email processing strategy includes one of the following:

集群策略、白名单策略以及比例阈值策略;其中:Cluster strategy, whitelist strategy, and ratio threshold strategy; among them:

所述集群策略,用于指示具备处理邮件权限的集群;The cluster strategy is used to indicate a cluster that has the authority to process emails;

所述白名单策略,用于指示能够被处理的邮件的收件人;The whitelist policy is used to indicate recipients of emails that can be processed;

所述比例阈值策略,用于指示能够被处理的收件人与特定阈值之间的数量关系。The ratio threshold strategy is used to indicate the relationship between the number of recipients that can be processed and a specific threshold.

可选的,所述邮件处理策略包括多种策略,所述确定单元302,用于:Optionally, the email processing strategy includes multiple strategies, and the determining unit 302 is used to:

按照所述多种策略的优先级确定所述第一邮件满足所述邮件处理策略。It is determined that the first email satisfies the email processing policy according to the priorities of the multiple policies.

可选的,所述多种邮件处理策略包括第一策略和第二策略,所述第一策略和所述第二策略均为所述集群策略、白名单策略以及比例阈值策略中的其中一项,所述第一策略的优先级高于所述第二策略的优先级,所述确定单元302,用于:Optionally, the multiple email processing strategies include a first strategy and a second strategy, the first strategy and the second strategy are both one of the cluster strategy, the whitelist strategy, and the ratio threshold strategy, the priority of the first strategy is higher than the priority of the second strategy, and the determining unit 302 is used to:

判断所述第一邮件是否满足所述第一策略,若所述第一邮件满足所述第一策略,则确定所述第一邮件满足所述邮件处理策略;或者,Determine whether the first email satisfies the first policy, and if the first email satisfies the first policy, determine that the first email satisfies the email processing policy; or,

在所述第一邮件不满足所述第一策略的情况下,判断所述第一邮件是否满足所述第二策略,若所述第一邮件满足所述第二策略,则确定所述第一邮件满足所述邮件处理策略。In the case that the first email does not satisfy the first policy, it is determined whether the first email satisfies the second policy. If the first email satisfies the second policy, it is determined that the first email satisfies the email processing policy.

可选的,当所述邮件处理策略包括所述集群策略时,所述发送单元303,用于:Optionally, when the email processing strategy includes the cluster strategy, the sending unit 303 is configured to:

响应于所述集群策略指示的集群包括运行邮箱客户端的设备所属的集群时,向处理服务端发送所述第一邮件。In response to the cluster indicated by the cluster policy including the cluster to which the device running the mailbox client belongs, the first email is sent to the processing server.

可选的,当所述邮件处理策略包括白名单策略时,所述发送单元303,用于:Optionally, when the email processing strategy includes a whitelist strategy, the sending unit 303 is configured to:

响应于所述白名单策略所指定的收件人包括所述第一邮件的收件人,向处理服务端发送所述第一邮件。In response to the recipients specified by the whitelist policy including the recipients of the first email, the first email is sent to a processing service end.

可选的,当所述邮件处理策略包括比例阈值策略时,所述发送单元303,用于:Optionally, when the email processing strategy includes a ratio threshold strategy, the sending unit 303 is configured to:

响应于所述第一邮件的收件人满足所述比例阈值策略所指定的所述数量关系,向处理服务端发送所述第一邮件。In response to the recipients of the first email satisfying the quantity relationship specified by the ratio threshold policy, the first email is sent to a processing server.

可选的,所述响应于所述第一邮件的收件人满足所述比例阈值策略所指定的所述数量关系,包括:Optionally, the recipients of the response to the first email satisfying the quantity relationship specified by the ratio threshold policy includes:

响应于根据所述第一邮件的收件人的邮箱地址得到的目标数字满足所述数量关系,向处理服务端发送所述第一邮件。In response to the target number obtained according to the email address of the recipient of the first email satisfying the quantitative relationship, the first email is sent to the processing server.

可选的,所述响应于根据所述第一邮件的收件人的邮箱地址得到的目标数字满足所述数量关系,包括:Optionally, the target number obtained in response to the email address of the recipient of the first email satisfying the quantity relationship includes:

响应于按照一定策略对由所述邮箱地址得到的数字进行处理得到的目标数字满足所述数量关系。In response to processing the number obtained from the email address according to a certain strategy, the target number satisfies the quantitative relationship.

可选的,所述邮件处理策略包括多种策略,所述至少一封邮件中的第二邮件不满足所述邮件处理策略,包括:Optionally, the email processing strategy includes multiple strategies, and the second email in the at least one email does not satisfy the email processing strategy, including:

所述第二邮件不满足所述多种策略中的每一种策略。The second email does not satisfy each of the multiple policies.

可选的,所述装置还包括:Optionally, the device further comprises:

第二获取单元,用于在向处理服务端发送所述第一邮件之前,获取所述邮件处理策略。The second acquisition unit is used to acquire the email processing policy before sending the first email to the processing server.

可选的,所述装置还包括:Optionally, the device further comprises:

第三获取单元,用于在向处理服务端发送所述第一邮件之前,获取所述设备的元数据,所述元数据包括所述设备所属的集群。The third acquisition unit is used to acquire metadata of the device before sending the first email to the processing server, where the metadata includes the cluster to which the device belongs.

由于所述装置300是与以上方法实施例提供的方法对应的装置,所述装置300的各个单元的具体实现,均与以上方法实施例为同一构思,因此,关于所述装置300的各个单元的具体实现,可以参考以上方法实施例的相关描述部分,此处不再赘述。Since the device 300 is a device corresponding to the method provided in the above method embodiment, the specific implementation of each unit of the device 300 is based on the same concept as the above method embodiment. Therefore, for the specific implementation of each unit of the device 300, please refer to the relevant description part of the above method embodiment, which will not be repeated here.

本申请实施例还提供了一种设备,所述设备包括处理器和存储器;The embodiment of the present application also provides a device, the device comprising a processor and a memory;

所述处理器用于执行所述存储器中存储的指令,以使得所述设备执行以上方法实施例提供的方法。The processor is used to execute the instructions stored in the memory, so that the device executes the method provided by the above method embodiment.

本申请实施例提供了一种计算机可读存储介质,包括指令,所述指令指示设备执行以上方法实施例提供的方法。An embodiment of the present application provides a computer-readable storage medium, including instructions, wherein the instructions instruct a device to execute the method provided in the above method embodiment.

本申请实施例提供了一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得计算机执行以上方法实施例提供的方法。An embodiment of the present application provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the method provided in the above method embodiment.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims (15)

Translated fromChinese
1.一种基于邮箱的数据处理方法,其特征在于,应用于邮箱客户端,所述方法包括:1. A data processing method based on mailbox, characterized in that it is applied to a mailbox client, and the method comprises:从邮箱服务端获取至少一封邮件,所述至少一封邮件,为所述邮箱服务端中的所有未读邮件;Obtain at least one email from the mailbox server, wherein the at least one email is all unread emails in the mailbox server;确定所述至少一封邮件是否满足邮件处理策略,所述邮件处理策略为灰度测试策略;Determine whether the at least one email satisfies an email processing policy, wherein the email processing policy is a grayscale testing policy;响应于所述至少一封邮件中的第一邮件满足所述邮件处理策略,向处理服务端发送所述第一邮件,以便于所述处理服务端对所述第一邮件进行处理,并将所述第一邮件在所述邮箱服务端标记为已读邮件;和/或,响应于所述至少一封邮件中的第二邮件不满足所述邮件处理策略,将所述第二邮件在所述邮箱服务端标记为未读邮件。In response to a first email among the at least one email satisfying the email processing policy, sending the first email to a processing server so that the processing server processes the first email and marking the first email as a read email on the mailbox server; and/or, in response to a second email among the at least one email not satisfying the email processing policy, marking the second email as an unread email on the mailbox server.2.根据权利要求1所述的方法,其特征在于,所述邮件处理策略包括以下其中一项:2. The method according to claim 1, wherein the mail processing strategy comprises one of the following:集群策略、白名单策略以及比例阈值策略;其中:Cluster strategy, whitelist strategy, and ratio threshold strategy; among them:所述集群策略,用于指示具备处理邮件权限的集群;The cluster strategy is used to indicate a cluster that has the authority to process emails;所述白名单策略,用于指示能够被处理的邮件的收件人;The whitelist policy is used to indicate recipients of emails that can be processed;所述比例阈值策略,用于指示能够被处理的收件人与特定阈值之间的数量关系。The ratio threshold strategy is used to indicate the relationship between the number of recipients that can be processed and a specific threshold.3.根据权利要求2所述的方法,其特征在于,所述邮件处理策略包括多种策略,所述确定所述至少一封邮件是否满足邮件处理策略,包括:3. The method according to claim 2, wherein the email processing strategy includes multiple strategies, and the determining whether the at least one email satisfies the email processing strategy includes:按照所述多种策略的优先级确定所述第一邮件满足所述邮件处理策略。It is determined that the first email satisfies the email processing policy according to the priorities of the multiple policies.4.根据权利要求3所述的方法,其特征在于,所述多种邮件处理策略包括第一策略和第二策略,所述第一策略和所述第二策略均为所述集群策略、白名单策略以及比例阈值策略中的其中一项,所述第一策略的优先级高于所述第二策略的优先级,所述按照所述多种策略的优先级确定所述第一邮件满足所述邮件处理策略,包括:4. The method according to claim 3 is characterized in that the multiple email processing strategies include a first strategy and a second strategy, the first strategy and the second strategy are both one of the cluster strategy, the whitelist strategy and the ratio threshold strategy, the priority of the first strategy is higher than the priority of the second strategy, and the determining that the first email satisfies the email processing strategy according to the priorities of the multiple strategies comprises:判断所述第一邮件是否满足所述第一策略,若所述第一邮件满足所述第一策略,则确定所述第一邮件满足所述邮件处理策略;或者,Determine whether the first email satisfies the first policy, and if the first email satisfies the first policy, determine that the first email satisfies the email processing policy; or,在所述第一邮件不满足所述第一策略的情况下,判断所述第一邮件是否满足所述第二策略,若所述第一邮件满足所述第二策略,则确定所述第一邮件满足所述邮件处理策略。In the case that the first email does not satisfy the first policy, it is determined whether the first email satisfies the second policy. If the first email satisfies the second policy, it is determined that the first email satisfies the email processing policy.5.根据权利要求2所述的方法,其特征在于,当所述邮件处理策略包括所述集群策略时,响应于所述至少一封邮件中的第一邮件满足所述邮件处理策略,向处理服务端发送所述第一邮件,包括:5. The method according to claim 2, wherein when the email processing strategy includes the cluster strategy, in response to a first email in the at least one email satisfying the email processing strategy, sending the first email to the processing server comprises:响应于所述集群策略指示的集群包括运行邮箱客户端的设备所属的集群时,向处理服务端发送所述第一邮件。In response to the cluster indicated by the cluster policy including the cluster to which the device running the mailbox client belongs, the first email is sent to the processing server.6.根据权利要求2所述的方法,其特征在于,当所述邮件处理策略包括白名单策略时,响应于所述至少一封邮件中的第一邮件满足所述邮件处理策略,向处理服务端发送所述第一邮件,包括:6. The method according to claim 2, characterized in that when the email processing policy includes a whitelist policy, in response to a first email in the at least one email satisfying the email processing policy, sending the first email to the processing server comprises:响应于所述白名单策略所指定的收件人包括所述第一邮件的收件人,向处理服务端发送所述第一邮件。In response to the recipients specified by the whitelist policy including the recipients of the first email, the first email is sent to a processing service end.7.根据权利要求2所述的方法,其特征在于,当所述邮件处理策略包括比例阈值策略时,响应于所述至少一封邮件中的第一邮件满足所述邮件处理策略,向处理服务端发送所述第一邮件,包括:7. The method according to claim 2, characterized in that when the email processing policy includes a ratio threshold policy, in response to a first email in the at least one email satisfying the email processing policy, sending the first email to the processing server comprises:响应于所述第一邮件的收件人满足所述比例阈值策略所指定的所述数量关系,向处理服务端发送所述第一邮件。In response to the recipients of the first email satisfying the quantity relationship specified by the ratio threshold policy, the first email is sent to a processing server.8.根据权利要求7所述的方法,其特征在于,所述响应于所述第一邮件的收件人满足所述比例阈值策略所指定的所述数量关系,包括:8. The method according to claim 7, wherein the number of recipients responding to the first email that satisfies the quantity relationship specified by the ratio threshold policy comprises:响应于根据所述第一邮件的收件人的邮箱地址得到的目标数字满足所述数量关系,向处理服务端发送所述第一邮件。In response to the target number obtained according to the email address of the recipient of the first email satisfying the quantitative relationship, the first email is sent to the processing server.9.根据权利要求8所述的方法,其特征在于,所述响应于根据所述第一邮件的收件人的邮箱地址得到的目标数字满足所述数量关系,包括:9. The method according to claim 8, characterized in that the target number obtained in response to the email address of the recipient of the first email satisfying the quantitative relationship comprises:响应于按照一定策略对由所述邮箱地址得到的数字进行处理得到的目标数字满足所述数量关系。In response to processing the number obtained from the email address according to a certain strategy, the target number satisfies the quantitative relationship.10.根据权利要求1所述的方法,其特征在于,所述邮件处理策略包括多种策略,所述至少一封邮件中的第二邮件不满足所述邮件处理策略,包括:10. The method according to claim 1, wherein the mail processing strategy includes multiple strategies, and the second mail in the at least one mail does not satisfy the mail processing strategy, including:所述第二邮件不满足所述多种策略中的每一种策略。The second email does not satisfy each of the multiple policies.11.根据权利要求1所述的方法,其特征在于,在向处理服务端发送所述第一邮件之前,所述方法还包括:11. The method according to claim 1, characterized in that before sending the first email to the processing service end, the method further comprises:获取所述邮件处理策略。Get the mail processing policy.12.根据权利要求5所述的方法,其特征在于,在向处理服务端发送所述第一邮件之前,所述方法还包括:12. The method according to claim 5, characterized in that before sending the first email to the processing service end, the method further comprises:获取所述设备的元数据,所述元数据包括所述设备所属的集群。Metadata of the device is obtained, where the metadata includes a cluster to which the device belongs.13.一种基于邮箱的数据处理装置,其特征在于,应用于邮箱客户端,所述装置包括:13. A data processing device based on a mailbox, characterized in that it is applied to a mailbox client, and the device comprises:第一获取单元,用于从邮箱服务端获取至少一封邮件,所述至少一封邮件,为所述邮箱服务端中的所有未读邮件;A first acquisition unit is used to acquire at least one email from a mailbox server, wherein the at least one email is all unread emails in the mailbox server;确定单元,用于确定所述至少一封邮件是否满足邮件处理策略,所述邮件处理策略为灰度测试策略;A determination unit, configured to determine whether the at least one email satisfies an email processing policy, wherein the email processing policy is a grayscale testing policy;发送单元,用于响应于所述至少一封邮件中的第一邮件满足所述邮件处理策略,向处理服务端发送所述第一邮件,以便于所述处理服务端对所述第一邮件进行处理,并将所述第一邮件在所述邮箱服务端标记为已读邮件;和/或,标记单元,用于响应于所述至少一封邮件中的第二邮件不满足所述邮件处理策略,将所述第二邮件在所述邮箱服务端标记为未读邮件。A sending unit is used to send a first email among the at least one email to a processing server in response to the first email satisfying the email processing policy, so that the processing server processes the first email and marks the first email as a read email on the mailbox server; and/or a marking unit is used to mark a second email among the at least one email as an unread email on the mailbox server in response to the second email not satisfying the email processing policy.14.一种设备,其特征在于,所述设备包括处理器和存储器;14. A device, characterized in that the device comprises a processor and a memory;所述处理器用于执行所述存储器中存储的指令,以使得所述设备执行如权利要求1至12中任一项所述的方法。The processor is configured to execute instructions stored in the memory, so that the device performs the method according to any one of claims 1 to 12.15.一种计算机可读存储介质,其特征在于,包括指令,所述指令指示设备执行如权利要求1至12中任一项所述的方法。15. A computer-readable storage medium, comprising instructions, wherein the instructions instruct a device to execute the method according to any one of claims 1 to 12.
CN202211337442.6A2022-10-282022-10-28 A data processing method, device, equipment and storage medium based on mailboxActiveCN115589394B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202211337442.6ACN115589394B (en)2022-10-282022-10-28 A data processing method, device, equipment and storage medium based on mailbox

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202211337442.6ACN115589394B (en)2022-10-282022-10-28 A data processing method, device, equipment and storage medium based on mailbox

Publications (2)

Publication NumberPublication Date
CN115589394A CN115589394A (en)2023-01-10
CN115589394Btrue CN115589394B (en)2024-07-23

Family

ID=84781109

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202211337442.6AActiveCN115589394B (en)2022-10-282022-10-28 A data processing method, device, equipment and storage medium based on mailbox

Country Status (1)

CountryLink
CN (1)CN115589394B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102035758A (en)*2010-12-282011-04-27北京深思洛克软件技术股份有限公司Method for distributing emails

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN100581144C (en)*2007-03-132010-01-13杭州华三通信技术有限公司Mail filtering system and mail filtering method
CN101621479B (en)*2008-07-012012-09-05联想(北京)有限公司Method, server and terminal for E-mail transmission
US20110219200A1 (en)*2010-03-042011-09-08Computer Associates Think, Inc.System and method to archive email messages in a software as a service system
CN110457223B (en)*2019-08-132023-08-22中国联合网络通信集团有限公司Gray test drainage method, device, proxy server and readable storage medium
CN114079642B (en)*2020-08-112023-05-23华为技术有限公司Mail processing method and electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102035758A (en)*2010-12-282011-04-27北京深思洛克软件技术股份有限公司Method for distributing emails

Also Published As

Publication numberPublication date
CN115589394A (en)2023-01-10

Similar Documents

PublicationPublication DateTitle
US7802304B2 (en)Method and system of providing an integrated reputation service
JP4387205B2 (en) A framework that enables integration of anti-spam technologies
US8725811B2 (en)Message organization and spam filtering based on user interaction
US8566406B2 (en)Filtering of electronic mail messages destined for an internal network
US7774420B2 (en)Managing on-demand email storage
US20070180031A1 (en)Email Opt-out Enforcement
CN111752973B (en) System and method for generating heuristic rules for identifying spam emails
US20250294003A1 (en)Methods for managing spam communication and devices thereof
CN102986174A (en)Mail transfer system, mail gateway and data store server
JP4904278B2 (en) Method, apparatus, and computer software for restricting reception of unnecessary e-mail by limiting the number of connections and the number of messages
CN111698310B (en) Multi-test environment scheduling method and device based on SWIFT network
TWI756288B (en) Method and apparatus for determining recipient during replying to e-mail
US20070061402A1 (en)Multipurpose internet mail extension (MIME) analysis
CN115580584A (en) A message processing method and device
CN115589394B (en) A data processing method, device, equipment and storage medium based on mailbox
US8874646B2 (en)Message managing system, message managing method and recording medium storing program for that method execution
TW201123782A (en)Computer-readable storage medium and computer-implemented method
US20050216588A1 (en)Blocking specified unread messages to avoid mailbox overflow
CN103716228A (en)Mail transmission method, mail gateway and mail transmission system
CN107592361A (en)A kind of data transmission method based on double IB networks, device, equipment
US20140236985A1 (en)Using Vacation Automatic Replies to Enhance Bulk Marketing Campaigns
US7657601B2 (en)Methods and computer programs for formulating messaging platform capacity projections
CN116170301B (en)NAT log collection method of load balancing equipment and load balancing equipment
JP7338160B2 (en) Electronic mail transmission determination device, electronic mail transmission determination method, and electronic mail transmission determination program
JP2009200999A (en)Mail system, server device, mail management method, program, and recording medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp