CN112528184A - Sending method and device of rich text mail, computer equipment and storage medium - Google Patents

Sending method and device of rich text mail, computer equipment and storage medium Download PDF

Info

Publication number
CN112528184A
CN112528184A CN202011488052.XA CN202011488052A CN112528184A CN 112528184 A CN112528184 A CN 112528184A CN 202011488052 A CN202011488052 A CN 202011488052A CN 112528184 A CN112528184 A CN 112528184A
Authority
CN
China
Prior art keywords
html page
sending
mail
image
browser
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011488052.XA
Other languages
Chinese (zh)
Inventor
冯英龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Pension Insurance Corp
Original Assignee
Ping An Pension Insurance Corp
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 Ping An Pension Insurance Corp filed Critical Ping An Pension Insurance Corp
Priority to CN202011488052.XA priority Critical patent/CN112528184A/en
Publication of CN112528184A publication Critical patent/CN112528184A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of software monitoring, and provides a sending method and a sending device for a rich text mail. The method comprises the following steps: receiving service data sent by a data analysis platform, wherein the service data comprises a service type; acquiring a display template corresponding to the service type, and rendering an HTML page based on the service data and the display template; performing virtual display on the rendered HTML page and acquiring a screen capture image; performing HTML redrawing based on the screen shot image to generate a compatible HTML page of the mail system; and sending the compatible HTML page to a designated recipient through the mail system. The invention utilizes the browser to virtually display the HTML page and capture the screen on the basis of the prior art, redraws the captured screen data, finally achieves the purpose that the mail system is compatible with the HTML page, and improves the efficiency and the quality of the reported mail sent by the data analysis platform.

Description

