Copywriting generation method and apparatus based on large language model, device, and storage medium

Through the copywriting generation method based on the large language model, knowledge features are recalled from the vector database and prompt text is generated, and advertising copy is automatically generated, solving the problems of long generation cycle and high cost caused by manual writing, and efficient and high-quality copywriting generation is achieved.

WO2025156651A1PCT designated stage expired Publication Date: 2025-07-31RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/117890
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-23
Filing Date
2024-09-10
Publication Date
2025-07-31

AI Technical Summary

Technical Problem

In the prior art, advertising copywriting relies on manual methods, resulting in a long generation cycle and high cost, making it difficult to meet the needs of efficient automated generation.

Method used

The copywriting generation method based on the large language model is adopted, and by obtaining copywriting generation requirements, the target knowledge characteristics are recalled from the vector database, the target prompt text is generated, and the large language model is input to automatically generate copywriting, and the vector database is used to supplement knowledge to improve the generation quality.

Benefits of technology

It realizes the automated generation of advertising copy, improves the efficiency and quality of copywriting, reduces the need for manual writing, and enhances the information richness and generation efficiency of copywriting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024117890_31072025_PF_FP_ABST
    Figure CN2024117890_31072025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of artificial intelligence, and provide a copywriting generation method and apparatus based on a large language model, a computer device, and a storage medium. The method comprises: acquiring a copywriting generation requirement, wherein the copywriting generation requirement at least comprises a copywriting object waiting for copywriting generation; on the basis of the copywriting generation requirement, performing copywriting knowledge recall from a vector database to obtain target knowledge features matching the copywriting generation requirement, wherein the vector database stores candidate knowledge features corresponding to copywriting knowledge; on the basis of the target knowledge features, generating a target prompt text corresponding to the large language model, wherein the target prompt text comprises context information required for instructing the large language model to generate copywriting; and inputting the target prompt text into the large language model to generate target copywriting matching the copywriting generation requirement. The method allows for automatic generation of copywriting, and improves the copywriting generation efficiency and generation effect.
Need to check novelty before this filing date? Find Prior Art

Description

Copywriting generation method, device, equipment and storage medium based on large language model

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on January 23, 2024, with application number 202410095240.8, and invention name “Document generation method, device, equipment and storage medium based on large language model”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] One or more embodiments of the present application relate to the field of artificial intelligence technology, and more specifically, to a method, apparatus, device, and storage medium for generating text based on a large language model in the field of artificial intelligence technology. Background Art

[0003] Advertising copy is often needed in operational scenarios. Advertising copy can not only attract the audience's attention, but also convey the characteristics and advantages of the product to the audience, so as to guide the audience's desire to buy and increase revenue.

[0004] Currently, copywriting is usually done manually. However, manual writing usually requires a lot of manpower, a long copywriting cycle, and high copywriting costs.

[0005] Application Contents

[0006] One or more embodiments of the present application provide a copywriting generation method, apparatus, device, and storage medium based on a large language model. The method can realize automatic generation of copywriting and improve the efficiency and effect of copywriting generation.

[0007] In one aspect, a method for generating copy based on a large language model is provided, the method comprising:

[0008] Obtaining a copywriting generation requirement, wherein the copywriting generation requirement at least includes a copywriting object for which a copywriting is to be generated;

[0009] Recalling copywriting knowledge from a vector database based on the copywriting generation requirement to obtain target knowledge features that match the copywriting generation requirement, wherein the vector database stores candidate knowledge features corresponding to the copywriting knowledge;

[0010] Based on the target knowledge features, generating a target prompt text corresponding to the large language model, wherein the target prompt text includes context information required for instructing the large language model to generate a copy;

[0011] The target prompt text is input into the large language model to generate a target copy that matches the copy generation requirement.

[0012] In an embodiment of the present application, the copywriting knowledge is recalled from the vector database based on the acquired copywriting generation requirements to obtain a number of target knowledge features that match the copywriting generation requirements, and the input target prompt text of the large language model is generated based on the target knowledge features, so that the large language model can generate a target copywriting that matches the copywriting generation requirements based on the target prompt text. And the user only needs to provide the copywriting generation requirements to automatically generate a number of target copywritings that meet the copywriting generation requirements, and the automatic generation of the copywriting can be achieved. Moreover, there is no need for the user to manually write the prompt text of the large language model. Instead, the target prompt text is automatically generated by a number of target knowledge features obtained by recalling the copywriting knowledge based on the copywriting generation requirements. This can not only improve the generation efficiency of the prompt text, but also supplement the prompt text with copywriting knowledge through the vector database, thereby improving the richness of information in the generated prompt text, and thus improving the copywriting generation quality of the large language model.

[0013] In a second aspect, a copywriting generation device based on a large language model is provided, the device comprising:

[0014] A first acquisition module is used to acquire a copywriting generation requirement, wherein the copywriting generation requirement at least includes a copywriting object for which a copywriting is to be generated;

[0015] A second acquisition module is configured to recall copywriting knowledge from a vector database based on the copywriting generation requirement to obtain target knowledge features that match the copywriting generation requirement, wherein the vector database stores candidate knowledge features corresponding to the copywriting knowledge;

[0016] A first generating module is configured to generate a target prompt text corresponding to the large language model based on the target knowledge feature, wherein the target prompt text includes context information required to instruct the large language model to generate a copy;

[0017] The second generation module is used to input the target prompt text into the large language model to generate a target copy that matches the copy generation requirement.

[0018] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the copywriting generation method based on a large language model as described in the above aspects.

[0019] On the other hand, a computer-readable storage medium is provided, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement the copywriting generation method based on a large language model as described above.

[0020] On the other hand, a computer program product comprising instructions is provided. When the computer program product is run on the computer or processor, the computer or processor is caused to execute the copywriting generation method based on a large language model in the above-mentioned first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] FIG1 is a schematic diagram of a computer system provided by one or more embodiments of the present disclosure;

[0022] FIG2 is a schematic flowchart of a method for generating text based on a large language model according to one or more embodiments of the present application;

[0023] FIG3 is a schematic diagram of a copywriting generation process provided by one or more embodiments of the present application;

[0024] FIG4 is a schematic flowchart of another method for generating text based on a large language model according to one or more embodiments of the present application;

[0025] FIG5 is a schematic diagram of an interface for generating a document according to one or more embodiments of the present application;

[0026] FIG6 is a schematic diagram of a text generated from an image provided by one or more embodiments of the present application;

[0027] FIG7 is a schematic flowchart of another method for generating text based on a large language model according to one or more embodiments of the present application;

[0028] FIG8 is a schematic diagram of another copywriting generation process provided by one or more embodiments of the present application;

[0029] FIG9 is a schematic flowchart of another method for generating text based on a large language model according to one or more embodiments of the present application;

[0030] FIG10 is a schematic diagram of another copywriting generation process provided by one or more embodiments of the present application;

[0031] FIG11 is a schematic flowchart of another method for generating text based on a large language model according to one or more embodiments of the present application;

[0032] FIG12 is a schematic diagram of another copywriting generation process provided by one or more embodiments of the present application;

[0033] FIG13 is a schematic structural diagram of a copywriting generation device based on a large language model provided by one or more embodiments of the present application;

[0034] FIG14 is a schematic diagram of the structure of a computer device provided by one or more embodiments of the present application. DETAILED DESCRIPTION

[0035] The technical solutions in one or more embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of one or more embodiments of the present application, "multiple" refers to two or more than two. The terms "first" and "second" are used for descriptive purposes only and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. "And / or" in the text is merely a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone.

[0036] FIG1 is a schematic diagram of a computer system according to one or more embodiments of the present disclosure. As shown in FIG1 , the computer system includes a document generation platform 110 and at least one document delivery platform 120 .

