CN109271619A - Mail pattern processing method, device, computer equipment and storage medium - Google Patents

Mail pattern processing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109271619A
CN109271619A CN201811012166.XA CN201811012166A CN109271619A CN 109271619 A CN109271619 A CN 109271619A CN 201811012166 A CN201811012166 A CN 201811012166A CN 109271619 A CN109271619 A CN 109271619A
Authority
CN
China
Prior art keywords
mail
sent
template
image
style
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.)
Granted
Application number
CN201811012166.XA
Other languages
Chinese (zh)
Other versions
CN109271619B (en
Inventor
钱克功
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811012166.XA priority Critical patent/CN109271619B/en
Publication of CN109271619A publication Critical patent/CN109271619A/en
Application granted granted Critical
Publication of CN109271619B publication Critical patent/CN109271619B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • G06F40/154Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention relates to field of computer technology, providing a kind of mail pattern processing method, device, computer equipment and storage medium, the mail pattern processing method includes: to obtain mail to be sent from default mail library;Mail to be sent is traversed, obtains the style information block in mail to be sent, wherein style information block includes style identifications and content;If style identifications are identical as preset target identification, the corresponding image template of target identification is obtained from preset template database;The predeterminated position for adding content to image template, obtains target image information;Style information block is replaced using target image information, obtains updated mail to be sent;Send updated mail to be sent.Technical solution of the present invention, which is realized, carries out conversion process to the mail for not supporting pattern effect, show that the pattern effect that do not support can normally in mail, to improve the readability and accuracy of Mail Contents.

Description

Mail pattern processing method, device, computer equipment and storage medium
Technical field
The present invention relates to field of computer technology more particularly to a kind of mail pattern processing methods, device, computer equipment And storage medium.
Background technique
Currently, in order to make mail seem more beautiful, it will usually add pattern effect to mail, but there are mails not to support Part format effect, for example, to mail be added suspension pattern processing when, there are some mails not to support suspension pattern, once Addition will be such that Mail Contents deform, to influence the readability of mail and the accuracy of Mail Contents.
Such as: when needing the mail header in outlook mail to increase by a picture, and by current date with the sample that suspends Formula is presented in picture, i.e., when showing current date in the picture, since outlook mailbox does not support this suspension sample Formula, therefore will lead to suspension pattern and do not come into force, current date random may can be shown in outside picture somewhere, so that Mail Contents deform.
Summary of the invention
The embodiment of the present invention provides a kind of mail pattern processing method, device, computer equipment and storage medium, to solve When adding pattern effect to mail, since mail does not support the pattern effect that Mail Contents is caused to deform, to influence mail The problem of readability and accuracy of content.
A kind of mail pattern processing method, comprising:
Mail to be sent is obtained from default mail library;
The mail to be sent is traversed, obtains the style information block in the mail to be sent, wherein the sample Formula block of information includes style identifications and content;
If the style identifications are identical as preset target identification, the target is obtained from preset template database Identify corresponding image template;
The content is added to the predeterminated position of described image template, obtains target image information;
The style information block is replaced using the target image information, obtains updated mail to be sent;
Send the updated mail to be sent.
A kind of mail pattern processing unit, comprising:
Mail obtains module, for obtaining mail to be sent from default mail library;
Spider module obtains the style information in the mail to be sent for traversing to the mail to be sent Block, wherein the style information block includes style identifications and content;
Template obtains module, if identical as preset target identification for the style identifications, from preset template number According to obtaining the corresponding image template of the target identification in library;
Adding module obtains target image information for the content to be added to the predeterminated position of described image template;
Update module obtains updated pending for replacing the style information block using the target image information Send mail;
First sending module, for sending the updated mail to be sent.
A kind of computer equipment, including memory, processor and storage are in the memory and can be in the processing The computer program run on device, the processor realize above-mentioned mail pattern processing method when executing the computer program Step.A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the computer The step of above-mentioned mail pattern processing method is realized when program is executed by processor.
Above-mentioned mail pattern processing method, device, computer equipment and storage medium, by being obtained from default mail library Mail to be sent, and the style information block in mail to be sent is obtained, if style identifications and preset mesh in style information block Mark mark is identical, then obtains the corresponding image template of target identification information, the content in style information block is added to image mould Target image information is obtained in plate, style information block is finally substituted for target image information, obtains updated postal to be sent Part simultaneously sends the mail, can be avoided since mail does not support pattern effect to cause to add mail the pattern effect When, the case where deforming Mail Contents, to improve the readability and accuracy of Mail Contents.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is the application environment schematic diagram of mail pattern processing method provided in an embodiment of the present invention;
Fig. 2 is the flow chart of mail pattern processing method provided in an embodiment of the present invention;
Fig. 3 is the flow chart of step S4 in mail pattern processing method provided in an embodiment of the present invention;
Fig. 4 is the flow chart of step S43 in mail pattern processing method provided in an embodiment of the present invention;
Fig. 5 is the flow chart of step S45 in mail pattern processing method provided in an embodiment of the present invention;
Fig. 6 is the schematic diagram of mail pattern processing unit provided in an embodiment of the present invention;
Fig. 7 is the schematic diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
Fig. 1 shows application environment provided in an embodiment of the present invention, which includes server-side and client, In, it is attached between server-side and client by network, client is used to receive the mail to be sent of user's submission, and will Mail to be sent is saved in the default mail library of server-side by network, and server-side obtains postal to be sent from default mail library Part, and style identifications mail to be sent identical with preset target identification is handled.Client specifically can with but it is unlimited Then the intelligent terminals such as mobile phone, tablet computer, personal computer (Personal Computer, PC);Server-side specifically may be used It is realized with the server cluster formed with independent server or multiple servers.Mail pattern provided in an embodiment of the present invention Processing method is applied to server-side.
In one embodiment, it as shown in Fig. 2, providing a kind of mail pattern processing method, applies in Fig. 1 in this way It is illustrated, includes the following steps: for server-side
S1: mail to be sent is obtained from default mail library.
In the present embodiment, mail library is preset to refer to dedicated for storing the database of mail to be sent, mail to be sent Refer to the user mail for being ready for sending.
Specifically, server-side obtains mail to be sent from default mail library.
S2: traversing mail to be sent, obtains the style information block in mail to be sent, wherein style information block Including style identifications and content.
In the present embodiment, corresponding between style identifications and style tags, for example, style identifications are corresponding for " background colour " Style tags be "<span style="background-color:yellow"></span>", equally, style tags are "<span style="background-color:yellow"></span>" corresponding style identifications are " background colour ".
Specifically, traversal step S1 obtain mail to be sent, identify style tags present in mail to be sent and The content for including in the style tags, and according to the corresponding style identifications of the preset style library inquiry style tags, obtain pattern Mark and content are to get to the style information block in mail to be sent.Wherein, the preset style library refers to dedicated for storing pattern The database of label and the corresponding style identifications of style tags.
For example, there are style tags "<span style=" background-color:yellow in the preset style library "> </span>" corresponding style identifications are " background colour ", exist in mail to be sent:<span style=" background- Color:yellow ">weather forecast</span>if recognize style tags be "<span style=" background- Color:yellow "></span>", then it is " background according to the corresponding style identifications of the preset style library inquiry style tags Color ", and identify that the content for including in the style tags is " weather forecast ".
S3: if style identifications are identical as preset target identification, target identification is obtained from preset template database Corresponding image template.
In the present embodiment, preset target identification refers to according to user demand setting for not supporting in mark mails Pattern identification information, may determine that whether style identifications are handled by the identification information;Preset template number Refer to the database dedicated for storage identification information and the corresponding image template of identification information according to library.
Specifically, which is compared by the style identifications obtained according to step S2 with preset target identification, If style identifications are identical as preset target identification, the target identification is inquired from preset template database, obtains the mesh Mark identifies corresponding image template.
For example, in preset template database there are identification information be " suspension " and the corresponding figure of identification information " suspension " As template A, if style identifications and preset target identification are all " suspension ", target mark is obtained from preset template database Know " suspension " corresponding image template A.
S4: the predeterminated position of image template is added content to, target image information is obtained.
In the present embodiment, predeterminated position specifically can be on the head of image template, can also be according to the practical need of user It asks and is configured.Target image information refers to the image template for being added to the content that step S2 is obtained.
Specifically, which is directly added in the predeterminated position of image template, obtains by the content obtained according to step S2 It include the image template of addition content to predeterminated position, using the image template as target image information.
For example, being " market fund state daily comment " there are content, image template T, predeterminated position is the head of image template, Content " market fund state daily comment " is added in the predeterminated position of image template T, new image template Y, and the figure are obtained As the head of template Y includes to add content " market fund state daily comment ", and believe the new image template Y as target image Breath.
S5: style information block is replaced using target image information, obtains updated mail to be sent.
In the present embodiment, target image information includes corresponding target patterns label.
Specifically, the mail to be sent that traversal step S1 is obtained, if recognizing pair of style information block in mail to be sent The content for including in the style tags and style tags answered, then to the content blocks for including in the style tags and style tags Delete processing is carried out, and the corresponding target patterns label of target image information that step S4 is obtained is added in mail to be sent The position of the style tags of deletion obtains updated mail to be sent after the completion of addition.
For example, exist in mail to be sent "<h1><span style>123</span></h1>", target image information packet Containing corresponding target patterns label be "<h2></h2>", if including in the corresponding style tags of style information block and style tags Content be "<span style>123</span>", then be deleted processing obtain "<h1></h1>", and target image is believed Cease corresponding target patterns label "<h2></h2>" be added to the position of style tags deletion, that is, become after adding "<h1> <h2></h2></h1>”。
S6: updated mail to be sent is sent.
Specifically, updated mail to be sent is sent.
In the present embodiment, by obtaining mail to be sent from default mail library, and the pattern in mail to be sent is obtained It is corresponding to obtain target identification information if the style identifications in style information block are identical as preset target identification for block of information Content in style information block is added in image template and obtains target image information by image template, finally by style information Block is substituted for target image information, obtains updated mail to be sent and sends to the mail, can be avoided due to postal When part does not support pattern effect to cause to add mail the pattern effect, the case where deforming Mail Contents, to improve mail The readability and accuracy of content.
In one embodiment, as shown in figure 3, in step S4, that is, the predeterminated position of image template is added content to, is obtained Target image information specifically comprises the following steps:
S41: according to the predeterminated position of image template, target position of the content in preset initial pictures is determined.
In the present embodiment, the predeterminated position of image template includes the coordinate information of the predeterminated position, preset initial graph As specifically can be blank image, can also be configured according to user's actual need.
Specifically, the size of image template and the size of initial pictures are obtained, by the size of image template and it is preset just The size of beginning image is compared, if the size of image template is identical as the size of preset initial pictures, by image template The coordinate information of predeterminated position be determined as content to be added in the coordinate information of the target position of preset initial pictures;If The size of image template is not identical as the size of preset initial pictures, then by the predeterminated position in image template according to initial graph The size of picture carries out uniform zoom processing, the target position after obtaining scaling processing.
For example, being 10*10 there are the size of image template, the coordinate information of predeterminated position is respectively as follows: a left side in image template Lower angular coordinate (0,0), top left co-ordinate (4,0), bottom right angular coordinate (10,0), upper right angular coordinate (10,4), if preset initial The size of image is 10*10, then the coordinate information of the target position of the initial pictures is respectively as follows: lower-left angular coordinate (0,0), upper left Angular coordinate (4,0), bottom right angular coordinate (10,0), upper right angular coordinate (10,4);If the size of preset initial pictures is 20*20, Since the size of the initial pictures is 2 times of the size of image object, then the coordinate information of target position will be predeterminated position 2 times of coordinate information are respectively as follows: lower-left angular coordinate (0,0), top left co-ordinate (8,0), bottom right angular coordinate (20,0), upper right Angular coordinate (20,8).
S42: it adds content in the target position of preset initial pictures, obtains base image.
Specifically, the obtained content of step S2 is detected, if directly detecting the content, using the content as General data, and directly the general data is added in the target position of initial pictures, and the first of general data will be added to Beginning image is as basic image;If detecting, the content needs to read by specified path, using the content as system data, And by the destination path where default query statement inquiry system data, the data in destination path are added to initial pictures Target position in, and the initial pictures of system data will be added to as basic image.Wherein, destination path refers to special use In the specified path for storing corresponding system data.Wherein, general data refers to system onrelevant, the number that can be read directly According to system data refers to the data for needing to read system relationship by specified path.
Default query statement specifically can be structured query language (Structured Query Language, SQL), Herein with no restrictions.
SQL is the programming language and a kind of data base querying and programming language of a kind of specific purposes, for accessing Data and relational database system is queried, updated, and managed, while being also the extension name of database script file.
For example, being " hello, the world " there are general data, system data is " system real time date ", and path 123 is storage The destination path of system data " system real time date ", the data in path 123 are " on June 7th, 2018 ", initial pictures J, mesh Mark is set to the head of initial pictures, if the content of addition is general data, directly adds general data " hello, the world " Into the target position of initial pictures J, the head for obtaining image includes the new image K of general data " hello, the world ", and will Image K is as basic image;If the content of addition is system data, storage system data are inquired by default query statement Data " on June 7th, 2018 " in path 123 are added to the target of initial pictures J by the path 123 of " system real time date " In position, the head for obtaining image includes the new image L of the data " on June 7th, 2018 " in path 123, and image L is made For basic image.
S43: synthesis processing is carried out to base image and image template, the target image information after being synthesized.
In the present embodiment, synthesis processing, which refers to, synthesizes the new images comprising two picture materials for two images. Target image information refers to that the image information for the image that synthesis is handled, image information can specifically refer to interior in image Appearance, picture size, picture format etc..
Specifically, the base image that step S42 is obtained and the image template that step S4 is obtained are subjected to synthesis processing, will closed At the image information of the image obtained after processing as target image information.
For example, if there are content X1X1 in image template Z2, by foundation drawing there are content XXX in base image Z1 After carrying out synthesis processing as Z1 and image template Z2, new image Z is obtained, and comprising interior in base image Z1 in image Z Hold the content X1X1 in XXX and image template Z2, and using the image information of image Z as target image information.
In the present embodiment, foundation drawing is obtained by the way that the content in mail to be sent to be added in preset initial pictures Picture, then base image and image template are subjected to synthesis processing, the target image information after being synthesized can be avoided direct incite somebody to action Content in mail to be sent is directly appended in image template, and image template is caused to there are problems that anamorphose, to protect Picture quality is demonstrate,proved, the accuracy being updated using target image information to mail to be sent is improved.
In one embodiment, as shown in figure 4, in step S43, i.e., synthesis processing is carried out to base image and image template, Target image information after being synthesized specifically comprises the following steps:
S431: the key dimension of base image and the template size of image template are obtained.
In the present embodiment, key dimension refers to the length and width of base image, and template size refers to image template Length and width obtains the key dimension of base image and the template size of image template from preset image data table.Its In, preset image data table is used exclusively for the key dimension of storage base image and the template size of image template.
S432: if key dimension is identical with template size, using image template as more new images.
Specifically, according to the template size of the key dimension of the step S421 base image obtained and image template, by base Plinth size and template size are compared, if key dimension is identical with template size, by the corresponding image mould of the template size Plate is used as more new images.
For example, the key dimension of base image is 10*5, the template size of image template is 10*5, by key dimension and mould Board size is compared, due to being all 10*5, then using image template as more new images.
S433: if key dimension and template size be not identical, zooming in and out processing according to key dimension for image template, And using the image template after scaling processing as more new images.
Specifically, according to the template size of the key dimension of the step S421 base image obtained and image template, by base Plinth size and template size are compared, if key dimension and template size be not identical, according to key dimension to image template Template size modify, the template size of image template is modified as size identical with key dimension, and will be after modification Image template be used as more new images.
For example, the template size of image template is 20*10, the key dimension of base image is 10*5, by key dimension and Template size is compared, since template size 20*10 is different from key dimension 10*5, then by the template size of image template from 20*10 is modified as 10*5, i.e., the template size of modified image template is 10*5, and using modified image template as more New images.
S434: base image and more new images are converted into the base image to be synthesized of identical image format respectively and wait close At more new images.
In the present embodiment, picture format specifically can be the picture formats such as jpg format, png format.Foundation drawing to be synthesized Conversion process will be carried out to base image by referring to, obtain the process object of the base image for synthesis;More new images to be synthesized Refer to and conversion process is carried out to more new images, obtains the process object of the more new images for synthesizing and having picture format.
Specifically, according to default parsing library, base image and more new images is directed respectively into default parsing library and carried out Dissection process, basic image data stream after respectively obtaining dissection process and updates image data stream, then by basic image data Stream and update image data stream are imported into default transformation warehouse, the foundation drawing of the identical image format after respectively obtaining conversion process The process object of picture and the process object of more new images, and the process object of the process object of base image and more new images is divided It Zuo Wei not base image to be synthesized and more new images to be synthesized.
Default parsing library refers to dedicated for the database by image analysis at image data stream;Default transformation warehouse refers to specially Image data stream for being converted into the database of process object by door.
For example, base image can be parsed into basis by calling directly getInputStream function in java Image data stream, then the basic image data stream parsed is converted into Image process object by ImageIO.read function, And the Image is dealt with objects and is used as base image to be synthesized.
S435: according to default synthesis component, synthesis processing is carried out to base image to be synthesized and more new images to be synthesized, is obtained To target image information.
In the present embodiment, it presets synthesis component to refer to dedicated for carrying out image the component of synthesis processing, such as can To be image processing software (Photoshop, PS), the image synthesis module being also possible in java, herein with no restrictions.Target Image refers to that the new image for being synthesized base image to be synthesized and more new images to be synthesized, the new image include Content in base image to be synthesized and more new images to be synthesized.
Specifically, according to default synthesis component, by the obtained base image to be synthesized of step S434 and update figure to be synthesized Synthesis processing is carried out as importeding into default synthesis component, the image information of the image obtained after synthesis is handled is as target figure As information.
For example, more new images C to be synthesized includes data 456, then in java if base image B to be synthesized includes data 123 In, it can be by calling the setBackgroundImage function in image synthesis module, by base image B to be synthesized and wait close Carry out synthesis processing at more new images C, obtain the new image D comprising data 123456, and using the image information of image D as Target image information.
In the present embodiment, compared by the way that the template size of the key dimension of base image and image template to be compared Compared with as a result, picture size more new images identical with key dimension are obtained further according to comparison result alignment processing, finally to basis Image and more new images carry out synthesis and handle to obtain treated target image information, can make mesh in the way of image synthesis Comprising the information in base image and image template in logo image information, to improve later use target image information to pending Send the readability and accuracy that mail is updated.
In one embodiment, as shown in figure 5, in step S5, i.e., style information block is replaced using target image information, obtained Updated mail to be sent specifically comprises the following steps:
S51: replacing style information block using target image information, obtains replacement result.
In the present embodiment, replacement result refers to the processing result that style information block is replaced by target image information, The replacement result includes that style information block is successfully replaced by target image information, that is, be replaced successfully and style information block not It is successfully replaced into target image information, i.e. replacement failure.
Specifically, style information block is substituted for target image information by the target image information obtained according to step S456, Obtain replacement result.
S52: if replacement result is to be replaced successfully, using replaced mail to be sent as updated postal to be sent Part.
In the present embodiment, according to the obtained replacement of step S51 as a result, if replacement result is that the success of style information block is replaced Change target image information into, that is, be replaced successfully, then using after replacement include target image information mail to be sent as update after Mail to be sent.
For example, there are style information block W, target image information F in mail to be sent, if style information block W success quilt Be substituted for target image information F, i.e., no longer exist in replaced mail to be sent comprising style information block W, it is replaced to Send mail in will include target image information F, and using the mail to be sent comprising target image information F as it is updated to Send mail.
S53: it if replacement result is to replace failure and accumulate the replacement frequency of failure to be less than preset frequency threshold value, returns And execute step S51.
In the present embodiment, preset threshold specifically can be 10, can also be configured according to the actual demand of user, this Place is with no restrictions.
Specifically, according to the obtained replacement of step S51 as a result, if replacement result is that block of information is not successfully replaced into target Image information, i.e. replacement failure, and the result for replacing failure each time is recorded, accumulation replacement number is obtained, will be accumulated Replacement number is compared with preset frequency threshold value, when the accumulation replacement frequency of failure is less than preset frequency threshold value, again Return step S51 is continued to execute.
For example, preset frequency threshold value is 5, when first time replacement result is replacement failure, current replacement failure is recorded As a result, obtain accumulation replacement the frequency of failure be 1, due to accumulation replacement the frequency of failure be 1 be less than preset frequency threshold value 5, then It returns to step S51 to continue to execute, if obtaining second of replacement result also is replacement failure, records current replacement failure As a result, and replace the frequency of failure will first time replacement result be replacement failure accumulation replacement the frequency of failure 1 on the basis of Add 1, i.e. the accumulation replacement frequency of failure becomes 2, since the accumulation replacement frequency of failure is less than preset frequency threshold value 5 for 2, then again Return step S51 is continued to execute, and so on continue to calculate.
S54: if the accumulation replacement frequency of failure is equal to frequency threshold value, target image information and mail to be sent are sent to Mail sends user and handles.
In the present embodiment, frequency threshold value is the preset frequency threshold value in step S53, and mail transmission user, which refers to, to be treated It sends mail and executes the user for sending operation.
Specifically, the accumulation that replacement result is replacement failure is obtained according to step S53 and replaces the frequency of failure, which is replaced The frequency of failure is changed to be compared with frequency threshold value, when accumulation replacement the frequency of failure be equal to frequency threshold value when, by target image information, The result of target image information replacement failure and mail to be sent are sent to mail according to preset mode and send user's progress Processing.
Preset mode can be in the form of mail, can also be configured according to user's actual need.
For example, there are mail I to be sent, target image information P, frequency threshold value 5, when the accumulation replacement frequency of failure is 5 When, the accumulation replacement frequency of failure 5 is compared with frequency threshold value for 5, since the accumulation replacement frequency of failure 5 is equal to frequency threshold value 5, then target image information P, the result of target image information replacement failure and mail I to be sent are sent out according to preset mode Mail transmission user is given to handle.
S55: the targeted mails that mail sends user feedback are obtained, and using targeted mails as updated postal to be sent Part.
Specifically, when detecting that mail sends the targeted mails that user sends, then it is original the mail to be sent into user Mail to be sent carries out delete processing, and adds targeted mails again after delete processing, using the targeted mails as update after Mail to be sent, wherein targeted mails refer to mail send user for target image information replacement failure postal to be sent Part re-starts processing, obtains the mail to be sent that target image information is replaced successfully.
For example, there are the mail D to be sent of mail user, when detecting that mail sends the targeted mails F that user sends, Then mail D to be sent carries out delete processing, adds targeted mails F again and using targeted mails F as updated postal to be sent Part.
In the present embodiment, by being identified to replacement result, if recognizing replacement result is to be replaced successfully, it can guarantee Style information block is substituted for the accuracy of target image information, if recognizing replacement result as replacement failure, can lose in replacement Replacement processing is lost and re-started under the premise of the frequency of failure is less than preset frequency threshold value, the success of replacement processing is improved Rate, and feed back to mail transmission user when replacing the frequency of failure and being equal to frequency threshold value and handle, receive mail hair It send the targeted mails of user feedback as updated mail to be sent, can guarantee to timely update to mail to be sent, from And improve the accuracy of mail to be sent.
In one embodiment, after step S2, which further includes following steps:
S7: if style identifications and preset target identification be not identical, mail to be sent is directly transmitted.
Specifically, which is compared by the style identifications obtained according to step S2 with preset target identification, If style identifications and preset target identification be not identical, directly mail to be sent is sent.
For example, preset target identification is " suspension ", by pattern if the style identifications in mail to be sent are " background colour " Mark " background colour " is compared with preset target identification " suspension ", due to style identifications " background colour " and preset target mark Knowledge " suspension " is not identical, then directly sends to mail to be sent.
In the present embodiment, by the way that style identifications and the different mail to be sent of preset target identification are sent, It can ensure that mail to be sent supports the corresponding pattern effect of style identifications, ensure the readability and accuracy of Mail Contents.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
In one embodiment, a kind of mail pattern processing unit is provided, the mail pattern processing unit and above-described embodiment Middle mail pattern processing method corresponds.As shown in fig. 6, the mail pattern processing unit include mail obtain module 61, time Go through module 62, template obtains module 63, adds template 64, update module 65 and the first sending module 66.Each functional module is detailed It is described as follows:
Mail obtains module 61, for obtaining mail to be sent from default mail library;
Spider module 62 obtains the style information block in mail to be sent for traversing to mail to be sent, In, style information block includes style identifications and content;
Template obtains module 63, if identical as preset target identification for style identifications, from preset template data The corresponding image template of target identification is obtained in library;
It adds template 64 and obtains target image information for adding content to the predeterminated position of image template;
Update module 65 obtains updated mail to be sent for replacing style information block using target image information;
First sending module 66, for sending updated mail to be sent.
Further, addition template 64 includes:
It determines submodule 641, for the predeterminated position according to image template, determines content in preset initial pictures Target position;
Basic submodule 642 obtains foundation drawing for adding content in the target position of preset initial pictures Picture;
First synthesis submodule 643, for carrying out synthesis processing to base image and image template, the mesh after being synthesized Logo image information.
Further, the first synthesis submodule 643 includes:
Size acquiring unit 6431, for obtaining the key dimension of base image and the template size of image template;
First size comparing unit 6432, if identical with template size for key dimension, using image template as more New images;
Second size comparing unit 6433, if for key dimension and template size it is not identical, by image template according to Key dimension zooms in and out processing, and using the image template after scaling processing as more new images;
Converting unit 6434, for base image and more new images to be converted into the base to be synthesized of identical image format respectively Plinth image and more new images to be synthesized;
Second synthesis unit 6435, for being schemed to base image to be synthesized and update to be synthesized according to default synthesis component As carrying out synthesis processing, target image information is obtained.
Further, update module 65 includes:
Submodule 651 is replaced, for replacing style information block using target image information, obtains replacement result;
Be replaced successfully submodule 652, if for replace result be replaced successfully, using replaced mail to be sent as Updated mail to be sent;
Replacement failure submodule 653, if being less than in advance for replacing result to replace failure and accumulating the replacement frequency of failure If frequency threshold value, then return and execute step S51;
Threshold value submodule 654, if for accumulate replacement the frequency of failure be equal to frequency threshold value, by target image information and to Transmission mail is sent to mail transmission user and handles;
Submodule 655 is fed back, the targeted mails of user feedback are sent for obtaining mail, and using targeted mails as update Mail to be sent afterwards.
Further, the mail pattern processing unit further include:
Second sending module 67: it if not identical for style identifications and preset target identification, directly transmits to be sent Mail.
Specific about mail pattern processing unit limits the limit that may refer to above for mail pattern processing method Fixed, details are not described herein.Modules in above-mentioned mail pattern processing unit can fully or partially through software, hardware and its Combination is to realize.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with It is stored in the memory in computer equipment in a software form, in order to which processor calls the above modules of execution corresponding Operation.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction Composition can be as shown in Figure 6.The computer equipment include by system bus connect processor, memory, network interface and Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The database of machine equipment is used to store the data of mail to be sent.The network interface of the computer equipment is used for and external terminal It is communicated by network connection.To realize a kind of mail pattern processing method when the computer program is executed by processor.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory And the computer program that can be run on a processor, processor are realized at above-described embodiment mail pattern when executing computer program The step of reason method, such as step S1 shown in Fig. 2 to step S6.Alternatively, being realized when processor execution computer program above-mentioned The function of each module of mail pattern processing unit in embodiment, such as module 61 shown in Fig. 6 is to the function of module 66.To avoid It repeats, which is not described herein again.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Mail pattern processing method in above method embodiment is realized when machine program is executed by processor, alternatively, the computer program quilt The function of each module in mail pattern processing unit in above-mentioned apparatus embodiment is realized when processor executes.To avoid repeating, this In repeat no more.Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, it is Relevant hardware can be instructed to complete by computer program, the computer program can be stored in a non-volatile meter In calculation machine read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Its In, to any reference of memory, storage, database or other media used in each embodiment provided herein, It may each comprise non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), may be programmed ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory can wrap Include random access memory (RAM) or external cache.By way of illustration and not limitation, RAM in a variety of forms may be used , such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), increase Strong type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of mail pattern processing method, which is characterized in that the mail pattern processing method includes:
Mail to be sent is obtained from default mail library;
The mail to be sent is traversed, the style information block in the mail to be sent is obtained, wherein the pattern letter Ceasing block includes style identifications and content;
If the style identifications are identical as preset target identification, the target identification is obtained from preset template database Corresponding image template;
The content is added to the predeterminated position of described image template, obtains target image information;
The style information block is replaced using the target image information, obtains updated mail to be sent;
Send the updated mail to be sent.
2. mail pattern processing method as described in claim 1, which is characterized in that described that the content is added to the figure As the predeterminated position of template, obtaining target image information includes:
According to the predeterminated position of described image template, target position of the content in preset initial pictures is determined;
The content is added in the target position of preset initial pictures, base image is obtained;
Synthesis processing is carried out to the base image and described image template, the target image information after being synthesized.
3. mail pattern processing method as claimed in claim 2, which is characterized in that described to the base image and the figure As template carries out synthesis processing, the target image information after being synthesized includes:
Obtain the key dimension of the base image and the template size of described image template;
If the key dimension is identical with the template size, using described image template as more new images;
If the key dimension and the template size be not identical, described image template is contracted according to the key dimension Processing is put, and using the image template after scaling processing as more new images;
The base image and the more new images are converted into the base image to be synthesized of identical image format respectively and wait close At more new images;
According to default synthesis component, synthesis processing is carried out to the base image to be synthesized and the more new images to be synthesized, is obtained To the target image information.
4. mail pattern processing method as described in claim 1, which is characterized in that described to be replaced using the target image information The style information block is changed, obtaining updated mail to be sent includes:
The style information block is replaced using the target image information, obtains replacement result;
If the replacement result is to be replaced successfully, using replaced mail to be sent as updated mail to be sent;
If the replacement result is replacement failure and accumulates the replacement frequency of failure less than preset frequency threshold value, returns and hold Row is described to replace the style information block using the target image information, obtains the step of replacing result;
If the accumulation replacement frequency of failure is equal to the frequency threshold value, by the target image information and the postal to be sent Part is sent to mail transmission user and handles;
The targeted mails that the mail sends user feedback are obtained, and using the targeted mails as updated postal to be sent Part.
5. such as the described in any item mail pattern processing methods of Claims 1-4, which is characterized in that described to described pending Mail is sent to be traversed, after obtaining the style information block in the mail to be sent, the mail pattern processing method is also wrapped It includes:
If the style identifications and preset target identification be not identical, the mail to be sent is directly transmitted.
6. a kind of mail pattern processing unit, which is characterized in that the mail pattern processing unit includes:
Mail obtains module, for obtaining mail to be sent from default mail library;
Spider module obtains the style information block in the mail to be sent for traversing to the mail to be sent, In, the style information block includes style identifications and content;
Template obtains module, if identical as preset target identification for the style identifications, from preset template database It is middle to obtain the corresponding image template of the target identification;
Adding module obtains target image information for the content to be added to the predeterminated position of described image template;
Update module obtains updated postal to be sent for replacing the style information block using the target image information Part;
First sending module, for sending the updated mail to be sent.
7. mail pattern processing unit as claimed in claim 6, which is characterized in that the adding module includes:
It determines submodule, for the predeterminated position according to described image template, determines the content in preset initial graph Target position as in;
Basic submodule obtains foundation drawing for the content to be added in the target position of preset initial pictures Picture;
First synthesis submodule, for carrying out synthesis processing to the base image and described image template, after being synthesized Target image information.
8. mail pattern processing unit as claimed in claim 6, which is characterized in that the update module includes:
Submodule is replaced, for replacing the style information block using the target image information, obtains replacement result;
It is replaced successfully submodule, if being to be replaced successfully for the replacement result, using replaced mail to be sent as more Mail to be sent after new;
The submodule that fails is replaced, if being to replace failure and accumulate to replace the frequency of failure less than preset for the replacement result Frequency threshold value then returns and executes the use target image information and replace the style information block, obtains replacement result The step of;
Threshold value submodule believes the target image if being equal to the frequency threshold value for the accumulation replacement frequency of failure Breath and the mail to be sent are sent to mail transmission user and handle;
Submodule is fed back, the targeted mails of user feedback are sent for obtaining the mail, and using the targeted mails as more Mail to be sent after new.
9. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to The step of any one of 5 mail pattern processing method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In realizing the mail pattern processing method as described in any one of claim 1 to 5 when the computer program is executed by processor Step.
CN201811012166.XA 2018-08-31 2018-08-31 Mail style processing method, device, computer equipment and storage medium Active CN109271619B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811012166.XA CN109271619B (en) 2018-08-31 2018-08-31 Mail style processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811012166.XA CN109271619B (en) 2018-08-31 2018-08-31 Mail style processing method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109271619A true CN109271619A (en) 2019-01-25
CN109271619B CN109271619B (en) 2024-05-03

