Method and device for generating copywriting of GPT model, storage medium and electronic device

Through the copywriting generation method based on the GPT model, the copywriting creation process is automatically processed, and the problem of low copywriting creation in the existing technology is solved, achieving efficient copywriting generation.

CN120030988APending Publication Date: 2025-05-23QINGDAO HAIER TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311571168.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

In the process of creating copywriting, existing technologies rely on manual methods, resulting in inefficient copywriting creation.

Method used

The copywriting generation method based on the GPT model is adopted to obtain the user's copywriting requirements information, determine the copywriting application scenario information, extract keywords, generate target text prompts, and input them into the GPT model to generate the corresponding copy.

Benefits of technology

It realizes automatic generation of copywriting corresponding to copywriting requirements information, reduces dependence on manual writing, and improves copywriting creation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120030988A_ABST
    Figure CN120030988A_ABST
Patent Text Reader

Abstract

The invention discloses a document generation method and device based on a GPT model, a storage medium and an electronic device, and relates to the technical field of smart home / smart home, and the document generation method based on the GPT model comprises the steps: obtaining document demand information of a user; based on the copywriting demand information, copywriting application scene information is determined; keyword extraction is carried out on the copywriting application scene information to obtain application scene keywords, a target text prompt corresponding to the copywriting application scene information is generated according to the application scene keywords, and the target text prompt is used for guiding a GPT model to generate prompt information of a copywriting corresponding to the target text prompt; and inputting the target text prompt into the GPT model to obtain a copywriting corresponding to the target text prompt. The copywriting corresponding to the copywriting demand information can be automatically generated, so that the copywriting creation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, storage medium and electronic device for generating text using a GPT model. Background Art

[0002] Copywriting refers to the use of words to express creative strategies about products or marketing plans.

[0003] It is known from relevant technologies that manual methods are often used in the process of creating copywriting, which will lead to low efficiency in copywriting creation.

[0004] Therefore, finding a method to improve the efficiency of copywriting creation has become a research hotspot. Summary of the invention

[0005] The present application provides a copywriting generation method, device, storage medium and electronic device of a GPT model, which can automatically generate copywriting corresponding to copywriting requirement information, thereby improving copywriting creation efficiency.

[0006] The present application provides a copywriting generation method based on a GPT model, the method comprising: obtaining copywriting demand information of a user; determining copywriting application scenario information based on the copywriting demand information; performing keyword extraction on the copywriting application scenario information to obtain application scenario keywords, and generating a target text prompt corresponding to the copywriting application scenario information based on the application scenario keywords, wherein the target text prompt is used to guide the GPT model to generate prompt information of the copywriting corresponding to the target text prompt; inputting the target text prompt into the GPT model to obtain the copywriting corresponding to the target text prompt.

[0007] According to a copywriting generation method based on a GPT model provided by the present application, the copywriting application scenario information is determined based on the copywriting requirement information: the copywriting requirement information is sequentially segmented and stop word removed to obtain processed copywriting requirement information; the processed copywriting requirement information is input into an autoencoding language model to obtain a plurality of application scenario labels corresponding to the copywriting requirement information output by the autoencoding language model, wherein the autoencoding language model is obtained through pre-training; based on the plurality of application scenario labels, the copywriting application scenario information is determined.

[0008] According to a copywriting generation method based on a GPT model provided by the present application, the auto-encoding language model includes a BERT model, and the processing of inputting the processed copywriting requirement information into the auto-encoding language model to obtain a plurality of application scenario labels corresponding to the copywriting requirement information output by the auto-encoding language model specifically includes: inputting the processed copywriting requirement information into the BERT model to obtain a plurality of initial application scenario labels corresponding to the processed copywriting requirement information, and readjusting the plurality of initial application scenario labels based on a fully connected layer preset in the BERT model to obtain a plurality of application scenario labels corresponding to the copywriting requirement information output by the BERT model.

[0009] According to a copywriting generation method based on a GPT model provided by the present application, the copywriting application scenario information is determined based on multiple application scenario tags, specifically including: performing word meaning extraction processing on each of the application scenario tags to obtain the word meaning corresponding to each of the application scenario tags, and dividing the application scenario tags belonging to the same word meaning into a group to obtain multiple scene tag groups; determining a target scene tag group containing the largest number of application scenario tags from the multiple scene tag groups; performing keyword extraction processing on each of the application scenario tags in the target scene tag group to obtain tag keywords, and determining the copywriting application scenario information based on the tag keywords.