[0037] The copy generation platform 110 is a device with the function of automatically generating copy, which can be a cloud platform or a server, etc. The copy delivery platform 120 is a device that runs an application that can deliver copy. It can be a portable electronic device such as a terminal or a tablet computer. The application can be a shopping application, a takeaway application, a search application, a social application, etc. The copy generation platform 110 and the copy delivery platform 120 can communicate with each other through the network. The network can be a wired network or a wireless network. In the embodiment of the present application, a large language model is deployed in the copy generation platform 110, and the large language model has the function of generating target copy according to the prompt text. Optionally, the copy generation platform 110 has a front-end operation interface, and the user can input the copy generation requirements through the front-end operation interface. The copy generation platform 110 can generate the required target copy through the large language model and display it on the front-end operation interface.

[0038] Optionally, the user can also select the desired copy on the front-end operation interface and deliver the copy to at least one copy delivery platform 120; after the preset delivery time, the delivery effect of each delivered copy can be obtained and fed back to the copy generation platform 110. The copy generation platform 110 can fine-tune the large language model according to the delivery effect to improve the copy generation capability of the large language model.

[0039] Figure 2 is a schematic flow chart of a method for generating text based on a large language model according to one or more embodiments of the present application. The method for generating text based on a large language model according to the embodiments of the present application can be applied to a computer device.

[0040] Exemplarily, as shown in FIG2 , the method 200 includes:

[0041] Step 202: Acquire a copywriting generation requirement, where the copywriting generation requirement at least includes a copywriting object for the copywriting to be generated.

[0042] There are requirements for copywriting in various application scenarios. For example, if you need to introduce a certain object, you need to write an explanation copy for that object; or if you need to promote a certain object, you need to write a promotional copy or an operational copy for that object. In order to improve the efficiency of copywriting generation, the embodiments of the present application provide a method for automatically generating copywriting. The user only needs to input the copywriting generation requirements, and the corresponding computer device will obtain the input copywriting generation requirements and automatically generate the required target copywriting according to the copywriting generation requirements.

[0043] In order to enable the computer device to clearly understand the purpose of the copy, the copy generation requirement at least includes a copy object corresponding to the copy to be generated, so that the computer device generates a target copy corresponding to the copy object based on the copy generation requirement. Optionally, the copy generation requirement may also include the number of copies, the copy style, the copy type, the hot words required to be included in the copy, the copy delivery platform, etc. This embodiment of the application does not limit the specific information included in the copy generation requirement.

[0044] Step 204 : Based on the copywriting generation requirement, copywriting knowledge is recalled from the vector database to obtain target knowledge features that match the copywriting generation requirement. The vector database stores candidate knowledge features corresponding to the copywriting knowledge.

[0045] In the embodiment of the present application, a large language model (LLM) is used for copy generation. If the large language model is required to perform a specific copy generation task and better understand the task requirements and output correctly, it is necessary to input task-related information or context information required to instruct the large language model to generate the copy, that is, the prompt text (Prompt) of the model; and the richness of the context information contained in the prompt text will directly affect the copy generation quality of the large language model. In order to improve the copy generation quality of the large language model, in one possible implementation, a vector database is configured for the vertical application scenario of copy generation, and the vector database includes several candidate knowledge features corresponding to copy generation-related copy knowledge, so that during the copy generation process, the computer device can recall copy knowledge from the vector database based on the copy generation requirements to obtain several target knowledge features that match the copy generation requirements, so as to provide relevant knowledge supplements for the input generation of the large language model, improve the knowledge richness of the prompt text, and thus improve the copy generation quality.

[0046] Step 206 : Generate a target prompt text corresponding to the large language model based on the target knowledge features. The target prompt text includes context information required to instruct the large language model to generate text.

[0047] The input of the large language model is the target prompt text of a specific template. In order to make the target prompt text include multiple recalled target knowledge features, the computer device can generate a target prompt text that meets the input requirements of the large language model based on the target knowledge features. The target prompt text includes the context information required to instruct the large language model to generate copy.

[0048] Step 208: Input the target prompt text into the large language model to generate a target copy that matches the copy generation requirement.

[0049] After generating the target prompt text, the computer device can input the target prompt text into the large language model, which then provides copywriting guidance to the large language model, thereby generating a target copywriting that meets the copywriting requirements. Optionally, the large language model can generate multiple target copies based on the same target prompt text, the number of which can be preset; or, the large language model can output as the target copywriting a copywriting candidate whose copywriting score exceeds a preset threshold.

[0050] For example, if the copy generation requirement is "fried chicken", the copy knowledge is recalled based on the copy generation requirement, and target knowledge features corresponding to several copy knowledge related to "fried chicken" can be obtained, such as "taste, quality, discount, timely delivery", etc.; then, a target prompt text is generated based on the target knowledge features, and the target prompt text is used to instruct the large language model to generate a target copy related to fried chicken and containing the above-mentioned target knowledge features.

[0051] Figure 3 is a schematic diagram of a copywriting generation process provided by one or more embodiments of the present application. As shown in Figure 3, after a computer device obtains a copywriting generation requirement 301, it can retrieve copywriting knowledge from a vector database 302 based on the copywriting generation requirement 301 to obtain a number of target knowledge features 303 that match the copywriting generation requirement 301. Target prompt text 304 is generated based on the target knowledge features 303 and input into a large language model 305. The large language model 305 then generates a copywriting based on the target prompt text 304 to obtain a target copywriting 306 that meets the copywriting generation requirement 301.

[0052] Optionally, the copywriting generation function provided in the embodiment of the present application can be implemented as a copywriting generation application, such as an intelligent copywriting assistant. Users can input copywriting generation requirements into the intelligent copywriting assistant, and the corresponding intelligent copywriting assistant can display several generated high-quality target copies to the user.

[0053] In summary, the embodiment of the present application provides a method for intelligently generating copy based on a large language model: by recalling copy knowledge from a vector database based on the acquired copy generation requirements, a number of target knowledge features that match the copy generation requirements are obtained, and the input target prompt text of the large language model is generated based on the target knowledge features, so that the large language model can generate a target copy that matches the copy generation requirements based on the target prompt text. And the user only needs to provide the copy generation requirements to automatically generate a number of target copy that meets the copy generation requirements, and the automatic generation of the copy can be achieved. Moreover, there is no need for the user to manually write the prompt text of the large language model. Instead, the target prompt text is automatically generated by recalling the copy knowledge based on the copy generation requirements. This can not only improve the efficiency of prompt text generation, but also supplement the prompt text with copy knowledge through the vector database, thereby improving the richness of information in the generated prompt text, and thus improving the copy generation quality of the large language model.

[0054] When recalling copywriting knowledge from a vector database, a knowledge feature search can be performed from the vector database based on a vector similarity method to search for target knowledge features that match the copywriting generation requirements.

[0055] Figure 4 is a schematic flow chart of another method for generating text based on a large language model provided by one or more embodiments of the present application. The method for generating text based on a large language model provided by the embodiments of the present application can be applied to computer devices.

[0056] Exemplarily, as shown in FIG4 , the method 400 includes:

[0057] Step 402: Acquire a copywriting generation requirement, which at least includes a copywriting object for the copywriting to be generated.

[0058] Optionally, the copywriting generation platform 110 is configured with a front-end operation interface, so that operators or other users with copywriting generation requirements can input copywriting generation requirements through the front-end operation interface and view several target copies output by the large language model that meet the copywriting generation requirements.

[0059] In an illustrative example, step 402 may include step 402A and step 402B.

[0060] Step 402A: In response to the triggering operation on the copy generation control, the requirement input control is displayed.

[0061] Step 402B: In response to an input operation on a requirement input control, a copywriting generation requirement is obtained.

