Method, device, electronic device and storage medium for intelligent filling of email content
By identifying and splitting email text, matching and loading element templates, and building email pages with custom containers, the problem of not being able to view the effects of email content in real time in the existing technology is solved, and intelligent filling and customized display of complex email content is realized.
Patent Information
- Application Number
- CN202111519154.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-13
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-12-13
AI Technical Summary
The existing email content filling method cannot view the front-end page effects in real time, and cannot meet the needs of complex email content, and is limited by the content of the email template.
By receiving content loading requests from the sender of the email, identify the mail text, split it according to the preset page elements, match the element object and the templates in the front-end element template library, use the interpolation replacement algorithm to load the matching content, and use a custom container Build a template that fails to match to realize integrated display of email pages.
Real-time viewing of email content is realized, and intelligent filling of complex email content is met, improving the user experience and customized capabilities of email display.
Smart Images

Figure CN114186540B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a method, device, electronic device and computer-readable storage medium for intelligently filling in email content. Background Art
[0002] Email refers to a file that is processed through network transmission. Text content can be transmitted through email. For example, during training, you need to send invitation letters, training notices, training summaries and other emails. Since the page structure of the emails is not much different, only the content information filled in is different. Therefore, when sending emails, you usually choose the corresponding email template to fill in the content and then send it.
[0003] At present, email content is usually based on email templates. Multiple email templates are set in the background, and interpolation is set in the email template. When sending an email, the email template to be used is selected, and an email content is generated through interpolation replacement. Since the email template is automatically generated in the background, it is impossible to view the email content effect on the front-end page in real time in this way. In the actual operation process, it is often necessary to create multiple times to view the effect of email content generation. It is limited by the content of the email template and cannot meet the needs of more complex email content. Summary of the invention
[0004] The present invention provides a method, device, electronic device and computer-readable storage medium for intelligently filling in email content, the main purpose of which is to realize real-time effect viewing of email content and meet the requirements of intelligent filling in complex email content.
[0005] To achieve the above purpose, the present invention provides a method for intelligently filling email content, comprising:
[0006] receiving a content loading request from an email sender, identifying an email text corresponding to the content loading request, and dividing the email text into elements according to preset page elements to obtain at least two element texts;
[0007] Extracting the element object of each element text, and matching each element object with an element template in a preset front-end element template library;
[0008] Using an interpolation replacement algorithm, the element content corresponding to the successfully matched element object is loaded into the element template to obtain the first page element content;
[0009] A custom container is used to construct a page template for the element object that fails to match, and the element content corresponding to the element object that fails to match is loaded into the page template to obtain the second page element content;
[0010] The first page element content and the second page element content are integrated into an email page to obtain email page content.
[0011] Optionally, the step of splitting the email text into elements according to preset page elements to obtain at least two element texts includes:
[0012] The preset page element is matched with the email content in the email text, and the successfully matched email content is divided into element text content, and at least two element texts are generated according to the element text content.
[0013] Optionally, extracting the element object of each element text includes:
[0014] Get the text field of each of said elements' text;
[0015] Determine the element attribute of each element text according to the text field;
[0016] According to the element attributes, the element object of each element text is identified.
[0017] Optionally, matching each of the element objects with an element template in a preset front-end element template library includes:
[0018] Convert each of the element objects into a first element vector, and convert each element template of the preset front-end element template library into a second element vector;
[0019] Calculating the vector similarity between the first element vector and the second element vector;
[0020] If the vector similarity is greater than a preset threshold, the element object and the element template are matched successfully;
[0021] If the vector similarity is not greater than the preset threshold, the matching between the element object and the element template fails.
[0022] Optionally, the adopting of an interpolation replacement algorithm to load the element content corresponding to the successfully matched element object into the element template to obtain the first page element content includes:
[0023] According to the interpolation replacement algorithm, construct a parameter interpolation thread of the element template;
[0024] The element coordinates of the element content corresponding to the element object that successfully matches are transmitted to the parameter interpolation thread, so that the element content is loaded into the element template through the parameter interpolation thread to obtain the first page element content. Optionally, the page template of the element object that fails to match is constructed using a custom container:
[0025] A page layout event of the element object that fails to match is obtained, and the page layout event is transmitted to the custom container, so as to construct a page template of the element object by using the custom container according to the page layout event.
[0026] Optionally, the step of integrating the first page element content and the second page element content into an email page to obtain email page content includes:
[0027] Configuring the layout of the first page element content and the second page element content on the front-end page, and constructing the element styles of the first page element content and the second page element content on the front-end page;
[0028] The email page content is generated according to the layout mode and the element style.
[0029] In order to solve the above problem, the present invention also provides a device for intelligently filling email content, the device comprising:
[0030] An email text splitting module is used to receive a content loading request from an email sender, identify the email text corresponding to the content loading request, and split the email text into elements according to preset page elements to obtain at least two element texts;
[0031] An element object matching module, used to extract the element object of each element text, and match each element object with an element template in a preset front-end element template library;
[0032] An element content generation module, used for loading the element content corresponding to the successfully matched element object into the element template by using an interpolation replacement algorithm to obtain the first page element content;
[0033] The element content generation module is further used to construct a page template of the element object that failed to match by using a custom container, and load the element content corresponding to the element object that failed to match into the page template to obtain the second page element content;
[0034] The email content generation module is used to integrate the first page element content and the second page element content into an email page to obtain email page content.
[0035] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0036] at least one processor; and,
[0037] a memory communicatively connected to the at least one processor; wherein,
[0038] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to implement the above-mentioned method for intelligently filling in email content.
[0039] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned method for intelligently filling in email content.
[0040] It can be seen that the embodiment of the present invention can achieve fine-grained content splitting of the email text by splitting the email text of the email sender into elements according to preset page elements to obtain at least two element texts, so that the text elements existing in the email text can be more clearly understood, and the content refinement of the subsequent email text for template matching can be guaranteed, and the element object of each element text can be matched with the element template in the preset front-end element template library, and the page loading template of each element object can be obtained, and the one-key operation of page visualization can be realized, so that the email content effect of the front-end page can be viewed in real time; secondly, the embodiment of the present invention uses an interpolation replacement algorithm to load the element content corresponding to the successfully matched element object into the element template to obtain the first page element content, so as to obtain the matched element content in real time. The display content of the element content of the failed matching on the front page of the email is convenient for users to view and improve the user experience. A custom container is used to construct a page template for the element object that failed to match, so that the element object does not need to be limited by the element content of the email template and can be customized to generate user-required template elements, further improving the user experience. The element content corresponding to the element object that failed to match is loaded into the page template to obtain the second page element content, and the display content of the element content that failed to match on the front page of the email can be obtained in real time; further, the embodiment of the present invention integrates the first page element content and the second page element content into the email page to obtain the email page content, which can display the final display style of the email text of the email sender on the front page. Therefore, the method, device, electronic device and computer-readable storage medium for intelligent filling of email content proposed in the embodiment of the present invention can realize real-time effect viewing of email content and meet the intelligent filling of complex email content. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of a flow chart of a method for intelligently filling in email content provided by an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of modules of a device for intelligently filling email content provided by an embodiment of the present invention;
[0043] Figure 3 A schematic diagram of the internal structure of an electronic device for implementing a method for intelligently filling in email content provided by an embodiment of the present invention;
[0044] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0045] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0046] An embodiment of the present invention provides a method for intelligently filling in email content. The execution subject of the method for intelligently filling in email content includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present invention. In other words, the method for intelligently filling in email content can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0047] Reference Figure 1 FIG. 1 is a flow chart of a method for intelligently filling in email content provided by an embodiment of the present invention. In an embodiment of the present invention, the method for intelligently filling in email content includes:
[0048] S1. Receive a content loading request from an email sender, identify an email text corresponding to the content loading request, and split the email text into elements according to preset page elements to obtain at least two element texts.
[0049] In an embodiment of the present invention, the email sender refers to a user who transmits file content through a network transmission method, and the content loading request refers to a request determined based on the needs of different email senders, such as the need of email sender A is to load the email signature content, the need of email sender B is to load the email body content, and the need of email sender C is to load the email subject content.
[0050] Furthermore, the embodiment of the present invention obtains the email data in the content loading request by identifying the email text corresponding to the content loading request, thereby ensuring the matching premise of the subsequent email template, wherein the email text refers to the text data formed by the email content in the content loading request.
[0051] As an embodiment of the present invention, the identifying the email text corresponding to the content loading request includes: obtaining the email subject, email content and email signature of the content loading request, and generating the email text corresponding to the content loading request according to the email subject, email content and email signature. The email subject refers to the main body description information used to characterize the content loading request, such as a notification email, the email content refers to the body description information used to characterize the content loading request, and the email signature refers to the description information used to characterize the sender of the email corresponding to the content loading request, such as name, contact information, etc.
[0052] Furthermore, the embodiment of the present invention splits the email text into elements according to preset page elements to achieve fine-grained content splitting of the email text, so that the text elements existing in the email text can be more clearly understood, and the content refinement of subsequent email text template matching is guaranteed, wherein the page elements are set based on the email format, and include buttons, text boxes, drop-down boxes, background boxes, etc.
[0053] As an embodiment of the present invention, the email text is split into elements according to preset page elements to obtain at least two element texts, including: matching the preset page elements with the email content in the email text, and dividing the successfully matched email content into element text content, and generating at least two element texts according to the element text content, wherein the matching of the page elements with the email content in the email text is achieved by a character matching algorithm, such as a naive algorithm, a KMP algorithm, etc.
[0054] Furthermore, in order to ensure the privacy and security of the element text, the element text may also be stored in a blockchain node.
[0055] S2. Extracting the element object of each element text, and matching each element object with an element template in a preset front-end element template library.
[0056] In an embodiment of the present invention, the element object refers to the text target data in the element text, which is used to characterize the type characteristics of the element text. As an embodiment of the present invention, the extraction of the element object of each element text includes: obtaining the text field of each element text, determining the element attribute of each element text according to the text field, and identifying the element object of each element text according to the element attribute. Among them, the text field refers to the structured form data of the element content in the element text, and the element attribute refers to the characteristic dimension of the element content in the element text, which is used to characterize the element type of the element content in the element text.
[0057] Furthermore, the embodiment of the present invention matches each element object with an element template in a preset front-end element template library to obtain a page loading template for each element object, thereby realizing one-key operation of page visualization, so that the email content effect of the front-end page can be viewed in real time. The preset front-end element template library is constructed based on elements sent by historical emails.
[0058] As an embodiment of the present invention, the matching of each of the element objects with the element templates in the preset front-end element template library includes: converting each of the element objects into a first element vector, and converting each element template of the preset front-end element template library into a second element vector; calculating the vector similarity between the first element vector and the second element vector, if the vector similarity is greater than a preset threshold, the element object and the element template are matched successfully, if the vector similarity is not greater than the preset threshold, the element object and the element template are matched unsuccessfully. The vector conversion of the first element feature and the second element is implemented by a vector conversion algorithm, such as a one-hot algorithm, a word2vec algorithm, etc. The preset threshold can be set to 0.8, or it can be set according to the actual business scenario.
[0059] Furthermore, in an optional embodiment of the present invention, the vector similarity between the first element vector and the second element vector is calculated using the following formula:
[0060]
[0061] Among them, R represents the vector similarity, A x represents the xth first element vector, B y Represents the yth second element vector in the data code table.
[0062] S3. Use an interpolation replacement algorithm to load the element content corresponding to the successfully matched element object into the element template to obtain the first page element content.
[0063] It should be understood that when the element object and the element template match successfully, it means that the element template can be directly used as the page display carrier of the element content corresponding to the element object. Therefore, the embodiment of the present invention loads the element content corresponding to the successfully matched element object into the element template by adopting an interpolation replacement algorithm, so as to obtain the display content of the element content on the front-end page of the email in real time, facilitate user viewing, and improve user experience.
[0064] The element content refers to the specific information of the element object in the element text. For example, if the element object is the sender of the email, the element content is the specific data of the sender of the email in the element text, such as Xiao Zhang, Xiao Zhao, etc.
[0065] As an embodiment of the present invention, the interpolation replacement algorithm is used to load the element content corresponding to the successfully matched element object into the element template to obtain the first page element content, including: constructing a parameter interpolation thread of the element template according to the interpolation replacement algorithm, and transmitting the element coordinates of the element content corresponding to the successfully matched element object to the parameter interpolation thread, so as to execute the loading of the element content in the element template through the parameter interpolation thread to obtain the first page element content.
[0066] The parameter interpolation thread refers to a task running unit specifically used for element content interpolation. The interpolation replacement algorithm includes the nearest neighbor method, bilinear interpolation method, etc. The parameter interpolation thread is created through the call() method.
[0067] Furthermore, in an optional embodiment of the present invention, the element content is loaded into the element template using the following formula:
[0068]
[0069] Among them, t(x) represents the element content loaded in the element template, x represents the element coordinates of the element content, and x 0 ,y 0 Respectively represent the horizontal and vertical coordinates of the 0th pixel in the element template, x 1 ,y 1 They respectively represent the horizontal and vertical coordinates of the first pixel in the element template.
[0070] S4. Use a custom container to construct a page template for the element object that fails to match, and load the element content corresponding to the element object that fails to match into the page template to obtain the second page element content.
[0071] It should be understood that when the element object and the element template fail to match, it means that the element template cannot directly serve as the page display carrier of the element content corresponding to the element object. Therefore, the embodiment of the present invention constructs the page template of the element object that fails to match by adopting a custom container, and also serves as the page display carrier of the element content of the element object, wherein the custom container refers to a tool for automatically compiling page templates, which is compiled by HTML5+CSS+JavaScript language. The page carrier of the element object can be automatically compiled through the custom container, so that the element object does not need to be restricted by the element content of the email template, and can be customized to generate user-required template elements, thereby further improving the user experience.
[0072] As an embodiment of the present invention, the page template of the element object that failed to match is constructed using a custom container: a page layout event of the element object that failed to match is obtained, and the page layout event is transmitted to the custom container, so as to construct the page template of the element object using the custom container according to the page layout event, wherein the page layout event includes the element style, element size, element color, etc. of the element object.
[0073] Furthermore, the embodiment of the present invention obtains the second page element content by loading the element content corresponding to the element object that failed to match into the page template, so as to obtain the display content of the element content on the front page of the email in real time, facilitate the user's viewing, and improve the user experience. It should be noted that the loading of the element content corresponding to the element object that failed to match is the same as the loading principle of the element content corresponding to the element object that successfully matched, and will not be further elaborated here.
[0074] S5. Integrate the first page element content and the second page element content into an email page to obtain email page content.
[0075] In an embodiment of the present invention, the first page element content and the second page element content are integrated into an email page to obtain the email page content, including: configuring the layout of the first page element content and the second page element content on the front-end page, and constructing the element style of the first page element content and the second page element content on the front-end page, and generating the email page content according to the layout and the element style.
[0076] Among them, the layout method refers to the position information layout of the first page element content and the second page element content on the front page, such as vertical layout, associated layout and semi-column layout, etc., and the element style refers to the display information of the first page element content and the second page element content on the front page, such as size, font, color and clarity, etc.
[0077] It can be seen that the embodiment of the present invention can achieve fine-grained content splitting of the email text by splitting the email text of the email sender into elements according to preset page elements to obtain at least two element texts, so that the text elements existing in the email text can be more clearly understood, and the content refinement of the subsequent email text for template matching can be guaranteed, and the element object of each element text can be matched with the element template in the preset front-end element template library, and the page loading template of each element object can be obtained, and the one-key operation of page visualization can be realized, so that the email content effect of the front-end page can be viewed in real time; secondly, the embodiment of the present invention uses an interpolation replacement algorithm to load the element content corresponding to the successfully matched element object into the element template to obtain the first page element content, so as to obtain the matched element content in real time. The display content of the element content of the failed matching on the front-end page of the email is convenient for users to view and improve the user experience. A custom container is used to construct a page template for the element object that failed to match, so that the element object does not need to be limited by the element content of the email template and can be customized to generate user-required template elements, further improving the user experience. The element content corresponding to the element object that failed to match is loaded into the page template to obtain the second page element content, and the display content of the element content that failed to match on the front-end page of the email can be obtained in real time; further, the embodiment of the present invention integrates the first page element content and the second page element content into the email page to obtain the email page content, which can display the final display style of the email text of the email sender on the front-end page. Therefore, a method for intelligent filling of email content proposed in an embodiment of the present invention can realize real-time effect viewing of email content and meet the intelligent filling of complex email content.
[0078] like Figure 2 FIG. 1 is a functional module diagram of the device for intelligently filling email content according to the present invention.
[0079] The apparatus 100 for intelligently filling in email content of the present invention can be installed in an electronic device. According to the functions to be implemented, the apparatus 100 for intelligently filling in email content can include an email text splitting module 101, an element object matching module 102, an element content generating module 103, and an email content generating module 104. The module of the present invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, and is stored in a memory of the electronic device.
[0080] In this embodiment, the functions of each module / unit are as follows:
[0081] The email text splitting module 101 is used to receive a content loading request from an email sender, identify the email text corresponding to the content loading request, and split the email text into elements according to preset page elements to obtain at least two element texts;
[0082] The element object matching module 102 is used to extract the element object of each element text and match each element object with an element template in a preset front-end element template library;
[0083] The element content generating module 103 is used to load the element content corresponding to the successfully matched element object into the element template by using an interpolation replacement algorithm to obtain the first page element content;
[0084] The element content generating module 103 is further used to construct a page template of the element object that failed to match by using a custom container, and load the element content corresponding to the element object that failed to match into the page template to obtain the second page element content;
[0085] The email content generating module 104 is used to integrate the first page element content and the second page element content into an email page to obtain email page content.
[0086] In detail, each module in the apparatus 100 for intelligently filling email content in the embodiment of the present invention adopts the same method as above when in use. Figure 1 The same technical means are used as the method for intelligently filling email content described in , and can produce the same technical effects, which will not be repeated here.
[0087] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device 1 for implementing the method for intelligently filling in email content according to the present invention.
[0088] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an email content intelligent filling program.
[0089] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device 1, and uses various interfaces and lines to connect various components of the entire electronic device 1, and executes or executes programs or modules stored in the memory 11 (for example, executing a smart filling program for email content, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
[0090] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the smart filling program of the email content, but also can be used to temporarily store data that has been output or is to be output.
[0091] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0092] The communication interface 13 is used for communication between the above-mentioned electronic device 1 and other devices, including a network interface and an employee interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices 1. The employee interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the employee interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual employee interface.
[0093] Figure 3 Only the electronic device 1 having components is shown, and those skilled in the art can understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0094] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0095] It should be understood that the embodiment is for illustrative purposes only and the scope of the patent invention is not limited to this structure.
[0096] The email content intelligent filling program stored in the memory 11 of the electronic device 1 is a combination of multiple computer programs. When running in the processor 10, it can achieve:
[0097] receiving a content loading request from an email sender, identifying an email text corresponding to the content loading request, and dividing the email text into elements according to preset page elements to obtain at least two element texts;
[0098] Extracting the element object of each element text, and matching each element object with an element template in a preset front-end element template library;
[0099] Using an interpolation replacement algorithm, the element content corresponding to the successfully matched element object is loaded into the element template to obtain the first page element content;
[0100] A custom container is used to construct a page template for the element object that fails to match, and the element content corresponding to the element object that fails to match is loaded into the page template to obtain the second page element content;
[0101] The first page element content and the second page element content are integrated into an email page to obtain email page content.
[0102] Specifically, the specific implementation method of the processor 10 for the above computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0103] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0104] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of the electronic device 1, the computer program can implement:
[0105] receiving a content loading request from an email sender, identifying an email text corresponding to the content loading request, and dividing the email text into elements according to preset page elements to obtain at least two element texts;
[0106] Extracting the element object of each element text, and matching each element object with an element template in a preset front-end element template library;
[0107] Using an interpolation replacement algorithm, the element content corresponding to the successfully matched element object is loaded into the element template to obtain the first page element content;
[0108] A custom container is used to construct a page template for the element object that fails to match, and the element content corresponding to the element object that fails to match is loaded into the page template to obtain the second page element content;
[0109] The first page element content and the second page element content are integrated into an email page to obtain email page content.
[0110] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0111] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0112] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0113] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0114] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0115] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0116] The embodiments of the present invention can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0117] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.
[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for intelligently filling in email content, characterized in that: The method comprises: receiving a content loading request from an email sender, identifying an email text corresponding to the content loading request, and dividing the email text into elements according to preset page elements to obtain at least two element texts; Extracting the element object of each element text, and matching each element object with an element template in a preset front-end element template library; Using an interpolation replacement algorithm, the element content corresponding to the successfully matched element object is loaded into the element template to obtain the first page element content; A custom container is used to construct a page template for the element object that fails to match, and the element content corresponding to the element object that fails to match is loaded into the page template to obtain the second page element content; Integrate the first page element content and the second page element content into an email page to obtain email page content; Wherein, matching each of the element objects with the element templates in the preset front-end element template library includes: converting each of the element objects into a first element vector, and converting each element template in the preset front-end element template library into a second element vector; calculating the vector similarity between the first element vector and the second element vector; if the vector similarity is greater than a preset threshold, the element object and the element template are matched successfully; if the vector similarity is not greater than the preset threshold, the element object and the element template are matched unsuccessfully; The adopting of the interpolation replacement algorithm to load the element content corresponding to the successfully matched element object into the element template to obtain the first page element content includes: constructing a parameter interpolation thread of the element template according to the interpolation replacement algorithm; transmitting the element coordinates of the element content corresponding to the successfully matched element object to the parameter interpolation thread, so as to execute the loading of the element content in the element template through the parameter interpolation thread to obtain the first page element content; The method of using a custom container to construct a page template for the element object that fails to match includes: obtaining a page layout event for the element object that fails to match, transmitting the page layout event to the custom container, and using the custom container to construct a page template for the element object according to the page layout event.
2. The method for intelligently filling in email content according to claim 1, characterized in that: The step of splitting the email text into elements according to preset page elements to obtain at least two element texts includes: The preset page element is matched with the email content in the email text, and the successfully matched email content is divided into element text content, and at least two element texts are generated according to the element text content.
3. The method for intelligently filling in email content according to claim 1, characterized in that: The step of extracting the element object of each element text comprises: Get the text field of each said element's text; Determine the element attribute of each element text according to the text field; According to the element attributes, the element object of each element text is identified.
4. The method for intelligently filling in email content according to any one of claims 1 to 3, characterized in that: The step of integrating the first page element content and the second page element content into an email page to obtain email page content includes: Configuring the layout of the first page element content and the second page element content on the front-end page, and constructing the element styles of the first page element content and the second page element content on the front-end page; The email page content is generated according to the layout mode and the element style.
5. An intelligent filling device for email content, used to implement the intelligent filling method for email content as claimed in any one of claims 1 to 4, characterized in that: The device comprises: An email text splitting module is used to receive a content loading request from an email sender, identify the email text corresponding to the content loading request, and split the email text into elements according to preset page elements to obtain at least two element texts; An element object matching module, used to extract the element object of each element text, and match each element object with an element template in a preset front-end element template library; An element content generation module, used for loading the element content corresponding to the successfully matched element object into the element template by using an interpolation replacement algorithm to obtain the first page element content; The element content generation module is further used to construct a page template of the element object that failed to match by using a custom container, and load the element content corresponding to the element object that failed to match into the page template to obtain the second page element content; The email content generation module is used to integrate the first page element content and the second page element content into an email page to obtain email page content.
6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for intelligently filling in email content as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for intelligently filling in email content as claimed in any one of claims 1 to 4 is implemented.