Family

ID=65154929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811012166.XA Active CN109271619B (en) 2018-08-31 2018-08-31 Mail style processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109271619B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111063001A (en) * 2019-12-18 2020-04-24 北京金山安全软件有限公司 Picture synthesis method and device, electronic equipment and storage medium
CN113556276A (en) * 2020-04-23 2021-10-26 北京沃东天骏信息技术有限公司 Method and device for sending mail
US20210358190A1 (en) * 2020-05-12 2021-11-18 LINE Plus Corporation Method of generating item for avatar, recording medium and computing device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105787696A (en) * 2014-12-24 2016-07-20 阿里巴巴集团控股有限公司 Method for efficiently generating emails on computer and apparatus thereof
CN108399155A (en) * 2018-01-17 2018-08-14 链家网(北京)科技有限公司 A kind of Picture Generation Method and mobile terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105787696A (en) * 2014-12-24 2016-07-20 阿里巴巴集团控股有限公司 Method for efficiently generating emails on computer and apparatus thereof
CN108399155A (en) * 2018-01-17 2018-08-14 链家网(北京)科技有限公司 A kind of Picture Generation Method and mobile terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111063001A (en) * 2019-12-18 2020-04-24 北京金山安全软件有限公司 Picture synthesis method and device, electronic equipment and storage medium
CN111063001B (en) * 2019-12-18 2023-11-10 北京金山安全软件有限公司 Picture synthesis method, device, electronic equipment and storage medium
CN113556276A (en) * 2020-04-23 2021-10-26 北京沃东天骏信息技术有限公司 Method and device for sending mail
US20210358190A1 (en) * 2020-05-12 2021-11-18 LINE Plus Corporation Method of generating item for avatar, recording medium and computing device