Sending method and device of rich text mail, computer equipment and storage medium
Technical Field
The invention relates to the technical field of software monitoring, in particular to a method and a device for sending a rich text mail, computer equipment and a storage medium.
Background
More and more business modules for public warning analysis, individual sales product analysis and the like in the system need to send warning information or notification information to receiving personnel in time in a mail mode. The mail usually encapsulates the early warning information or the notification information again in format to form a notification mail which directly contains an intuitive HTML page.
In the prior art, outlook is mostly adopted as a client for sending and receiving mails. The css rendering mechanism of Microsoft is adopted in Outlook, which is greatly different from the rendering mechanism of a browser which mainly supports h5 style, and Outlook is easy to have compatibility problem when displaying html pages; and different outlook versions are not consistent in the effect of showing the mails in the html format.
Therefore, how to improve the compatibility and consistency when sending the HTML page by using outlook becomes a problem to be solved urgently by those skilled in the art.
Disclosure of Invention
The invention aims to provide a technical scheme capable of improving compatibility of outlook and HTML pages so as to solve the problems in the prior art.
In order to achieve the above object, the present invention provides a method for sending rich text mail, including:
receiving service data sent by a data analysis platform, wherein the service data comprises a service type;
acquiring a display template corresponding to the service type, and rendering an HTML page based on the service data and the display template;
performing virtual display on the rendered HTML page and acquiring a screen capture image;
performing HTML redrawing based on the screen shot image to generate a compatible HTML page compatible with the mail system;
and sending the compatible HTML page to a designated recipient through the mail system.
According to the sending method of the rich text mail provided by the invention, the step of virtually displaying the rendered HTML page and acquiring the screen capture image comprises the following steps:
sending the rendered HTML page to a first browser, and utilizing the first browser to virtually display the HTML page;
the method comprises the steps of performing screen capture on the virtually displayed page content to obtain a screen capture image;
wherein the open state of the first browser is maintained after the screen capture image is acquired.
According to the sending method of the rich text mail provided by the invention, before the step of sending the rendered HTML page to the first browser and utilizing the first browser to virtually display the HTML page, the method further comprises the following steps:
detecting whether a process of the first browser is included in a current running process;
and if not, starting the first browser.
According to the sending method of the rich text mail provided by the invention, the step of capturing the screen of the virtually displayed page content to obtain the screen capture image comprises the following steps:
and acquiring the screen capture image according to the image format, the image size and/or the image quality parameters corresponding to the service type.
According to the sending method of the rich text mail provided by the invention, the step of performing HTML redrawing based on the screen capture image to generate the compatible HTML page compatible with the mail system comprises the following steps:
receiving the screen capture image through a mail system component, and storing the screen capture image into a preset form based on the service type;
and adding a mail body element based on the service type.
According to the sending method of the rich text mail provided by the invention, before the step of receiving the screenshot image through the mail system component and storing the screenshot image into a preset form based on the service type, the method further comprises the following steps:
and transmitting the screen capture image to a mail system component in an IO stream mode.
According to the method for sending the rich text mail provided by the invention, the step of sending the compatible HTML page to the appointed receiver through the mail system comprises the following steps:
and sending the compatible HTML page to an appointed receiver according to the number of preset receivers, the sending frequency and the attachment size.
In order to achieve the above object, the present invention further provides a rich text mail sending apparatus, including:
the data receiving module is suitable for receiving service data sent by the data analysis platform, and the service data comprises a service type;
the template acquisition module is suitable for acquiring a display template corresponding to the service type and performing HTML page rendering based on the service data and the display template;
the screen capture module is suitable for virtually displaying the rendered HTML page and acquiring a screen capture image;
the HTML redrawing module is suitable for performing HTML redrawing based on the screen capture image so as to generate a compatible HTML page compatible with the mail system;
and the sending module is suitable for sending the compatible HTML page to a specified receiver through the mail system.
To achieve the above object, the present invention further provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
To achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above method.
The invention provides a technical scheme for efficiently compatible with an email system and an HTML page. The method comprises the steps of firstly selecting different HTML display templates for service data in a data analysis platform based on different service types, and virtually displaying a rendered HTML page by using a first browser and acquiring a screenshot image on the basis of performing corresponding HTML rendering on the service data. And then redrawing the screen shot image in the mail system to obtain a compatible HTML page, and finally sending the compatible HTML page to a specified receiver. The method and the system provided by the invention have the advantages that the HTML page is virtually displayed and the screen is shot by utilizing the first browser on the basis of the prior art, the redrawing is carried out aiming at the shot data, and finally the purpose that the mail system is compatible with the HTML page is achieved, so that the data consistency is kept between the content reported by the data analysis platform and the mail received by a user.
Drawings
FIG. 1 is a flowchart of a first embodiment of a method for sending rich text mail according to the present invention;
FIG. 2 is a schematic flow chart of a virtual display of an HTML page and capture of a screenshot image in accordance with an embodiment of the present invention;
FIG. 3 is a schematic flowchart of an HTML redraw based on a screenshot image according to an embodiment of the present invention;
FIG. 4 is a block diagram of a rich text mail sending apparatus according to a first embodiment of the present invention;
fig. 5 is a schematic hardware configuration diagram of a rich text mail sending apparatus according to a first embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a technical scheme for efficiently compatible with an email system and an HTML page. The method comprises the steps of firstly selecting different HTML display templates for service data in a data analysis platform based on different service types, and virtually displaying a rendered HTML page by using a first browser and acquiring a screenshot image on the basis of performing corresponding HTML rendering on the service data. And then redrawing the screen shot image in the mail system to obtain a compatible HTML page, and finally sending the compatible HTML page to a specified receiver. The method and the system provided by the invention have the advantages that the HTML page is virtually displayed and the screen is shot by utilizing the first browser on the basis of the prior art, the redrawing is carried out aiming at the shot data, the purpose that the mail system is compatible with the HTML page is finally achieved, and the efficiency and the quality of the reported mail sent by the data analysis platform are improved.
Example one
Referring to fig. 1, the present embodiment provides a method for sending rich text mails. Rich Text Format (Rich Text Format), i.e. multi-Text Format, such as Word, WPS Office, Excel, etc., Rich Text mail is mail containing multiple Text formats. As shown in fig. 1, the sending method of rich text mail of the present embodiment includes the following steps:
and S100, receiving service data sent by the data analysis platform, wherein the service data comprises a service type.
The data analysis platform can comprise any third-party platform with data analysis, management, statistics and other functions, such as a public warning analysis platform, an individual sales product analysis platform and the like. These platforms need to send the data analysis results to a specific receiver in a regular or quantitative way by mail, wherein the metadata to be sent is the business data of the embodiment. It can be understood that the service data is different for different scenes and different data analysis platforms. The service type represents different service attributions of the service data, such as early warning type service data, notification type service data, reminding type service data and the like. Multiple service types may be divided according to different service application scenarios, which is not limited in this embodiment.
S200, obtaining a display template corresponding to the service type, and rendering an HTML page based on the service data and the display template.
It will be appreciated that different traffic types generally correspond to different degrees of importance. For example, the importance level of the early warning type of service data is the highest, the importance level of the alert type of service data is the next to, the importance level of the notification type of service data is the next to, and so on. The display modes of the display templates are different corresponding to the business service data with different importance degrees. For example, for the type of the warning, the warning information needs to be displayed in a particularly striking font, while for the general type of the notification, the corresponding processing in terms of font, layout, etc. is relatively more moderate. In order to deal with different display modes corresponding to data of different service types, different display templates are preset for each service type respectively in the embodiment. The display template is used for specifying the display font, the display position, the typesetting mode and other contents of the service data, so that different effects are presented.
The mapping relationship between the service type and the presentation template can be stored by a data table, and the presentation template can be stored in a specific URL address by an HTML script. Assuming that the service type obtained from the service data is T1, the chrome copper searches for a URL address D1 having a mapping relationship with the service type T1 from a preset data table, and obtains the display template M1 stored in the corresponding address based on D1. The presentation template M1 may typically specify the filling position, display font, background picture, etc. of the service data.
And performing HTML page rendering based on the service data and the display template, namely filling the specific content of the service data to the corresponding position of the display template, and displaying the specific content in a form specified in the display template. The rendering process may be implemented based on any existing HTML rendering method, for example, including the steps of:
(1) the browser parses the HTML source and then creates a DOM tree. In the DOM tree, each HTML tag has a corresponding node, and each text also has a corresponding text node. The root node of the DOM tree is documentElement, and the corresponding node is html tag.
(2) And the browser analyzes the CSS codes and calculates the final style data. The illegal grammar in the CSS code can be directly ignored by the browser. In parsing the CSS, the browser typically defines the priorities in the following order: browser default settings, user settings, out-link style, in-link style, style in html.
(3) And constructing a DOM tree, and constructing a rendering tree (rendering tree) after the style data is calculated. Render trees are similar to the DOM but with some differences. The DOM tree completely corresponds to the html tag one by one, but the rendering tree omits elements which do not need to be rendered, such as elements of head, display: none and the like. Each line in a large text segment is an independent node in the rendering tree, and each node in the rendering tree stores a corresponding css attribute. Once the render tree creation is complete, the browser may draw the page directly to the screen based on the render tree.
The above HTML page rendering process can be implemented by using any existing browser, and the google (Chrome) browser is preferably used in the present embodiment. In one example, the functionality of the google browser is implemented by installing the Chrome kernel on the nodejs server.
And S300, performing virtual display on the rendered HTML page and acquiring a screen capture image.
It will be appreciated that when multiple items of business data in multiple data platforms are docked at the same time, multiple virtual display requests are generated. In this case, in order to improve concurrency and response speed, the present embodiment may adopt a mode in which the Chrome kernel on the nodejs server is not turned off, so as to save the time for turning on the page first and turning off the page last before rendering, and also enable nodejs to reduce the operation of turning on and off the browser. For example, there are currently N virtual display requests that require the rendered HTML page to be displayed. The existing browser operation method generally includes receiving a first virtual display request, starting a browser process to display a rendered first HTML page, acquiring a first screenshot image, and closing the browser process. And then, receiving a second virtual display request, starting the browser process to display the rendered second HTML page, acquiring a second screen capture image, and closing the browser process. And by analogy, receiving an Nth virtual display request, starting a browser process to display a rendered NHTML page, acquiring an Nth screenshot image, and closing the browser process. It can be seen that, in the above process, the browser process is started every time the browser receives a virtual display request, and is closed every time the browser acquires a screenshot image. When the virtual display requests are too many, the browser process is continuously opened and closed, so that a large amount of computing resources are consumed, and the data processing speed is seriously influenced. Therefore, the embodiment can adopt a strategy that the browser is not closed, so that the data processing efficiency is improved.
FIG. 2 is a schematic flow chart of virtual display of an HTML page and capture of a screenshot image according to an embodiment of the present invention. As shown in fig. 2, step S300 includes:
s310, sending the rendered HTML page to a first browser, and utilizing the first browser to perform virtual display on the HTML page. The first browser in this embodiment may include any existing browser, such as an IE browser, a google browser, a QQ browser, and a dog search browser. In one example, a Google (Chrome) browser is preferred.
S320, screen capturing is carried out on the virtually displayed page content to obtain the screen capturing image; wherein the open state of the first browser is maintained after the screen capture image is acquired.
Before the steps of rendering and virtual display, whether a Chrome process is included in the currently running processes of the system can be detected in real time. If the Google browser is in the open state, the business data and the display template can be directly sent to the Google browser for rendering and displaying. If not, the Google browser is required to be started first, and then the service data and the display template are sent to the Google browser to be displayed in a rendering mode. That is, after the browser executes the virtual display process and acquires the screenshot image every time, the browser process is not closed, but only the currently displayed HTML page is closed. Therefore, when a new virtual display request is received, the previous HTML page can be directly displayed without starting the browser process again, and the waste of computing resources caused by frequent starting of the browser process is reduced.
The screenshot can be realized by any existing screenshot tool, and the embodiment does not limit the screenshot. The embodiment can also specify different parameters of the screenshot image according to different service types, such as image format, image size and/or image quality. The mapping relation between the service type and the screenshot image parameter can be stored through a data table. For example, the service type T1 corresponds to the image format G1, the image size R1, the image quality Q1, and the like. It will be appreciated that the parameters of the screenshot image are actually adapted to the presentation template. Since the screenshot image itself is to be filled into the corresponding presentation template, the style of the presentation template directly affects the format, size, quality, and other parameters of the screenshot image. Therefore, the embodiment can establish the influence relationship among the service type, the display template and the screenshot image parameter in the preset data table. For example, the service type T1 corresponds to the presentation template M1 and the screen capture image parameter C1, the service type T2 corresponds to the presentation template M2 and the screen capture image parameters C2 and C … …, and the service type TN corresponds to the presentation template MN and the screen capture image parameter CN. Therefore, on the basis of obtaining the service type, the style of the display template and the parameters of the screen capture image can be directly determined. Therefore, the compatibility between the screen capture image and the display template can be improved, and the situation that the display effect is not good due to the fact that the screen capture image is not matched with the display template is avoided.
Based on the above description, in this embodiment, before performing screen capturing, first, a corresponding screen capturing image parameter is queried in a preset data table according to a service type, and screen capturing of an HTML page is performed based on the queried screen capturing image parameter. Generally, the size of the screenshot image is equal to or smaller than the size of the HTML page displayed by the browser, in which case the screenshot may be performed based on a preset origin. For example, a preset origin is set as the top left corner of an HTML page, the data table is queried to obtain the corresponding size L1 and the width W1 of a screenshot image, and then L1 and W1 can be respectively intercepted from the preset origin downwards and rightwards, so that the screenshot image meeting the parameter requirements is obtained.
Further, on the basis of obtaining the screen capture image, the screen capture image may be returned to the IO stream. It is understood that a stream refers to a series of characters flowing, and is a channel for transmitting information in a first-in first-out manner, and includes an input stream InputStream and an output stream OutputStream, wherein only a read operation can be performed on the input stream, and only a write operation can be performed on the output stream. For the embodiment, the screen shot image is written into a receiving component of the mail system as an input stream, and the content of the body or the mail attachment is generated by the receiving component of the mail system. The mail system receiving component may be an external interface in the mail system, and is used for receiving externally transmitted data. The screen capture image is written into the receiving component of the mail system in an IO stream mode, and page data in the mail system can be protected from being copied. It should be noted that the mail system in this embodiment includes any existing software system for sending, receiving and managing electronic mails, such as OUTLOOK system, fox xml system, Coremail system, and the like. In one example, the mail system is preferably the OUTLOOK system.
And S400, performing HTML redrawing based on the screen shot image to generate a compatible HTML page compatible with the mail system.
It will be appreciated that any operation that changes the style or structure of a page after the HTML page has been rendered will cause the browser to redraw. Considering that the display mode of the e-mail system, such as OUTLOOK, is different from the display mode of the browser, the step enables the HTML page to conform to the display mode of the e-mail system in an active redrawing mode, so that the condition that the HTML page is incompatible with the e-mail system, such as OUTLOOK and the like, is avoided. The redrawing process of the step mainly comprises the steps of determining the storage form of the screen capture image and determining the text elements of the mail. As shown in fig. 3, the method comprises the following steps:
s410, receiving the screen capture image through a mail system component, and storing the screen capture image into a preset form based on the service type. The mail system component receives the screenshot image returned by the nodejs server through the IO stream and determines whether the screenshot image is stored in the mail to be sent as a text or an attachment. The screenshot image as the text refers to directly using the screenshot image as the text content of the mail, and the screenshot image as the attachment refers to using the screenshot image as the attachment in the mail to be sent, which may be a picture type attachment and a PDF type attachment. When the picture type is attached, the specific format thereof includes any one of formats such as bmp, jpg, png, tif, and gif.
And S420, adding a mail body element based on the service type. The mail body element comprises any one or more items of the head-up, the drop, the background and the body content of the mail. It can be understood that the screenshot image forms the core content of the mail to be sent, and the mail body element forms the additional content of the mail to be sent. And combining the screen capture image with the mail text element to obtain the complete content of the mail to be sent.
And S500, sending the compatible HTML page to a specified receiver through the mail system.
It will be appreciated that a to-be-sent mail of the same content may need to be sent to multiple recipients. In order to ensure that the mail to be sent can be successfully received, the step may set mail sending parameters, including the number of recipients, sending frequency, attachment size, and the like, which are preset, for example, the recipients are required to be less than 30 bits, the mail content is less than 10M, a maximum of 40 mails are sent in 1 minute, and the like. By setting a unification requirement, the mails can be ensured to be sequentially sent and received.
Continuing to refer to fig. 4, a rich text mail sending device is shown, in this embodiment, the rich text mail sending device 40 may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the present invention and implement the rich text mail sending method. The program module referred to in the present invention means a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program itself for describing the execution process of the rich text mail sending apparatus 40 in the storage medium. The following description will specifically describe the functions of the program modules of the present embodiment:
the data receiving module 41 is adapted to receive service data sent by the data analysis platform, where the service data includes a service type. The data analysis platform may include any third party platform with data analysis, management, statistics, etc., such as a public warning analysis platform, a sales product analysis platform, etc., which needs to send data analysis results to a specific receiver in an email manner regularly or quantitatively. The service type represents different service attributions of the service data, such as early warning type service data, notification type service data, reminding type service data and the like. Multiple service types can be divided according to different service application scenarios.
And the template obtaining module 42 is adapted to obtain a display template corresponding to the service type, and perform HTML page rendering based on the service data and the display template. The display modes of the display templates are different corresponding to the business service data with different importance degrees. For example, for the type of the warning, the warning information needs to be displayed in a particularly striking font, while for the general type of the notification, the corresponding processing in terms of font, layout, etc. is relatively more moderate. In order to deal with different display modes corresponding to data of different service types, different display templates are preset for each service type respectively in the embodiment. The HTML page rendering process in this embodiment may be implemented by using any existing browser, and a google (Chrome) browser is preferably used. The functionality of google browser can be implemented by installing the Chrome kernel on nodejs server.
And the screen capture module 43 is adapted to perform virtual display on the rendered HTML page and acquire a screen capture image. In the process of rendering and virtual display, whether a Chrome process is included in the currently running processes of the system can be detected in real time. If the Google browser is in the open state, the business data and the display template can be directly sent to the Google browser for rendering and displaying. If not, the Google browser is required to be started first, and then the service data and the display template are sent to the Google browser to be displayed in a rendering mode. That is, after the browser executes the virtual display process and acquires the screenshot image every time, the browser process is not closed, but only the currently displayed HTML page is closed.
And the HTML redrawing module 44 is suitable for performing HTML redrawing on the basis of the screen capture image so as to generate a compatible HTML page compatible with the mail system. Considering that the mail system such as an OUTLOOK display mode is different from a browser display mode, the step enables the HTML page to accord with the OUTLOOK display mode in an active redrawing mode, so that the condition that the HTML page is not compatible with the mail system is avoided. The redrawing process of the step mainly comprises the steps of determining the storage form of the screen capture image and determining the text elements of the mail.
And the sending module 45 is suitable for sending the compatible HTML page to a specified receiver through a mail system. In order to ensure that the mail to be sent can be successfully received, the module can set mail sending parameters, including the number of recipients, sending frequency, attachment size and the like which are preset. By setting a unification requirement, the mails can be ensured to be sequentially sent and received.
The embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers) capable of executing programs, and the like. The computer device 50 of the present embodiment includes at least, but is not limited to: a memory 51, a processor 52, which may be communicatively coupled to each other via a system bus, as shown in FIG. 5. It is noted that fig. 5 only shows a computer device 50 with components 51-52, but it is to be understood that not all shown components are required to be implemented, and that more or fewer components may be implemented instead.
In this embodiment, the memory 51 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 51 may be an internal storage unit of the computer device 50, such as a hard disk or a memory of the computer device 50. In other embodiments, the memory 51 may be an external storage device of the computer device 50, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 50. Of course, the memory 51 may also include both internal and external storage devices for the computer device 50. In this embodiment, the memory 51 is generally used for storing an operating system installed in the computer device 50 and various application software, such as the program code of the rich text mail sending apparatus 40 in the first embodiment. Further, the memory 51 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 52 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 52 generally serves to control the overall operation of the computer device 50. In this embodiment, the processor 52 is configured to run program codes stored in the memory 51 or process data, for example, run the sending apparatus 40 for rich text mails, so as to implement the sending method for rich text mails in the first embodiment.
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of this embodiment is used for storing the sending apparatus 40 of the rich text mail, and when executed by the processor, the sending method of the rich text mail of the first embodiment is implemented.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example" or "some examples" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for sending rich text mail, comprising:
receiving service data sent by a data analysis platform, wherein the service data comprises a service type;
acquiring a display template corresponding to the service type, and rendering an HTML page based on the service data and the display template;
performing virtual display on the rendered HTML page and acquiring a screen capture image;
performing HTML redrawing based on the screen shot image to generate a compatible HTML page compatible with the mail system;
and sending the compatible HTML page to a designated recipient through the mail system.
2. The method for sending rich text mail according to claim 1, wherein the step of virtually displaying the rendered HTML page and acquiring the screen shot image comprises:
sending the rendered HTML page to a first browser, and utilizing the first browser to virtually display the HTML page;
the method comprises the steps of performing screen capture on the virtually displayed page content to obtain a screen capture image;
wherein the open state of the first browser is maintained after the screen capture image is acquired.
3. The method for sending rich text mail according to claim 2, wherein before the step of sending the rendered HTML page to the first browser and virtually displaying the HTML page by the first browser, the method further comprises:
detecting whether a process of the first browser is included in a current running process;
and if not, starting the first browser.
4. The method for sending rich text mail according to claim 2, wherein the step of capturing the screenshot of the virtually displayed page content to obtain the screenshot image comprises:
and acquiring the screen capture image according to the image format, the image size and/or the image quality parameters corresponding to the service type.
5. The method for sending rich text mail according to claim 4, wherein the step of performing HTML redrawing based on the screenshot image to generate a compatible HTML page compatible with the mail system comprises:
receiving the screen capture image through a mail system component, and storing the screen capture image into a preset form based on the service type;
and adding a mail body element based on the service type.
6. The method of claim 5, wherein prior to the step of receiving the screenshot image by the mail system component and saving the screenshot image in a preset form based on the service type, further comprising:
and transmitting the screen capture image to the mail system component in an IO stream mode.
7. The method of sending rich text mail according to claim 1, wherein the step of sending the compatible HTML page to the designated recipient through the mail system comprises:
and sending the compatible HTML page to an appointed receiver according to the number of preset receivers, the sending frequency and the attachment size.
8. A rich text mail sending apparatus, comprising:
the data receiving module is suitable for receiving service data sent by the data analysis platform, and the service data comprises a service type;
the template acquisition module is suitable for acquiring a display template corresponding to the service type and performing HTML page rendering based on the service data and the display template;
the screen capture module is suitable for virtually displaying the rendered HTML page and acquiring a screen capture image;
the HTML redrawing module is suitable for performing HTML redrawing based on the screen capture image so as to generate a compatible HTML page compatible with the mail system;
and the sending module is suitable for sending the compatible HTML page to a specified receiver through the mail system.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented by the processor when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011488052.XA 2020-12-16 2020-12-16 Sending method and device of rich text mail, computer equipment and storage medium Pending CN112528184A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011488052.XA CN112528184A (en) 2020-12-16 2020-12-16 Sending method and device of rich text mail, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011488052.XA CN112528184A (en) 2020-12-16 2020-12-16 Sending method and device of rich text mail, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112528184A true CN112528184A (en) 2021-03-19