[0062] In one possible implementation, the copy generation function can be implemented as an intelligent copy assistant APP or an intelligent copy assistant applet. The user can trigger the program control of the intelligent copy assistant APP or the intelligent copy assistant applet to open the application and trigger the copy generation control on the application interface. The corresponding computer device can display the demand input control so that the user can input the copy generation requirements through the input operation of the demand input control. The corresponding computer device can receive the input operation of the demand input control to obtain the copy generation requirements.

[0063] Optionally, in order to clarify some inputtable copy generation requirements, multiple requirement input controls may be displayed according to different categories of copy generation requirements, and then the copy generation requirements may be acquired according to input operations of the multiple requirement input controls.

[0064] Figure 5 is a schematic diagram of a copywriting generation interface provided by one or more embodiments of the present application. As shown in Figure 5, if a user has a copywriting generation requirement, they can click on a copywriting generation control 501, and the corresponding computer device can display at least one requirement input control 502. The user can enter the copywriting generation requirement in the requirement input control 502, for example, the category is ice cream, the number of copies to be generated is 5, the copywriting style is not limited, the distribution channel is platform A, the category is catering, and the hot word is Thai pants spicy. The corresponding computer device then obtains the above copywriting generation requirement and generates a number of corresponding target copies based on the copywriting generation requirement.

[0065] Step 404 : vectorize the copywriting generation requirement to obtain target requirement features corresponding to the copywriting generation requirement.

[0066] Since the vector database stores candidate knowledge features corresponding to a number of candidate copywriting knowledge, i.e., features in vector form, the copywriting generation requirements must also be converted into vector form in order to match the target knowledge features based on the copywriting generation requirements. In one possible implementation, the computer device can vectorize the copywriting generation requirements to convert them into target requirement features expressed in vector form, and then select the target knowledge features using vector similarity.

[0067] The specific vectorization methods used for copywriting generation requirements may vary depending on the type of copywriting generation requirements. If the copywriting generation requirement is in text form, the text can be converted into vectors for vectorization. For example, one-hot encoding can be used to vectorize the copywriting generation requirement to obtain the target requirement characteristics, or the Word2Vec model can be used to vectorize the copywriting generation requirement to obtain the target requirement characteristics. If the copywriting generation requirement is in the form of an image, that is, the target copywriting needs to be generated to match the target image, and the image-based copywriting generation requirement needs to be processed not only through vector conversion but also through vector space conversion when it is processed into the target requirement characteristics.

[0068] When the copy generation requirement is a target image, the method of processing the target image into target requirement features may include step 404A and step 404B.

[0069] Step 404A: extract image features from the target image to obtain target image features corresponding to the target image.

[0070] Step 404B: convert the target image features into text space to obtain target demand features corresponding to the target image.

[0071] In order to enable the large language model to generate target copy that matches the target image, it is first necessary to perform image feature extraction on the target image to extract the image information contained in the target image, that is, to obtain the target image features corresponding to the target image; and since the target image features are vector features in the image space, if it is necessary to match the text space features corresponding to the candidate copy knowledge, it is also necessary to perform vector space conversion on the target image features, that is, to convert the target image features in the image space to the text space, so as to obtain the target demand features in the text space corresponding to the target image.

[0072] Step 406 , based on the target requirement feature, copywriting knowledge is recalled from the vector database, and candidate knowledge features whose similarity with the target requirement feature is greater than a similarity threshold are determined as target knowledge features that match the copywriting generation requirement.

[0073] In one possible implementation, vector similarity is used to recall copywriting knowledge. If it is necessary to obtain target knowledge features that match the copywriting generation requirements, it is necessary to obtain target knowledge features that are similar to the target requirement features corresponding to the copywriting generation requirements. The computer device then searches from the vector database based on the target requirement features and compares the similarity between the target requirement features and each candidate knowledge feature in the vector database. If the similarity is high, it indicates that the candidate knowledge feature meets the copywriting generation requirements. If the similarity is low, it indicates that the candidate knowledge feature does not meet the copywriting generation requirements. Copywriting knowledge is then recalled based on the similarity between the target requirement features and the candidate knowledge features, and candidate knowledge features whose similarity to the target requirement features is greater than a similarity threshold are recalled as target knowledge features that match the copywriting generation requirements.

[0074] Optionally, the similarity between the target requirement feature and the candidate knowledge feature can be determined by calculating the cosine value between the two vectors, where the larger the cosine value, the greater the similarity; or, the similarity can be determined by taking the distance between the two vectors, where the larger the distance, the lower the similarity.

[0075] Optionally, the copy generation requirements may include not only a copy object, which may be in text or image form, such as "fried chicken" or "image containing fried chicken"; but also a target copy style, a target copy quantity, a target copy type, a target publishing platform, and the like.

[0076] Regarding the establishment method of the vector database, several candidate copywriting knowledge related to the copywriting can be collected from web pages or delivery platforms, and then based on the several candidate copywriting knowledge, a vector database can be constructed to provide knowledge supplement for copywriting generation.

[0077] In an illustrative example, the process of constructing a vector database may include steps one to three.

[0078] Step 1: Obtain candidate copywriting knowledge from the copywriting knowledge base. The candidate copywriting knowledge includes at least one of hot topic knowledge, regional knowledge, encyclopedia knowledge, published copywriting, and platform information.

[0079] In order to maximize the number of candidate knowledge features in the vector database, providing a richer knowledge base for copywriting and improving copywriting quality, one possible implementation involves establishing a copywriting knowledge base within the computer device. This base stores copywriting-related hotspot knowledge, regional knowledge, encyclopedic knowledge, previously released copywriting, platform information, and more. This ensures that the candidate copywriting knowledge in the knowledge base covers all aspects of copywriting generation, providing a more comprehensive knowledge base for copywriting generation and enabling the generated copywriting to meet multiple copywriting generation requirements.

[0080] Among them, taking the food promotion scenario as an example of the copy generation scenario, hot knowledge can be hot words, hot jokes (hot sentences), etc. related to food generation; encyclopedia knowledge can be a food encyclopedia related to copy generation; regional knowledge can be food knowledge related to the city; the published copy can be the copy with better publishing effect among the published copy related to food, such as high-quality picture copy, high-quality video broadcast copy, etc.; platform information can be platform marketing activities related to food, such as full-discount activities, buy-one-get-one-free activities, etc.

[0081] Optionally, the candidate copywriting knowledge in the copywriting knowledge base can be updated as real-time hot spots, city characteristics, marketing activities, and delivery effects are updated, so that the copywriting knowledge base can provide the vector database with the latest, hottest, and most comprehensive candidate knowledge features, thereby improving the ability of the large language model to learn real-time hot spots, follow up on on-site marketing activities, learn high-quality copywriting and iterate, thereby fully meeting the copywriting quality generation requirements.

[0082] Step 2: Perform text segmentation and text vectorization on the candidate copywriting knowledge to generate candidate knowledge features corresponding to the candidate copywriting knowledge.

[0083] Step 3: Store the candidate knowledge features into the vector database.

[0084] In order to facilitate the subsequent recall and search of copywriting knowledge based on target demand characteristics, the computer device obtains candidate copywriting knowledge from the copywriting knowledge base, and performs text segmentation and text vectorization on the candidate copywriting knowledge, thereby generating candidate knowledge features corresponding to the candidate copywriting knowledge to be stored in the vector database.

[0085] Optionally, while the candidate copywriting knowledge in the copywriting knowledge base is updated, it is necessary to obtain the updated candidate copywriting knowledge and synchronously update the candidate knowledge features in the vector database.

[0086] Step 408 : Generate target prompt text corresponding to the large language model based on the target knowledge features. The target prompt text includes context information required to instruct the large language model to generate text.