Also Published As

Publication number Publication date
CN109271619B (en) 2024-05-03

Similar Documents

Publication Publication Date Title
CN109271619A (en) Mail pattern processing method, device, computer equipment and storage medium
CN108769109A (en) Method and system are uniformly processed in a kind of Internet of Things heterogeneous device data
CN110209652A (en) Tables of data moving method, device, computer equipment and storage medium
CN102163233A (en) Method and system for converting webpage markup language format
CN107992275B (en) Document printing method and device, computer equipment and storage medium
CN110908712A (en) Data processing method and equipment for cross-platform mobile terminal
CN105868962A (en) Intelligent product specification management system based on Internet
CN105608066A (en) Method and device for generating evidence report
CN103914438A (en) Template and tag implementation based excel display and export method and system
CN103824104A (en) Two-dimensional code fabrication system and application method thereof
CN104391991B (en) A kind of conversion method from AutoCAD data to GIS spatial data
CN110059687A (en) Pictorial information recognition methods, device, computer equipment and storage medium
CN102663198A (en) Method and system for designing and manufacturing printed matter on line by combining background and foreground of web
CN103023978B (en) The application attribute information synchronous method of application aggregation platform and system
CN1924906A (en) Product data statistics of flowing production line and management method
CN107145569A (en) Document management method and device
CN111666114B (en) Plug-in logging data conversion method
CN108062649A (en) Body paper warehouse management method, device and computer readable storage medium
CN104506624A (en) Socializing information management system and management method
CN105659581B (en) Picture pick-up device, camera system and the method for controlling picture pick-up device
CN105007310A (en) Information synchronization method, device and system
CN105159997B (en) Report processing method and report processing system
CN112819924A (en) Picture editing method and device, electronic equipment and storage medium
CN1620060B (en) Method and device for integrating browser-incompatible information into web content and for displaying the information
JPH08123714A (en) System for concentrically converting file format

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
GR01 Patent grant
GR01 Patent grant