[0010] According to a copywriting generation method based on a GPT model provided by the present application, the target text prompt corresponding to the copywriting application scenario information is generated according to the application scenario keywords, specifically including: based on the application scenario keywords, determining the text style standard and tone style standard for outputting the copy in the application scenario corresponding to the copywriting application scenario information; based on the text style standard and the tone style standard, determining the initial text prompt corresponding to the copywriting application scenario information; obtaining the number of occurrences of each word under each of the application scenario labels, obtaining the word with the largest number of occurrences under each of the application scenario labels, and using the word with the largest number of occurrences as the keyword under each of the application scenario labels; using the keyword as the positive reference word of the initial text prompt, and using the initial text prompt containing the positive reference word as the target text prompt corresponding to the copywriting application scenario information.

[0011] According to a copywriting generation method based on a GPT model provided by the present application, when the copywriting does not meet the user's requirements, the method further includes: obtaining a target text prompt corresponding to the copywriting that does not meet the user's requirements, and using the target text prompt as a correction text prompt; obtaining a text prompt to be corrected based on the application scenario keywords; using the correction text prompt as a negative reference prompt for the text prompt to be corrected, and using the text prompt to be corrected containing the negative reference prompt as a retrieved target text prompt, and inputting the retrieved target text prompt into the GPT model to obtain a copywriting output by the GPT model corresponding to the retrieved target text prompt.

[0012] The present application also provides a copy generation device based on the GPT model, the device comprising: an acquisition module, used to obtain the user's copy demand information; a determination module, used to determine the copy application scenario information based on the copy demand information; a processing module, used to extract keywords from the copy application scenario information to obtain application scenario keywords, and generate a target text prompt corresponding to the copy application scenario information based on the application scenario keywords, wherein the target text prompt is used to guide the GPT model to generate prompt information of the copy corresponding to the target text prompt; a generation module, used to input the target text prompt into the GPT model to obtain the copy corresponding to the target text prompt.

[0013] The present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute through the computer program any of the above-mentioned methods for generating text based on the GPT model.

[0014] The present application also provides a computer-readable storage medium, which includes a stored program, wherein when the program is run, it executes and implements any of the above-mentioned GPT model-based copywriting generation methods.

[0015] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for generating text based on the GPT model.

[0016] The copywriting generation method, device, storage medium and electronic device of the GPT model provided in the present application obtain the copywriting demand information of the user; determine the copywriting application scenario information based on the copywriting demand information; then perform keyword extraction on the copywriting application scenario information to obtain application scenario keywords, and generate a target text prompt corresponding to the copywriting application scenario information based on the application scenario keywords; then input the target text prompt into the GPT model to obtain the copywriting corresponding to the target text prompt, thereby reducing the reliance on manual labor in the process of creating copywriting and improving the efficiency of copywriting creation. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0019] Figure 1 It is a schematic diagram of the hardware environment of a copywriting generation method based on a GPT model according to an embodiment of the present application;

[0020] Figure 2 It is a flowchart of the copywriting generation method based on the GPT model provided by this application;

[0021] Figure 3 This is a flow chart of determining the copywriting application scenario information based on the copywriting requirement information provided by this application;

[0022] Figure 4 This is a flow chart of determining the application scenario information of a copy based on multiple application scenario tags provided by the present application;

[0023] Figure 5 It is a flowchart of generating target text prompts corresponding to the copywriting application scenario information according to the application scenario keywords provided by the present application;

[0024] Figure 6 It is a structural schematic diagram of a text generation device based on a GPT model provided by the present application;

[0025] Figure 7 It is a schematic diagram of the structure of the electronic device provided in this application. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] According to one aspect of an embodiment of the present application, a method for generating text based on a GPT model is provided. The method for generating text based on a GPT model is widely used in smart home, smart home, smart home device ecology, smart home ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the method for generating text based on a GPT model can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.

