Promotional page generation method and related device based on natural language processing
Through natural language processing methods, promotional files are parsed, text and image features are obtained, and promotional pages are generated based on page style models, the problems of single and high repetition rate of publicity pages in the existing technology are solved, and more efficient and attractive promotional page generation is achieved.
Patent Information
- Application Number
- CN202210168361.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-23
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2042-02-23
AI Technical Summary
When creating promotional pages, the pictures are single and the repetition rate is high, making it difficult to improve the promotional effect.
A natural language processing method is adopted to generate requests by receiving user's promotional pages, analyze promotional files, obtain text and image features of character information and activity information, and generate promotional pages based on page style model.
It improves the generation efficiency and display effect of the promotional page, enhances the attractiveness of the promotional page, and thus improves the promotional effect.
Smart Images

Figure CN114581124B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and mainly to a method for generating a promotional page based on natural language processing and related devices. Background Art
[0002] With the rapid development of the Internet, the marketing channels of enterprises or businesses have gradually shifted from offline to online, and the Internet is used to achieve goals such as brand and product marketing and customer service. For example, in the insurance field, promotional pages for promotional activities can be published on the Internet to improve the publicity effect. However, the promotional pages produced by the existing image template software have relatively simple images and high repetition rates, which makes it difficult to improve the publicity effect. Summary of the invention
[0003] The embodiment of the present application provides a promotional page generation method and related devices based on natural language processing, which can improve the generation efficiency and display effect of the promotional page, and is conducive to improving the promotional effect.
[0004] In a first aspect, an embodiment of the present application provides a method for generating a promotional page based on natural language processing, wherein:
[0005] Receiving a promotional page generation request sent by a user, wherein the promotional page generation request includes a promotional file;
[0006] Parsing the promotional file to obtain the character information and activity information of the promotional character;
[0007] Acquire a target text and text features of the target text, and a target image and image features of the target image corresponding to the character information and the activity information;
[0008] Acquire the promotional page style corresponding to the text feature and the image feature based on the page style model;
[0009] A promotional page corresponding to the target text and the target image is generated based on the promotional page style.
[0010] In a second aspect, an embodiment of the present application provides a promotional page generation device based on natural language processing, wherein:
[0011] A receiving unit, configured to receive a promotional page generation request sent by a user, wherein the promotional page generation request includes a promotional file;
[0012] A parsing unit, used to parse the promotional file to obtain the character information and activity information of the promotional character;
[0013] An acquisition unit is used to acquire a target text and text features of the target text corresponding to the character information and the activity information, as well as a target image and image features of the target image; and acquire a promotional page style corresponding to the text features and the image features based on a page style model;
[0014] A generating unit is used to generate a promotional page corresponding to the target text and the target image based on the promotional page style.
[0015] In a third aspect, an embodiment of the present application provides a computer device, comprising a processor, a memory, a communication interface, and a computer program, wherein the computer program is stored in the memory, the computer program is configured to be executed by the processor, and the computer program includes instructions for some or all of the steps described in the first aspect.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program enables a computer to execute to implement some or all of the steps described in the first aspect.
[0017] Implementing the embodiments of the present application will have the following beneficial effects:
[0018] After adopting the above-mentioned promotional page generation method based on natural language processing and related devices, if a promotional page generation request sent by a user is received, the promotional file in the promotional page generation request is parsed to obtain the character information and activity information of the promotional character. Then the target text and the text features of the target text corresponding to the character information and the activity information, as well as the target image and the image features of the target image are obtained. Then, the promotional page style corresponding to the text features and the image features is obtained based on the page style model, and then the promotional page corresponding to the target text and the target image is generated based on the promotional page style. In this way, the promotional page can be generated based on the promotional file, which can improve the generation efficiency of the promotional page. And the corresponding promotional page is generated based on the promotional page style obtained based on the text features and the image features, which is used to promote the character itself and related activities, which can improve the display effect of the promotional page and is conducive to improving the promotional effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] in:
[0021] Figure 1 A flowchart of a method for generating a promotional page based on natural language processing provided in an embodiment of the present application;
[0022] Figure 2 A schematic diagram of the structure of a promotional page generation device based on natural language processing provided in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. According to the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0026] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0027] The network architecture used in the embodiment of the present application includes a server and an electronic device. The embodiment of the present application does not limit the number of electronic devices and servers, and the server can provide services for multiple electronic devices at the same time. 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 (CDNs), and big data and artificial intelligence platforms. The server may be implemented by a server cluster consisting of multiple servers.
[0028] The electronic device may be a personal computer (PC), a laptop or a smart phone, or an all-in-one machine, a handheld computer, a tablet computer (pad), a smart TV player terminal, a vehicle-mounted terminal or a portable device. The operating system of the electronic device on the PC side, such as an all-in-one machine, may include but is not limited to Linux system, Unix system, Windows series system (such as Windows XP, Windows 7, etc.), Mac OS X system (Apple computer operating system) and other operating systems. The operating system of the electronic device on the mobile side, such as a smart phone, may include but is not limited to Android system, IOS (Apple mobile phone operating system), Window system and other operating systems.
[0029] The electronic device can install and run the application, and the server can be a server corresponding to the application installed in the electronic device, providing application services for the application. The application can be a separately integrated application software, or a small program embedded in other applications, or a system on a web page, etc., which is not limited here.
[0030] The promotional content involved in this application may be promotional content in the insurance field, or may be promotional content in the real estate field, or may be promotional content in the medical field, or may be promotional content in the Internet field, etc., and is not limited here.
[0031] For example, if an insurance agent needs to promote the insurance business he is responsible for, he can send the business information of the insurance business to the server through the electronic device. The server can generate a promotional page based on the personal information and business information of the insurance agent and return it to the electronic device so that the insurance agent can use the promotional page to promote the business and himself.
[0032] The embodiment of the present application proposes a method for generating a promotional page based on natural language processing, which can be executed by a promotional page generation device based on natural language processing. The device can be implemented by software and / or hardware, and can generally be integrated in an electronic device or a server, which can improve the generation efficiency and display effect of the promotional page, and is conducive to improving the promotional effect.
[0033] Please refer to Figure 1 , Figure 1 This is a flowchart of a method for generating a promotional page based on natural language processing provided by the present application. Taking the method applied to a server as an example, the method includes the following steps S101 to S105, wherein:
[0034] S101. Receive a promotional page generation request sent by a user, where the promotional page generation request includes a promotional file.
[0035] This application does not limit the user, and the user can be a planner of a promotional activity, etc. In a possible example, the user is a promotional figure. In the embodiment of this application, the promotional figure refers to the promoter of this promotional activity, and can be the explainer of this promotional activity, such as the host, etc. Or it can be the object to be promoted in this promotional activity, such as a hero, etc.
[0036] For example, in the insurance field, insurance agents can be publicity figures and hold small exchange meetings and other publicity activities to introduce themselves while introducing the insurance business, so as to increase their activity and influence in the insurance field.
[0037] The request for generating a promotional page is used to generate a promotional page. The request for generating a promotional activity may include a promotional file. The promotional file may be a planning scheme or discussion document for the promotional activity, and may be in the form of text, image, audio or video, etc., which is not limited here. It can be understood that when the promotional file is a voice file or video file of a meeting discussion, the step of arranging the promotional content can be omitted, which can improve the efficiency of generating the promotional page.
[0038] This application does not limit the information in the promotional file. The information in the promotional file can be various information input based on the prompt information before submitting the promotional page generation request, or a file obtained by importing a file. Exemplarily, various promotional activity information related to the promotional page is input one by one according to the prompt information in the text input box, and the character image of the promotional character is imported. It should be noted that the number of character information and activity information obtained by the above classification can be one or more.
[0039] In the embodiment of the present application, the publicity file may include the character information and activity information of the publicity character. The character information of the publicity character may include the name of the publicity character, the number of the professional qualification certificate, and other identification information. The character information of the publicity character may also include the introduction information of the publicity character, which may include the basic information of the publicity character, such as the character image, age, gender, and work experience. The character image is usually a certificate photo, work photo, award photo, or other image suitable for publicity.
[0040] If the uploaded character image does not meet the promotional requirements (for example, low pixels, blurred background, etc., or the character image is a daily photo), you can first perform target recognition based on the character image in the promotional file to obtain the face image and body image; then adjust the face image and body image based on the preset image template to obtain the character image in the promotional page.
[0041] The preset image template may be a background image, and thus, the background image, the face image, and the body image may be combined to obtain the character image in the promotional page. The preset image template may also be an image generation model obtained by training a promotional algorithm or a neural network, etc., which is not limited here. In this way, the display effect of the character image can be improved, which is conducive to improving the promotional effect.
[0042] In a possible example, the character image is a cartoon character image. It is understandable that using a cartoon character image for image display is conducive to improving the publicity effect. The step of generating the cartoon character image may include first obtaining the character features corresponding to the face image and the body image; and then generating a cartoon face image corresponding to the character features based on a preset image template. In this way, it is conducive to improving the fit of the generated cartoon image.
[0043] In the embodiment of the present application, the activity information may include the activity theme, activity time, activity location, activity object, activity form, etc., which are not limited here. Among them, the activity theme is used to briefly introduce the content of the activity, for example, pension planning, etc. The activity time may include the specific time of holding the activity, and may also include the time of participating in the activity, etc. For example, if the promotional activity is a registration activity, the activity time may be the registration time and the participation time. The activity time can be classified into upcoming, ongoing, long-term planning, periodic events, etc.
[0044] The activity objects may include objects that may participate in the activity (hereinafter referred to as the delivery objects), and may also include objects that host the activity (hereinafter referred to as the hosting objects). For example, the hosting objects may be insurance agents, insurance companies, financial experts, etc., and the delivery objects may be potential customers, purchased customers, promotional customers, etc. The activity forms may include online activities and offline activities, and may also include the types of participation in the activity, such as likes, forwarding, voting, registration, etc.
[0045] The activity information may also include business information of the business to be promoted. For example, if the business to be promoted is a life insurance product, the attribute information of the life insurance product may include the investment amount, investment method, payment period, etc.
[0046] In the embodiment of the present application, based on the type of information in the activity text, the character information is divided into character text and character image, and the activity information is divided into activity text and activity image. It can be understood that introducing the promotional activity from both text and image aspects can improve the readability of the promotional page.
[0047] S102: Parse the promotional file to obtain the character information and activity information of the promotional character.
[0048] This application does not limit the method for parsing the promotional file. If the promotional file includes voice, in a possible example, step S102 may include the following steps: performing voiceprint recognition on the promotional file to obtain at least two voice segments, each voice segment corresponding to an identity identifier and time information; performing semantic recognition on the voice segment to obtain at least two texts; classifying the at least two texts to obtain the person information and activity information of the promotional person.
[0049] It is understandable that there may be multiple voice clips of characters in a voice file. Therefore, in this example, the promotional file is first divided into voice clips of each character based on the different voiceprint features. Then the text of each voice clip is identified. Then the text is classified to obtain the character information and activity information of the promotional character. In this way, the efficiency and accuracy of the analysis can be improved.
[0050] It should be noted that if the promotional file includes text, a step of classifying the text may be performed. Further, if the promotional file includes text, the character information of the promotional character includes the character text of the promotional character, and the activity information of the promotional character includes the activity text of the promotional character, then in a possible example, step S102 may include: classifying the text in the promotional file to obtain the character text and activity text of the promotional character.
[0051] If the promotional file includes images, the character information of the promotional character includes the character image of the promotional character, and the activity information of the promotional character includes the activity image of the promotional character, then in a possible example, step S102 may include: classifying the images in the promotional file to obtain the character image and activity image of the promotional character.
[0052] S103: Acquire a target text and text features of the target text, and a target image and image features of the target image corresponding to the character information and the activity information.
[0053] In an embodiment of the present application, the target text refers to a text that can be used for a promotional page. The text features of the target text may include activity information such as the theme of the activity, the time of the activity, the location of the activity, the object of the activity, the product of the activity, or may include business information of the business to be promoted. The text features of the target text may also include character introduction information of the promotional figure, for example, work experience related to the promotional activity, etc. Exemplarily, if the promotional figure is a fund manager, the character features may be name, educational experience, research direction, income information, etc. Or the text features of the target text may include information related to the promotional figure in the business to be promoted, for example, the commission and rebate of the promotional figure for the business to be promoted, etc. It can be understood that introducing the promotional activity in text can improve the readability of the page display.
[0054] The target image refers to an image that can be used for a promotional page. The image features of the target image may include product images of the business to be promoted, or images of answers to related questions, etc. The image features of the target image may also include images of promotional figures, etc. It can be understood that the inclusion of images in the promotional page can improve the readability of the page display.
[0055] In a possible example, step S103 may include the following steps A1 to A4, wherein:
[0056] A1. Obtain a first text and a first image corresponding to the activity information.
[0057] In an embodiment of the present application, the first text may include text in the activity information or obtained based on the activity information, which can be used for a promotional page, etc. That is, the first text may be text selected from the activity information, or may be text obtained by searching or processing the activity information. The first image may include an image in the activity information or obtained based on the activity information, which can be used for a promotional page, etc. That is, the first image may be an image selected from the activity information, or may be an image obtained by searching or processing the activity information. The present application does not limit the first text and the first image, and the method for obtaining the first text and the first image.
[0058] In a possible example, the activity information includes activity text and activity images, and step A1 may include the following steps A11 to A15, wherein:
[0059] A11. Perform named entity recognition on the active text to obtain a first subtext corresponding to the active text.
[0060] Among them, named entity recognition (NER) is an important basic tool in application fields such as information extraction, question-answering systems, syntactic analysis, and machine translation. Generally speaking, the purpose of named entity recognition is to identify three major categories (entity category, time category, and number category) and seven minor categories (name, organization name, place name, time, date, currency, and percentage) of named entities in the text to be processed. For example, the sentence: Xiao Ming goes to school at 8 o'clock in the morning. Performing named entity recognition on this sentence should extract the information {name: Xiao Ming; time: 8 o'clock in the morning; place: school}.
[0061] The first sub-text may include text in the active text, or text obtained based on the active text, which can be used for promotional pages, etc. For example, the first sub-text may be a text vector obtained by performing named entity recognition on the active text, or may be a text vector obtained by weighting the entity's weight value, etc. The weight value of each entity is used to illustrate the importance of the entity in a sentence or fragment. For example, the title is "Briefly Talking about Retirement Planning, Locking in Quality Life", and the entities may be retirement and quality, where the weight value of retirement may be 0.8, and the weight value of quality may be 0.6. The present application does not limit the method for determining the weight value of an entity, and it can be determined based on the entity's part of speech and its position in the sentence, etc.
[0062] A12. Obtain a second subtext corresponding to the active image.
[0063] The second subtext refers to the text obtained from the moving image and used for the promotional page. The second subtext may include summary information of the moving image, or introduction information of the moving image, etc. The present application does not limit the second subtext and the method for obtaining the second subtext.
[0064] In a possible example, step A12 may include the following steps A121 and A122, wherein:
[0065] A121. Perform target recognition on the moving image to obtain image attributes of the moving object.
[0066] A122. Generate a second subtext corresponding to the active image based on the image attributes.
[0067] In the embodiment of the present application, the activity object may be the business to be promoted or the product corresponding to the business to be promoted, etc., which is not limited here. If the image attributes of the activity object include image features such as the size, shape, color, etc. of the activity object, or may include text obtained by image recognition, it is not limited here. The second subtext may be obtained by combining text corresponding to the image attributes, or may be generated based on text of image features corresponding to the image attributes, etc.
[0068] It can be understood that in step A121 and step A122, the second subtext corresponding to the moving image is generated based on the image attributes of the moving object obtained by target recognition of the moving image, which can improve the accuracy of obtaining the text.
[0069] It should be noted that step A11 may be performed before step A12, or after step A12, or simultaneously with step A12, which is not limited here.
[0070] A13. Combine the first subtext and the second subtext to obtain a first text corresponding to the activity information.
[0071] In an embodiment of the present application, the first text includes a first subtext and a second subtext. The first text includes features that are different and features that are similar between the first subtext and the second subtext. The present application does not limit the combination method, and classification can be performed based on the first subtext and the second subtext to obtain at least two types of text sets; the text vectors corresponding to the text sets are combined to obtain the first text corresponding to the activity information.
[0072] A14. Acquire other active images based on the first text.
[0073] In the embodiment of the present application, other activity images refer to activity images other than the activity images found based on the first text, which can be understood as activity images not uploaded by the user. Other activity images may include promotional scene images, such as scene images of promotional activities before the promotional figures, etc. Other activity images may also include question-and-answer images of the business to be promoted, which are used to explain the problems that may be encountered when handling the business to be promoted or purchasing the products corresponding to the business to be promoted.
[0074] In a possible example, the other activity images include a question-and-answer image of the business to be promoted, and step A14 may include the following steps A141 and A142, wherein:
[0075] A141. Determine the question about the business to be promoted and a reference answer to the question based on the first text.
[0076] In the embodiment of the present application, the question about the business to be promoted can be a business process of the business to be promoted determined based on the first text, or a question obtained by statistics of business information, or a common question obtained by statistics, etc. The reference answer to the question can be a pre-set standard answer, or an answer searched from the network or standard protocol, etc., which is not limited here.
[0077] A142. Generate the question-answer image based on the question and the reference answer.
[0078] In an embodiment of the present application, the question-answer image may be an image obtained by arranging and combining each question and the reference answer to the question. The style of the questions may be the same or different. The style of the reference answers may be the same or different, and the style of the reference answers may be the same or different from the corresponding questions. The order of the questions and the reference answers may be determined based on the number of times the questions are asked, or the level of the questions, etc., which is not limited here.
[0079] It can be understood that in step A141 and step A142, a question and answer image of the business to be promoted is generated based on the question of the business to be promoted determined by the first text and the reference answer to the question, which can interpret the business to be promoted and help improve the promotion effect of the business to be promoted.
[0080] A15. Combine the activity image and the other activity images to obtain a first image corresponding to the activity information.
[0081] In an embodiment of the present application, the first image includes an active image and other active images. The first image may include features that are different from and features that are similar to the active image and other active images. The present application does not limit the method for combining the active image and other active images. Similar images may be fused, or image features may be adjusted to a unified style.
[0082] It can be understood that in steps A11 to A15, the first subtext corresponding to the active text and the second subtext corresponding to the active image are combined to obtain the first text corresponding to the active information. Then, the other active images obtained from the first text are combined with the active image to obtain the first image corresponding to the active information. In this way, obtaining text and images from the perspective of text and image is conducive to improving the comprehensiveness of obtaining the first image and the first text corresponding to the active information.
[0083] A2. Obtain a second text and a second image corresponding to the character information.
[0084] In an embodiment of the present application, the second text may include text in the character information or obtained based on the character information, which can be used for a promotional page, etc. That is, the second text may be text selected from the character information, or may be text obtained by searching or processing the character information. The second image may include an image in the character information or obtained based on the character information, which can be used for a promotional page, etc. That is, the second image may be an image selected from the character information, or may be an image obtained by searching or processing the character information. The present application does not limit the second text and the second image, and the method for obtaining the second text and the second image.
[0085] In a possible example, the character information includes character text and character image, the character text includes at least two character sub-texts, and step A2 may include the following steps A21 to A23, wherein:
[0086] A21. Select a target character sub-text from the character sub-texts.
[0087] In the embodiment of the present application, the target character subtext is a character subtext selected from the character text. The present application does not limit the selection method. In a possible example, step A21 may include the following steps A211 to A213, wherein:
[0088] A211. Search for historical promotional pages based on the first text.
[0089] In the embodiment of the present application, the historical promotional page may include a promotional page with the same activity theme, activity type, etc. as the first text. It can be understood that selecting the target person subtext based on the historical promotional page can improve the accuracy of the selection.
[0090] A212. Obtain the historical figure information of the historical propaganda figure from the historical propaganda page.
[0091] In the embodiment of the present application, the historical figure information refers to the information corresponding to the historical propaganda figure in the historical propaganda page. It should be noted that the number of historical propaganda pages can be one or more. The number of historical figure information can be one or more.
[0092] A213. Select a target character sub-text from the character sub-texts based on a similarity value between the attributes of the historical character information and the attributes of the character sub-texts.
[0093] In the embodiment of the present application, the target character subtext may be a character subtext whose attribute similarity value with the historical character information is greater than a preset threshold value. The preset threshold value may be a fixed value, or may be determined based on the number of historical character information or the number of character subtexts, etc., which is not limited here.
[0094] It can be understood that in steps A211 to A213, by selecting the target character sub-text based on the similarity value between the attributes of the historical activity information of the historical propaganda figure in the historical propaganda page searched by the first text and the attributes of the character sub-text, the accuracy of selecting the target character sub-text can be improved, which is conducive to improving the display effect of the text in the promotional page.
[0095] A22. Perform named entity recognition on the target person sub-text to obtain a second text corresponding to the person information.
[0096] A23. Adjust the character image based on a preset image template to obtain a second image corresponding to the character information.
[0097] The step of performing named entity recognition on the target character subtext can refer to the description of step A11, which will not be repeated here. The preset image template can also refer to the above, and can include a background image, or can be an image generation model obtained by training a promotional algorithm or a neural network. The present application does not limit the method of adjusting the character image using the preset image template. The face image and the limb image can be first extracted from the character image, and then the face image and the limb image are adjusted based on the preset image template. Specifically, the shooting angle of the promotional character can be determined based on the face image and the limb image; the target image template corresponding to the shooting angle is obtained from the preset image template; the background in the target image template is combined with the face image and the limb image to obtain a second image. Alternatively, the character features corresponding to the face image and the limb image can be obtained based on the preset image template, and then the second image can be generated based on the character features.
[0098] It can be understood that in steps A21 to A23, named entity recognition is performed on the target character sub-text selected from the character sub-text to obtain the second text corresponding to the character information. Then, the face image is adjusted based on the preset image template to obtain the second image corresponding to the character information. In this way, the accuracy of obtaining the second text and the second image can be improved.
[0099] A3. Acquire a target text corresponding to the character information and the activity information and text features of the target text based on the first text and the second text.
[0100] A4. Acquire a target image corresponding to the character information and the activity information and image features of the target image based on the first image and the second image.
[0101] In step A3, the first text and the second text may be classified to fuse the texts and obtain texts with differences. In step A4, the first image and the second image may be classified to fuse the images and obtain images with differences.
[0102] It can be understood that in steps A1 to A4, the text and image corresponding to the activity information and the character information are first obtained. Based on the respectively obtained text and image, the target text and the text features of the target text, and the target image and the image features of the target image are respectively obtained. In this way, the accuracy of obtaining images and texts can be improved, and the accuracy of obtaining text features and image features can be improved.
[0103] It should be noted that step A1 may be performed before step A2, or after step A2, or simultaneously with step A2. Step A3 may be performed before step A4, or after step A4, or simultaneously with step A4, which is not limited here.
[0104] S104: Acquire the promotional page style corresponding to the text feature and the image feature based on the page style model.
[0105] In an embodiment of the present application, the page generation model is used to obtain the style of the promotional page, so that the promotional page can be generated based on the style of the promotional page and the content of the promotional page. The present application does not limit the page generation model. In a possible example, the page generation model is a generative adversarial network (GAN).
[0106] The training method of the GAN may include the following steps: obtaining a reference promotional page from the network; classifying the reference promotional page to obtain training data and test data; performing unsupervised learning based on the training data to obtain an initialization model of the GAN; and performing supervised learning on the initialization model of the GAN based on the test data to obtain an initial model of the GAN.
[0107] The reference promotional page can be a promotional page of various styles, and each style carries label information of image features and text features. The label information can be obtained by classification based on a pre-trained CNN convolutional neural network. In this way, obtaining the promotional page style through the trained GAN is conducive to improving the display effect of the generated promotional page.
[0108] S105: Generate a promotional page corresponding to the target text and the target image based on the promotional page style.
[0109] In the embodiment of the present application, the promotional page can be used before the promotional activity to improve the influence of the promotional activity. Or it can be used after the promotional activity ends to improve the effect of the promotional activity. The promotional page includes a target text and a target image. It can be understood that the promotional page style obtained based on the text features of the target text and the image features of the target image is used to generate a promotional page for promoting the person himself and related activities, which can improve the display effect of the promotional page and help improve the promotional effect.
[0110] This application does not limit the arrangement order between the target text and the target image in the promotional page. It can be determined based on historical promotional pages, or it can be sorted based on the summaries corresponding to the target text and the target image, etc.
[0111] It should be noted that the promotional page style may include multiple sub-styles, i.e., styles corresponding to different text types and different image types. Therefore, after obtaining the promotional page style, the target text and target image may be processed based on the promotional page style so that the target text and target image meet the corresponding promotional page style.
[0112] exist Figure 1 In the method shown, if a promotional page generation request sent by a user is received, the promotional file in the promotional page generation request is parsed to obtain the character information and activity information of the promotional character. Then the target text and the text features of the target text corresponding to the character information and the activity information, as well as the target image and the image features of the target image are obtained. Then, the promotional page style corresponding to the text features and the image features is obtained based on the page style model, and then the promotional page corresponding to the target text and the target image is generated based on the promotional page style. In this way, the promotional page can be generated based on the promotional file, which can improve the generation efficiency of the promotional page. And the corresponding promotional page is generated based on the promotional page style obtained based on the text features and the image features, which is used to promote the character itself and related activities, which can improve the display effect of the promotional page and is conducive to improving the promotional effect.
[0113] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.
[0114] and Figure 1 The embodiment shown is consistent with that shown in FIG. Figure 2 , Figure 2 This is a schematic diagram of the structure of a promotional page generation device based on natural language processing proposed in this application. Figure 2 As shown, the above-mentioned promotional page generation device 200 based on natural language processing includes:
[0115] The receiving unit 201 is used to receive a promotional page generation request sent by a user, wherein the promotional page generation request includes a promotional file;
[0116] The parsing unit 202 is used to parse the promotional file to obtain the character information and activity information of the promotional character;
[0117] The acquisition unit 203 is used to acquire the target text and the text features of the target text corresponding to the character information and the activity information, as well as the target image and the image features of the target image; and acquire the promotional page style corresponding to the text features and the image features based on the page style model;
[0118] The generating unit 204 is used to generate a promotional page corresponding to the target text and the target image based on the promotional page style.
[0119] In a possible example, the acquisition unit 203 is specifically used to acquire a first text and a first image corresponding to the activity information; acquire a second text and a second image corresponding to the character information; acquire a target text and text features of the target text corresponding to the character information and the activity information based on the first text and the second text; acquire a target image and image features of the target image corresponding to the character information and the activity information based on the first image and the second image.
[0120] In a possible example, the activity information includes activity text and activity images, and the acquisition unit 203 is specifically used to perform named entity recognition on the activity text to obtain a first sub-text corresponding to the activity text; obtain a second sub-text corresponding to the activity image; combine the first sub-text and the second sub-text to obtain a first text corresponding to the activity information; obtain other activity images based on the first text; and combine the activity image and the other activity images to obtain a first image corresponding to the activity information.
[0121] In a possible example, the acquisition unit 203 is specifically configured to perform target recognition on the moving image to obtain image attributes of the moving object; and generate a second subtext corresponding to the moving image based on the image attributes.
[0122] In a possible example, the other active images include a question-and-answer image of the business to be promoted, and the acquisition unit 203 is specifically used to determine the question of the business to be promoted and the reference answer to the question based on the first text; and generate the question-and-answer image based on the question and the reference answer.
[0123] In a possible example, the character information includes character text and character image, the character text includes at least two character sub-texts, and the acquisition unit 203 is specifically used to select a target character sub-text from the character sub-texts; perform named entity recognition on the target character sub-text to obtain a second text corresponding to the character information; and adjust the character image based on a preset image template to obtain a second image corresponding to the character information.
[0124] In a possible example, the acquisition unit 203 is specifically used to search for historical promotional pages based on the first text; obtain historical figure information of historical promotional figures from the historical promotional pages; and select a target character sub-text from the character sub-text based on a similarity value between attributes of the historical figure information and attributes of the character sub-text.
[0125] The detailed execution process of each unit in the promotional page generation device 200 based on natural language processing can be found in the execution steps in the aforementioned method embodiment, which will not be repeated here.
[0126] and Figure 1 For details, please refer to Figure 3 , Figure 3 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 3 As shown, the computer device 300 includes a processor 310, a memory 320 and a communication interface 330. The processor 310, the memory 320 and the communication interface 330 are connected to each other via a bus 350. Figure 2 The related functions implemented by the receiving unit 201 shown can be implemented through the communication interface 330. Figure 2 The related functions implemented by the parsing unit 202 , the acquiring unit 203 and the generating unit 204 shown can be implemented by the processor 310 .
[0127] The memory 320 stores a computer program 340, which is configured to be executed by the processor 310. The computer program 340 includes instructions for executing the following steps:
[0128] Receiving a promotional page generation request sent by a user, wherein the promotional page generation request includes a promotional file;
[0129] Parsing the promotional file to obtain the character information and activity information of the promotional character;
[0130] Acquire a target text and text features of the target text, and a target image and image features of the target image corresponding to the character information and the activity information;
[0131] Acquire the promotional page style corresponding to the text feature and the image feature based on the page style model;
[0132] A promotional page corresponding to the target text and the target image is generated based on the promotional page style.
[0133] In a possible example, in the aspect of acquiring the target text and the text features of the target text, and the target image and the image features of the target image corresponding to the character information and the activity information, the computer program 340 includes instructions specifically for executing the following steps:
[0134] Acquire a first text and a first image corresponding to the activity information;
[0135] Acquire a second text and a second image corresponding to the character information;
[0136] Acquire a target text corresponding to the character information and the activity information and a text feature of the target text based on the first text and the second text;
[0137] A target image corresponding to the character information and the activity information and an image feature of the target image are acquired based on the first image and the second image.
[0138] In a possible example, the activity information includes an activity text and an activity image. In the aspect of obtaining the first text and the first image corresponding to the activity information, the computer program 340 includes instructions for executing the following steps:
[0139] Performing named entity recognition on the active text to obtain a first subtext corresponding to the active text;
[0140] Acquire a second subtext corresponding to the active image;
[0141] combining the first subtext and the second subtext to obtain a first text corresponding to the activity information;
[0142] Acquire other active images based on the first text;
[0143] The activity image and the other activity images are combined to obtain a first image corresponding to the activity information.
[0144] In a possible example, in the aspect of acquiring the second subtext corresponding to the active image, the computer program 340 includes instructions specifically for executing the following steps:
[0145] Performing target recognition on the moving image to obtain image attributes of the moving object;
[0146] A second subtext corresponding to the active image is generated based on the image attribute.
[0147] In a possible example, the other activity images include a question-and-answer image of the business to be promoted. In the aspect of obtaining the other activity images based on the first text, the computer program 340 includes instructions for executing the following steps:
[0148] Determining the question of the business to be promoted and a reference answer to the question based on the first text;
[0149] The question-answer image is generated based on the question and the reference answer.
[0150] In a possible example, the character information includes a character text and a character image, the character text includes at least two character sub-texts, and in the aspect of obtaining the second text and the second image corresponding to the character information, the computer program 340 includes instructions specifically for performing the following steps:
[0151] Selecting a target character sub-text from the character sub-texts;
[0152] Performing named entity recognition on the target character sub-text to obtain a second text corresponding to the character information;
[0153] The character image is adjusted based on a preset image template to obtain a second image corresponding to the character information.
[0154] In a possible example, in the aspect of selecting the target character sub-text from the character sub-text, the computer program 340 includes instructions for executing the following steps:
[0155] Searching for historical promotional pages based on the first text;
[0156] Obtaining historical figure information of the historical propaganda figure from the historical propaganda page;
[0157] Based on the similarity value between the attribute of the historical figure information and the attribute of the figure sub-text, a target figure sub-text is selected from the figure sub-text.
[0158] An embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, which enables a computer to execute part or all of the steps of any method recorded in the method embodiment, and the computer includes an electronic device or a server.
[0159] The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute to implement some or all steps of any method described in the method embodiment. The computer program product can be a software installation package, and the computer includes an electronic device or a server.
[0160] In the above embodiment, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of blockchain nodes, etc. For example, the blockchain may store page style models, preset image templates, historical promotional pages, and related information of promotional figures, etc., which are not limited here.
[0161] The blockchain referred to in the embodiments of the present application is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods, each of which 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.
[0162] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modes involved are not necessarily required by the present application.
[0163] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0164] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as at least one unit or component can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0165] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on at least one network unit. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0166] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or 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 software program mode.
[0167] If the integrated unit is implemented in the form of a software program model and sold or used as an independent product, it can be stored in a computer-readable memory. According to this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk or optical disk, etc., and other media that can store program codes.
[0168] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for generating a promotional page based on natural language processing, characterized in that: include: Receiving a promotional page generation request sent by a user, wherein the promotional page generation request includes a promotional file, which is a planning scheme or discussion document for a promotional activity, and the form of the promotional file includes text, image, and voice file; Parsing the promotional file to obtain character information and activity information of the promotional character, wherein the character information includes character text and character image, and the activity information includes activity text and activity image; Performing named entity recognition on the active text to obtain a first subtext corresponding to the active text; Performing target recognition on the activity image to obtain image attributes of the activity object, the activity object being the business to be promoted or the product corresponding to the business to be promoted, and the image attributes of the activity object including the size, shape, color of the activity object and text obtained by image recognition; generating a second subtext based on the text of the image feature corresponding to the image attribute; Classify the first subtext and the second subtext to obtain at least two types of text sets, and combine text vectors corresponding to the text sets to obtain a first text corresponding to the activity information; Determining, based on the first text, a question about the business to be promoted and a reference answer to the question, wherein the question about the business to be promoted is a question obtained by statistically analyzing a business process or business information of the business to be promoted determined based on the first text; Generate a question-and-answer image based on the question and the reference answer as another activity image; The activity image and the other activity images are combined to obtain a first image corresponding to the activity information, wherein the activity image and the other activity images are combined including: fusing similar images or adjusting image features to a unified style; The character text includes at least two character sub-texts; Searching for historical promotional pages based on the first text, wherein the historical promotional pages include promotional pages with the same activity theme and activity type as those in the first text; Acquire historical figure information of the historical figure from the historical propaganda page, where the historical figure information refers to the information corresponding to the historical figure in the historical propaganda page; Selecting a target character subtext from the character subtext based on a similarity value between the attribute of the historical character information and the attribute of the character subtext, wherein the similarity value between the attribute of the target character subtext and the attribute of the historical character information is greater than a preset threshold; Performing named entity recognition on the target character sub-text to obtain a second text corresponding to the character information; Extracting a face image and a body image from the character image, determining a shooting angle of the promotional character based on the face image and the body image, acquiring a target image template corresponding to the shooting angle from a preset image template, and combining the background in the target image template with the face image and the body image to obtain a second image; Acquire a target text corresponding to the character information and the activity information and a text feature of the target text based on the first text and the second text; Acquire a target image corresponding to the character information and the activity information and an image feature of the target image based on the first image and the second image; Acquire the promotional page style corresponding to the text feature and the image feature based on the page style model; Processing the target text and the target image based on the promotional page style so that the target text and the target image meet the corresponding promotional page style; The step of parsing the promotional file to obtain the character information and activity information of the promotional character includes: The promotional file includes a voice file, the voice file includes voice clips of multiple characters, the voice file fails to be voiceprinted, at least two voice clips are obtained, each voice clip corresponds to an identity identifier and time information, the voice clips are semantically recognized, at least two texts are obtained, the at least two texts are classified, and the character information and activity information of the promotional character are obtained; The promotional file includes texts, and the texts in the promotional file are classified to obtain character texts and activity texts of the promotional characters; the character information of the promotional characters includes the character texts of the promotional characters, and the activity information of the promotional characters includes the activity texts of the promotional characters; The promotional file includes images. The images in the promotional file are classified to obtain the character image and activity image of the promotional character. The character information of the promotional character includes the character image of the promotional character, and the activity information of the promotional character includes the activity image of the promotional character.
2. The method according to claim 1, characterized in that The target text is the text of the promotion page, and the text features of the target text include: activity theme, activity time, activity location, activity object, activity product, business information of the business to be promoted, character introduction information of the promotion figure, and information related to the promotion figure in the business to be promoted; The target image is an image for promoting a business, and image features of the target image include: a product image of the business to be promoted, a question-and-answer image, and a character image of a promotional character.
3. A promotional page generation device based on natural language processing, characterized in that: The device comprises a unit for executing the method according to claim 1 or 2, wherein the device comprises: A receiving unit, configured to receive a promotional page generation request sent by a user, wherein the promotional page generation request includes a promotional file; A parsing unit, used to parse the promotional file to obtain the character information and activity information of the promotional character; An acquisition unit is used to acquire a target text and text features of the target text corresponding to the character information and the activity information, as well as a target image and image features of the target image; and acquire a promotional page style corresponding to the text features and the image features based on a page style model; A generating unit is used to generate a promotional page corresponding to the target text and the target image based on the promotional page style.
4. A computer device, characterized in that: The method comprises a processor, a memory and a communication interface, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program includes instructions for executing the steps in the method according to claim 1 or 2.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which enables a computer to execute to implement the method of claim 1 or 2.
Citation Information
Patent Citations
Advertisement creativity processing method and advertisement creativity processing apparatus
CN106096995A