[0087] Optionally, a prompt generator is provided, and the computer device can input the target knowledge features into the prompt generator. The corresponding prompt generator can generate a target prompt text that conforms to the large language model input based on several target knowledge features. The target prompt text includes the context information required to instruct the large language model to generate the copy.

[0088] Step 410: Input the target prompt text into the large language model to generate a target copy that matches the copy generation requirement.

[0089] When the copy requirement is a target picture, the target prompt text is input into the large language model to generate a target copy that matches the target picture; that is, the copy generation function provided by the embodiment of the present application also provides the ability to generate target copy in text form based on the picture, that is, the picture-to-text capability.

[0090] Figure 6 is a schematic diagram of a copywriting method for image-generated text, provided by one or more embodiments of the present application. As shown in Figure 6, taking a pizza image as an example, the pizza image is input into an intelligent copywriting assistant 602, which performs feature extraction, vector search, knowledge recall, prompt generation, and input into a large language model for copywriting generation, outputting a target copywriting 603 corresponding to the pizza image.

[0091] Optionally, when the copywriting requirements include a copywriting target and a target copywriting style, the large language model is used to generate a target copywriting corresponding to the target copywriting style based on the target prompt text, thereby enabling multi-style copywriting generation. For example, if the copywriting target is fried chicken and the target copywriting style is conventional style copywriting or popular online slang copywriting, the target copywriting generated by the large language model can be as shown in Table 1.

[0092] Table 1

[0093] When the copywriting requirement includes the number of copies and the copywriting target, the large language model is used to generate a target number of copies based on the target prompt text, thereby achieving batch copywriting capabilities. For example, if the copywriting requirement is "fried chicken, 5 pieces", the large language model will generate 5 target copies related to fried chicken.

[0094] When the copy generation requirement includes a copy object and a copy type, the large language model is used to generate a target copy of the copy type based on the target prompt text, thereby enabling the generation of marketing tweets. For example, if the copy generation requirement is "fried chicken, official account tweet type", the large language model will generate a preset number of official account tweets related to fried chicken.

[0095] Optionally, after the large language model outputs several target copywritings, the target copywritings are mainly used to be delivered to various other platforms to achieve promotional purposes; and the delivered copywritings need to comply with the preset copywriting delivery rules. A corresponding review auxiliary model is also configured to review the several target copywritings generated by the large language model according to the preset copywriting delivery rules. The target copywritings that pass the review can be used for delivery; and the copywritings that fail the review can be used as negative examples to iteratively update the large language model.

[0096] After a target copy passes the copy placement rules, the computer device can display the target copy on the front-end operation interface, allowing operators to select the target copy for placement. Optionally, in addition to displaying the target copy, the corresponding copy score can also be displayed. The copy score is used to represent the predicted placement effect of the target copy, allowing operators to select the target copy for placement based on the copy score. This copy score is also output by the large language model. Optionally, when displaying the target copy, it can also be sorted from high to low according to the copy score.

[0097] As shown in Figure 5, after the computer device generates multiple target copies, the generated target copies 503 can be displayed on the front-end interface, and each target copy 503 is sorted and displayed according to the popularity value 504; if the user needs to deliver a certain target copy 503, the user can click the delivery control 505 corresponding to the target copy 503; the corresponding computer device receives the delivery operation of the delivery control 505 corresponding to the target copy 503, and can deliver the target copy 503 to platform A according to the copy generation requirements.

[0098] In an embodiment of the present application, the copy generation requirements are vectorized to obtain the target requirement features corresponding to the copy generation requirements, and then feature retrieval is performed from the vector database by means of vector similarity to recall several target knowledge features that match the copy generation requirements, thereby improving the efficiency of copy knowledge recall; moreover, for the copy generation requirements of the image type, the image features of the image space are converted to the text space to achieve vector similarity comparison in the same space, thereby realizing the image-to-text capability.

[0099] In addition, a copywriting knowledge base is built, and the candidate copywriting knowledge in the copywriting knowledge base can be updated as real-time hot spots, city characteristics, marketing activities, and delivery effects are updated, so that the copywriting knowledge base can provide the vector database with the latest, hottest, and most comprehensive candidate knowledge features, thereby improving the ability of the large language model to learn real-time hot spots, follow up on on-site marketing activities, learn high-quality copywriting and iterate, thereby fully meeting the needs of copywriting quality generation.

[0100] During the copywriting process, the large language model can also iteratively fine-tune the model based on the delivery effect of the generated copy, thereby further optimizing the copywriting generation capability of the large language model; thus realizing a positive cycle system of copywriting generation - copywriting delivery - copywriting delivery effect recovery - model fine-tuning - copywriting generation in the copywriting generation scenario.

[0101] Figure 7 is a schematic flow chart of another method for generating text based on a large language model provided by one or more embodiments of the present application. The method for generating text based on a large language model provided by the embodiments of the present application can be applied to computer devices.

[0102] Exemplarily, as shown in FIG7 , the method 700 includes:

[0103] Step 702: Acquire a document generation requirement, which at least includes a document object for which the document is to be generated.

[0104] Step 704 : Based on the copy generation requirement, copy knowledge is recalled from the vector database to obtain target knowledge features that match the copy generation requirement. The vector database stores candidate knowledge features corresponding to the copy knowledge.

[0105] Step 706 : Generate target prompt text corresponding to the large language model based on the target knowledge features. The target prompt text includes context information required to instruct the large language model to generate text.

[0106] Step 708: Input the target prompt text into the large language model to generate a target copy that matches the copy generation requirement.

[0107] The implementation of steps 702 to 708 can refer to the above embodiment, and will not be described in detail in this embodiment.

[0108] Step 710: Obtain the delivery effect parameters and copy review parameters of the target copy.

[0109] Among them, the delivery effect parameter is used to indicate the delivery effect of the target copy that passes the copy delivery rules. The delivery effect parameter at least includes the number of likes, comments, reposts, publicity brought, etc. of the target copy that passes the copy delivery rules. The larger the delivery effect parameter, the better the delivery effect of the copy; the copy review parameter is used to indicate whether the target copy passes the copy delivery rules. If the target copy does not pass the copy delivery rules, the copy review parameter of the target copy can be set to 0. If the target copy passes the copy delivery rules, the copy review parameter of the target copy can be set to 1.

[0110] In one possible implementation, after obtaining the generated target copy, the computer device first inputs the target copy into the copy auxiliary review model for copy review to obtain the copy review parameters of each target copy; further, for the target copy that passes the copy review, the total number of likes, comments, reposts, publicity brought, and other parameters of the target copy after being released for a preset period of time can be obtained to determine the release effect parameters of the target copy.

[0111] Step 712: Iteratively update the large language model based on the delivery effect parameters, target prompt text, target copy, and copy review parameters.

[0112] During the application of the large language model, in order to iteratively update the copy generation capability of the large language model in real time, one possible implementation method is to iteratively update the large language model based on the delivery effect parameters, copy review parameters, target prompt text, target copy, etc. of the target copy generated by the large language model as a training data set, so that the large language model can learn to generate higher-quality copy.

[0113] When fine-tuning a large language model, both positive and negative training data are required to enable the large language model to learn from high-quality content and avoid generating content that has poor delivery performance or fails review. In an illustrative example, step 712 may include steps 712A to 712D.

[0114] Step 712A: Based on the copy review parameters, a negative label is set for the target copy that does not pass the copy delivery rules.

[0115] In order to reduce the generation of target copywriting that fails to pass the copywriting delivery rules by the large language model, in one possible implementation, the computer device can determine the non-delivered copywriting that fails to pass the copywriting delivery rules from the target copywriting based on the copywriting review parameters, and set negative example labels for the non-delivered copywriting to serve as negative example copywriting in the subsequent model fine-tuning process, so that the large language model learns the characteristics of the negative example copywriting to reduce the generation of subsequent negative example copywriting.