[0029] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0030] In another embodiment, the copywriting generation method based on the GPT model provided in this application can be applied to smart home appliances. Among them, smart home appliances refer to home appliances formed by introducing microprocessors, sensor technology, and network communication technology into home appliances, which have the function of automatically sensing the state of residential space, the state of the home appliances themselves, and the state of home appliance services, and can automatically control and receive control instructions from residential users in the home or remotely. It can be understood that smart home appliances are an integral part of smart homes.

[0031] The copywriting generation method based on the GPT model provided in this application reduces the reliance on manual writing by automatically generating copywriting, so as to improve the efficiency and consistency of copywriting. By introducing a language model such as ChatGPT, the marketing copywriting can be automatically generated for multiple application scenarios by machine generation, which can greatly improve the writing efficiency; in addition, the copywriting style can be controlled so that the marketing copywriting in the same application scenario remains consistent; and ChatGPT can provide a variety of expressions and creative elements to break through the limitations of creation; in addition, ChatGPT can improve the performance and adaptability of specific tasks by fine-tuning on specific tasks.

[0032] Figure 2 It is a flowchart of the copywriting generation method based on the GPT model provided in this application.

[0033] In order to further introduce the copywriting generation method based on the GPT model provided by this application, Figure 2 Provide explanation.

[0034] In an exemplary embodiment of the present application, Figure 2 It can be seen that the method for automatically generating text may include steps 210 to 240, and each step will be introduced below.

[0035] In step 210, the user's copywriting requirement information is obtained.

[0036] In step 220, based on the copy requirement information, copy application scenario information is determined.

[0037] In one embodiment, the user's copywriting requirement information can be understood as what kind of copywriting the user wants to generate, and the copywriting requirement is described through the copywriting requirement information. In the application process, the copywriting requirement information can be determined by mobile phone and analysis of marketing goals.

[0038] In another embodiment, the copy requirement information may be parsed to obtain the copy application scenario information of the copy included in the copy requirement information. It is understandable that different copy application scenarios may correspond to different copies.

[0039] Figure 3 This is a flow chart of determining the copy application scenario information based on the copy requirement information provided by this application.

[0040] The following will be combined Figure 3 The process of determining the copywriting application scenario information based on the copywriting demand information is explained.

[0041] In an exemplary embodiment of the present application, Figure 3 It can be seen that based on the copy requirement information, determining the copy application scenario information may include steps 310 to 330, and each step will be introduced below.

[0042] In step 310, the text demand information is segmented and stop words are removed in sequence to obtain processed text demand information.

[0043] In step 320, the processed copy requirement information is input into the auto-encoding language model to obtain a plurality of application scenario labels corresponding to the copy requirement information output by the auto-encoding language model, wherein the auto-encoding language model is obtained through pre-training.

[0044] In step 330, based on a plurality of application scenario tags, the copy application scenario information is determined.

[0045] In one embodiment, the copy demand information can be segmented and stop word removed in sequence to obtain processed copy demand information; the processed copy demand information is then input into the self-encoding language model to obtain multiple application scenario labels, and based on the application scenario labels, the copy application scenario information is determined. In this embodiment, by pre-processing the copy demand information (including segmentation and stop word removal), irrelevant information can be eliminated for the self-encoding language model, reducing the amount of calculation in the process of obtaining application scenario labels.

[0046] In an exemplary embodiment of the present application, the auto-encoding language model may include a BERT model. Among them, the BERT model at least includes a fully connected layer. Wherein, the processed copywriting requirement information is input into the auto-encoding language model, and multiple application scenario tags corresponding to the copywriting requirement information output by the auto-encoding language model can be implemented in the following manner:

[0047] Input the processed copywriting requirement information into the BERT model to obtain multiple initial application scenario tags corresponding to the processed copywriting requirement information, and perform readjustment processing on the multiple initial application scenario tags based on the pre-set fully connected layer in the BERT model to obtain multiple application scenario tags corresponding to the copywriting requirement information output by the BERT model.

[0048] It should be noted that the fully connected layer belongs to a classification layer. Through the fully connected layer, different multiple application scenario tags corresponding to different copywriting requirement information can be determined. Among them, the auto-encoding language model, such as the BERT model, can be obtained through pre-training.