Family

ID=75000628

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011488052.XA Pending CN112528184A (en) 2020-12-16 2020-12-16 Sending method and device of rich text mail, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112528184A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656032A (en) * 2021-08-23 2021-11-16 湖南快乐阳光互动娱乐传媒有限公司 Processing method and system for circular value list of H5 production platform

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107256476A (en) * 2017-05-27 2017-10-17 上海非码网络科技有限公司 A kind of document sending method captured based on browser and system, server
CN108171610A (en) * 2017-12-28 2018-06-15 中国平安人寿保险股份有限公司 Page generation method, page generation equipment, storage medium and device
CN108494668A (en) * 2018-04-03 2018-09-04 北京京东尚科信息技术有限公司 A kind of method and apparatus executing email processing jobs

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107256476A (en) * 2017-05-27 2017-10-17 上海非码网络科技有限公司 A kind of document sending method captured based on browser and system, server
CN108171610A (en) * 2017-12-28 2018-06-15 中国平安人寿保险股份有限公司 Page generation method, page generation equipment, storage medium and device
CN108494668A (en) * 2018-04-03 2018-09-04 北京京东尚科信息技术有限公司 A kind of method and apparatus executing email processing jobs

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656032A (en) * 2021-08-23 2021-11-16 湖南快乐阳光互动娱乐传媒有限公司 Processing method and system for circular value list of H5 production platform
CN113656032B (en) * 2021-08-23 2023-09-26 湖南快乐阳光互动娱乐传媒有限公司 Processing method and system for cyclic value list of H5 manufacturing platform

