






技术领域technical field
本发明涉及互联网领域,尤其涉及一种邮件生成与发送方法、装置及存储介质。The invention relates to the field of the Internet, in particular to a method, device and storage medium for generating and sending emails.
背景技术Background technique
业务处理系统,例如资产证券化(Asset-backed Securities,简称ABS)系统通常包括多个业务类型,常常需要将每个业务类型对应的数据内容以电子邮件的方式发送到相关用户和人员。Business processing systems, such as asset-backed securities (ABS for short) systems usually include multiple business types, and often need to send the data content corresponding to each business type to relevant users and personnel in the form of email.
现有技术中,邮件的数据采集方式单一、发送模板单一且切换困难,无法根据业务需求灵活变换,而如果对每个业务类型的邮件进行定制化开发,对于业务处理系统的功能开发和维护又将是灾难性的。In the existing technology, the data collection method of mail is single, the sending template is single, and switching is difficult, which cannot be flexibly changed according to business needs. However, if the mail of each business type is customized, it will be difficult for the function development and maintenance of the business processing system. would be disastrous.
发明内容Contents of the invention
本发明提供了一种邮件生成与发送方法、装置及存储介质,以解决邮件生成与发送无法根据业务需求灵活变换的技术问题。The invention provides a mail generation and sending method, device and storage medium to solve the technical problem that mail generation and sending cannot be flexibly changed according to business requirements.
第一方面,本发明提供了一种邮件生成与发送方法,包括:响应于邮件生成请求,接收配置指令配置业务数据的业务逻辑;根据所述业务逻辑处理所述业务数据,获得邮件的展示数据,所述展示数据与预先配置的邮件基础配置信息构成邮件内容信息;响应于邮件发送请求,确定所述邮件内容信息的发送模式;根据所述发送模式确定邮件发送模板;将所述邮件内容信息填充至所述邮件发送模板,并进行发送。In the first aspect, the present invention provides a method for generating and sending emails, including: in response to an email generation request, receiving configuration instructions to configure the business logic of business data; processing the business data according to the business logic, and obtaining the display data of the email , the display data and pre-configured basic mail configuration information constitute mail content information; in response to the mail sending request, determine the sending mode of the mail content information; determine the mail sending template according to the sending mode; send the mail content information Fill in the email sending template and send it.
作为可选的实施例,所述方法应用于集成有邮件功能的业务处理系统,所述业务处理系统包括多个业务类型;所述方法还包括:为所述业务处理系统中的每个业务类型配置对应的路由配置信息,所述路由配置信息包括邮件的展示模式;所述响应于邮件生成请求,接收配置指令配置业务数据的业务逻辑,包括:响应于邮件生成请求,根据所述路由配置信息确定邮件的展示模式;若所述展示模式为计算器模式,则执行所述接收配置指令配置业务数据的业务逻辑的步骤。As an optional embodiment, the method is applied to a business processing system integrated with a mail function, and the business processing system includes a plurality of business types; the method further includes: for each business type in the business processing system Configure the corresponding routing configuration information, the routing configuration information includes the display mode of the mail; the business logic of receiving configuration instructions to configure business data in response to the mail generation request includes: responding to the mail generation request, according to the routing configuration information Determine the display mode of the mail; if the display mode is a calculator mode, execute the step of receiving the configuration instruction and configuring the business logic of the business data.
作为可选的实施例,所述方法还包括:若所述展示模式为固定计算模式,则根据预先配置的固定业务逻辑处理所述业务数据,获得邮件的展示数据。As an optional embodiment, the method further includes: if the presentation mode is a fixed computing mode, processing the business data according to pre-configured fixed business logic to obtain the mail presentation data.
作为可选的实施例,所述路由配置信息还包括邮件的发送模式、邮件解析模板、邮件发送模板;所述响应于邮件发送请求,确定所述邮件内容信息的发送模式,包括:响应于邮件发送请求,根据所述路由配置信息确定邮件的发送模式;所述根据所述发送模式确定邮件发送模板;将所述邮件内容信息填充至所述邮件发送模板,并进行发送,包括:若所述发送模式为第一发送模式,则根据路由配置信息确定所述邮件解析模板和所述邮件发送模板;根据所述邮件解析模板对邮件内容信息进行解析;将解析后的邮件内容信息填充到所述邮件发送模板中,并进行发送。As an optional embodiment, the routing configuration information also includes an email sending mode, an email parsing template, and an email sending template; the determining the sending mode of the email content information in response to the email sending request includes: responding to the email sending request Send a request, determine the sending mode of the mail according to the routing configuration information; determine the sending template of the mail according to the sending mode; fill the content information of the mail into the sending template of the mail, and send it, including: if the The sending mode is the first sending mode, then determine the mail analysis template and the mail sending template according to the routing configuration information; analyze the mail content information according to the mail analysis template; fill the parsed mail content information into the Email sending template, and send it.
作为可选的实施例,所述方法还包括:若所述发送模式为第二发送模式,则将邮件内容信息填充到预先配置的固定邮件发送模板中,并进行发送。As an optional embodiment, the method further includes: if the sending mode is the second sending mode, filling email content information into a pre-configured fixed email sending template and sending it.
作为可选的实施例,所述路由配置信息还包括预设处理标识;所述响应于邮件发送请求之前,还包括:根据路由配置信息中的预设处理标识确定所述邮件内容信息是否进行预设处理;若是,则进行预设处理。As an optional embodiment, the routing configuration information also includes a preset processing identifier; before responding to the email sending request, it also includes: determining whether the email content information is pre-processed according to the preset processing identifier in the routing configuration information. Set processing; if yes, perform default processing.
作为可选的实施例,所述预设处理包括以下至少一种处理:延迟发送、展示数据修改、邮件解析模板修改、邮件发送模板修改。As an optional embodiment, the preset processing includes at least one of the following processing: delayed sending, modification of display data, modification of email parsing template, modification of email sending template.
作为可选的实施例,所述响应于邮件生成请求,包括:遍历所述业务处理系统中每个业务类型的邮件生成请求;若至少两个业务类型发出邮件生成请求,则并行处理所述邮件生成请求。As an optional embodiment, the responding to the mail generation request includes: traversing the mail generation requests of each business type in the business processing system; if at least two business types send mail generation requests, processing the mails in parallel Generate a request.
作为可选的实施例,若至少两个业务类型发出邮件生成请求,则生成对应的至少两条邮件内容信息,将所述邮件内容信息存储至邮件生成列表中;所述响应于邮件发送请求,包括:遍历所述邮件生成列表,并行处理所述邮件发送请求。As an optional embodiment, if at least two business types send mail generation requests, then generate at least two pieces of corresponding mail content information, and store the mail content information in the mail generation list; in response to the mail sending request, The method includes: traversing the mail generation list, and processing the mail sending request in parallel.
第二方面,本发明提供一种邮件生成与发送装置,包括:邮件生成模块和邮件发送模块;其中,所述邮件生成模块用于响应于邮件生成请求,根据接收到的配置指令配置业务数据的业务逻辑;根据所述业务逻辑处理所述业务数据,获得邮件的展示数据,所述展示数据与预先配置好的邮件基础配置信息构成邮件内容信息;所述邮件发送模块,用于响应于邮件发送请求,确定所述邮件内容信息的发送模式;根据所述发送模式确定邮件发送模板;将所述邮件内容信息填充至所述邮件发送模板,并进行发送。In a second aspect, the present invention provides an email generating and sending device, including: an email generating module and an email sending module; wherein, the email generating module is configured to configure service data according to received configuration instructions in response to an email generating request Business logic; process the business data according to the business logic, and obtain the display data of the mail, and the display data and the pre-configured basic configuration information of the mail form the content information of the mail; the mail sending module is used to respond to the sending of the mail request, determine the sending mode of the email content information; determine an email sending template according to the sending mode; fill the email sending template with the email content information, and send it.
第三方面,本发明提供一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;存储器,用于存放计算机程序;处理器,用于执行存储器上所存放的程序时,实现第一方面任一项所述的邮件生成与发送方法的步骤。In a third aspect, the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; the memory is used to store computer programs; The processor is used to implement the steps of the mail generating and sending method described in any one of the first aspect when executing the program stored in the memory.
第四方面,本发明提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面任一项所述的邮件生成与发送方法的步骤。In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for generating and sending an email according to any one of the first aspect are implemented.
本发明实施例提供的邮件生成与发送方法、装置及存储介质,通过响应于邮件生成请求,接收配置指令配置业务数据的业务逻辑;根据所述业务逻辑处理所述业务数据,获得邮件的展示数据,所述展示数据与预先配置的邮件基础配置信息构成邮件内容信息;响应于邮件发送请求,确定所述邮件内容信息的发送模式;根据所述发送模式确定邮件发送模板;将所述邮件内容信息填充至所述邮件发送模板,并进行发送;即本发明实施例中,通过将邮件生成与发送分开执行,满足不同业务的发送时机;通过配置指令配置不同的业务逻辑,实现了邮件展示数据的灵活生成;通过发送模式确定对应的邮件发送模板,实现了不同邮件发送模板的选择;综上所述,本发明的实施例能够根据不同的业务需求灵活变换邮件。The email generation and sending method, device and storage medium provided by the embodiments of the present invention receive configuration instructions to configure business logic of business data in response to a mail generation request; process the business data according to the business logic to obtain the display data of the mail , the display data and pre-configured basic mail configuration information constitute mail content information; in response to the mail sending request, determine the sending mode of the mail content information; determine the mail sending template according to the sending mode; send the mail content information Fill in the email sending template and send it; that is, in the embodiment of the present invention, by separately executing email generation and sending, the sending timing of different services is satisfied; different business logics are configured through configuration instructions, and the display data of the email is realized. Flexible generation; the corresponding email sending template is determined through the sending mode, and the selection of different email sending templates is realized; in summary, the embodiments of the present invention can flexibly change emails according to different business requirements.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, In other words, other drawings can also be obtained from these drawings without paying creative labor.
图1为本发明实施例一提供的一种邮件生成与发送方法的流程示意图;FIG. 1 is a schematic flowchart of a method for generating and sending an email provided in Embodiment 1 of the present invention;
图2为本发明实施例二提供的一种邮件生成与发送方法的流程示意图;FIG. 2 is a schematic flowchart of a method for generating and sending an email provided in Embodiment 2 of the present invention;
图3为本发明实施例三提供的一种邮件生成与发送方法的流程示意图;FIG. 3 is a schematic flowchart of a method for generating and sending an email provided in Embodiment 3 of the present invention;
图4为本发明实施例四提供的一种邮件生成与发送方法的流程示意图;FIG. 4 is a schematic flowchart of a method for generating and sending an email provided in Embodiment 4 of the present invention;
图5为本发明实施例提供的又一种邮件生成与发送方法的流程示意图;FIG. 5 is a schematic flowchart of another method for generating and sending emails provided by an embodiment of the present invention;
图6为本发明实施例提供的一种邮件生成与发送装置的结构示意图;FIG. 6 is a schematic structural diagram of an email generating and sending device provided by an embodiment of the present invention;
图7为本发明实施例提供的一种电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
首先对本发明所涉及的专有名词进行解释:At first the proper nouns involved in the present invention are explained:
资产证券化(Asset-backed Securities,简称ABS)系统:服务于ABS融资模式的底层交易系统。其中,ABS融资模式是以项目所属的资产为支撑的证券化融资方式,即以项目所拥有的资产为基础,以项目资产可以带来的预期收益为保证,通过在资本市场发行债券来募集资金的一种项目融资方式。Asset-backed Securities (ABS) system: an underlying trading system that serves the ABS financing model. Among them, the ABS financing model is a securitization financing method supported by the assets of the project, that is, based on the assets owned by the project and guaranteed by the expected income that the project assets can bring, funds are raised by issuing bonds in the capital market A method of project financing.
专项计划:ABS系统中会根据专项计划资产管理计划,生成对应的唯一标识及其详细信息。Special plan: The ABS system will generate the corresponding unique identifier and its detailed information according to the special plan asset management plan.
对于业务处理系统,通常需要将业务处理系统生成的数据内容通过电子邮件(本文中简称邮件)的形式发送给相关用户和人员。比如ABS系统中,每天需要通过邮件将ABS系统的还款、还款过滤等信息发送给计划管理人,计划管理人会根据邮件信息校验、核对线上或者线下的金额交易信息。For a business processing system, it is usually necessary to send the data content generated by the business processing system to relevant users and personnel in the form of email (hereinafter referred to as email). For example, in the ABS system, information such as repayment and repayment filtering of the ABS system needs to be sent to the plan manager by email every day, and the plan manager will verify and check the online or offline amount transaction information based on the email information.
但是,目前的邮件,一般就是根据不同的邮件协议,实现邮件的发送和接收,邮件数据采集方式单一、发送模板单一且切换困难、邮件的生成和发送不能根据业务需求灵活变换。尤其是针对ABS系统中,包括多个专项计划,且日后专项计划的数量还会新增。每个专项计划因为底层资产、资金、收益等问题,对于邮件的发送时机、展示数据、展示样式都会有不同的需求,如果定制化开发,且按照专项计划管理人需求执行不同的发送策略,那么对于ABS系统的功能开发和维护将是灾难性的。However, the current emails generally realize the sending and receiving of emails according to different email protocols. The email data collection method is single, the sending template is single and switching is difficult, and the generation and sending of emails cannot be flexibly changed according to business needs. Especially for the ABS system, it includes multiple special plans, and the number of special plans will be added in the future. Each special plan has different requirements for the timing of sending emails, display data, and display styles due to issues such as underlying assets, funds, and income. If customized development is implemented and different sending strategies are implemented according to the needs of the special plan manager, then It would be disastrous for the functional development and maintenance of the ABS system.
针对上述技术问题,本发明的技术构思在于,为了应对不同业务类型的邮件发送时机,将邮件的生成和发送分开执行;为了应对不同业务类型的展示数据,可以灵活配置不同业务逻辑;为了应对不同业务类型的展示样式,将邮件发送模板进行配置化管理,可以动态切换不同的邮件发送模板。In view of the above-mentioned technical problems, the technical idea of the present invention is that, in order to cope with the timing of sending mails of different business types, the generation and sending of mails are performed separately; in order to cope with the display data of different business types, different business logics can be flexibly configured; in order to deal with different The display style of the business type, the email sending template is configured and managed, and different email sending templates can be dynamically switched.
第一方面,本实施例提供一种邮件生成与发送方法。图1为本发明实施例一提供的一种邮件生成与发送方法的流程示意图,如图1所示,该邮件生成与发送方法包括:In a first aspect, this embodiment provides a method for generating and sending an email. Fig. 1 is a schematic flow chart of a method for generating and sending an email provided in Embodiment 1 of the present invention. As shown in Fig. 1, the method for generating and sending an email includes:
步骤S101、响应于邮件生成请求,接收配置指令配置业务数据的业务逻辑。Step S101 , in response to an email generation request, receiving a configuration instruction to configure the business logic of the business data.
本步骤中,当某个业务需要生成邮件时,可以接收用户的配置指令,根据配置指令配置该业务数据的业务逻辑。也就是说,针对不同的业务,用户可以进行不同的配置。In this step, when a certain business needs to generate an email, it can receive a user's configuration instruction, and configure the business logic of the business data according to the configuration instruction. That is to say, for different services, users can perform different configurations.
步骤S102、根据所述业务逻辑处理所述业务数据,获得邮件的展示数据,所述展示数据与预先配置的邮件基础配置信息构成邮件内容信息。Step S102, process the business data according to the business logic, and obtain the display data of the mail, and the display data and the pre-configured basic configuration information of the mail form the content information of the mail.
本步骤中,可以根据业务逻辑处理业务数据,获得邮件的展示数据;然后将展示数据和预先配置好的邮件基础配置信息构成邮件内容信息,其中,邮件基础配置信息包括收件人信息、发件人所使用的组件信息等。优选的,邮件内容信息可以以一条记录的形式存储到数据库中。In this step, the business data can be processed according to the business logic to obtain the display data of the mail; then the display data and the pre-configured basic configuration information of the mail can be used to form the content information of the mail, wherein the basic configuration information of the mail includes the recipient information, sender Component information used by people, etc. Preferably, the mail content information can be stored in the database in the form of a record.
步骤S103、响应于邮件发送请求,确定所述邮件内容信息的发送模式。Step S103, in response to the email sending request, determine the sending mode of the email content information.
步骤S104、根据所述发送模式确定邮件发送模板。Step S104, determining an email sending template according to the sending mode.
步骤S105、将所述邮件内容信息填充至所述邮件发送模板,并进行发送。Step S105, filling the email content information into the email sending template and sending it.
具体来说,当需要将生成的邮件内容信息进行发送时,确定邮件内容信息的发送模式,其中,发送模式可以包括第一发送模式和第二发送模式,其中,第一发送模式可以为新邮件发送模板,即将邮件内容信息填充到新邮件发送模板中后,进行发送;第二发送模式可以为旧邮件发送模板,即将邮件内容信息填充到程序中早已写死的邮件发送模板中,进行发送。Specifically, when the generated mail content information needs to be sent, the sending mode of the mail content information is determined, wherein the sending mode may include a first sending mode and a second sending mode, wherein the first sending mode may be a new mail The sending template is to fill the mail content information into the new mail sending template and then send it; the second sending mode can be the old mail sending template, which is to fill the mail content information into the already written mail sending template in the program and send it.
本实施例提供的邮件生成与发送方法,通过响应于邮件生成请求,接收配置指令配置业务数据的业务逻辑;根据所述业务逻辑处理所述业务数据,获得邮件的展示数据,所述展示数据与预先配置的邮件基础配置信息构成邮件内容信息;响应于邮件发送请求,确定所述邮件内容信息的发送模式;根据所述发送模式确定邮件发送模板;将所述邮件内容信息填充至所述邮件发送模板,进行发送;即本实施例中,通过将邮件生成与发送分开执行,满足不同业务的发送时机;通过配置指令配置不同的业务逻辑,实现了邮件展示数据的灵活生成;通过发送模式确定对应的邮件发送模板,实现了不同邮件发送模板的选择;综上所述,本发明的实施例能够根据不同的业务需求灵活变换邮件。In the email generating and sending method provided in this embodiment, the business logic of business data is configured by receiving configuration instructions in response to the mail generating request; the business data is processed according to the business logic, and the display data of the mail is obtained, and the display data and The pre-configured mail basic configuration information constitutes mail content information; in response to the mail sending request, determining the sending mode of the mail content information; determining the mail sending template according to the sending mode; filling the mail content information into the mail sending Templates for sending; that is, in this embodiment, by separately executing mail generation and sending, the sending timing of different businesses is satisfied; different business logics are configured through configuration instructions, and the flexible generation of mail display data is realized; the corresponding sending mode is determined The e-mail sending template realizes the selection of different e-mail sending templates; in summary, the embodiment of the present invention can flexibly change e-mails according to different business requirements.
在实施例一的基础上,图2为本发明实施例二提供的一种邮件生成与发送方法的流程示意图,所述方法应用于集成有邮件功能的业务处理系统,所述业务处理系统包括多个业务类型。如图2所示,所述邮件生成与发送方法包括:On the basis of Embodiment 1, FIG. 2 is a schematic flowchart of a method for generating and sending emails provided in Embodiment 2 of the present invention. The method is applied to a business processing system integrated with mail functions, and the business processing system includes multiple business type. As shown in Figure 2, the mail generating and sending method includes:
步骤S201、为所述业务处理系统中的每个业务类型配置对应的路由配置信息。Step S201, configuring corresponding routing configuration information for each service type in the service processing system.
其中,所述路由配置信息包括邮件的展示模式。Wherein, the routing configuration information includes the display mode of the mail.
步骤S202、响应于邮件生成请求,根据所述路由配置信息确定邮件的展示模式。Step S202, in response to the email generation request, determine the display mode of the email according to the routing configuration information.
若确定邮件的展示模式为计算器模式,则执行步骤S203-S204;若确定邮件的展示模式为固定计算模式,则执行步骤S205。If it is determined that the display mode of the mail is the calculator mode, then perform steps S203-S204; if it is determined that the display mode of the mail is the fixed calculation mode, then perform step S205.
步骤S203、接收配置指令配置业务数据的业务逻辑。Step S203, receiving a configuration instruction to configure the business logic of the business data.
步骤S204、根据所述业务逻辑处理所述业务数据,获得邮件的展示数据,所述展示数据与预先配置的邮件基础配置信息构成邮件内容信息。Step S204, process the business data according to the business logic, and obtain the display data of the mail, and the display data and the pre-configured basic configuration information of the mail constitute the content information of the mail.
步骤S205、根据预先配置的固定业务逻辑处理所述业务数据,获得邮件的展示数据,所述展示数据与预先配置的邮件基础配置信息构成邮件内容信息。Step S205, process the service data according to the pre-configured fixed service logic, and obtain the display data of the mail, and the display data and the pre-configured basic configuration information of the mail form the content information of the mail.
步骤S206、响应于邮件发送请求,确定所述邮件内容信息的发送模式。Step S206, in response to the email sending request, determine the sending mode of the email content information.
步骤S207、根据所述发送模式确定邮件发送模板。Step S207, determining an email sending template according to the sending mode.
步骤S208、将所述邮件内容信息填充至所述邮件发送模板,并进行发送。Step S208, filling the email content information into the email sending template, and sending it.
本实施例中的步骤S203、步骤S204、以及步骤S206-步骤S208的实现方式分别与实施例一中的步骤S101-步骤S105的实现方式类似,此处不再赘述。The implementation manners of step S203, step S204, and step S206-step S208 in this embodiment are similar to the implementation manners of step S101-step S105 in Embodiment 1, and will not be repeated here.
与实施例一的区别在于,为了进一步满足不同业务类型的展示数据的需求,在本实施例中,为所述业务处理系统中的每个业务类型配置对应的路由配置信息,所述路由配置信息包括邮件的展示模式,响应于邮件生成请求,根据所述路由配置信息确定邮件的展示模式;若所述展示模式为计算器模式,则执行所述接收配置指令配置业务数据的业务逻辑的步骤;若所述展示模式为固定展示模式,则根据预先配置的固定业务逻辑处理所述业务数据,获得邮件的展示数据。The difference from Embodiment 1 is that, in order to further meet the display data requirements of different business types, in this embodiment, corresponding routing configuration information is configured for each business type in the business processing system, and the routing configuration information Including the display mode of the mail, in response to the mail generation request, determine the display mode of the mail according to the routing configuration information; if the display mode is a calculator mode, then execute the step of receiving the configuration instruction to configure the business logic of the business data; If the display mode is a fixed display mode, the business data is processed according to the pre-configured fixed business logic to obtain the mail display data.
具体来说,针对于业务处理系统中的不同类型业务,可以为其配置对应的路由配置信息,其中,路由配置信息包括邮件的展示模式,邮件的展示模式分为计算器和固定计算两种模式;当为计算器模式时,说明此时业务类型对于展示数据有新的需求,此时可以接收用户的配置指令配置对应的业务逻辑;当为固定计算模式时,说明此时业务类型对于展示数据没有新的需求,则可以直接根据程序中早已写死的固定业务逻辑处理业务数据即可。其过程如下:当某业务类型有生成邮件的需求时,首先查询该业务类型对应的路由配置信息中的邮件的展示模式,若查询到计算器模式,则可以接收用户的配置指令,配置业务数据的业务逻辑,若查询到固定计算模式,则可以按照已经预先写死的固定业务逻辑处理业务数据。Specifically, for different types of business in the business processing system, corresponding routing configuration information can be configured for it. The routing configuration information includes the display mode of the mail, and the display mode of the mail is divided into two modes: calculator and fixed calculation. ; When it is in the calculator mode, it means that the business type has new requirements for the display data at this time, and the corresponding business logic can be configured by receiving the user's configuration command at this time; If there are no new requirements, the business data can be processed directly according to the fixed business logic already written in the program. The process is as follows: When a business type needs to generate emails, first query the display mode of the emails in the routing configuration information corresponding to the business type. If the calculator mode is found, it can receive user configuration instructions and configure business data business logic, if the fixed calculation mode is queried, the business data can be processed according to the pre-written fixed business logic.
举例来说,可以为ABS系统的每个专项计划配置对应的路由配置信息,当专项计划有生成邮件的需求时,可以根据该专项计划的路由配置信息,查询当前专项计划采用计算器模式还是固定计算模式来获取邮件的展示数据,可以将展示数据保存到内容容器中,然后将展示数据与专项计划的邮件基础配置信息结合,获得邮件内容信息,将邮件内容信息存储到数据库中。For example, you can configure corresponding routing configuration information for each special plan of the ABS system. When a special plan needs to generate emails, you can query whether the current special plan uses the calculator mode or fixed according to the routing configuration information of the special plan. The calculation mode is used to obtain the display data of the mail, and the display data can be saved in the content container, and then the display data is combined with the basic configuration information of the mail of the special plan to obtain the content information of the mail, and the content information of the mail is stored in the database.
本实施例提供的邮件生成与发送方法,通过为所述业务处理系统中的每个业务类型配置对应的路由配置信息,所述路由配置信息包括邮件的展示模式;根据所述路由配置信息确定邮件的展示模式;若所述展示模式为计算器模式,则执行所述接收配置指令配置业务数据的业务逻辑的步骤,若所述展示模式为固定计算模式,则根据预先配置的固定业务逻辑处理所述业务数据,获得邮件的展示数据。即本实施例首先根据路由配置信息查询邮件的展示模式,再根据邮件的展示模式确定是否进行业务逻辑配置,若不需要进行配置,则直接按照既定的程序获取展示数据即可,进一步满足了用户对不同展示数据的需求。In the mail generation and sending method provided in this embodiment, the corresponding routing configuration information is configured for each business type in the business processing system, and the routing configuration information includes the display mode of the mail; the mail is determined according to the routing configuration information display mode; if the display mode is a calculator mode, execute the step of receiving configuration instructions to configure the business logic of business data; if the display mode is a fixed calculation mode, process all the data according to the pre-configured fixed business logic The business data described above is used to obtain the display data of emails. That is to say, this embodiment first queries the display mode of the mail according to the routing configuration information, and then determines whether to perform business logic configuration according to the display mode of the mail. The need for different display data.
在上述实施例的基础上,图3为本发明实施例三提供的一种邮件生成与发送方法的流程示意图。如图3所示,所述邮件生成与发送方法包括:On the basis of the above embodiments, FIG. 3 is a schematic flowchart of a method for generating and sending an email provided in Embodiment 3 of the present invention. As shown in Figure 3, the mail generating and sending method includes:
步骤S301、为所述业务处理系统中的每个业务类型配置对应的路由配置信息。Step S301, configuring corresponding routing configuration information for each service type in the service processing system.
其中,所述路由配置信息包括邮件的发送模式、邮件解析模板、邮件发送模板。Wherein, the routing configuration information includes an email sending mode, an email parsing template, and an email sending template.
步骤S302、响应于邮件生成请求,接收配置指令配置业务数据的业务逻辑。Step S302, in response to the email generation request, receiving a configuration instruction to configure the business logic of the business data.
步骤S303、根据所述业务逻辑处理所述业务数据,获得邮件的展示数据,所述展示数据与预先配置的邮件基础配置信息构成邮件内容信息。Step S303, process the business data according to the business logic, and obtain the display data of the mail, and the display data and the pre-configured basic configuration information of the mail constitute the content information of the mail.
步骤S304、响应于邮件发送请求,根据所述路由配置信息确定邮件的发送模式。Step S304, in response to the email sending request, determine the email sending mode according to the routing configuration information.
若确定邮件的发送模式为第一发送模式,则执行步骤S305-S307;若确定邮件的发送模式为第二发送模式,则执行步骤S308。If it is determined that the sending mode of the email is the first sending mode, then execute steps S305-S307; if it is determined that the sending mode of the email is the second sending mode, then execute step S308.
步骤S305、根据路由配置信息确定所述邮件解析模板和所述邮件发送模板。Step S305. Determine the email parsing template and the email sending template according to routing configuration information.
步骤S306、根据所述邮件解析模板对所述邮件内容信息进行解析。Step S306, analyzing the content information of the email according to the email analysis template.
步骤S307、将解析后的邮件内容信息填充到所述邮件发送模板中,并进行发送。结束。Step S307, filling the analyzed email content information into the email sending template, and sending it. Finish.
步骤S308、将邮件内容信息填充到预先配置的固定邮件发送模板中,并进行发送。结束。Step S308, filling the email content information into the pre-configured fixed email sending template, and sending it. Finish.
本实施例中的步骤S302、步骤303的实现方式分别与实施例一中的步骤S101、步骤S102的实现方式类似,此处不再赘述。The implementation manners of step S302 and step 303 in this embodiment are similar to the implementation manners of step S101 and step S102 in Embodiment 1, and will not be repeated here.
与上述实施例的区别在于,为了进一步满足用户对不同业务类型的展示样式的需求,在本实施例中,为所述业务处理系统中的每个业务类型配置对应的路由配置信息,所述路由配置信息包括邮件的发送模式、邮件解析模板、邮件发送模板;响应于邮件发送请求,根据所述路由配置信息确定邮件的发送模式;若所述发送模式为第一发送模式,则根据路由配置信息确定邮件解析模板和邮件发送模板;根据所述邮件解析模板对所述邮件内容信息进行解析;将解析后的邮件内容信息填充到所述邮件发送模板中,并进行发送;若所述发送模式为第二发送模式,则将邮件内容信息填充到预先配置的固定邮件发送模板中,并进行发送。The difference from the above embodiment is that, in order to further meet the user's requirements for display styles of different service types, in this embodiment, corresponding route configuration information is configured for each service type in the service processing system, and the route The configuration information includes the sending mode of the mail, the mail analysis template, and the mail sending template; in response to the mail sending request, determine the sending mode of the mail according to the routing configuration information; if the sending mode is the first sending mode, then according to the routing configuration information Determine an email analysis template and an email sending template; analyze the email content information according to the email analysis template; fill the analyzed email content information into the email sending template, and send it; if the sending mode is In the second sending mode, the email content information is filled into a pre-configured fixed email sending template and sent.
具体来说,针对需要发送的邮件内容信息,可以根据路由配置信息查询对应的邮件发送模式,若采用第一发送模式(新发送模式),则根据路由配置信息查询到对应的邮件解析模板,将邮件内容信息进行解析,获得解析数据,并将解析数据保存至内存容器中,再根据路由配置信息查询到对应的邮件发送模板,然后将内存容器中的解析数据填充至邮件发送模板中,最后发送邮件;若采用第二发送模式(老发送模式),那么会查找固定邮件发送模板,并将邮件内容信息填充到固定邮件发送模板中,最后发送邮件。Specifically, for the email content information to be sent, the corresponding email sending mode can be queried according to the routing configuration information. If the first sending mode (new sending mode) is adopted, the corresponding email parsing template can be found according to the routing configuration information, and the Analyze the mail content information, obtain the parsed data, and save the parsed data to the memory container, then query the corresponding mail sending template according to the routing configuration information, then fill the parsed data in the memory container into the mail sending template, and finally send Mail; if the second sending mode (old sending mode) is adopted, then the fixed mail sending template will be searched, and the mail content information will be filled into the fixed mail sending template, and finally the mail will be sent.
本实施例提供的邮件生成与发送方法,通过为所述业务处理系统中的每个业务类型配置对应的路由配置信息,所述路由配置信息还包括邮件的发送模式、邮件解析模板、邮件发送模板;根据所述路由配置信息确定邮件的发送模式;若所述发送模式为第一发送模式,则根据路由配置信息确定邮件解析模板和邮件发送模板;根据所述邮件解析模板对邮件内容信息进行解析;将解析后的邮件内容信息填充到邮件发送模板中,并进行发送;若所述发送模式为第二发送模式,则将邮件内容信息填充到预先配置的固定邮件发送模板中,并进行发送;即本实施例首先根据路由配置信息查询邮件的发送模式,再根据邮件的发送模式确定邮件发送模板,进一步满足了用户对不同邮件展示样式的需求。In the mail generation and sending method provided in this embodiment, by configuring corresponding routing configuration information for each business type in the business processing system, the routing configuration information also includes the sending mode of the mail, the mail analysis template, and the mail sending template ; Determine the sending mode of the mail according to the routing configuration information; if the sending mode is the first sending mode, then determine the mail analysis template and the mail sending template according to the routing configuration information; analyze the mail content information according to the mail analysis template ; Fill the parsed mail content information into the mail sending template and send it; if the sending mode is the second sending mode, fill the mail content information into the pre-configured fixed mail sending template and send it; That is, in this embodiment, the sending mode of the mail is firstly queried according to the routing configuration information, and then the sending template of the mail is determined according to the sending mode of the mail, which further satisfies the user's requirements for different mail display styles.
在上述实施例的基础上,图4为本发明实施例四提供的一种邮件生成与发送方法的流程示意图。如图4所示,所述邮件生成与发送方法包括:On the basis of the above embodiments, FIG. 4 is a schematic flow chart of a method for generating and sending an email according to Embodiment 4 of the present invention. As shown in Figure 4, the mail generating and sending method includes:
步骤S401、为所述业务处理系统中的每个业务类型配置对应的路由配置信息。Step S401, configuring corresponding routing configuration information for each service type in the service processing system.
其中,所述路由配置信息还包括预设处理标识。Wherein, the routing configuration information further includes a preset processing identifier.
步骤S402、响应于邮件生成请求,接收配置指令配置业务数据的业务逻辑。Step S402, in response to the email generation request, receiving a configuration instruction to configure the business logic of the business data.
步骤S403、根据所述业务逻辑处理所述业务数据,获得邮件的展示数据,所述展示数据与预先配置的邮件基础配置信息构成邮件内容信息。Step S403, process the business data according to the business logic, and obtain the display data of the mail, and the display data and the pre-configured basic configuration information of the mail constitute the content information of the mail.
步骤S404、根据路由配置信息中的预设处理标识确定邮件内容信息是否进行预设处理。Step S404. Determine whether to perform preset processing on the mail content information according to the preset processing identifier in the routing configuration information.
若是,执行步骤S405-S406;若否,直接执行步骤S406。If yes, execute steps S405-S406; if not, directly execute step S406.
步骤S405、进行预设处理。Step S405, perform preset processing.
步骤S406、响应于邮件发送请求,确定所述邮件内容信息的发送模式。Step S406, in response to the email sending request, determine the sending mode of the email content information.
步骤S407、根据所述发送模式确定邮件发送模板。Step S407. Determine an email sending template according to the sending mode.
步骤S408、将所述邮件内容信息填充至所述邮件发送模板,并进行发送。Step S408, filling the email content information into the email sending template, and sending it.
本实施例中的步骤S401-步骤S403、步骤S406-步骤S408的实现方式分别与实施例二中的步骤S201-步骤S205的实现方式类似,此处不再赘述。The implementation manners of step S401-step S403 and step S406-step S408 in this embodiment are similar to the implementation manners of step S201-step S205 in embodiment 2 respectively, and will not be repeated here.
与上述实施例的区别在于,为了满足用户对生成的邮件进行一些特殊处理,在本实施例中,根据路由配置信息中的预设处理标识确定邮件内容信息是否进行预设处理,若是,则进行预设处理,然后再执行所述响应于邮件发送请求的步骤。The difference from the above-mentioned embodiment is that, in order to satisfy the user to perform some special processing on the generated mail, in this embodiment, it is determined whether the mail content information is subjected to the preset processing according to the preset processing identifier in the routing configuration information, and if so, the Preset processing, and then execute the step of responding to the email sending request.
具体来说,在生成邮件内容信息后,根据路由配置信息中的预设处理标识,查询该邮件是否需要特殊处理(例如:延迟发送、展示数据修改、邮件发送模板修改等),若有特殊处理,那么需要先进行特殊处理,再响应于邮件发送请求,发送邮件;如果没有特殊处理,直接响应于邮件发送请求,发送邮件即可。Specifically, after generating the email content information, check whether the email needs special processing (for example: delayed sending, display data modification, email sending template modification, etc.) according to the preset processing identifier in the routing configuration information. , then you need to perform special processing first, and then send the email in response to the email sending request; if there is no special processing, just respond to the email sending request directly and send the email.
作为可选的实施例,所述预设处理包括以下至少一种处理:邮件延迟发送、展示数据修改、发送模板修改。As an optional embodiment, the preset processing includes at least one of the following processing: delayed sending of emails, modification of display data, and modification of sending templates.
具体来说,在邮件内容信息生成后,若根据路由配置信息中的预设处理标识确定邮件延迟发送,此时可以配置邮件的延迟发送时机,或者在邮件生成内容前也可以配置延迟发送时机;在收到需要发送邮件内容信息的请求后,确定邮件发送模板、将邮件内容信息填充至邮件发送模板,最后在延迟发送时机发送邮件;若路由配置信息中查询不到需要进行邮件延迟发送的预设处理,则可以在收到需要发送邮件内容信息的请求后,确定邮件发送模板、将邮件内容信息填充至邮件发送模板后,立即发送邮件。Specifically, after the email content information is generated, if the delayed delivery of the email is determined according to the preset processing identifier in the routing configuration information, the delayed sending timing of the email can be configured at this time, or the delayed sending timing can also be configured before the content of the email is generated; After receiving the request to send email content information, determine the email sending template, fill the email content information into the email sending template, and finally send the email at the timing of delayed sending; If processing is set, after receiving a request to send email content information, the email sending template can be determined, the email content information can be filled into the email sending template, and the email can be sent immediately.
若根据路由配置信息中的预设处理标识确定进行展示数据修改时,则此时可以接收用户的重新配置指令配置新的业务逻辑,从而获得新的展示数据,新的展示数据和邮件基础配置信息构成新的邮件内容信息,此后再响应于邮件发送请求即可。If it is determined to modify the display data according to the preset processing identifier in the routing configuration information, then at this time, the user’s reconfiguration command can be received to configure new business logic, so as to obtain new display data, new display data and basic email configuration information It is sufficient to form new mail content information, and then respond to the mail sending request.
若根据路由配置信息中的预设处理标识确定进行邮件解析模板、邮件发送模板修改时,则此时可以接收用户的配置指令,重新在路由配置信息中配置新的邮件解析模板、新的邮件发送模板,响应于邮件发送请求,将邮件内容信息通过新的邮件解析模板进行解析,再将解析后的邮件内容信息填充到新的邮件发送模板,从而变换了邮件的展示样式。If it is determined to modify the email parsing template and email sending template according to the preset processing identifier in the routing configuration information, the user's configuration instructions can be received at this time, and a new email parsing template and a new email sending template can be reconfigured in the routing configuration information. The template, in response to the mail sending request, parses the mail content information through the new mail parsing template, and then fills the parsed mail content information into the new mail sending template, thereby changing the display style of the mail.
作为可选的实施例,所述响应于邮件生成请求,包括:遍历业务处理系统中每个业务类型的邮件生成请求;若至少两个业务类型发出邮件生成请求,则并行处理所述邮件生成请求。As an optional embodiment, the responding to the mail generation request includes: traversing the mail generation requests of each business type in the business processing system; if at least two business types send mail generation requests, processing the mail generation requests in parallel .
以ABS系统包括多个专项计划为例,ABS系统会遍历需要发送邮件的专项计划,然后对多个专项计划的邮件生成请求,进行多线程分发处理。Taking the ABS system including multiple special plans as an example, the ABS system will traverse the special plans that need to send emails, and then generate requests for the mails of multiple special plans, and perform multi-threaded distribution processing.
作为可选的实施例,若至少两个业务类型发出邮件生成请求,则生成对应的至少两条邮件内容信息,将所述邮件内容信息存储至邮件生成列表中;所述响应于邮件发送请求,包括:遍历所述邮件生成列表,并行处理所述邮件发送请求。As an optional embodiment, if at least two business types send mail generation requests, then generate at least two pieces of corresponding mail content information, and store the mail content information in the mail generation list; in response to the mail sending request, The method includes: traversing the mail generation list, and processing the mail sending request in parallel.
仍以ABS系统为例,在多线程处理多个邮件生成请求后,会生成对应的多个邮件内容信息,这多个邮件内容信息以记录的形式存储到邮件生成列表中。ABS系统会遍历邮件生成列表,多线程分发处理邮件发送请求。Still taking the ABS system as an example, after multiple mail generation requests are processed by multiple threads, corresponding multiple mail content information will be generated, and the multiple mail content information will be stored in the mail generation list in the form of records. The ABS system will traverse the mail generation list, and multi-thread distribution will process the mail sending request.
本实施例提供的邮件生成与发送方法,通过根据路由配置信息中的预设处理标识确定邮件内容信息是否进行预设处理,若是,则进行预设处理,然后再执行所述响应于邮件发送请求的步骤;即本实施例可以满足用户对邮件的一些特殊处理,提高了用户体验。The mail generation and sending method provided by this embodiment determines whether the mail content information is subjected to preset processing according to the preset processing identifier in the routing configuration information, and if so, performs preset processing, and then executes the response to the mail sending request. steps; that is, this embodiment can satisfy some special handling of emails by users and improve user experience.
为了更详细了解本实施例,图5为本发明实施例提供的又一种邮件生成与发送方法的流程示意图,如图5所示,该邮件生成与发送方法包括:In order to understand this embodiment in more detail, FIG. 5 is a schematic flowchart of another email generation and sending method provided by the embodiment of the present invention. As shown in FIG. 5, the email generation and sending method includes:
步骤S501、为所述业务处理系统中的每个业务类型配置对应的路由配置信息。Step S501, configuring corresponding routing configuration information for each service type in the service processing system.
其中,所述路由配置信息包括邮件的展示模式、邮件的发送模式、邮件解析模板、邮件发送模板以及预设处理标识。Wherein, the routing configuration information includes an email display mode, an email sending mode, an email parsing template, an email sending template, and a preset processing identifier.
步骤S502、响应于邮件生成请求,根据所述路由配置信息确定邮件的展示模式。Step S502, in response to the email generation request, determine the display mode of the email according to the routing configuration information.
若确定所述展示模式为计算器模式,则执行步骤S503-S504;若确定所述展示模式为固定计算模式,则执行步骤S505。If it is determined that the display mode is a calculator mode, execute steps S503-S504; if it is determined that the display mode is a fixed calculation mode, execute step S505.
步骤S503、接收配置指令配置业务数据的业务逻辑。Step S503, receiving a configuration instruction to configure the business logic of the business data.
步骤S504、根据所述业务逻辑处理所述业务数据,获得邮件的展示数据,所述展示数据与预先配置的邮件基础配置信息构成邮件内容信息。Step S504, process the business data according to the business logic, and obtain the display data of the mail, and the display data and the pre-configured basic configuration information of the mail constitute the content information of the mail.
步骤S505、根据预先配置的固定业务逻辑处理所述业务数据,获得邮件的展示数据,所述展示数据与预先配置的邮件基础配置信息构成邮件内容信息。Step S505, process the service data according to the pre-configured fixed service logic, and obtain the display data of the mail, and the display data and the pre-configured basic configuration information of the mail form the content information of the mail.
步骤S506、根据路由配置信息中的预设处理标识确定所述邮件内容信息是否进行预设处理。Step S506. Determine whether to perform preset processing on the email content information according to the preset processing identifier in the routing configuration information.
若是,则执行步骤S507-S508;若否,直接执行步骤S508。If yes, execute steps S507-S508; if not, directly execute step S508.
步骤S507、进行预设处理。Step S507, performing preset processing.
步骤S508、响应于邮件发送请求,根据所述路由配置信息确定邮件的发送模式。Step S508, in response to the email sending request, determine the email sending mode according to the routing configuration information.
若所述发送模式为第一发送模式,执行步骤S509-S511;若所述发送模式为第二发送模式,执行步骤S512。If the sending mode is the first sending mode, execute steps S509-S511; if the sending mode is the second sending mode, execute step S512.
步骤S509、根据路由配置信息确定所述邮件解析模板和所述邮件发送模板。Step S509, determining the email parsing template and the email sending template according to the routing configuration information.
步骤S510、根据所述邮件解析模板对所述邮件内容信息进行解析。Step S510, analyzing the content information of the email according to the email analysis template.
步骤S511、将解析后的邮件内容信息填充到所述邮件发送模板中,并进行发送。结束。Step S511 , filling the analyzed email content information into the email sending template, and sending it. Finish.
步骤S512、将邮件内容信息填充到预先配置的固定邮件发送模板中,并进行发送。结束。Step S512, filling the email content information into the pre-configured fixed email sending template, and sending it. Finish.
以ABS系统包括多个专项计划为例进行说明,首先为每个专项计划配置对应的路由配置信息,路由配置信息中包括邮件的展示模式、邮件的发送模式、邮件解析模板、邮件发送模板以及预设处理标识。Taking the ABS system including multiple special plans as an example, first configure the corresponding routing configuration information for each special plan. The routing configuration information includes the display mode of the mail, the sending mode of the mail, the mail analysis template, the mail sending template and the preset Set the processing ID.
然后,ABS系统遍历各专项计划是否需要发送邮件,若需要,则查询该专项计划的路由配置信息中的邮件展示模式,若确定邮件展示模式为计算器模式,则可以接收用户的配置指令配置对应的业务逻辑,根据该业务逻辑处理业务数据,获得邮件展示数据,邮件展示数据和邮件基础配置信息(收件人信息等)构成邮件内容信息,存储到邮件生成列表中;若确定邮件展示模式为固定计算模式,则根据预先配置的固定业务逻辑处理业务数据,获得邮件的展示数据,所述展示数据与预先配置的邮件基础配置信息构成邮件内容信息,存储到邮件生成列表中。Then, the ABS system traverses whether each special plan needs to send emails. If so, it queries the mail display mode in the routing configuration information of the special plan. If the mail display mode is determined to be the calculator mode, it can receive the user's configuration command to configure the corresponding business logic, process business data according to the business logic, obtain email display data, email display data and email basic configuration information (recipient information, etc.) constitute email content information, and store it in the email generation list; if the email display mode is determined In the fixed calculation mode, the business data is processed according to the pre-configured fixed business logic, and the display data of the mail is obtained. The display data and the pre-configured basic configuration information of the mail form the content information of the mail, which is stored in the mail generation list.
然后,根据该专项计划中的路由配置信息查询是否需要进行预设处理,预设处理包括邮件延迟发送、展示数据修改、邮件解析模板修改、邮件发送模板修改等;若需要进行预设处理,则先进行预设处理,然后再响应于邮件发送请求;若不需要进行预设处理,则直接响应于邮件发送请求。Then, according to the routing configuration information in the special plan, it is inquired whether preset processing is required. The preset processing includes delayed sending of emails, modification of display data, modification of email parsing templates, modification of email sending templates, etc.; if preset processing is required, then Perform preset processing first, and then respond to the mail sending request; if no preset processing is required, directly respond to the mail sending request.
在响应于邮件发送请求时,ABS系统会遍历邮件生成列表,确定需要进行发送邮件的专项计划;然后查询该专项计划的路由配置信息中的邮件发送模式;若确定邮件发送模式为第一发送模式,根据路由配置信息确定邮件解析模板和邮件发送模板,将邮件生成列表中的邮件内容信息通过述邮件解析模板进行解析,获得解析数据,将解析数据填充到邮件发送模板中进行发送;若确定邮件发送模式为第二发送模式,则直接将邮件生成列表中的邮件内容信息填充到预先配置的固定邮件发送模板中,进行发送即可。When responding to the mail sending request, the ABS system will traverse the mail generation list to determine the special plan that needs to send mail; then query the mail sending mode in the routing configuration information of the special plan; if it is determined that the mail sending mode is the first sending mode , determine the email analysis template and email sending template according to the routing configuration information, analyze the email content information in the email generation list through the email analysis template, obtain the analysis data, fill the analysis data into the email sending template and send it; if the email is determined If the sending mode is the second sending mode, then directly fill the mail content information in the mail generation list into the pre-configured fixed mail sending template and send it.
综上,通过把邮件的生成和发送分开执行、邮件的生成使用计算器模式可以根据不同的业务类型灵活的生成不同的邮件展示数据、邮件发送根据不同的业务类型,可以选择不同的邮件解析模板和邮件展示模板,可以满足目前几乎所有的复杂业务场景。To sum up, by separating the generation and sending of emails, using the calculator mode for email generation, different email display data can be flexibly generated according to different business types, and different email analysis templates can be selected for email sending according to different business types and email presentation templates, which can meet almost all complex business scenarios at present.
另外,通过将邮件生成与发送分开执行,可以极大遍历实际业务中,对于各个业务类型的邮件生成或发送过程中的特殊业务需求;其次,在不开发代码的情况下,能够完全通过配置,实现新的业务类型的邮件的生成和发送;最后,业务处理系统中,邮件的生成可以通过配置,变换展示数据,邮件的发送可以通过配置变换邮件解析逻辑,可以通过配置邮件发送模板,变换邮件的展示样式;即可以根据需要灵活变换邮件。In addition, by executing email generation and sending separately, you can greatly traverse the actual business, and the special business requirements in the process of email generation or sending for each business type; secondly, without developing code, you can completely pass the configuration, Realize the generation and sending of new business types of emails; finally, in the business processing system, the generation of emails can be configured to transform the display data, and the sending of emails can be configured to change the email parsing logic, and the email sending template can be configured to change the email The display style; that is, the mail can be flexibly changed according to the needs.
第二方面,本实施例提供一种邮件生成与发送装置。图6为本发明实施例提供的一种邮件生成与发送装置的结构示意图,如图6所示,该邮件生成与发送装置包括:In a second aspect, this embodiment provides an apparatus for generating and sending emails. FIG. 6 is a schematic structural diagram of a mail generating and sending device provided by an embodiment of the present invention. As shown in FIG. 6, the mail generating and sending device includes:
邮件生成模块10和邮件发送模块20;其中,所述邮件生成模块10用于响应于邮件生成请求,根据接收到的配置指令配置业务数据的业务逻辑;根据所述业务逻辑处理所述业务数据,获得邮件的展示数据,所述展示数据与预先配置好的邮件基础配置信息构成邮件内容信息;邮件发送模块20,用于响应于邮件发送请求,确定所述邮件内容信息的发送模式;根据所述发送模式确定邮件发送模板;将所述邮件内容信息填充至所述邮件发送模板,并进行发送。A
作为可选的实施例,所述装置应用于集成有邮件功能的业务处理系统,所述业务处理系统包括多个业务类型;所述装置还包括路由配置模块30,所述路由配置模块30,用于为所述业务处理系统中的每个业务类型配置对应的路由配置信息,所述路由配置信息包括邮件的展示模式;则所述邮件生成模块10,具体用于:响应于邮件生成请求,根据所述路由配置信息确定邮件的展示模式;若所述展示模式为计算器模式,则执行所述接收配置指令配置业务数据的业务逻辑的步骤。As an optional embodiment, the device is applied to a business processing system integrated with a mail function, and the business processing system includes multiple business types; the device also includes a
作为可选的实施例,所述邮件生成模块10,还用于:若所述展示模式为固定计算模式,则根据预先配置的固定业务逻辑处理所述业务数据,获得邮件的展示数据。As an optional embodiment, the
作为可选的实施例,所述路由配置信息还包括邮件的发送模式、邮件解析模板、邮件发送模板;所述邮件发送模块20,具体用于:响应于邮件发送请求,根据所述路由配置信息确定邮件的发送模式;若所述发送模式为第一发送模式,则根据路由配置信息确定所述邮件解析模板和所述邮件发送模板;根据所述邮件解析模板对所述邮件内容信息进行解析;将解析后的邮件内容信息填充到所述邮件发送模板中,并进行发送。As an optional embodiment, the routing configuration information also includes an email sending mode, an email parsing template, and an email sending template; the
作为可选的实施例,所述邮件发送模块20,还用于:若所述发送模式为第二发送模式,则将邮件内容信息填充到预先配置的固定邮件发送模板中,并进行发送。As an optional embodiment, the
作为可选的实施例,所述路由配置信息还包括预设处理标识,所述装置还包括预设处理模块40,所述预设处理模块40,用于:在响应于邮件发送请求之前,根据路由配置信息中的预设处理标识确定所述邮件内容信息是否进行预设处理;若是,则进行预设处理。As an optional embodiment, the routing configuration information further includes a preset processing identifier, and the device further includes a
作为可选的实施例,所述预设处理包括以下至少一种处理:延迟发送、展示数据修改、邮件解析模板修改、邮件发送模板修改。As an optional embodiment, the preset processing includes at least one of the following processing: delayed sending, modification of display data, modification of email parsing template, modification of email sending template.
作为可选的实施例,所述邮件生成模块10,具体用于:遍历所述业务处理系统中每个业务类型的邮件生成请求;若至少两个业务类型发出邮件生成请求,则并行处理所述邮件生成请求。As an optional embodiment, the
作为可选的实施例,若至少两个业务类型发出邮件生成请求,则所述邮件生成模块10生成对应的至少两条邮件内容信息,将所述邮件内容信息存储至邮件生成列表中;所述邮件发送模块20,用于:遍历所述邮件生成列表,并行处理所述邮件发送请求。As an optional embodiment, if at least two business types send mail generation requests, the
本实施例提供的邮件生成与发送装置,其实现原理和技术效果与上述实施例类似,此处不再赘述。The implementation principle and technical effect of the email generation and sending device provided in this embodiment are similar to those of the above embodiment, and will not be repeated here.
本实施例提供的邮件生成与发送装置,包括邮件生成模块和邮件发送模块;其中,所述邮件生成模块用于响应于邮件生成请求,根据接收到的配置指令配置业务数据的业务逻辑;根据所述业务逻辑处理所述业务数据,获得邮件的展示数据,所述展示数据与预先配置好的邮件基础配置信息构成邮件内容信息;邮件发送模块,用于响应于邮件发送请求,确定所述邮件内容信息的发送模式;根据所述发送模式确定邮件发送模板;将所述邮件内容信息填充至所述邮件发送模板,并进行发送;即本实施例中,通过将邮件生成与发送分开执行,满足不同业务的发送时机;通过配置指令配置不同的业务逻辑,实现了邮件展示数据的灵活生成;通过发送模式确定对应的邮件发送模板,实现了不同邮件发送模板的选择;综上所述,本发明的实施例能够根据不同的业务需求灵活变换邮件。The mail generation and sending device provided in this embodiment includes a mail generation module and a mail sending module; wherein, the mail generation module is used to respond to the mail generation request and configure the business logic of the business data according to the configuration instruction received; according to the The business logic processes the business data to obtain the display data of the mail, and the display data and the pre-configured basic configuration information of the mail form the mail content information; the mail sending module is used to determine the mail content in response to the mail sending request The sending mode of the information; determine the mail sending template according to the sending mode; fill the mail content information into the mail sending template, and send it; that is, in this embodiment, by separately executing the mail generation and sending, satisfying different The sending timing of the business; the flexible generation of mail display data is realized by configuring different business logics through configuration instructions; the corresponding mail sending template is determined through the sending mode, and the selection of different mail sending templates is realized; in summary, the present invention Embodiments can flexibly transform emails according to different business requirements.
如图7所示,本发明实施例提供了一种电子设备,包括处理器111、通信接口112、存储器113和通信总线114,其中,处理器111,通信接口112,存储器113通过通信总线114完成相互间的通信,As shown in FIG. 7 , an embodiment of the present invention provides an electronic device, including a
存储器113,用于存放计算机程序;
在本发明一个实施例中,处理器111,用于执行存储器113上所存放的程序时,实现前述任意一个方法实施例提供的邮件生成与发送方法的步骤。In one embodiment of the present invention, the
本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如前述任意一个方法实施例提供的邮件生成与发送方法的步骤。The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for generating and sending an email as provided in any one of the foregoing method embodiments are implemented.
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relative terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these No such actual relationship or order exists between entities or operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
以上所述仅是本发明的具体实施方式,使本领域技术人员能够理解或实现本发明。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所申请的原理和新颖特点相一致的最宽的范围。The above descriptions are only specific embodiments of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Accordingly, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110744731.7ACN115567478A (en) | 2021-07-01 | 2021-07-01 | Mail generating and sending method, device and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110744731.7ACN115567478A (en) | 2021-07-01 | 2021-07-01 | Mail generating and sending method, device and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN115567478Atrue CN115567478A (en) | 2023-01-03 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110744731.7APendingCN115567478A (en) | 2021-07-01 | 2021-07-01 | Mail generating and sending method, device and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN115567478A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130311588A1 (en)* | 2011-01-30 | 2013-11-21 | Tencent Technology (Shenzhen) Company Limited | Mail sending method and email system |
| CN107733789A (en)* | 2017-12-01 | 2018-02-23 | 世纪龙信息网络有限责任公司 | E-mail sending method and device |
| CN108259553A (en)* | 2017-10-09 | 2018-07-06 | 平安科技(深圳)有限公司 | The sending method and terminal device of business mail |
| CN109104360A (en)* | 2018-09-19 | 2018-12-28 | 平安科技(深圳)有限公司 | E-mail sending method, system, computer equipment and storage medium |
| CN111181842A (en)* | 2019-12-29 | 2020-05-19 | 苏州浪潮智能科技有限公司 | A method and system for sending emails based on different business logics |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130311588A1 (en)* | 2011-01-30 | 2013-11-21 | Tencent Technology (Shenzhen) Company Limited | Mail sending method and email system |
| CN108259553A (en)* | 2017-10-09 | 2018-07-06 | 平安科技(深圳)有限公司 | The sending method and terminal device of business mail |
| CN107733789A (en)* | 2017-12-01 | 2018-02-23 | 世纪龙信息网络有限责任公司 | E-mail sending method and device |
| CN109104360A (en)* | 2018-09-19 | 2018-12-28 | 平安科技(深圳)有限公司 | E-mail sending method, system, computer equipment and storage medium |
| CN111181842A (en)* | 2019-12-29 | 2020-05-19 | 苏州浪潮智能科技有限公司 | A method and system for sending emails based on different business logics |
| Publication | Publication Date | Title |
|---|---|---|
| US8924559B2 (en) | Provisioning services using a cloud services catalog | |
| US10846644B2 (en) | Cognitive process learning | |
| CN112633691A (en) | Method and device for generating custom approval process | |
| CN111177231A (en) | Report generation method and report generation device | |
| US10558716B2 (en) | Adaptive content-based publish/subscribe messaging | |
| CN106027593B (en) | For dynamically maintaining the method and system of data structure | |
| US8767241B2 (en) | Print services selection in a networked computing environment | |
| CN107038645B (en) | Service processing method, device and system and server | |
| US20120266164A1 (en) | Determining starting values for virtual machine attributes in a networked computing environment | |
| CN108073429A (en) | A kind of means of payment collocation method, device, equipment and storage medium | |
| CN110706093A (en) | Accounting processing method and device | |
| CN110633959A (en) | Method, device, equipment and medium for creating approval task based on graph structure | |
| CN112947919B (en) | Method and device for building business model and processing business request | |
| US20140143293A1 (en) | Managing Assets | |
| US10877805B2 (en) | Optimization of memory usage by integration flows | |
| CN111522840B (en) | Label configuration method, device, equipment and computer readable storage medium | |
| CN102932416B (en) | A kind of intermediate data storage method of information flow task, processing method and device | |
| US20130226670A1 (en) | Method and system for automatically partitioning and processing a business process | |
| EP2746944A2 (en) | ABAP unified connectivity | |
| CN108074074A (en) | Integration device and integration method thereof | |
| US10168999B2 (en) | Software object definition and integration | |
| US20150127508A1 (en) | Methods, Apparatus, Systems for First Look Matching of Orders on an Exchange | |
| CN115567478A (en) | Mail generating and sending method, device and storage medium | |
| CN111353766A (en) | Service process processing system and method of distributed service system | |
| US11023479B2 (en) | Managing asynchronous analytics operation based on communication exchange |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20230103 |