[0049] In one embodiment, multiple data sets can be prepared in advance. Among them, the data samples in the data set are copywriting requirement information samples of users, and the copywriting requirement information samples of users need to be marked with corresponding tags to define different categories or tags, such as tone, emoji usage, content type, number of words, etc.

[0050] To ensure that the data in the data set meets the format requirements of the BERT model input, the data set can be pre-processed, including word segmentation, removing stop words (such as meaningless common words like "de", "shi", etc.), removing punctuation marks, and pre-training the BERT model through the data set.

[0051] During the application process, the copywriting requirement information can be input into the pre-trained BERT model to obtain multiple application scenario tags corresponding to the copywriting requirement information output by the BERT model, and based on the multiple application scenario tags, the copywriting application scenario information can be determined.

[0052] In step 230, keywords are extracted from the copywriting application scenario information to obtain application scenario keywords, and based on the application scenario keywords, a target text prompt corresponding to the copywriting application scenario information is generated, where the target text prompt is used to guide the GPT model to generate prompt information corresponding to the target text prompt for the copywriting.

[0053] In step 240, the target text prompt is input into the GPT model to obtain the copywriting corresponding to the target text prompt.

[0054] Among them, the target text prompt is used to guide the GPT model to generate prompt information of the copy corresponding to the target text, and the GPT model is a pre-trained GPT model for outputting copy.

[0055] In one embodiment, since the copy application scenario information will affect the generated copy, a target text prompt corresponding to the copy application scenario information, also called a target prompt, may be generated based on the copy application scenario information.

[0056] In another embodiment, keyword extraction can be performed on the copy application scenario information to obtain application scenario keywords, and a target text prompt corresponding to the copy application scenario information is generated based on the application scenario keywords. In one example, the application scenario keywords can directly constitute the target text prompt; in another example, the application scenario keywords can be keywords of the target text prompt.

[0057] Furthermore, based on the GPT model, copywriting corresponding to the target text prompt is generated according to the target text prompt, thereby reducing the reliance on manual labor in the process of creating copywriting and improving the efficiency of copywriting creation.

[0058] The copywriting generation method of the GPT model provided in the present application obtains the copywriting demand information of the user; determines the copywriting application scenario information based on the copywriting demand information; then extracts keywords from the copywriting application scenario information to obtain application scenario keywords, and generates a target text prompt corresponding to the copywriting application scenario information based on the application scenario keywords; then inputs the target text prompt into the GPT model to obtain the copywriting corresponding to the target text prompt, thereby reducing the reliance on manual labor in the process of creating copywriting and improving the efficiency of copywriting creation.

[0059] Figure 4 This is a flow chart of determining the application scenario information of a copy based on multiple application scenario tags provided by this application.

[0060] In order to further introduce the copywriting generation method based on the GPT model provided by this application, Figure 4 Provide explanation.

[0061] In an exemplary embodiment of the present application, Figure 4 It can be seen that based on multiple application scenario tags, determining the copy application scenario information may include steps 410 to 430, and each step will be introduced below.

[0062] In step 410, by performing word meaning extraction processing on each application scenario tag, the word meaning corresponding to each application scenario tag is obtained, and the application scenario tags belonging to the same word meaning are divided into a group to obtain a plurality of scenario tag groups.

[0063] In step 420, determine the target scenario tag group with the largest number of application scenario tags among multiple scenario tag groups.

[0064] In step 430, perform keyword extraction processing on each application scenario tag in the target scenario tag group to obtain tag keywords, and determine the copywriting application scenario information based on the tag keywords.

[0065] In one embodiment, for one copywriting requirement information, multiple application scenario tags can be correspondingly obtained. During the application process, for each application scenario tag, the corresponding word meaning can be obtained, so that the application scenario tags can be grouped, and the application scenario tags belonging to the same word meaning can be divided into one group to obtain multiple scenario tag groups. It can be understood that one copywriting requirement information ultimately needs to determine one copywriting application scenario information. Therefore, it is necessary to determine the final copywriting application scenario information based on multiple application scenario tags.

[0066] To ensure the rationality and accuracy of the obtained final copywriting application scenario information, the word meaning or keyword corresponding to the target scenario tag group with the largest number of application scenario tags can be determined as the copywriting application scenario information.