Similar Documents

Publication Publication Date Title
CN109801347B (en) Method, device, equipment and medium for generating editable image template
CN106991154B (en) Webpage rendering method and device, terminal and server
US8959431B2 (en) Low resolution placeholder content for document navigation
CN106294658B (en) Webpage quick display method and device
CN104820589B (en) A kind of method and its device of dynamic adaptation webpage
CN104346322A (en) Document format processing device and document format processing method
WO2019127864A1 (en) Electronic device, springmvc-based data interface and automatic description generation method therefor, and storage medium
WO2023093673A1 (en) Information processing method, apparatus and system, and storage medium
WO2016107465A1 (en) Method, device, and system for implementing card-type desktop
CN109634579B (en) Code generation method, device, computer device and storage medium
CN114417226A (en) Page generation method, display method, device, electronic equipment and storage medium
CN112783494A (en) Automatic skeleton screen generation method and device and application page updating method and device
CN112528184A (en) Sending method and device of rich text mail, computer equipment and storage medium
CN115587075B (en) Layout file processing method and device, terminal equipment and storage medium
CN112581568A (en) Dynamic poster generation method, device, server and storage medium
US20240214340A1 (en) Methods, apparatuses, systems and storage media for processing a link in a conversation
KR101345726B1 (en) Method for printing a captured screen of web pages
CN115935909A (en) File generation method and device and electronic equipment
CN114117302A (en) Data conversion method and device
CN114168875A (en) Page program generation method and device, computer equipment and storage medium
CN114444447A (en) Card processing method and device
CN111610908B (en) Method for generating frame diagram, computer equipment and readable storage medium
CN113656020A (en) Reactnative-based picture display component development method and related components
CN114048048A (en) Information sharing method and device, electronic equipment and storage medium
CN113656041A (en) Data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination