Cboth generation method and device, electronic equipment and storage medium
By obtaining copywriting requirements data and generating the first content information representing the object content and business field, the problems of low copy accuracy and poor matching in the prior art are solved, and higher copywriting matching and accuracy are achieved.
Patent Information
- Application Number
- CN202311191341.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-14
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, business copywriting generated based on copywriting databases has problems such as low copy accuracy and poor matching between copywriting and demand.
By obtaining copywriting requirements data, the first content information is generated, which represents the object content and corresponding business areas of the description object, and then generates the target copy based on the first content information to ensure that the copywriting is highly correlated with the object content and business areas.
The matching and accuracy of the description objects corresponding to the target copy and copywriting requirement data is improved.
Smart Images

Figure CN119623444A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of Internet technology, and in particular to a method, device, electronic device and storage medium for generating a text. Background Art
[0002] Currently, various types of promotional information are usually placed and set up on Internet platforms such as e-commerce and social media, such as product introductions, shopping advertisements, business promotional pages, etc., in order to achieve the purpose of information release and promotion on the Internet platform.
[0003] Regarding the copy in the above-mentioned promotional information, that is, the text-type descriptive information, in the prior art, a copy library provided by the platform is usually used to generate business copy corresponding to different needs.
[0004] However, in the prior art, the business copy generated based on the copy library is realized by randomly retrieving the alternative copy in the copy library, so there are problems such as low copy accuracy and poor matching between copy and demand. Summary of the invention
[0005] The embodiments of the present disclosure provide a copy generation method, device, electronic device and storage medium to overcome the problems of low accuracy of the generated copy, poor matching between the copy and demand, and the like.
[0006] In a first aspect, an embodiment of the present disclosure provides a method for generating a document, comprising:
[0007] Acquire copy requirement data, the copy requirement data is used to indicate the description object corresponding to the target copy to be generated; generate first content information according to the copy requirement data, the first content information is used to characterize the object content and the corresponding business field of the description object; generate the target copy according to the first content information, the target copy is used to describe the description object in text from at least one feature dimension.
[0008] In a second aspect, an embodiment of the present disclosure provides a copywriting generation device, including:
[0009] An acquisition module, used to acquire text requirement data, wherein the text requirement data is used to indicate a description object corresponding to a target text to be generated;
[0010] A conversion module, used to generate first content information according to the copywriting requirement data, wherein the first content information is used to characterize the object content of the description object and the corresponding business field;
[0011] A generating module is used to generate the target text according to the first content information, wherein the target text is used to describe the description object in words from at least one characteristic dimension.
[0012] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0013] The memory stores computer-executable instructions;
[0014] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the copy generation method described in the first aspect and various possible designs of the first aspect.
[0015] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the copy generation method described in the first aspect and various possible designs of the first aspect is implemented.
[0016] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the text generation method described in the first aspect and various possible designs of the first aspect.
[0017] The copywriting generation method, device, electronic device and storage medium provided in this embodiment obtain copywriting requirement data, the copywriting requirement data is used to indicate the description object corresponding to the target copywriting to be generated; based on the copywriting requirement data, first content information is generated, the first content information is used to characterize the object content of the description object and the corresponding business field; based on the first content information, the target copywriting is generated, the target copywriting is used to describe the description object in words from at least one characteristic dimension. By parsing the copywriting requirement data into the first content information that characterizes the object content and the corresponding business field, and then generating the target copywriting based on the first content information, the generated target copywriting can be highly related to the object content and the business field, thereby improving the matching degree and accuracy of the target copywriting and the description object corresponding to the copywriting requirement data. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present disclosure 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 some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0019] Figure 1 An application scenario diagram of the copywriting generation method provided in the embodiment of the present disclosure;
[0020] Figure 2 A schematic diagram of the process of the copywriting generation method provided in the embodiment of the present disclosure Figure 1 ;
[0021] Figure 3 A schematic diagram of a process for generating a target document provided by an embodiment of the present disclosure;
[0022] Figure 4 for Figure 2 A flowchart of a specific implementation method of step S103 in the illustrated embodiment;
[0023] Figure 5 A schematic diagram of another process of generating a target document provided by an embodiment of the present disclosure;
[0024] Figure 6 A schematic diagram of the process of the copywriting generation method provided in the embodiment of the present disclosure Figure 2 ;
[0025] Figure 7 for Figure 6 A flowchart of a specific implementation method of step S206 in the illustrated embodiment;
[0026] Figure 8 for Figure 7 A flowchart of a specific implementation method of step S2062 in the illustrated embodiment;
[0027] Fig. 9 A schematic diagram of a process for iteratively determining text areas corresponding to each level identifier provided in an embodiment of the present disclosure;
[0028] Fig.10 A structural block diagram of a text generation device provided in an embodiment of the present disclosure;
[0029] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure;
[0030] Fig.12 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0032] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0033] The application scenarios of the embodiments of the present disclosure are explained below:
[0034] Figure 1 This is an application scenario diagram of the text generation method provided in the embodiment of the present disclosure. The text generation method provided in the embodiment of the present disclosure can be applied to applications with text generation functions and text template generation. More specifically, it can be applied to application scenarios such as page advertisement template design. The execution subject of this embodiment can be a terminal device running the above-mentioned application with text generation function, or a platform server (referred to as server) running the server corresponding to the above-mentioned application, or other electronic devices with similar functions. Reference Figure 1 As shown in , taking the server as an example, after receiving the copy demand data sent by the terminal device, the server processes the copy demand data based on the copy generation method provided in this embodiment, generates a copy template that matches the copy demand data, and returns it to the terminal device, so that the terminal device (the user on one side) obtains automatically generated personalized copy. Among them, the copy demand data is, for example, a product picture, and the copy template obtained by the terminal device may include descriptive text for the product in the product image, such as advertising words, titles, promotional activity rules, etc., and may also include a combination of the above descriptive text and the product picture, that is, a graphic template for the above product. Afterwards, the terminal device can further adjust as needed based on the above copy template, generate a promotional page containing the above personalized copy, and put it on the Internet platform to achieve the purposes of advertising, product display, etc.
[0035] In the prior art, in the process of generating output copy or graphic page, the generation of copy is usually based on the copy library provided by the server, that is, after specifying the target object on the server side, the server randomly retrieves one or more descriptive texts from the copy library, and after combining them (if necessary), generates the output text. Since the above process has a certain degree of randomness, the generated copy has problems such as low copy accuracy and poor matching between the copy and the demand.
[0036] The embodiment of the present disclosure provides a method for generating a document to solve the above-mentioned problem.
[0037] refer to Figure 2 , Figure 2 A schematic diagram of the process of the copywriting generation method provided in the embodiment of the present disclosure Figure 1 The method of this embodiment can be applied in a server, and the copywriting generation method includes:
[0038] Step S101: Acquire text requirement data, where the text requirement data is used to indicate a description object corresponding to a target text to be generated.
[0039] Step S102: Generate first content information according to the copywriting requirement data, where the first content information is used to characterize the object content of the description object and the corresponding business field.
[0040] For example, reference Figure 1 The application scenario diagram shown in the figure takes the server as the execution subject as an example. The server receives the text demand data sent by the terminal device and processes it. Among them, in one possible implementation, the text demand data may include a demand image, more specifically, a product introduction picture, a product display picture, etc. Among them, the main image element described in the demand image is the description object, and the target text subsequently generated based on the text demand data is the information for introducing the description object, that is, Figure 1 The copy template in the scene diagram shown. Afterwards, the server parses and identifies the above-mentioned demand image to generate the first content information. In another possible implementation, the copy demand data may include text for describing user needs, such as the character string "generate copy about mobile phone product promotion". In this embodiment, the description object indicated by the copy demand data is "mobile phone". Afterwards, the server processes the text describing the user needs to generate the first content information. In another possible implementation, the copy demand data includes both the demand image and the above-mentioned descriptive text. Among them, the server processes the image or text to obtain the specific implementation method of the description object indicated therein, which is a prior art, for example, it can be implemented through a pre-trained image recognition model or a language recognition model, which will not be repeated here. According to different implementation methods of the copy requirement data, there are three possible copy generation scenarios corresponding to "text-text" (that is, the copy requirement data includes or represents text), "image-text" (that is, the copy requirement data includes or represents image), and "picture-text" (that is, the copy requirement data includes or represents text and image). Regardless of the method in which the copy requirement data is implemented, the processing steps for the copy requirement data are similar. Therefore, in the subsequent embodiments, one of them is mainly used as an example for introduction. The processing steps of other implementation methods of the copy requirement data are similar and will not be repeated.
[0041] Furthermore, after obtaining the copywriting demand data, the server processes it to generate the first content information representing the object content of the description object and the corresponding business field. Among them, the object content of the description object can be objective description information for the description object, such as the appearance, category, brand, etc. of the description object. The business field represents the classification of the industry and field dimensions to which the description object belongs. For example, business fields include: clothing, shoes and hats, food and beverages, office business, consumer electronics, etc. Among them, since the business field is usually a field category divided from a business perspective, and is usually divided based on experience and needs, the specific implementation method of the business field is not limited here. In one possible implementation method, the server processes the copywriting demand data through a pre-trained model to obtain the object content representing the description object and the identifier of the corresponding business field, which is the first content information.
[0042] In a possible implementation, the copy requirement data includes an image tag, and the description object is the required image; the image tag includes a content subtag and a domain subtag, and the tag value of the content subtag is used to characterize the image content of the required image; the tag value of the domain subtag is used to characterize the business field corresponding to the image content. Accordingly, the specific implementation of step S102 includes: generating the first content information according to the content subtag and the domain subtag. Exemplarily, the first content information can be obtained by combining the content subtag and the domain subtag. Further, in a possible implementation, the copy requirement data is generated by the required image. For example, after the server receives the required image sent by the terminal device, it processes the required image to obtain the copy requirement data containing the image tag.
[0043] Step S103: Generate a target text based on the first content information, where the target text is used to describe the description object from at least one feature dimension.
[0044] Exemplarily, after obtaining the first content information, text generation can be performed based on the image content and business field represented by the first content information, thereby obtaining a text description of the description object indicated by the copy requirement data, that is, the target copy. The target copy describes the description object in text from at least one feature dimension, and the feature dimension includes, for example, the appearance, price, and usage experience of the description object, so that the target copy can introduce and promote the content of the description object in a manner that is adapted to the business field in which the description object is located. Specifically, for example, the first content information includes a content identifier representing the image content, and a domain identifier representing the business field. The first content information including the content identifier and the domain identifier is input into a pre-trained language generation model to obtain a descriptive text that introduces the content in a manner that is adapted to the business field, that is, the target copy. Figure 3A schematic diagram of a process of generating a target copy provided by an embodiment of the present disclosure, such as Figure 3 As shown, based on the first content information, when the server obtains the first content information Info_1 (shown as Info_1 in the figure) based on the copy demand data, the first content information Info_1 includes an identifier A representing the image content and an identifier B representing the business field, wherein, specifically, identifier A, for example, represents that the image contains the image elements "people" and "mobile phone"; identifier B represents "consumer electronics". In this case, the server inputs the language generation model according to the first content information Info_1 to generate the target copy #1, and specifically, the content of the target copy #1 is, for example, "XX smart phone, shockingly launched". When the server obtains the first content information Info_2 (shown as Info_2 in the figure) based on the copy demand data, the first content information Info_2 includes an identifier C representing the image content and an identifier D representing the business field, wherein, specifically, identifier C, for example, represents that the image contains the image elements "people" and "X boots"; identifier D represents "clothing, shoes and hats". In this case, the server inputs the language generation model according to the first content information Info_2, and generates target copy #2. Specifically, the content of target copy #2 is, for example, "X boots are on sale."
[0045] It should be noted that the "X" in this embodiment can be a placeholder in the text, or any other identifier that serves as a placeholder. In the target text that is finally generated, the original "X" can appear, or "X" can be replaced by other identifiers. After the execution of this embodiment is completed and the target text is generated, the user can replace the "X" identifier in the target text as needed, so as to generate a personalized text that meets the needs. The meaning of the "X" identifier that appears in subsequent embodiments is the same, and the "X" identifier will not be repeatedly described.
[0046] Furthermore, in another possible implementation, as Figure 4 As shown, the specific implementation of step S103 includes:
[0047] Step S1031: obtaining second content information according to the first content information, wherein the second content information represents a target use of a text description for a description object.
[0048] Step S1032: Obtain a usage keyword corresponding to the target usage according to the second content information.
[0049] Step S1033: Generate target copy based on the purpose keywords.
[0050] Exemplarily, after the server obtains the first content information, it can further determine the corresponding second content information based on the first content information, wherein the second content information represents the target purpose of the text description of the description object, specifically, the target purpose includes, for example, product display, event promotion, business users, etc., and accordingly, the second content information can include an identifier representing the above target purpose. In a possible implementation, the second content purpose has a fixed mapping relationship with the first content information, that is, after the server obtains the first content information, it can obtain the corresponding second content information based on a preset mapping table, and the mapping table can be pre-configured, and this implementation is not repeated. In another possible implementation, the server determines a preset logical purpose set according to the first content information, and the purpose set includes a variety of text description purposes, such as product display, event promotion, business users, etc. Afterwards, the server determines the target purpose indicated by the first reference information in the purpose set according to the first reference information, wherein the first reference information can be randomly generated or determined based on a user instruction sent by the terminal device, which is not limited here.
[0051] Furthermore, after obtaining the second content information representing the target purpose, the target purpose is further refined to obtain a purpose keyword representing a secondary purpose (sub-purpose). For example, for the second content information representing the target purpose as "activity promotion", the corresponding purpose keywords include: key_1 (representing the extent of price reduction), key_2 (representing discount), key_3 (representing gift giving), etc. Similarly, the purpose keyword corresponding to the target purpose can be randomly selected from all the purpose keywords corresponding to the target purpose, and at least one purpose keyword corresponding to the target purpose can be selected as the purpose keyword corresponding to the target purpose based on the second reference information. The purpose keyword specified by the second reference information can also be selected from all the purpose keywords corresponding to the target purpose based on the second reference information as the purpose keyword corresponding to the target purpose. The second reference information can be randomly generated or determined based on a user instruction sent by the terminal device, which is not limited here.
[0052] Figure 5 Another schematic diagram of a process for generating a target document provided by an embodiment of the present disclosure is as follows: Figure 5As shown, after the server obtains the first content information Info_1 (shown as Info_1 in the figure) based on the copy demand data, it further obtains the second content information info_3 (shown as Info_3 in the figure) representing the target purpose based on the first content information Info_1; then, from the N purpose keywords corresponding to the second content information info_3 (shown as key_1, key_2, ..., key_N in the figure), based on the second reference information, the target purpose keywords, namely, keyword key_1 and keyword key_3 (shown as key_1 and key_3 in the figure). Among them, keyword key_1 represents "price reduction"; keyword key_3 represents "gift"; then keyword key_1 and keyword key_3 are input into the language generation model to generate target copy #3. Specifically, the content of target copy #3 is, for example, "XX smartphone, price reduction of X, and gift of XXX".
[0053] In this embodiment, by generating second content information representing the target purpose and generating a target copy based on the purpose keyword corresponding to the second content information, the purpose of the target copy can be further clarified, thereby further improving the accuracy of the target copy.
[0054] Optionally, before step S1033, the method further includes:
[0055] Step S1030: Obtain the fixed text corresponding to the purpose keyword.
[0056] Accordingly, the specific implementation of step S1033 includes:
[0057] Generate targeted copy based on fixed text and purpose keywords.
[0058] Exemplarily, after obtaining the purpose keyword according to the second content information, in order to further improve the accuracy of the generated target copy, the server further matches the corresponding fixed text for the purpose keyword to achieve supplementary explanations for the purpose keyword and enrich the content of the target copy. For example, when the purpose keyword includes key_1 (representing the countdown of the activity), the server matches the corresponding fixed text "X days" for the purpose keyword key_1, so that the target copy finally generated includes descriptive text representing "activity countdown" and "X days" at the same time; for another example, when the purpose keyword includes key_2 (representing a discount or price reduction), the server matches the corresponding fixed text "X% discount" for the purpose keyword key_2, so that the target copy finally generated includes descriptive text representing "discount or price reduction" and "X% discount" at the same time. In this embodiment, by obtaining the fixed text corresponding to the purpose keyword and generating the target copy based on the purpose keyword and the corresponding fixed text, the integrity and accuracy of the target copy are improved.
[0059] refer to Figure 6 , Figure 6 A schematic diagram of the process of the copywriting generation method provided in the embodiment of the present disclosure Figure 2 In this embodiment Figure 2 Based on the embodiment shown, step S103 is further refined, and the copywriting generation method includes:
[0060] Step S201: Acquire text requirement data, where the text requirement data is used to indicate a description object corresponding to a target text to be generated.
[0061] Step S202: Generate first content information according to the copywriting requirement data, where the first content information is used to characterize the object content of the description object and the corresponding business field.
[0062] Step S203: Determine at least one target copywriting level from at least two preset copywriting levels according to the first content information.
[0063] Step S204: Generate corresponding description text for each target copywriting level.
[0064] Step S205: Generate a target copy based on each description text.
[0065] Exemplarily, the target copy includes at least two copy levels. The copy levels are the result of division based on the content and function of each part of the target copy. The copy levels include, for example, main title (level, the same below), subtitle, text, guide copy, advertising information, decorative text, etc. Alternatively, the copy level can also be represented by logical identifiers, for example, level I, level II, level III, etc. Among them, each copy level corresponds to a description text, for example, the description text corresponding to the main title (or level I) copy level is "Remind your work efficiency!" For another example, the description text corresponding to the subtitle (or level II) copy level is "XX's latest laptop, called your efficient work assistant." Based on the above introduction to the copy level, after obtaining the first content information, the server determines at least one target copy level that matches it according to the object content represented by the first content information and the corresponding business field, and then generates a corresponding description text for each target copy level, and in subsequent steps, constructs the target copy through the description text corresponding to each target copy level. For example, for the first content information Info_1, the server determines (from all the copywriting levels) that the 1st level and the 3rd level are the corresponding target copywriting levels, and generates the description text text_1 corresponding to the 1st level and the description text text_3 corresponding to the 3rd level accordingly. Wherein, exemplarily. The description text text_1 corresponding to the 1st level is the main title in the target copywriting; the description text text_3 corresponding to the 3rd level is the product introduction text in the target copywriting. And for the first content information Info_2, the server determines (from all the copywriting levels) that the 1st level, the 2nd level, and the 3rd level are the corresponding target copywriting levels, and generates the description text text_1 corresponding to the 1st level, the description text text_2 corresponding to the 2nd level, and the description text text_3 corresponding to the 3rd level accordingly. Wherein, exemplarily. The description text text_1 corresponding to the 1st level is the main title in the target copywriting; the description text text_2 corresponding to the 2nd level is the subtitle in the target copywriting, and the description text text_3 corresponding to the 3rd level is the product introduction text in the target copywriting. That is, the target text generated based on the first content information Info_2 has an additional description text text_2 corresponding to the subtitle compared to the target text generated based on the first content information Info_1.
[0066] Among them, based on the implementation method of the first content information, the mapping relationship between the first content information and the corresponding target copy level can be determined based on a preset first mapping rule. The first mapping rule can be set as needed and will not be described one by one here.
[0067] Exemplarily, further, after obtaining the description text corresponding to each target copy level, the description text is combined in combination with the level identifier corresponding to each target copy level to generate the target copy. It should be noted that the specific method of generating the description text in this embodiment can be based on the text generation rules corresponding to each target copy level to generate the corresponding description text. More specifically, the object content and business field represented by the first content information can be processed according to the text generation rules corresponding to the target copy level to obtain the corresponding description text. The specific implementation method of generating the description text can refer to Figure 2 The specific implementation process of generating the target copy in the embodiment shown in the figure ( Figure 4 and Figure 5 The specific implementation process will not be described in detail.
[0068] Step S206: obtaining text parameters of the description text corresponding to each target copy level.
[0069] Exemplarily, after determining each text level, the text parameters of the description text corresponding to each target copy level can be further obtained based on the first content information and / or the second content information in the above embodiment, wherein the text parameters are parameters used to characterize the display style of the description text in the graphic template, and the graphic template is a template generated by inserting the target copy into the image and containing an image and text. In a possible implementation, the copy requirement data includes a required image. The graphic template is generated by inserting the target copy into the required image.
[0070] Further, exemplarily, the text parameters include at least one of the following: text position, text area, text size, text color, text font, text direction, etc. Through the text parameters, the following settings for the description text can be implemented, for example, the text position of the description text corresponding to the main title is set to the upper left corner P1 point of the required image, the text color is red, and the text font is Songti. For another example, the text area of the description text corresponding to the subtitle is set to the [x1, x2, y1, y2] area of the required image (x1, x2, y1, y2 are the four vertices of the rectangular area respectively), the text color is black, and the text font size is 10. Among them, in one possible implementation method, the text parameters of the description text corresponding to each target copy level can be generated based on the text content of the description text, can be set based on user instructions, or can be iteratively generated based on the text parameters corresponding to each target copy level. The following is a detailed introduction to the method of iteratively generating text parameters corresponding to each target copy level.
[0071] For example, Figure 7 As shown, the specific implementation of step S206 includes:
[0072] Step S2061: obtaining a copy level sequence according to the level identifiers of each target copy level, wherein the copy level sequence includes at least two level identifiers arranged in order.
[0073] Step S2062: iteratively obtaining text parameters corresponding to each level identifier in the text level sequence, wherein the text parameter corresponding to the next level identifier in the text level sequence is determined based on the text parameter corresponding to the previous level identifier.
[0074] Exemplarily, for example, the target text level determined by the first content information includes text level 1, text level 2, text level 3 and text level 5. Based on the level identifiers of each target text level, the text level sequence obtained is list_1 = [#1, #2, #3, #5]. Among them, the sequence values #1, #2, #3, and #5 in the text level sequence are the level identifiers of text level 1, text level 2, text level 3 and text level 5, respectively. It can be understood that the implementation method of the above-mentioned level identifier is only exemplary, and the specific implementation method can be set as needed, which will not be repeated. Afterwards, the text parameters corresponding to each level identifier in the copy hierarchy sequence are obtained iteratively in turn. For example, the text parameters corresponding to #1 are obtained first. Exemplarily, the text parameters corresponding to #1 are A (initialization value); then, the text parameters corresponding to #2 are obtained. The text parameters corresponding to #2 are B determined based on the text parameters A corresponding to #1, that is, the text parameters corresponding to #2 are B=func(A), where func() is a mapping function between the text parameters corresponding to the latter level identifier and the text parameters corresponding to the previous level identifier. Furthermore, the text parameters corresponding to #3 are C determined based on the text parameters B corresponding to #2. And so on, so as to determine the text parameters for each level identifier in the copy hierarchy sequence, that is, the text parameters of the description text corresponding to each target copy hierarchy.
[0075] More specifically, the text parameter example includes font transparency. For example, the font transparency corresponding to level identifier #1 is 0% (initial value, representing 0% transparency); the font transparency corresponding to level identifier #2 is the font transparency corresponding to level identifier #1 + 20%, that is, 20% (representing 20% transparency); the font transparency corresponding to level identifier #3 is the font transparency corresponding to level identifier #2 + 20%, that is, 40% (representing 40% transparency), and so on, to determine the text parameters (font transparency) of each level identifier in the copywriting level sequence.
[0076] Furthermore, in another possible implementation, the text parameter includes a text area, such as Figure 8 As shown, the specific implementation of step S2062 includes:
[0077] Step S2062A: Initialize the current image area and the current level identifier, wherein the current image area is the entire image area of the required image; and the current level identifier is the first level identifier in the text level sequence.
[0078] Step S2062B: Acquire the current image area, and determine the text area corresponding to the current level identifier based on the current image area and the description text corresponding to the current level identifier.
[0079] Step S2062C: Segment the image area corresponding to the text area from the current image area to obtain the remaining image area, and update the current image area to the remaining image area.
[0080] Step S2062D: Update the current level identifier to the next level identifier of the current level identifier in the document level sequence.
[0081] Step S2062E: If the current level identifier exceeds the last level identifier in the text level sequence, the loop ends; otherwise, the loop returns to step S2062B.
[0082] Fig. 9 A schematic diagram of iteratively determining the text area corresponding to each level mark provided in the embodiment of the present disclosure is shown below in combination with Fig. 9 The above embodiments are described in detail. Fig. 9 As shown, exemplarily, first, based on the required image and the text level sequence list=[#1,#2,#3] obtained in the previous step, the current image area and the current level identifier are used to obtain the current image area P_zoon_1 and the current level identifier #1; then, a region matching the description text text_1 corresponding to the current level identifier #1 is determined from the current image area P_zoon_1, namely, the text region K_zoon_1. There are many specific implementation methods for determining a region matching the description text corresponding to the current level identifier #1 in the current image area P_zoon_1, for example, by detecting a blank region (i.e., a region that does not contain important image elements, such as a person's head, torso, or an object) in the current image area P_zoon_1, to determine the text region K_zoon_1 corresponding to the current level identifier. Alternatively, based on the positional relationship of the image elements in the current image area P_zoon_1, the text region K_zoon_1 corresponding to the current level identifier is determined from the perspective of composition aesthetics. The specific implementation of determining the text area K_zoon_1 corresponding to the current level identifier can be achieved through a pre-trained image processing model, which will not be described in detail here.
[0083] Further, from the current image area P_zoon_1, the text area K_zoon_1 corresponding to the text area is segmented to obtain the remaining image area, and the current image area P_zoon_1 is updated to the remaining image area, that is, the current image area P_zoon_2 is obtained, and the current level identifier #1 is updated to the current level identifier #2 (the next level identifier of the current level identifier in the copywriting level sequence). After that, the above steps are looped to determine the text area K_zoon_2 from the current image area P_zoon_2, that is, the area corresponding to the description text text_2 in the required image, and then the text area K_zoon_2 is segmented from the current image area P_zoon_2 to obtain the updated current image area P_zoon_3, and the above steps are repeated to obtain the text area K_zoon_3, that is, the area corresponding to the description text text_2 in the required image. The current level identifier #3 corresponding to the text area K_zoon_3 is the last target level identifier in the copywriting level sequence, and then the loop ends, completing the process of iteratively determining the text area corresponding to each level identifier.
[0084] In the steps of this embodiment, since the text area corresponding to each target text level is not determined before the required image is actually inserted (affected by factors such as font size), it is impossible to obtain the optimal text area in one go. In the steps of this embodiment, the text area (text parameters) corresponding to each target level identifier is obtained in turn by iterative recursion, thereby achieving the dynamic optimization result of the text area, thereby improving the rationality of the text area where the description text corresponding to each target text level is located, and then improving the visual effect of the final generated copy template. At the same time, the steps provided in this embodiment can also be applied to other text parameters, such as text size, text direction, etc., which will not be repeated here.
[0085] Step S207: Based on the text parameters, the target text is inserted into the required image to generate a graphic template.
[0086] Exemplarily, after obtaining the text parameters corresponding to each target copy level, the description text of each target copy level is rendered based on the text parameters, and the required image is inserted to obtain the graphic template. Since the above-mentioned steps of setting and obtaining the text parameters have been passed, the description text of each target copy level can be set at a reasonable position in the required image, so that the graphic template has a better visual effect and reduces the secondary modification of the graphic template in the later stage.
[0087] In this embodiment, the implementation method of step S201-step S202 is the same as that of the present disclosure. Figure 2 The implementation methods of step S101 and step S102 in the illustrated embodiment are the same and will not be described in detail here.
[0088] Corresponding to the copywriting generation method of the above embodiment, Fig.10 This is a structural block diagram of a text generation device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown.
[0089] Reference Fig.10 , the copywriting generating device 3 comprises:
[0090] An acquisition module 31 is used to acquire text requirement data, where the text requirement data is used to indicate a description object corresponding to a target text to be generated;
[0091] A conversion module 32, used to generate first content information according to the copywriting requirement data, where the first content information is used to characterize the object content of the description object and the corresponding business field;
[0092] The generating module 33 is used to generate a target text according to the first content information, where the target text is used to describe the description object in words from at least one feature dimension.
[0093] In one embodiment of the present disclosure, the generation module 33 is specifically used to: obtain second content information based on first content information, the second content information representing a target purpose of textual description of the description object; obtain a purpose keyword corresponding to the target purpose based on the second content information; and generate a target copy based on the purpose keyword.
[0094] In one embodiment of the present disclosure, when the generation module 33 generates the target copy based on the purpose keyword, it is specifically used to: obtain at least two corresponding text segments based on the purpose keyword and the first content information, the text segments are used to represent the text description matching the object content and the business field, and the at least two text segments are respectively used to realize the sub-purposes constituting the target purpose; based on the combination of at least one text segment, obtain the target copy.
[0095] In one embodiment of the present disclosure, the generation module 33 is further used to: obtain a fixed text corresponding to the purpose keyword; when the generation module 33 generates a target copy according to the purpose keyword, it is specifically used to: generate the target copy based on the fixed text and the purpose keyword.
[0096] In one embodiment of the present disclosure, the target copy includes at least two copy levels; the generation module 33 is specifically used to: determine at least one target copy level from at least two preset copy levels according to the first content information; generate corresponding description texts for each target copy level; and generate the target copy based on each description text.
[0097] In one embodiment of the present disclosure, the copy requirement data includes a requirement image; the generation module 33 is also used for at least one of the following: obtaining text parameters of the description text corresponding to each target copy level; based on the text parameters, inserting the target copy into the requirement image to generate a graphic template; wherein the text parameters include at least one of the following: text position, text size, text color, text font, and text direction.
[0098] In one embodiment of the present disclosure, when obtaining the text parameters of the description text corresponding to each target copy level, the generation module 33 is specifically used to: obtain a copy level sequence according to the level identifier of each target copy level, wherein the copy level sequence includes at least two level identifiers arranged in order; iteratively obtain the text parameters corresponding to each level identifier in the copy level sequence in turn, wherein the text parameters corresponding to the next level identifier in the copy level sequence are determined based on the text parameters corresponding to the previous level identifier.
[0099] In one embodiment of the present disclosure, the text parameters include a text area. When the generation module 33 sequentially iterates and obtains the text parameters corresponding to each level identifier in the text level sequence, it is specifically used to: initialize the current image area and the current level identifier, wherein the current image area is the entire image area of the required image; the current level identifier is the first level identifier in the text level sequence; loop the following steps until the current level identifier exceeds the last level identifier in the text level sequence: obtain the current image area, and determine the text area corresponding to the current level identifier based on the description text corresponding to the current image area and the current level identifier; from the current image area, segment the image area corresponding to the text area to obtain the remaining image area, and update the current image area to the remaining image area; update the current level identifier to the next level identifier of the current level identifier in the text level sequence.
[0100] In one embodiment of the present disclosure, the copy requirement data includes an image tag, which describes the required image; the image tag includes a content sub-tag and a domain sub-tag, and the tag value of the content sub-tag is used to characterize the image content of the required image; the tag value of the domain sub-tag is used to characterize the business field corresponding to the image content; the conversion module 32 is specifically used to: generate the first content information according to the content sub-tag and the domain sub-tag.
[0101] The acquisition module 31, the conversion module 32 and the generation module 33 are connected in sequence. The text generation device 3 provided in this embodiment can implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be described in detail in this embodiment.
[0102] Fig.11 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure is shown in FIG. Fig.11 As shown, the electronic device 4 includes:
[0103] A processor 41, and a memory 42 communicatively connected to the processor 41;
[0104] The memory 42 stores computer executable instructions;
[0105] The processor 41 executes the computer execution instructions stored in the memory 42 to implement the following Figure 2-Figure 9 The text generation method in the illustrated embodiment.
[0106] Optionally, the processor 41 and the memory 42 are connected via a bus 43 .
[0107] For related instructions, please refer to Figure 2-Figure 9 The relevant descriptions and effects corresponding to the steps in the corresponding embodiments can be understood, and no further elaboration is made here.
[0108] The present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which are used to implement the present invention when executed by a processor. Figure 2-Figure 9 The copywriting generation method provided in any one of the corresponding embodiments.
[0109] In order to implement the above embodiment, the embodiment of the present disclosure also provides an electronic device.
[0110] refer to Fig.12 , which shows a schematic diagram of the structure of an electronic device 900 suitable for implementing the embodiment of the present disclosure, and the electronic device 900 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.12 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0111] like Fig.12As shown, the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 to a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0112] Typically, the following devices may be connected to the I / O interface 905: input devices 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 908 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.12 The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0113] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0114] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0115] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0116] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0117] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0118] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0119] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0120] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0121] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0122] In a first aspect, according to one or more embodiments of the present disclosure, a method for generating a document is provided, comprising:
[0123] Acquire copy requirement data, the copy requirement data is used to indicate the description object corresponding to the target copy to be generated; generate first content information according to the copy requirement data, the first content information is used to characterize the object content and the corresponding business field of the description object; generate the target copy according to the first content information, the target copy is used to describe the description object in text from at least one feature dimension.
[0124] According to one or more embodiments of the present disclosure, generating the target copy based on the first content information includes: obtaining second content information based on the first content information, the second content information representing a target purpose of textual description of the description object; obtaining a purpose keyword corresponding to the target purpose based on the second content information; and generating the target copy based on the purpose keyword.
[0125] According to one or more embodiments of the present disclosure, generating the target copy based on the purpose keyword includes: obtaining at least two corresponding text segments based on the purpose keyword and the first content information, the text segments are used to represent text descriptions that match the object content and the business field, and the at least two text segments are respectively used to implement sub-purposes that constitute the target purpose; and obtaining the target copy based on a combination of the at least one text segment.
[0126] According to one or more embodiments of the present disclosure, it further includes: acquiring a fixed text corresponding to the purpose keyword; generating the target copy according to the purpose keyword includes: generating the target copy based on the fixed text and the purpose keyword.
[0127] According to one or more embodiments of the present disclosure, the target copy includes at least two copy levels; generating the target copy according to the first content information includes: determining at least one target copy level from at least two preset copy levels according to the first content information; generating a corresponding description text for each of the target copy levels; and generating the target copy based on each of the description texts.
[0128] According to one or more embodiments of the present disclosure, the copy requirement data includes a requirement image; the method further includes at least one of the following: obtaining text parameters of the description text corresponding to each target copy level; based on the text parameters, inserting the target copy into the requirement image to generate a graphic template; wherein the text parameters include at least one of the following: text position, text size, text color, text font, and text direction.
[0129] According to one or more embodiments of the present disclosure, obtaining text parameters of description texts corresponding to each target copy level includes: obtaining a copy level sequence according to the level identifiers of each target copy level, wherein the copy level sequence includes at least two of the level identifiers arranged in order; and iterating in sequence to obtain text parameters corresponding to each level identifier in the copy level sequence, wherein the text parameters corresponding to the next level identifier in the copy level sequence are determined based on the text parameters corresponding to the previous level identifier.
[0130] According to one or more embodiments of the present disclosure, the text parameters include a text area, and the iterative acquisition of the text parameters corresponding to each level identifier in the text level sequence includes: initializing the current image area and the current level identifier, wherein the current image area is the entire image area of the required image; the current level identifier is the first level identifier in the text level sequence; and looping the following steps until the current level identifier exceeds the last level identifier in the text level sequence: acquiring the current image area, and determining the text area corresponding to the current level identifier based on the description text corresponding to the current image area and the current level identifier; segmenting the image area corresponding to the text area from the current image area to obtain the remaining image area, and updating the current image area to the remaining image area; and updating the current level identifier to the next level identifier of the current level identifier in the text level sequence.
[0131] According to one or more embodiments of the present disclosure, the copywriting requirement data includes an image tag, and the description object is the required image; the image tag includes a content sub-tag and a domain sub-tag, and the tag value of the content sub-tag is used to characterize the image content of the required image; the tag value of the domain sub-tag is used to characterize the business field corresponding to the image content; generating the first content information according to the copywriting requirement data includes: generating the first content information according to the content sub-tag and the domain sub-tag.
[0132] In a second aspect, according to one or more embodiments of the present disclosure, a copywriting generation device is provided, comprising:
[0133] An acquisition module, used to acquire text requirement data, wherein the text requirement data is used to indicate a description object corresponding to a target text to be generated;
[0134] A conversion module, used to generate first content information according to the copywriting requirement data, wherein the first content information is used to characterize the object content of the description object and the corresponding business field;
[0135] A generating module is used to generate the target text according to the first content information, wherein the target text is used to describe the description object in words from at least one characteristic dimension.
[0136] According to one or more embodiments of the present disclosure, the generation module is specifically used to: obtain second content information based on the first content information, the second content information representing a target purpose of textual description of the description object; obtain a purpose keyword corresponding to the target purpose based on the second content information; and generate the target copy based on the purpose keyword.
[0137] According to one or more embodiments of the present disclosure, when the generation module generates the target copy according to the purpose keyword, it is specifically used to: obtain at least two corresponding text segments according to the purpose keyword and the first content information, the text segments are used to represent the text description matching the object content and the business field, and the at least two text segments are respectively used to realize the sub-purposes constituting the target purpose; based on the combination of the at least one text segment, obtain the target copy.
[0138] According to one or more embodiments of the present disclosure, the generation module is further used to: obtain a fixed text corresponding to the purpose keyword; when the generation module generates the target copy according to the purpose keyword, it is specifically used to: generate the target copy based on the fixed text and the purpose keyword.
[0139] According to one or more embodiments of the present disclosure, the target copy includes at least two copy levels; the generation module is specifically used to: determine at least one target copy level from at least two preset copy levels according to the first content information; generate a corresponding description text for each of the target copy levels; and generate the target copy based on each of the description texts.
[0140] According to one or more embodiments of the present disclosure, the copy requirement data includes a requirement image; the generation module is also used for at least one of the following: obtaining text parameters of the description text corresponding to each target copy level; based on the text parameters, inserting the target copy into the requirement image to generate a graphic template; wherein the text parameters include at least one of the following: text position, text size, text color, text font, and text direction.
[0141] According to one or more embodiments of the present disclosure, when obtaining the text parameters of the description text corresponding to each target copy level, the generation module is specifically used to: obtain a copy level sequence according to the level identifier of each target copy level, wherein the copy level sequence includes at least two of the level identifiers arranged in order; and iteratively obtain the text parameters corresponding to each level identifier in the copy level sequence in sequence, wherein the text parameters corresponding to the next level identifier in the copy level sequence are determined based on the text parameters corresponding to the previous level identifier.
[0142] According to one or more embodiments of the present disclosure, the text parameters include a text area, and the generation module is specifically used to iteratively obtain the text parameters corresponding to each level identifier in the copy hierarchy sequence, and is specifically used to: initialize the current image area and the current level identifier, wherein the current image area is the entire image area of the required image; the current level identifier is the first level identifier in the copy hierarchy sequence; and loop the following steps until the current level identifier exceeds the last level identifier in the copy hierarchy sequence: obtain the current image area, and determine the text area corresponding to the current level identifier based on the description text corresponding to the current image area and the current level identifier; from the current image area, segment the image area corresponding to the text area to obtain the remaining image area, and update the current image area to the remaining image area; update the current level identifier to the next level identifier of the current level identifier in the copy hierarchy sequence.
[0143] According to one or more embodiments of the present disclosure, the copy requirement data includes an image tag, and the description object is the required image; the image tag includes a content sub-tag and a domain sub-tag, and the tag value of the content sub-tag is used to characterize the image content of the required image; the tag value of the domain sub-tag is used to characterize the business field corresponding to the image content; the conversion module is specifically used to: generate the first content information according to the content sub-tag and the domain sub-tag.
[0144] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0145] The memory stores computer-executable instructions;
[0146] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the copy generation method described in the first aspect and various possible designs of the first aspect.
[0147] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the copy generation method described in the first aspect and various possible designs of the first aspect is implemented.
[0148] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the copy generation method described in the first aspect and various possible designs of the first aspect.
[0149] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0150] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0151] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A copywriting generation method, characterized in that: include: Acquire text requirement data, where the text requirement data is used to indicate a description object corresponding to a target text to be generated; Generate first content information according to the copywriting requirement data, where the first content information is used to characterize the object content of the description object and the corresponding business field; The target text is generated according to the first content information, and the target text is used to describe the description object in words from at least one feature dimension.
2. The method according to claim 1, characterized in that Generating the target copy according to the first content information includes: Obtaining second content information according to the first content information, wherein the second content information represents a target use of a text description of the description object; Obtaining a usage keyword corresponding to the target usage according to the second content information; The target copy is generated according to the usage keyword.
3. The method according to claim 2, characterized in that The step of generating the target copy according to the usage keyword includes: According to the purpose keyword and the first content information, at least two corresponding text segments are obtained, wherein the text segments are used to represent text descriptions that match the object content and the business field, and the at least two text segments are respectively used to realize sub-purposes constituting the target purpose; The target copy is obtained based on the combination of the at least one text segment.
4. The method according to claim 2, characterized in that: Also includes: Obtaining fixed text corresponding to the purpose keyword; The step of generating the target copy according to the usage keyword includes: The target copy is generated based on the fixed text and the purpose keyword.
5. The method according to claim 1, characterized in that The target copy includes at least two copy levels; generating the target copy according to the first content information includes: Determining at least one target copywriting level from at least two preset copywriting levels according to the first content information; For each target copywriting level, generate a corresponding description text; Based on each of the description texts, the target text is generated.
6. The method according to claim 5, characterized in that The copywriting requirement data includes a required image; and the method further includes at least one of the following: Obtain the text parameters of the description text corresponding to each target copywriting level; Based on the text parameters, the target text is inserted into the required image to generate a graphic template; Wherein, the text parameter includes at least one of the following: Text position, text size, text color, text font, text direction.
7. The method according to claim 6, characterized in that Get the text parameters of the description text corresponding to each target copywriting level, including: According to the level identifiers of the target copy levels, a copy level sequence is obtained, wherein the copy level sequence includes at least two of the level identifiers arranged in order; The text parameters corresponding to each level identifier in the text level sequence are iteratively obtained in sequence, wherein the text parameters corresponding to the next level identifier in the text level sequence are determined based on the text parameters corresponding to the previous level identifier.
8. The method according to claim 7, characterized in that The text parameter includes a text area, and the sequentially iterative acquisition of the text parameter corresponding to each level identifier in the copywriting level sequence includes: Initialize the current image area and the current level identifier, wherein the current image area is the entire image area of the required image; the current level identifier is the first level identifier in the text level sequence; The following steps are executed repeatedly until the current level identifier exceeds the last level identifier in the text level sequence: Acquire a current image area, and determine a text area corresponding to the current level identifier based on the current image area and the description text corresponding to the current level identifier; Segmenting the image region corresponding to the text region from the current image region to obtain a remaining image region, and updating the current image region to the remaining image region; The current level identifier is updated to a level identifier next to the current level identifier in the text level sequence.
9. The method according to claim 1, characterized in that: The copywriting requirement data includes an image tag, and the description object is the required image; the image tag includes a content subtag and a domain subtag, and the tag value of the content subtag is used to characterize the image content of the required image; The tag value of the domain subtag is used to represent the business domain corresponding to the image content; The step of generating first content information according to the copywriting requirement data includes: The first content information is generated according to the content sub-tag and the domain sub-tag.
10. A copywriting generation device, characterized in that: include: An acquisition module, used to acquire text requirement data, wherein the text requirement data is used to indicate a description object corresponding to a target text to be generated; A conversion module, used to generate first content information according to the copywriting requirement data, wherein the first content information is used to characterize the object content of the description object and the corresponding business field; A generating module is used to generate the target text according to the first content information, wherein the target text is used to describe the description object in words from at least one characteristic dimension.
11. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the document generation method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the document generation method according to any one of claims 1 to 9 is implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the copywriting generation method according to any one of claims 1 to 9 is implemented.