[0067] In one embodiment, keyword extraction processing can be performed on each application scenario tag in the target scenario tag group to obtain tag keywords, and the copywriting application scenario information can be determined based on the tag keywords. In one example, the tag keywords can be directly used as the copywriting application scenario information. In another example, the tag keywords are the keywords of the copywriting application scenario information.

[0068] In another example, the copywriting application scenario information can include the application scenario information of APP promotion, the application scenario information of official account tweets, the application scenario information of community operation, the application scenario information of online activities, the application scenario information of offline activities, etc. In this embodiment, the copywriting application scenario information is not specifically limited.

[0069] Figure 5 It is a schematic flowchart of generating a target text prompt corresponding to the copywriting application scenario information according to the application scenario keyword provided by this application.

[0070] The following will be combined with Figure 5 to illustrate the process of generating a target text prompt corresponding to the copywriting application scenario information according to the application scenario keyword.

[0071] In an exemplary embodiment of this application, combined with Figure 5 it can be known that generating a target text prompt corresponding to the copywriting application scenario information according to the application scenario keyword may include steps 510 to 540, and each step will be introduced separately below.

[0072] In step 510, based on the application scenario keywords, a text style standard and a tone style standard for outputting the copy in the application scenario corresponding to the copy application scenario information are determined.

[0073] In step 520, based on the text style standard and the tone style standard, an initial text prompt corresponding to the copywriting application scenario information is determined.

[0074] In step 530, the number of occurrences of each word under each application scenario tag is obtained to obtain the word with the most occurrences under each application scenario tag, and the word with the most occurrences is used as a keyword under each application scenario tag.

[0075] In step 540, the keyword is used as a positive reference word for the initial text prompt, and the initial text prompt containing the positive reference word is used as a target text prompt corresponding to the copywriting application scenario information.

[0076] In one embodiment, in order to ensure the rationality and accuracy of the generated target text prompt, two parts are combined to obtain the target text prompt. One part can determine the initial text prompt corresponding to the copy application scenario information based on the copy application scenario information. The other part can determine the corresponding keywords based on the application scenario tag, and obtain the target text prompt based on the initial text prompt and the keywords.

[0077] In one example, a set of mapping tables may be pre-set, wherein the mapping tables may include correspondences between different copywriting application scenario information and different initial text prompts. During the application process, when the copywriting application scenario information is determined, the initial text prompt corresponding to the copywriting application scenario information may be obtained in combination with the mapping table.

[0078] In another example, the text style standard and tone style standard of the copy output in the application scenario corresponding to the copy application scenario information can also be determined based on the application scenario keyword; further, based on the text style standard and tone style standard, the initial text prompt corresponding to the copy application scenario information is determined. In one example, the initial text prompt can be that the text style standard is A and the tone style standard is B.

[0079] It should be noted that the initial text prompt may be a framework prompt about the copy, which may at least include information such as the activity title, image requirements, rule requirements, etc.

[0080] In another embodiment, the number of occurrences of each word under each application scenario tag corresponding to the application scenario information can be obtained. And the word with the most occurrences under each application scenario tag is determined. It can be understood that the word with the most occurrences is the keyword under the application scenario tag. Further, the keyword can be used as a positive reference word for the initial text prompt, and the initial text prompt containing the positive reference word is used as the target text prompt corresponding to the copy application scenario information.

[0081] In another example, the words with higher frequency under each application scenario label can be selected and added to the manually set basic prompt (corresponding to the initial text prompt) to obtain the target text prompt corresponding to the copy application scenario information. Through this embodiment, it can be ensured that the generated target text prompt is more reasonable and more compatible with the application scenario.

[0082] In another exemplary embodiment of the present application, continue with Figure 2 The above embodiment is used as an example to illustrate that when the text does not meet the user's requirements, the text generation method based on the GPT model may further include the following steps:

[0083] Obtaining a target text prompt corresponding to the copy that does not meet the user's requirements, and using the target text prompt as a correction text prompt;

[0084] Based on the application scenario keywords, get the text prompt to be corrected;