[0116] Step 712B: Based on the delivery effect parameters, determine the positive copy and the negative copy from the delivered copy. The delivery effect of the positive copy is better than that of the negative copy.

[0117] It's important to note that non-delivered content doesn't have delivery performance parameters. Delivery performance parameters are parameters for content delivered through content delivery rules. A larger delivery performance parameter indicates a better delivery performance for that content, while a smaller delivery performance parameter indicates a poorer delivery performance.

[0118] In order to enable the large language model to learn to generate more copywriting with better delivery effects, in one possible implementation, the computer device can determine, based on delivery effect parameters, copywriting with better delivery effects from the delivered copywriting as positive copywriting and copywriting with poor delivery effects as negative copywriting, to serve as training data sets in the subsequent model fine-tuning process, so that the large language model can learn the copywriting features of the positive copywriting and the copywriting features of the negative copywriting, so as to increase the generation of copywriting with better delivery effects and reduce the generation of copywriting with poor delivery effects.

[0119] Step 712C: set a positive label for the positive example document and a negative label for the negative example document.

[0120] In order to make the large language model clear about which features need positive learning and which features need negative learning, the computer equipment sets positive labels for positive copy and negative labels for negative copy, so that the large language model can clearly know the copy features of positive copy that need to be learned and increase the weight of the copy features to increase the number of subsequent high-quality copy generated; and clearly know the copy features of negative copy that need to be reduced in weight to reduce the number of subsequent negative copy generated.

[0121] Step 712D: Iteratively update the large language model based on the undelivered text, positive text, negative text, positive labels, negative labels, and target prompt text.

[0122] Furthermore, the computer device can iteratively update the large language model based on the non-delivered copy, negative copy, positive copy, positive label, negative label and target prompt text, and update the model parameters of the large language model to achieve the purpose of gradually updating the copy generation quality of the model during the model application process.

[0123] Figure 8 is a schematic diagram of another copywriting process provided by one or more embodiments of the present application. As shown in Figure 8, after a computer device obtains a copywriting generation requirement 801, it can retrieve copywriting knowledge from a vector database 802 based on the copywriting generation requirement 801 to obtain a number of target knowledge features 803 that match the copywriting generation requirement 801. Target prompt text 804 is generated based on the target knowledge features 803 and input into a large language model 805. The large language model 805 then generates a copywriting based on the target prompt text 804 to obtain a target copywriting 806 that meets the copywriting generation requirement 801. Furthermore, the generated target copy 806 is reviewed according to the copy delivery rules, and a negative label is set for the non-delivered copy 807 that does not pass the copy delivery rules; the delivered copy 808 that passes the copy delivery rules is delivered, and the delivery effect parameters of the delivered copy 808 are obtained. Based on the delivery effect parameters, a positive copy 809 with a better delivery effect and a negative copy 810 with a worse delivery effect are selected from the delivered copy 808, a positive label is set for the positive copy 809, and a negative label is set for the negative copy 810. Then, based on the non-delivered copy 807, the positive copy 809, the positive label, the negative copy 810, the negative label, and the target prompt text 804 for generating the target copy 806, the large language model 805 is iteratively updated to optimize the copy generation performance of the large language model 805.

[0124] In the embodiment of the present application, by obtaining the copy review parameters and delivery effect parameters of the target copy, the large language model is fine-tuned, so that in the actual copy generation process, the model parameters are optimized according to the online copy delivery effect, so that the model learns and generates copy with better delivery effect, and gradually improves the copy generation performance of the large language model; in addition, the large language model can also be fine-tuned according to the copy review parameters of the target copy, so that the large language model reduces the generation of copy that does not comply with the copy delivery rules, and further improves the copy generation quality of the large language.

[0125] The quality of the target copy generated by the large language model is also affected by the quality of the input target prompt text. Different target prompt texts can instruct the large language model to generate target copy of different qualities. In order to optimize the copy generation capability of the large language model, in addition to tuning the large language model according to the copy delivery effect, the copy generation capability of the large language model can also be optimized by optimizing the generated target prompt text.

[0126] Figure 9 is a schematic flow chart of another method for generating text based on a large language model provided by one or more embodiments of the present application. The method for generating text based on a large language model provided by the embodiments of the present application can be applied to computer devices.

[0127] Exemplarily, as shown in FIG9 , the method 900 includes:

[0128] Step 902: Acquire a document generation requirement, which at least includes a document object for which the document is to be generated.

[0129] Step 904 : Based on the copywriting generation requirement, copywriting knowledge is recalled from the vector database to obtain target knowledge features that match the copywriting generation requirement. The vector database stores candidate knowledge features corresponding to the copywriting knowledge.

[0130] The implementation of step 902 and step 904 can refer to the above embodiment, and will not be described in detail in this embodiment.

[0131] Step 906: Input the target knowledge features into the prompt generator to obtain at least two target prompt texts output by the prompt generator.

[0132] Optionally, a prompt generator is configured in the computer device. By inputting the target knowledge features into the prompt generator, multiple target prompt texts output by the prompt generator can be obtained, so that the prompt generator can be iteratively updated based on the copy delivery effect of the target copy generated by the multiple target prompt texts.

[0133] Step 908: Input each target prompt text into the large language model to generate target texts corresponding to each target prompt text.

[0134] Each target prompt text is input into the large language model respectively, and the large language model generates a number of target copywriting corresponding to the target prompt text based on each target prompt text; that is, each target prompt text generates its corresponding target copywriting.

[0135] Step 910: Obtain the delivery effect parameters of the target copy corresponding to each target prompt text.

[0136] In order to compare the quality of each target prompt text, which will affect the quality of the target copy, one possible implementation method is to obtain the delivery effect parameters of each target prompt text corresponding to the target copy. Based on the delivery effect parameters and the target prompt text, the prompt generator is iteratively updated to enable the prompt generator to learn to generate more optimal target prompt texts, thereby indirectly optimizing the copy generation quality of the large language model.

[0137] The delivery effect parameters include at least one of the number of likes, comments, and reposts of the delivery copy in the target copy.

[0138] Step 912: Iteratively update the prompt generator based on the delivery effect parameters and the target prompt text.

[0139] The computer device can determine the ratio of target prompt texts with better delivery effects and target copy texts with worse delivery effects according to the delivery effect parameters, and then iteratively update the prompt generator according to the copy ratio and the target prompt text, so that the prompt generator can learn the text features of the target prompt texts with better delivery effects, so as to improve the generation quality of subsequent target prompt texts.

[0140] Optionally, when iteratively updating the prompt generator, in addition to considering delivery effect parameters, whether the target copy complies with the delivery rules may also be considered. The corresponding computer device may obtain the copy review parameters for the target copy corresponding to each target prompt text, and based on the copy review parameters, determine the proportion of the target copy corresponding to the target prompt text that complies with the delivery rules and that that does not comply with the delivery rules. The prompt generator may then be iteratively updated based on the proportion of the target copy and the target prompt text.

[0141] Optionally, the computer device can also iteratively update the prompt generator based on the delivery effect parameters, the copy review parameters and the target prompt text; that is, according to the delivery effect parameters, determine the ratio of the first copy with poor delivery effect and the first copy with good delivery effect in the target copy corresponding to the target prompt text, and according to the copy review parameters, determine the ratio of the second copy that complies with the copy delivery rules and does not comply with the copy delivery rules in the target copy corresponding to the target prompt text, and iteratively update the prompt generator based on the first copy ratio and the second copy ratio.