[0085] The correction text prompt is used as a negative reference prompt of the text prompt to be corrected, and the text prompt to be corrected containing the negative reference prompt is used as the target text prompt to be retrieved, and

[0086] The retrieved target text prompt is input into the GPT model to obtain the text output by the GPT model corresponding to the retrieved target text prompt.

[0087] In one embodiment, when the user is not satisfied with the generated copy, the target text prompt corresponding to the copy can be obtained, and the target text prompt can be used as a correction text prompt to regenerate the copy requirement information of the user. The correction text prompt is used to prompt the user not to generate the copy corresponding to the correction text prompt.

[0088] Furthermore, based on the text application scenario information corresponding to the text demand information, a text prompt to be corrected corresponding to the text application scenario information is generated. In another example, the text prompt to be corrected can also be obtained based on the application scenario keywords. Furthermore, the corrected text prompt is used as a negative reference prompt for the text prompt to be corrected, and the text prompt to be corrected containing the negative reference prompt is used as the target text prompt to be obtained again. It can be understood that the target text prompt obtained this time includes the corrected text prompt, so that the re-generation of the text that the user is not satisfied with can be avoided.

[0089] The copywriting generation method based on the GPT model provided in this application can be combined with the ChatGPT model and prompts designed for different application scenarios, so as to realize the ability to generate copywriting according to the needs of different scenarios, and can timely change the framework and style of the generated copywriting according to the needs. In the reapplication process, the prompt can guide the ChatGPT model to generate copywriting that meets the needs of specific application scenarios. This design ensures the consistency and adaptability of the generated copywriting, and provides convenience and efficiency in copywriting in the marketing system.

[0090] According to the foregoing description, the copywriting generation method based on the GPT model provided in the present application obtains the user's copywriting demand information; determines the copywriting application scenario information based on the copywriting demand information; then performs keyword extraction on the copywriting application scenario information to obtain application scenario keywords, and generates a target text prompt corresponding to the copywriting application scenario information based on the application scenario keywords; then inputs the target text prompt into the GPT model to obtain the copywriting corresponding to the target text prompt, thereby reducing the reliance on manual labor in the process of creating copywriting and improving the efficiency of copywriting creation.

[0091] The following is a description of the text generation device based on the GPT model provided in the present application. The text generation device based on the GPT model described below and the text generation method based on the GPT model described above can refer to each other.

[0092] Figure 6 It is a structural schematic diagram of the copywriting generation device based on the GPT model provided in this application.

[0093] In an exemplary embodiment of the present application, Figure 6 It can be seen that the text generation device based on the GPT model can include an acquisition module 610, a determination module 620, a processing module 630 and a generation module 640, and each module will be introduced below.

[0094] The acquisition module 610 may be configured to acquire the user's copywriting requirement information;

[0095] The determination module 620 may be configured to determine the copywriting application scenario information based on the copywriting requirement information;

[0096] The processing module 630 may be configured to extract keywords from the copy application scenario information to obtain application scenario keywords, and generate target text prompts corresponding to the copy application scenario information according to the application scenario keywords, wherein the target text prompts are used to guide the GPT model to generate prompt information of the copy corresponding to the target text prompts;

[0097] The generation module 640 may be configured to input the target text prompt into the GPT model to obtain a copy corresponding to the target text prompt.

[0098] In another exemplary embodiment of the present application, the determination module 620 may determine the copywriting application scenario information based on the copywriting requirement information in the following manner:

[0099] The copywriting demand information is processed by word segmentation and stop word removal in sequence to obtain processed copywriting demand information;

[0100] Inputting the processed copy requirement information into the autoencoder language model to obtain a plurality of application scenario labels corresponding to the copy requirement information output by the autoencoder language model, wherein the autoencoder language model is obtained through pre-training;

[0101] Based on multiple application scenario tags, the copy application scenario information is determined.

[0102] In an exemplary embodiment of the present application, the autoencoding language model includes a BERT model, and the determination module 620 can input the processed copy requirement information into the autoencoding language model in the following manner to obtain a plurality of application scenario labels corresponding to the copy requirement information output by the autoencoding language model:

[0103] The processed copywriting requirement information is input into the BERT model to obtain multiple initial application scenario labels corresponding to the processed copywriting requirement information, and the multiple initial application scenario labels are readjusted based on the fully connected layer preset in the BERT model to obtain multiple application scenario labels corresponding to the copywriting requirement information output by the BERT model.

[0104] In an exemplary embodiment of the present application, the determination module 620 may determine the text application scenario information based on multiple application scenario tags in the following manner:

[0105] By performing word meaning extraction processing on each application scenario label, the word meaning corresponding to each application scenario label is obtained, and the application scenario labels belonging to the same word meaning are divided into a group to obtain multiple scenario label groups;

[0106] Determining a target scene label group including the largest number of application scene labels among multiple scene label groups;

[0107] Keyword extraction processing is performed on each application scenario tag in the target scenario tag group to obtain tag keywords, and the copy application scenario information is determined based on the tag keywords.

[0108] In another exemplary embodiment of the present application, the processing module 630 may generate a target text prompt corresponding to the copywriting application scenario information according to the application scenario keywords in the following manner:

[0109] Based on the application scenario keywords, determine the text style standard and tone style standard of the output copy in the application scenario corresponding to the copy application scenario information;

[0110] Based on the text style standard and the tone style standard, determine the initial text prompt corresponding to the copy application scenario information;

[0111] Obtain the number of occurrences of each word under each application scenario label, obtain the word with the most occurrences under each application scenario label, and use the word with the most occurrences as the keyword under each application scenario label;

[0112] The keywords are used as positive reference words for the initial text prompts, and the initial text prompts containing the positive reference words are used as target text prompts corresponding to the copywriting application scenario information.

[0113] In another exemplary embodiment of the present application, when the text does not meet the user's requirements, the processing module 630 may also be configured to:

[0114] Based on the application scenario keywords, get the text prompt to be corrected;

[0115] The correction text prompt is used as a negative reference prompt of the text prompt to be corrected, and the text prompt to be corrected containing the negative reference prompt is used as the target text prompt to be retrieved, and

[0116] The retrieved target text prompt is input into the GPT model to obtain the text output by the GPT model corresponding to the retrieved target text prompt.

[0117] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute a copywriting generation method based on the GPT model, the method comprising: obtaining the copywriting demand information of the user; determining the copywriting application scenario information based on the copywriting demand information; extracting keywords from the copywriting application scenario information to obtain application scenario keywords, and generating a target text prompt corresponding to the copywriting application scenario information according to the application scenario keywords, wherein the target text prompt is used to guide the GPT model to generate prompt information of the copywriting corresponding to the target text prompt; inputting the target text prompt into the GPT model to obtain the copywriting corresponding to the target text prompt.

[0118] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0119] On the other hand, the present application also provides a computer program product, which includes a computer program, and the computer program can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the copy generation method based on the GPT model provided by the above methods, and the method includes: obtaining the user's copy demand information; determining the copy application scenario information based on the copy demand information; performing keyword extraction on the copy application scenario information to obtain application scenario keywords, and generating a target text prompt corresponding to the copy application scenario information based on the application scenario keywords, wherein the target text prompt is used to guide the GPT model to generate prompt information of the copy corresponding to the target text prompt; inputting the target text prompt into the GPT model to obtain the copy corresponding to the target text prompt.

[0120] On the other hand, the present application also provides a computer-readable storage medium, which includes a stored program, wherein the program, when running, executes the copy generation method based on the GPT model provided by the above methods, the method including: obtaining the user's copy demand information; determining the copy application scenario information based on the copy demand information; performing keyword extraction on the copy application scenario information to obtain application scenario keywords, and generating a target text prompt corresponding to the copy application scenario information based on the application scenario keywords, wherein the target text prompt is used to guide the GPT model to generate prompt information of the copy corresponding to the target text prompt; inputting the target text prompt into the GPT model to obtain the copy corresponding to the target text prompt.

[0121] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0122] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0123] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A copywriting generation method based on the GPT model, It is characterized in that The method comprises: Obtain the user's copywriting demand information; Based on the copywriting requirement information, determine copywriting application scenario information; Perform keyword extraction on the copy application scenario information to obtain application scenario keywords, and generate a target text prompt corresponding to the copy application scenario information according to the application scenario keywords, wherein the target text prompt is used to guide the GPT model to generate prompt information of the copy corresponding to the target text prompt; The target text prompt is input into the GPT model to obtain a copy corresponding to the target text prompt.