[0142] FIG10 is a schematic diagram of another copywriting generation process provided by one or more embodiments of the present application. As shown in FIG10 , after the computer device obtains the copywriting generation requirement 1001, the computer device can retrieve the copywriting knowledge from the vector database 1002 based on the copywriting generation requirement 1001 to obtain a plurality of target knowledge features 1003 that match the copywriting generation requirement 1001; and input the plurality of target knowledge features 1003 into the prompt generator 1004 to obtain two target prompt texts output by the prompt generator 1004 (taking the generation of two target prompt texts as an example for explanation, in actual application, two or more target texts can be generated): a first prompt text 1005 and a second prompt text 1006; further, the generated first prompt text 1005 and the second prompt text 1006 are respectively input into the large language model 1007 to obtain a first copy 1008 corresponding to the first prompt text 1005 and a second copy 1009 corresponding to the second prompt text 1006. When the prompt generator 1004 is iteratively updated, the first delivery effect quality ratio is determined according to the delivery effect parameters of the first copy 1008, the first pass ratio is determined according to the copy review parameters of the first copy 1008, the second delivery effect quality ratio is determined according to the delivery effect parameters of the second copy 1009, and the second pass ratio is determined according to the copy review parameters of the second copy 1009. Then, the prompt generator is iteratively updated based on the first prompt text 1005, the first delivery effect quality ratio, the first pass ratio, and the second prompt text 1006, the second delivery effect quality ratio, the second pass ratio, etc.

[0143] In an embodiment of the present application, a prompt generator generates multiple target prompt texts based on the same target knowledge features, and a large language model generates corresponding target copywriting under the instructions of different target prompt texts. Then, the prompt generator is iteratively updated based on the delivery effect of the target copywriting and whether the copywriting complies with the copywriting delivery rules, so as to optimize the target prompt text generation capability of the prompt generator and thereby improve the copywriting generation quality of the large language model.

[0144] The high-quality copywriting generated by the large language model can not only be used to optimize the large language model, but also to enrich the copywriting knowledge in the vector database. Figure 11 is a schematic flow chart of another copywriting generation method based on a large language model provided by one or more embodiments of the present application. The copywriting generation method based on a large language model provided by the embodiments of the present application can be applied to computer devices.

[0145] Exemplarily, as shown in FIG11 , the method 1100 includes:

[0146] Step 1102: Acquire a document generation requirement, where the document generation requirement at least includes a document object for which the document is to be generated.

[0147] Step 1104 : Based on the copy generation requirement, copy knowledge is recalled from the vector database to obtain target knowledge features that match the copy generation requirement. The vector database stores candidate knowledge features corresponding to the copy knowledge.

[0148] Step 1106 : Generate target prompt text corresponding to the large language model based on the target knowledge features. The target prompt text includes context information required to instruct the large language model to generate text.

[0149] Step 1108: Input the target prompt text into the large language model to generate a target copy that matches the copy generation requirement.

[0150] The implementation of steps 1102 to 1108 can refer to the above embodiment, and will not be described in detail in this embodiment.

[0151] Step 1110: Obtain the delivery effect parameters of the target copy that is delivered according to the copy delivery rules.

[0152] Among them, the delivery effect parameter is used to indicate the delivery effect of the delivery copy in the target copy through the delivery rule. The delivery effect parameter at least includes the number of likes, comments, reposts, collections, publicity brought, etc. of the delivery copy in the target copy through the delivery rule. The larger the delivery effect parameter, the better the delivery effect of the delivery copy.

[0153] In one possible implementation, a computer device may obtain parameters such as the total number of likes, comments, reposts, and publicity brought about by the target copy that is delivered according to the copy delivery rules after being delivered for a preset period of time, so as to determine the delivery effect parameters of the target copy.

[0154] Step 1112: Based on the delivery effect parameters, determine a positive example copy from the delivered copies, where the delivery effect of the positive example copy is better than that of other target copies.

[0155] The computer device can determine, based on the delivery performance parameters, from the delivered copies that have a better delivery performance as a positive example copy. For example, a threshold can be set to determine that the delivered copy with a delivery performance parameter greater than the threshold is a positive example copy, and the delivery performance of the positive example copy is better than that of other target copies.

[0156] Step 1114: Update the copywriting knowledge base based on the positive copywriting.

[0157] Since the copy knowledge base is used to supplement positive copy knowledge for the generation of subsequent prompt texts, when updating the copy knowledge base based on the delivery effect of the target copy, positive copy with better delivery effect is selected and stored in the copy knowledge base to update the copy knowledge base.

[0158] Step 1116: Update the vector database based on the candidate copy knowledge in the updated copy knowledge base.

[0159] After the copywriting knowledge base is updated, in order to refer to the excellent copywriting that has been released when subsequent copywriting is generated, the computer device can update the vector database based on the candidate copywriting knowledge in the updated copywriting knowledge base.

[0160] Optionally, in order to avoid the processing pressure on computer equipment caused by frequent updates of the vector database, an update duration can be set. Every update duration, the vector database is updated for the candidate copy knowledge updated in the copy knowledge base; or, the knowledge storage capacity can be set. If the size of the updated candidate copy knowledge in the copy knowledge base reaches the knowledge storage capacity, the vector database is updated.

[0161] FIG12 is a schematic diagram of another copywriting generation process provided by one or more embodiments of the present application. As shown in FIG12 , a copywriting knowledge base 1201 is pre-constructed, which includes a hot word library, a food encyclopedia, city characteristics, high-quality picture copywriting, high-quality video broadcast copywriting, in-site marketing activities, etc., and the text is read from the copywriting knowledge base 1201, and text segmentation and text vectorization are performed to generate candidate knowledge features to be stored in the vector database 1202; in the copywriting generation stage, the user conducts a demand dialogue with the intelligent copywriting assistant 1203, and the corresponding computer device obtains the copywriting demand, and vectorizes the demand to obtain the target demand feature; based on the target demand feature, text knowledge is recalled from the vector database 1202, and a target prompt text is generated according to the prompt template; further, the generated target prompt text is input into the large language model 1204 to obtain the target copywriting 1205; and the target copywriting 1205 is reviewed by the audit auxiliary model. If the target copywriting 1205 passes the review, it is put online and delivered to the copywriting delivery platform 1206. In the knowledge updating stage, the computer device can obtain the delivery effect of the target copy, and update the copy with better delivery effect into the copy knowledge base 1201, and further update the vector database 1202.

[0162] In an embodiment of the present application, based on the delivery effect parameters of the target copy, a copy with better delivery effect is selected from the target copy, and the copy knowledge base and vector database are updated to provide supplementary knowledge of high-quality copy for the subsequent copy generation process, thereby further improving the quality of copy generation.

[0163] 13 is a schematic diagram of a structure of a copywriting generation device based on a large language model provided by one or more embodiments of the present application. The copywriting generation device based on a large language model is applied to a computer device.

[0164] Exemplarily, as shown in FIG13 , the apparatus 1300 includes:

[0165] The first acquisition module 1301 is used to acquire a document generation requirement, wherein the document generation requirement at least includes a document object for which a document is to be generated;

[0166] A second acquisition module 1302 is configured to retrieve copywriting knowledge from a vector database based on the copywriting generation requirement to obtain target knowledge features that match the copywriting generation requirement, wherein the vector database stores candidate knowledge features corresponding to the copywriting knowledge;

[0167] A first generating module 1303 is configured to generate a target prompt text corresponding to the large language model based on the target knowledge feature, wherein the target prompt text includes context information required to instruct the large language model to generate a copy;

[0168] The second generating module 1304 is configured to input the target prompt text into the large language model to generate a target text that matches the text generation requirement.

[0169] Optionally, the second obtaining module 1302 is further configured to:

[0170] Performing vectorization processing on the copywriting generation requirement to obtain target demand features corresponding to the copywriting generation requirement;

[0171] Based on the target demand feature, copywriting knowledge is recalled from the vector database, and candidate knowledge features whose similarity with the target demand feature is greater than a similarity threshold are determined as the target knowledge features that match the copywriting generation requirement.