2. The copywriting generation method based on the GPT model according to claim 1, It is characterized in that Determining the copy application scenario information based on the copy requirement information specifically includes: The copywriting demand information is processed by word segmentation and stop word removal in sequence to obtain processed copywriting demand information; Inputting the processed copy requirement information into an autoencoding language model to obtain a plurality of application scenario labels corresponding to the copy requirement information output by the autoencoding language model, wherein the autoencoding language model is obtained by pre-training; Based on the multiple application scenario tags, the copy application scenario information is determined.

3. The copywriting generation method based on the GPT model according to claim 2, It is characterized in that The auto-encoding language model includes a BERT model, and the processing of the copy requirement information is input into the auto-encoding language model to obtain a plurality of application scenario labels corresponding to the copy requirement information output by the auto-encoding language model, specifically including: The processed copy requirement information is input into the BERT model to obtain a plurality of initial application scenario labels corresponding to the processed copy requirement information, and the plurality of initial application scenario labels are readjusted based on the fully connected layer preset in the BERT model to obtain a plurality of application scenario labels corresponding to the copy requirement information output by the BERT model.

4. The copywriting generation method based on the GPT model according to claim 2, It is characterized in that The determining the copywriting application scenario information based on the multiple application scenario tags specifically includes: By performing word meaning extraction processing on each of the application scenario tags, the word meaning corresponding to each of the application scenario tags is obtained, and the application scenario tags belonging to the same word meaning are divided into a group to obtain a plurality of scenario tag groups; Determining a target scene label group including the largest number of application scene labels from among the multiple scene label groups; Keyword extraction processing is performed on each of the application scenario tags in the target scenario tag group to obtain tag keywords, and the copy application scenario information is determined based on the tag keywords.

5. The copywriting generation method based on the GPT model according to claim 4, It is characterized in that The generating, according to the application scenario keywords, a target text prompt corresponding to the copy application scenario information specifically includes: Based on the application scenario keywords, determining a text style standard and a tone style standard for outputting the copy in the application scenario corresponding to the copy application scenario information; Determining an initial text prompt corresponding to the copywriting application scenario information based on the text style standard and the tone style standard; Obtain the number of occurrences of each word under each of the application scenario tags, obtain the word with the largest number of occurrences under each of the application scenario tags, and use the word with the largest number of occurrences as a keyword under each of the application scenario tags; The keyword is used as a positive reference word for the initial text prompt, and the initial text prompt containing the positive reference word is used as a target text prompt corresponding to the copywriting application scenario information.

6. The copywriting generation method based on the GPT model according to claim 1, It is characterized in that In the case that the copy does not meet the user's requirements, the method further includes: Obtaining a target text prompt corresponding to the copy that does not meet the user's requirements, and using the target text prompt as a correction text prompt; Based on the application scenario keywords, a prompt of the text to be corrected is obtained; Using the corrected text prompt as a negative reference prompt of the text prompt to be corrected, and using the text prompt to be corrected containing the negative reference prompt as a retrieved target text prompt, and The retrieved target text prompt is input into the GPT model to obtain a text output by the GPT model corresponding to the retrieved target text prompt.

7. A copywriting generation device based on the GPT model, It is characterized in that The device comprises: The acquisition module is used to obtain the user's copywriting demand information; A determination module, used to determine the copywriting application scenario information based on the copywriting requirement information; A processing module, configured to extract keywords from the copy application scenario information to obtain application scenario keywords, and generate a target text prompt corresponding to the copy application scenario information according to the application scenario keywords, wherein the target text prompt is used to guide the GPT model to generate prompt information of the copy corresponding to the target text prompt; A generation module is used to input the target text prompt into the GPT model to obtain a copy corresponding to the target text prompt.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein the program, when running, executes the text generation method based on the GPT model described in any one of claims 1 to 6.

9. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to execute the GPT model-based copywriting method according to any one of claims 1 to 6 through the computer program.

10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the GPT model-based copywriting generation method as described in any one of claims 1 to 6 is implemented.