[0172] Optionally, the copywriting generation requirement is a target picture;

[0173] The second obtaining module 1302 is further configured to:

[0174] Performing image feature extraction on the target image to obtain target image features corresponding to the target image;

[0175] Converting the target image features into text space to obtain the target demand features corresponding to the target image;

[0176] The second generating module 1304 is further configured to:

[0177] The target prompt text is input into the large language model to generate the target text that matches the target image.

[0178] Optionally, the first generating module 1303 is further configured to:

[0179] Inputting the target knowledge feature into a prompt generator to obtain at least two target prompt texts output by the prompt generator;

[0180] The second generating module 1304 is further configured to:

[0181] Inputting each of the target prompt texts into the large language model respectively to generate the target copywriting corresponding to each of the target prompt texts;

[0182] The device further comprises:

[0183] A third acquisition module is configured to acquire delivery effect parameters of the target copy corresponding to each target prompt text, wherein the delivery effect parameters include at least one of the number of likes, comments, and reposts of the delivery copy in the target copy;

[0184] The first training module is used to iteratively update the prompt generator based on the delivery effect parameters and the target prompt text.

[0185] Optionally, the device further comprises:

[0186] A fourth acquisition module is used to obtain a text review parameter corresponding to the target text of each target prompt text, wherein the text review parameter is used to indicate whether the target text complies with the text delivery rules;

[0187] The first training module is further used to:

[0188] The prompt generator is iteratively updated based on the delivery effect parameters, the copy review parameters and the target prompt text.

[0189] Optionally, the device further comprises:

[0190] a fifth acquisition module, configured to acquire delivery effect parameters and delivery review parameters of the target copy, wherein the delivery effect parameters include at least one of the number of likes, comments, and reposts of the target copy that passes the delivery rule, and the delivery review parameters indicate whether the target copy passes the delivery rule;

[0191] The second training module is used to iteratively update the large language model based on the delivery effect parameters, the target prompt text, the target copy, and the copy review parameters.

[0192] Optionally, the second training module is further used to:

[0193] Based on the copy review parameters, a negative label is set for the target copy that fails to pass the copy delivery rule;

[0194] Based on the delivery effect parameter, determining a positive copy and a negative copy from the delivery copy, wherein the delivery effect of the positive copy is better than the delivery effect of the negative copy;

[0195] Setting a positive label for the positive example copy, and setting a negative label for the negative example copy;

[0196] The large language model is iteratively updated based on the undelivered copy, the positive copy, the negative copy, the positive label, the negative label, and the target prompt text.

[0197] Optionally, the first obtaining module 1301 is further configured to:

[0198] In response to a triggering operation on the copy generation control, a requirement input control is displayed;

[0199] In response to an input operation on the requirement input control, obtaining the copywriting generation requirement;

[0200] The device further comprises:

[0201] The display module is used to display the target copy and the copy score corresponding to the target copy when the target copy passes the copy delivery rule, and the copy score is used to represent the predicted delivery effect of the target copy.

[0202] Optionally, the device further comprises:

[0203] A sixth acquisition module is configured to acquire candidate copywriting knowledge from a copywriting knowledge base, wherein the candidate copywriting knowledge includes at least one of hot topic knowledge, regional knowledge, encyclopedia knowledge, published copywriting, and platform information;

[0204] A third generation module is used to perform text segmentation and text vectorization processing on the candidate copywriting knowledge to generate the candidate knowledge features corresponding to the candidate copywriting knowledge;

[0205] A storage module is used to store the candidate knowledge features in the vector database.

[0206] Optionally, the device further comprises:

[0207] a seventh acquisition module, configured to acquire delivery effect parameters of the target copy that is delivered according to the copy delivery rules, wherein the delivery effect parameters include at least one of the number of likes, comments, and reposts of the delivered copy;

[0208] a determination module, configured to determine a positive example copy from the delivered copy based on the delivery effect parameter, wherein the delivery effect of the positive example copy is better than that of the other target copies;

[0209] A first updating module, configured to update the document knowledge base based on the positive document;

[0210] The second updating module is configured to update the vector database based on the candidate copywriting knowledge in the updated copywriting knowledge base.

[0211] Optionally, when the copy generation requirement includes the copy object and the target copy style, the large language model is used to generate the target copy corresponding to the target copy style according to the target prompt text;

[0212] In a case where the copy generation requirement includes the copy quantity and the copy object, the large language model is used to generate the target copy quantity according to the target prompt text;

[0213] In a case where the copy generation requirement includes the copy object and the copy type, the large language model is used to generate the target copy of the copy type according to the target prompt text.

[0214] An embodiment of the present application provides a computer device comprising a processor and a memory, wherein the memory stores at least one program, which is loaded and executed by the processor to implement the method for generating text based on a large language model as provided in the above-mentioned optional embodiment. Optionally, the computer device may also be referred to as a text generation platform.

[0215] FIG14 is a schematic diagram of the structure of a computer device provided by one or more embodiments of the present application.

[0216] Exemplarily, as shown in FIG14 , the computer device 1400 includes: a memory 1401, a processor 1402, and a computer program 1403 stored in the memory 1401 and running on the processor 1402, wherein when the processor 1402 executes the computer program 1403, the computer device can execute any one of the large language model-based copywriting generation methods described above.

[0217] One or more embodiments of the present application may divide the computer device into functional modules according to the above-mentioned method examples. For example, each functional module may be corresponding to the functional module, or two or more functions may be integrated into a processing module. The above-mentioned integrated module may be implemented in the form of hardware. It should be noted that the division of modules in one or more embodiments of the present application is illustrative and is only a logical functional division. In actual implementation, other division methods may be used.

[0218] When the functional modules are divided according to their functions, the computer device may include: a first acquisition module, a second acquisition module, a first generation module, a second generation module, etc. It should be noted that all relevant contents of the various steps involved in the above method embodiment can be referred to the functional description of the corresponding functional modules and will not be repeated here.

[0219] The computer device provided in one or more embodiments of the present application is used to execute the above-mentioned copywriting generation method based on a large language model, and thus can achieve the same effect as the above-mentioned implementation method.

[0220] In the case of an integrated unit, the computer device may include a processing module and a storage module. The processing module may be used to control and manage the operation of the computer device, and the storage module may be used to support the computer device in executing mutual program codes and data.

[0221] The processing module may be a processor or controller that implements or executes various exemplary logic blocks, modules, and circuits disclosed in conjunction with one or more embodiments of the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processing (DSP) and a microprocessor, and the storage module may be a memory.

[0222] The computer device provided in one or more embodiments of the present application may specifically be a chip, component or module, and the computer device may include a connected processor and memory; wherein the memory is used to store instructions, and when the computer device is running, the processor may call and execute the instructions to enable the chip to execute any one of the copywriting generation methods based on the large language model introduced above.

[0223] One or more embodiments of the present application provide a computer-readable storage medium having instructions stored therein. When the instructions are executed on a computer or a processor, the computer or the processor executes any one of the aforementioned methods for generating text based on a large language model.

[0224] One or more embodiments of the present application further provide a computer program product comprising instructions, which, when executed on a computer or processor, causes the computer or processor to execute the aforementioned related steps to implement any of the aforementioned methods for generating text based on a large language model.

[0225] Among them, the computer device, computer-readable storage medium, computer program product or chip containing instructions provided in one or more embodiments of the present application are used to execute the corresponding large language model-based copywriting generation method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0226] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0227] In one or more embodiments of the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, 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, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0228] The foregoing description describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0229] The above content is merely one or more specific implementations of this application, but the scope of protection of one or more embodiments of this application is not limited thereto. Any person skilled in the art can easily conceive of changes or substitutions within the technical scope disclosed in one or more embodiments of this application, and such changes or substitutions should be included in the scope of protection of one or more embodiments of this application. Therefore, the scope of protection of one or more embodiments of this application should be based on the scope of protection of the claims.

Claims

1. A copywriting generation method based on large language models, characterized in that, The method includes: Obtaining a copywriting generation requirement, where the copywriting generation requirement at least includes a copywriting object for the copywriting to be generated; Performing copywriting knowledge recall from a vector database based on the copywriting generation requirement to obtain target knowledge features matching the copywriting generation requirement, where candidate knowledge features corresponding to the copywriting knowledge are stored in the vector database; Generating a target prompt text corresponding to a large language model based on the target knowledge features, where the target prompt text includes context information for instructing the large language model to generate copywriting; Inputting the target prompt text into the large language model to generate a target copywriting matching the copywriting generation requirement.

2. The method according to claim 1, characterized in that The performing copywriting knowledge recall from a vector database based on the copywriting generation requirement to obtain target knowledge features matching the copywriting generation requirement includes: Performing vectorization processing on the copywriting generation requirement to obtain target requirement features corresponding to the copywriting generation requirement; Performing copywriting knowledge recall from the vector database based on the target requirement features, and determining candidate knowledge features with a similarity greater than a similarity threshold to the target requirement features as the target knowledge features matching the copywriting generation requirement.

3. The method according to claim 2, wherein The copywriting generation requirement is a target picture; The performing vectorization processing on the copywriting generation requirement to obtain target requirement features corresponding to the copywriting generation requirement includes: Performing image feature extraction on the target picture to obtain target picture features corresponding to the target picture; converting the target picture features to the text space to obtain the target requirement features corresponding to the target picture; The inputting the target prompt text into the large language model to generate a target copywriting matching the copywriting generation requirement includes: Inputting the target prompt text into the large language model to generate the target copywriting matching the target picture.

4. The method according to any one of claims 1 to 3, characterized in that The generating a target prompt text corresponding to a large language model based on the target knowledge features includes: Inputting the target knowledge features into a prompt generator to obtain at least two of the target prompt texts output by the prompt generator; The inputting the target prompt text into the large language model to generate a target copywriting matching the copywriting generation requirement includes: Inputting each of the target prompt texts into the large language model to generate target copywritings respectively corresponding to each of the target prompt texts; The method further includes: Obtaining a delivery effect parameter of the target copywriting corresponding to each of the target prompt texts, where the delivery effect parameter at least includes at least one of the number of likes, comments, and forwards of the delivery copywriting in the target copywriting; Iteratively updating the prompt generator based on the delivery effect parameter and the target prompt text.

5. The method according to claim 4, wherein The method further includes: Obtaining a copywriting review parameter of the target copywriting corresponding to each of the target prompt texts, where the copywriting review parameter is used to indicate whether the target copywriting conforms to the copywriting delivery rule; Iteratively updating the prompt generator based on the delivery effect parameter and the target prompt text further includes: Iteratively updating the prompt generator based on the delivery effect parameter, the copywriting review parameter, and the target prompt text.

6. The method according to any one of claims 1 to 3, characterized in that The method further includes: Obtaining the delivery effect parameter and the copywriting review parameter of the target copywriting. The delivery effect parameter includes at least one of the number of likes, comments, and forwards of the delivered copywriting that passes the copywriting delivery rule in the target copywriting. The copywriting review parameter is used to indicate whether the target copywriting passes the copywriting delivery rule; Iteratively updating the large language model based on the delivery effect parameter, the target prompt text, the target copywriting, and the copywriting review parameter.

7. The method according to claim 6, characterized in that, The iteratively updating the large language model based on the delivery effect parameter, the target prompt text, the target copywriting, and the copywriting review parameter includes: Based on the copywriting review parameter, setting a negative example label for the undelivered copywriting that does not pass the copywriting delivery rule in the target copywriting; Based on the delivery effect parameter, determining positive example copywriting and negative example copywriting from the delivered copywriting, where the delivery effect of the positive example copywriting is better than that of the negative example copywriting; Setting a positive example label for the positive example copywriting and setting the negative example label for the negative example copywriting; Iteratively updating the large language model based on the undelivered copywriting, the positive example copywriting, the negative example copywriting, the positive example label, the negative example label, and the target prompt text.

8. The method according to any one of claims 1 to 3, characterized in that The obtaining the copywriting generation requirement includes: In response to a trigger operation on the copywriting generation control, displaying a requirement input control; In response to an input operation on the requirement input control, obtaining the copywriting generation requirement; The method further includes: When the target copywriting passes the copywriting delivery rule, displaying the target copywriting and the copywriting score corresponding to the target copywriting. The copywriting score is used to represent the predicted delivery effect of the target copywriting.

9. The method according to any one of claims 1 to 3, characterized in that The method further includes: Obtaining candidate copywriting knowledge from the copywriting knowledge base. The candidate copywriting knowledge includes at least one of hot knowledge, regional knowledge, encyclopedic knowledge, delivered copywriting, and platform information; Performing text segmentation and text vectorization processing on the candidate copywriting knowledge to generate the candidate knowledge features corresponding to the candidate copywriting knowledge; Storing the candidate knowledge features in the vector database.

10. The method according to claim 9, wherein The method further includes: Obtaining the delivery effect parameter of the delivered copywriting that passes the copywriting delivery rule in the target copywriting. The delivery effect parameter includes at least one of the number of likes, comments, and forwards of the delivered copywriting; Based on the delivery effect parameter, determining positive example copywriting from the delivered copywriting, where the delivery effect of the positive example copywriting is better than that of other target copywriting; Updating the copywriting knowledge base based on the positive example copywriting; Updating the vector database based on the candidate copywriting knowledge in the updated copywriting knowledge base.

11. According to the method according to any one of claims 1 to 3, characterized in that, When the copywriting generation requirement includes the copywriting object and the target copywriting style, the large language model is used to generate the target copywriting corresponding to the target copywriting style according to the target prompt text; When the copywriting generation requirement includes the copywriting quantity and the copywriting object, the large language model is used to generate the target copywriting of the copywriting quantity according to the target prompt text; When the copywriting generation requirement includes the copywriting object and the copywriting type, the large language model is used to generate the target copywriting of the copywriting type according to the target prompt text.

12. A copywriting generation device based on a large language model, characterized in that, The device includes: A first acquisition module, configured to acquire a copywriting generation requirement, where the copywriting generation requirement at least includes a copywriting object of the copywriting to be generated; A second acquisition module, configured to recall copywriting knowledge from a vector database based on the copywriting generation requirement, so as to acquire a target knowledge feature matching the copywriting generation requirement, where candidate knowledge features corresponding to the copywriting knowledge are stored in the vector database; A first generation module, configured to generate a target prompt text corresponding to the large language model based on the target knowledge feature, where the target prompt text includes context information for instructing the large language model to generate copywriting; A second generation module, configured to input the target prompt text into the large language model to generate a target copywriting matching the copywriting generation requirement.

13. A computer device, the computer device includes a processor and a memory, and at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the large language model-based copywriting generation method according to any one of claims 1 to 11.

14. A computer-readable storage medium, and at least one program is stored in the readable storage medium, and the at least one program is loaded and executed by a processor to implement the large language model-based copywriting generation method according to any one of claims 1 to 11.

15. A computer program product including instructions, when the computer program product runs on the computer device or the processor, enabling the computer device or the processor to execute the large language model-based copywriting generation method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Cboth generation method and device, equipment, storage medium and product

    CN116702737A

  • Prompt information generation system and prompt information generation model obtaining method

    CN116756276A

  • Advertisement copywriting generation method and device, equipment and medium

    CN116797280A

  • Cboth generation method and device, electronic equipment and storage medium

    CN117313670A

  • Big language model-based copywriting generation method, apparatus and device, and storage medium

    CN117611254A