Big language model-based copywriting generation method, storage medium and electronic equipment
Through the copywriting generation method based on the large language model, the limitations of the copywriting generation method in the existing technology in terms of creativity, personalization and adaptability are solved, copywriting content adapted to the styles of different social platforms is generated, and the production efficiency and efficiency of copywriting content are improved. promotion effect.
Patent Information
- Application Number
- CN202410626109.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-09-03
AI Technical Summary
Existing copywriting generation methods have limitations in creativity, personalization and adaptability to different delivery platform styles, making it difficult to generate content that meets the needs of enterprises for diversified marketing activities.
Adopting a copywriting generation method based on a large language model, by obtaining the copywriting category information and demand information determined by the user on the interactive interface of the electronic device, combined with the trained large language model to generate copywriting content that adapts to the styles of different social platforms, including text and picture content .
It has significantly improved the production efficiency and promotion effect of copywriting content, ensuring that the content can accurately cater to the preferences of the audience groups on various social platforms, and improving the promotion effect.
Smart Images

Figure CN118587320A
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home / smart family technology, and more specifically, to a text generation method, storage medium and electronic device based on a large language model. Background Art
[0002] With the rapid development and popularization of social media technology, the demand for enterprises to carry out diversified marketing activities has shown a continuous growth trend. In order to expand the customer base and attract more potential customers, enterprises need to carefully design various promotional materials, including promotional copy for holidays and promotional activities, as well as product promotional pictures. The traditional copywriting content creation process often relies on the experience and judgment of professionals to plan and organize content according to the category and specific needs of the target content, which has certain limitations in time and resources. In recent years, artificial intelligence has made significant progress in the fields of text generation and image generation, making it possible to automatically generate copy and automatically generate pictures. However, current generation methods often have limitations in creativity, personalization, and adaptability to the style of different delivery platforms.
[0003] Accordingly, the art needs a new copywriting generation solution to solve the above problems. Summary of the invention
[0004] In order to overcome the above-mentioned defects, the present application is proposed to provide a copywriting generation method, storage medium and electronic device based on a large language model, which solves or at least partially solves the technical problems that the copywriting content generated by the existing methods lacks creativity and personalization, and cannot adapt to the styles of different delivery platforms.
[0005] In a first aspect, the present application provides a copy generation method based on a large language model, the method being applied to an electronic device with an interactive interface, the method comprising: obtaining copy category information determined by a user on a first interactive interface of the electronic device, the copy category information comprising at least one of hot article category information, event promotion category information, community operation category information, social platform operation category information, and picture production category information; obtaining copy demand information based on the copy category information; generating copy content based on the copy demand information and a trained large language model, the copy content comprising text content and / or picture content.
[0006] In a technical solution of the above-mentioned copy generation method based on a large language model, the copy requirement information is obtained based on the copy category information, including: based on the copy category information determined by the user, displaying a second interactive interface corresponding to the copy category information; and obtaining the copy requirement information determined by the user in the second interactive interface.
[0007] In a technical solution of the above-mentioned copy generation method based on the large language model, the copy demand information determined by the user in the second interactive interface includes: obtaining at least one of the content type information, product name information, product selling point information, target population information, copy style information, word limit information, activity theme information, activity time information, activity content information, activity location information, combined element information, keyword information, greeting direction information, emotion orientation information, festival and solar term information, related topic information, category name information, creation mode information, and usage scenario information determined by the user in the second interactive interface as the copy demand information.
[0008] In a technical solution of the above-mentioned copywriting generation method based on the large language model, the generation of copywriting content based on the copywriting demand information and the trained large language model includes: determining copywriting content keywords based on the copywriting demand information, the copywriting content keywords including text keywords and image keywords; generating text content and / or image content based on the copywriting content keywords and the trained large language model.
[0009] In a technical solution of the above-mentioned copywriting generation method based on the large language model, the copywriting content keywords are determined based on the copywriting demand information, including: generating keyword information based on the copywriting demand information; judging whether the keyword information is a normal keyword; if the keyword information is a normal keyword, using the keyword information as the copywriting content keyword; if the keyword information is an abnormal keyword, generating a first abnormal reminder information.
[0010] In a technical solution of the above-mentioned copywriting generation method based on a large language model, the judging whether the keyword information is a normal keyword includes: calling a sensitive word library to match the keyword information, if the match is successful, judging the keyword information to be an abnormal keyword; if the match fails, judging the keyword information to be a normal keyword.
[0011] In a technical solution of the above-mentioned copywriting generation method based on a large language model, the large language model includes a text generation model; the generation of text content based on the copywriting content keywords and the trained large language model includes: using the trained text generation model to process the text keywords to obtain the text to be detected; calling the sensitive word library to match the text to be detected; if the match is successful, the text to be detected is determined to be abnormal text, and a second abnormal reminder message is generated; if the match fails, the text to be detected is determined to be normal text, and the text to be detected is used as the text content.
[0012] In a technical solution of the above-mentioned copywriting generation method based on a large language model, the large language model includes an image generation model; the generation of picture content based on the copywriting content keywords and the trained large language model includes: obtaining product pictures; preprocessing the product pictures; obtaining picture content based on the picture keywords, the preprocessed product pictures and the trained image generation model.
[0013] In a second aspect, a computer-readable storage medium is provided, wherein a plurality of program codes are stored therein, wherein the program codes are suitable for being loaded and run by a processor to execute the method for generating text based on a large language model as described in any one of the technical solutions of the method for generating text based on a large language model.
[0014] In a third aspect, an electronic device is provided, comprising at least one processor and at least one memory, wherein the memory is suitable for storing a plurality of program codes, and the program codes are suitable for being loaded and run by the processor to execute the text generation method based on a large language model as described in any one of the technical solutions of the above-mentioned text generation method based on a large language model.
[0015] The above one or more technical solutions of the present application have at least one or more of the following beneficial effects:
[0016] The present application discloses a method for generating copy based on a large language model, which is applied to an electronic device with an interactive interface, and specifically includes: obtaining the copy category information determined by the user in the first interactive interface of the electronic device, the copy category information including at least one of the explosive article category information, event promotion category information, community operation category information, social platform operation category information, and picture production category information; obtaining copy demand information based on the copy category information; generating copy content based on the copy demand information and a trained large language model, the copy content including text content and / or picture content. The present application can generate copy content that is adapted to the styles of different social platforms and is both creative and personalized based on copy category information, copy demand information, and a large language model. It not only significantly improves the efficiency of copy content production, but also ensures that the copy content can accurately cater to the preferences of the audience groups of each social platform, thereby greatly improving the promotion effect of the copy content. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art description will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0018] Figure 1 It is a flowchart of the main steps of a method for generating text based on a large language model according to an embodiment of the present application;
[0019] Figure 2 This is a schematic diagram of a first interactive interface of a method for generating text based on a large language model according to an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of a second interactive interface of a method for generating text based on a large language model according to an embodiment of the present application;
[0021] Figure 4 is a schematic diagram of a second interactive interface of a method for generating text based on a large language model according to another embodiment of the present application;
[0022] Figure 5 is a schematic diagram of an interface of a feedback interaction interface of a method for generating text based on a large language model according to another embodiment of the present application;
[0023] Figure 6 It is a schematic diagram of detailed steps for generating picture content according to a method for generating text based on a large language model in accordance with an embodiment of the present application;
[0024] Figure 7 It is a schematic diagram of the main structure block diagram of an electronic device according to an embodiment of the present application. List of reference numerals:
[0025] 71: processor; 72: memory. 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] In the present application, electronic devices may include wireless communication devices and wearable devices, etc., wherein wireless communication devices may be all types of handheld communication devices such as smartphones, tablet computers and other mobile terminals, and wearable devices may be devices such as watches and head-mounted devices (HeadMounted Display, HMD).
[0029] In order to make the purpose, technical solution and advantages of the present invention more clear, the following is a detailed description of the text generation method based on a large language model of the present application in combination with the accompanying drawings and embodiments, taking a smartphone as an example of an electronic device. It should be understood by those skilled in the art that the specific embodiments described herein are only used to explain the present invention, and are not intended to limit the text generation method based on a large language model described in the present invention to using a smartphone as an electronic device.
[0030] Currently, AI has made significant progress in the fields of text generation and image generation, making it possible to automatically generate text and images. However, AI-based generation methods often have limitations in terms of creativity, personalization, and adaptability to different delivery platforms.
[0031] To this end, the present application provides a copywriting generation method based on a large language model, which is applied to an electronic device with an interactive interface, and specifically includes: obtaining the copywriting category information determined by the user in the first interactive interface of the electronic device, the copywriting category information including at least one of the explosive article category information, event promotion category information, community operation category information, social platform operation category information, and picture production category information; obtaining copywriting demand information based on the copywriting category information; generating copywriting content based on the copywriting demand information and a trained large language model, and the copywriting content includes text content and / or picture content. Based on the copywriting category information, copywriting demand information and a large language model, the present application can generate copywriting content that is adapted to the styles of different social platforms and is both creative and personalized. It not only significantly improves the production efficiency of the copywriting content, but also ensures that the copywriting content can accurately cater to the preferences of the audience groups of each social platform, thereby greatly improving the promotion effect of the copywriting content.
[0032] See attached Figure 1 , Figure 1 FIG. 1 is a flow chart of the main steps of a method for generating text based on a large language model according to an embodiment of the present application. Figure 1 As shown, a text generation method based on a large language model of the present application is applied to an electronic device with an interactive interface, and mainly includes the following steps S101-S103.
[0033] Step S101: Acquire text category information determined by a user on a first interactive interface of the electronic device, wherein the text category information includes at least one of popular text category information, activity promotion category information, community operation category information, social platform operation category information, and picture production category information.
[0034] In this embodiment, the first interactive interface of the electronic device refers to an interactive interface for obtaining copy category information. The copy category information limits the type of generated copy content, which may be at least one of hot article category information, event promotion category information, community operation category information, social platform operation category information, and picture production category information.
[0035] Step S102: Acquire copy requirement information based on the copy category information.
[0036] In this embodiment, after determining the copy category information, the corresponding copy requirement information is determined based on the copy category information. The copy requirement information refers to the requirements for the generated copy content, such as the copy style, word limit, target audience, etc. of the copy content.
[0037] Step S103: Generate copy content based on the copy requirement information and the trained large language model, where the copy content includes text content and / or image content.
[0038] Based on the above steps S101 to S103, this application can generate creative and personalized copy content that is adapted to different social platform styles based on copy category information, copy demand information, and a large language model. This not only significantly improves the efficiency of copy content production, but also ensures that the copy content can accurately cater to the preferences of the audience groups on each social platform, thereby greatly improving the promotion effect of the copy content.
[0039] The above step S101 and step S103 are further explained below.
[0040] For step S101, in one embodiment, the copy category information determined by the user on the first interactive interface of the electronic device is obtained, and the copy category information includes at least one of the following: hot article category information, event promotion category information, community operation category information, social platform operation category information, and picture production category information.
[0041] In this embodiment, the first interactive interface of the electronic device refers to an interactive interface for obtaining text category information. Figure 2 Specifically, the copy content to be generated is classified according to the copy popular article category, activity promotion category, community operation category, social platform operation category and picture production category and displayed on the first interactive interface, and at least one of the category information selected by the user on the first interactive interface is obtained as the copy category information.
[0042] The copy category information limits the type of copy content generated. Among them, the hot article category can be to limit the generated copy content to copy content that is suitable for a certain social platform style, the event promotion category can be to limit the generated copy content to copy content that is suitable for the promotion of promotional activities, the community operation category can be to limit the generated copy content to copy content for daily maintenance of existing user communities, the social platform operation category can be to limit the generated copy content to copy content used for promotion on the personal social platforms of corporate sales personnel, and the picture production category information can be to limit the generated copy content to copy content used for picture promotion.
[0043] The above is the description of step S101 , and the following is a further description of step S102 .
[0044] With respect to step S102, the copy requirement information is acquired based on the copy category information.
[0045] In one embodiment, the acquiring of the copy requirement information based on the copy category information includes: based on the copy category information determined by the user, displaying a second interactive interface corresponding to the copy category information; and acquiring the copy requirement information determined by the user on the second interactive interface.
[0046] Specifically, after the user selects a certain text category information in the first interactive interface, the display interface of the electronic device will jump from the first interactive interface to the second interactive interface corresponding to the text category information. For example, if the user selects a hot text category in the first interactive interface, the display interface of the electronic device will jump from the first interactive interface to the second interactive interface corresponding to the hot text category information. Figure 3 As shown, it can be understood that the second interaction interface corresponding to each text category information is different. The user inputs the text requirement information in the second interaction interface, and then obtains the text requirement information determined by the user in the second interaction interface.
[0047] In one embodiment, the obtaining of the copywriting demand information determined by the user in the second interactive interface includes: obtaining at least one of the content type information, product name information, product selling point information, target population information, copywriting style information, word limit information, activity theme information, activity time information, activity content information, activity location information, combined element information, keyword information, greeting direction information, emotion orientation information, festival and solar term information, related topic information, category name information, creation mode information, and usage scenario information determined by the user in the second interactive interface as the copywriting demand information.
[0048] Specifically, each copywriting category information corresponds to different copywriting demand information.
[0049] In some embodiments, the copy requirement information corresponding to each copy category information includes:
[0050] When the copy category information is copy popular article category information, at least one of the content type information, product name information, product selling point information, activity theme information, activity time information, activity content information, target population information, copy style information, and word limit information is obtained as copy demand information.
[0051] In one embodiment, the product selling point information may be directly obtained from the product selling point input by the user, or may be obtained by searching the corresponding selling point of the product in the preset product information database according to the obtained product name information. As the product selling point information, the preset product information database includes the product name information and the corresponding product selling point information. For example, when the product name information is "A refrigerator white", the corresponding product selling point information is searched in the preset product information database according to "A refrigerator white" as "phantom blue body color matching / optical micro-carving panel / purifying water washing module / slim body / visible hot water volume / energy saving / high temperature antibacterial / automatic shutdown / patented anti-electric wall / multiple water use modes".
[0052] The target population information can be household users, general users, young women, young men, the mother and baby group, household users, office workers, etc.
[0053] The copywriting style information can be young and lively, professional and authoritative, literary and fresh, life experience, etc.
[0054] In one embodiment, after the user inputs the copywriting requirement information, the user can choose to save the input copywriting requirement information as common information. The next time the user creates copywriting content, the user can directly select the common information, which is convenient for the user's operation.
[0055] When the copywriting category information is the event promotion category information, at least one of the content type information, event theme information, event time information, event content information, event location information, combined element information, copywriting style information, and word count limit information is obtained as the copywriting requirement information.
[0056] In one embodiment, the event theme information, event time information, event content information, and event location information refer to the detailed information of the event. The combined element information can be information such as seasonal elements, festival elements, and solar term elements.
[0057] When the copywriting category information is the community operation category information, at least one of the content type information, greeting direction information, keyword information, emotional orientation information, and copywriting style information is obtained as the copywriting requirement information.
[0058] In one embodiment, the greeting direction information refers to daily greetings or festival and solar term greetings. The keyword information refers to the theme of the generated copywriting content, such as happiness, warmth, etc. The emotional orientation information refers to the emotional tendency of the generated copywriting content, such as positive, thought-provoking, best wishes, conveying care, life perception, etc.
[0059] When the copywriting category information is the social platform operation category information, at least one of the content type information, product name information, product selling point information, associated topic information, category name information, and copywriting style information is obtained as the copywriting requirement information.
[0060] In one embodiment, the associated topic information refers to popular topics, such as "#Spring Big Promotion Shopping Festival", etc. The category name information refers to the product category name, such as "a certain refrigerator", "a certain washing machine", etc.
[0061] When the copywriting category information is the picture production category information, at least one of the product name information, creation mode information, and usage scenario information is obtained as the copywriting requirement information.
[0062] In one embodiment, the creation mode information can be system pre-generated images and custom creations. The usage scenario information refers to the scene in which the image is generated. For example, the scene of the refrigerator product image is the kitchen, living room, next to a chest of drawers, next to a sofa chair, etc. After the user selects the image creation category in the first interaction interface, the display interface of the electronic device will jump from the first interaction interface to the second interaction interface corresponding to the image creation category information. The second interaction interface corresponding to the image creation category information is as follows: Figure 4 shown.
[0063] The above is the description of step S102 , and the following is a further description of step S103 .
[0064] With respect to step S103, the copy content is generated based on the copy requirement information and the trained large language model, and the copy content includes text content and / or image content. In one embodiment, generating copy content based on the copy demand information and a trained large language model includes: determining copy content keywords based on the copy demand information, the copy content keywords including text keywords and image keywords; generating text content and / or image content based on the copy content keywords and a trained large language model.
[0065] Specifically, the acquired copywriting demand information is spliced to obtain copywriting content keywords, which include text keywords and image keywords. The copywriting content keywords can adopt a common text splicing method, such as combining the copywriting demand information into a string by string concatenation operation; and then generating text content and / or image content according to the copywriting content keywords.
[0066] In one embodiment, determining the copy content keywords based on the copy requirement information includes: generating keyword information based on the copy requirement information; judging whether the keyword information is a normal keyword; if the keyword information is a normal keyword, using the keyword information as the copy content keyword; or, if the keyword information is an abnormal keyword, generating a first abnormal reminder message.
[0067] Specifically, the copy demand information is spliced to obtain keyword information, and it is determined whether the keyword is a normal keyword. If the keyword information is a normal keyword, the keyword information is used as the copy content keyword. If the keyword information is an abnormal keyword, it means that there may be abnormal information in the keyword information, which is not suitable for generating copy content, and a first abnormal reminder message is generated to remind the user that the information input is abnormal. The first abnormal reminder message may be "This topic is not suitable for discussion, let's talk about something else."
[0068] In one embodiment, the determining whether the keyword information is a normal keyword includes: calling a sensitive word library to match the keyword information, if the match is successful, determining that the keyword information is an abnormal keyword; if the match fails, determining that the keyword information is a normal keyword.
[0069] Specifically, the preset sensitive word library contains several sensitive words, and the sensitive word library is used to match the keyword information with sensitive words. If the match is successful, it means that the keyword information contains sensitive words, and the keyword information is determined to be an abnormal keyword; if the match fails, it means that the keyword information does not contain sensitive words, and the keyword information is determined to be a normal keyword. Sensitive word detection for keyword information can prevent the generated copy content from involving sensitive information and improve the quality of the generated copy content.
[0070] In one embodiment, the large language model includes a text generation model; the generating of text content based on the copy content keywords and the trained large language model includes: using the trained text generation model to process the text keywords to obtain the text to be detected; calling the sensitive word library to match the text to be detected; if the match is successful, the text to be detected is determined to be abnormal text, and a second abnormal reminder message is generated; or, if the match fails, the text to be detected is determined to be normal text, and the text to be detected is used as the text content.
[0071] Specifically, the text keywords are converted into structured model input data through the built-in Prompt method. The Prompt method can convert text keywords into a guiding text or question to guide the text generation model to generate specified outputs.
[0072] The text generation model may refer to a generative pre-training transformer (GPT), which is a model that is trained using training sample data to obtain a trained text generation model. The training sample data may be structured model input data based on the conversion of sample text keywords and text content of the historical output of the text generation model. The sample text keywords may be determined through product information, user customer group information, historical product sales information, hot event information, and copy category information.
[0073] Then, the structured model input data is input into the trained text generation model to obtain the text to be detected. The sensitive word library is used to match the text to be detected with sensitive words. If the match is successful, it means that the generated text to be detected contains sensitive words and is not suitable for feedback to the user. The text to be detected is determined to be abnormal text, and a second abnormal reminder message is generated to remind the user that the generated text content is abnormal. The second abnormal reminder message can be "This topic involves sensitive information, let's talk about something else." If the match fails, it means that the generated text to be detected does not involve sensitive information. The text to be detected is determined to be normal text and is fed back to the user as text content.
[0074] In one embodiment, after the user clicks "Generate Now" on the second interactive interface, text content is generated based on the copy content keywords and the trained large language model, and the display interface of the electronic device jumps from the second interactive interface to the feedback interactive interface, and the generated text content is displayed on the feedback interactive interface. The feedback interactive page is as follows: Figure 5 As shown, users can copy the text content displayed below the output copy on this page.
[0075] See attached Figure 6 , Figure 6 It is a flowchart of detailed steps for generating image content according to a method for generating text based on a large language model in accordance with an embodiment of the present application.
[0076] In one embodiment, the large language model includes an image generation model; generating picture content based on the copy content keywords and the trained large language model includes: obtaining product pictures; preprocessing the product pictures; obtaining picture content based on the picture keywords, the preprocessed product pictures and the trained image generation model.
[0077] An image generation model refers to a model commonly used in this field for generating images, such as a generative pre-training transformer (GPT). The image generation model is trained using sample data to obtain a trained image generation model. The sample data may be sample product images, sample scene information, etc.
[0078] like Figure 6 As shown, the image keywords include at least one of product name information, creation mode information, and usage scenario information. Product images can be obtained by obtaining product images of related products in a preset gallery based on the product name information, or by obtaining product images uploaded by users themselves.
[0079] In this embodiment, the preset gallery is classified according to product categories, and four categories are distinguished: refrigerators, washing equipment, air conditioners, and general household appliances. Each category includes multiple products, and each product corresponds to preset pictures of multiple scenes. Each preset picture is added with a used label after being used. When obtaining product pictures, preset pictures without used labels can be preferentially selected in the preset gallery according to the product name information. If all preset pictures corresponding to the product name information have used labels, a preset picture is randomly selected.
[0080] The preset gallery is maintained according to the preset cycle and preset maintenance strategy. For example, the preset cycle can be from 23:00 every night to 7:00 the next morning, and the used tags of the preset images corresponding to all products in the preset gallery are checked. If the preset images corresponding to the product all have used tags, the preset images of the product are supplemented first.
[0081] In addition, the preset pictures without used labels can be supplemented in order from least to most according to the number of preset pictures without used labels in the preset pictures corresponding to the products. For example, in the preset picture library, product A includes 20 preset pictures, and product B includes 20 preset pictures. There are 10 preset pictures without used labels for product A, and 5 preset pictures without used labels for product B. Then, the preset pictures of product B should be supplemented first, and then the preset pictures of product A should be supplemented.
[0082] After obtaining the product images, the product images are preprocessed and edge cutout processing is performed on the product images using the trained edge cutout model. Edge cutout processing refers to removing the border or background of the product image and only retaining the material image of the actual size of the product.
[0083] Then, the preprocessed product image is processed according to the creation mode information. The creation mode information refers to the way of processing the product image. The creation mode information is divided into system pre-generated images and custom creations. When the creation mode information is system pre-generated images, the preprocessed product image is input into the trained image generation model to obtain the image content. When the creation mode information is custom creation, the preprocessed product image and the usage scenario information are input into the trained image generation model to obtain the image content. Furthermore, when the creation mode information is custom creation, the user can also make custom adjustments to the image output by the image generation model, such as adjusting the position of the product image in the output image or scaling the product image, etc., to obtain the image content.
[0084] It is understood by those skilled in the art that all or part of the processes in the method for implementing any of the above embodiments of the present application can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of each of the above method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0085] Furthermore, the present application also provides an electronic device.
[0086] See attached Figure 7 , Figure 7 It is a main structural block diagram of an electronic device according to an embodiment of the present application.
[0087] like Figure 7 As shown, in an electronic device embodiment according to the present application, the electronic device includes at least one processor 71 and at least one memory 72, the memory 72 can be configured to store a program for executing the method for generating text based on a large language model of the above method embodiment, and the processor 71 can be configured to execute the program in the memory, which includes but is not limited to the program for executing the method for generating text based on a large language model of the above method embodiment. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The electronic device can be an electronic device formed by various electronic devices.
[0088] Furthermore, the present application also provides a computer-readable storage medium. In a computer-readable storage medium embodiment according to the present application, the computer-readable storage medium can be configured to store a program for executing the text generation method based on a large language model of the above-mentioned method embodiment, and the program can be loaded and run by the processor to implement the above-mentioned text generation method based on a large language model. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium can be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-temporary computer-readable storage medium.
[0089] Further, it should be understood that since the setting of each module is only for illustrating the functional units of the device of the present application, the physical devices corresponding to these modules may be the processor itself, or a part of the software in the processor, a part of the hardware, or a part of the combination of software and hardware. Therefore, the number of each module in the figure is only schematic.
[0090] Further, it should be understood that the method of the present application is widely used in smart home (Smart Home), smart home, smart home equipment ecology, smart house (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. The above-mentioned network may include but is not limited to at least one of the following: wired network, wireless network. The above-mentioned 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 above-mentioned wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity, wireless fidelity), Bluetooth. The terminal device may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projection equipment, smart TV, smart clothes rack, smart curtain, smart audio and video, smart socket, smart audio, smart speaker, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart sweeping robot, smart window cleaning robot, smart mopping robot, smart air purification equipment, smart steamer, smart microwave oven, smart kitchen treasure, smart purifier, smart water dispenser, smart door lock, etc.
[0091] It is understood by those skilled in the art that each module in the device can be adaptively split or merged. Such splitting or merging of specific modules will not cause the technical solution to deviate from the principle of the present application, and therefore, the technical solutions after splitting or merging will fall within the protection scope of the present application.
[0092] So far, the technical solutions of the present application have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.
Claims
1. A copywriting generation method based on a large language model, the method being applied to an electronic device with an interactive interface, It is characterized in that The method comprises: Acquire text category information determined by a user on a first interactive interface of the electronic device, wherein the text category information includes at least one of popular text category information, activity promotion category information, community operation category information, social platform operation category information, and picture production category information; Acquiring copywriting demand information based on the copywriting category information; Generate copy content based on the copy requirement information and a trained large language model, where the copy content includes text content and / or image content.
2. The method for generating text based on a large language model according to claim 1, It is characterized in that The acquiring of the copy requirement information based on the copy category information includes: Based on the text category information determined by the user, displaying a second interactive interface corresponding to the text category information; Acquire the copywriting requirement information determined by the user in the second interactive interface.
3. The method for generating text based on a large language model according to claim 2, It is characterized in that The obtaining of the copywriting requirement information determined by the user in the second interactive interface includes: Obtain at least one of the content type information, product name information, product selling point information, target population information, copywriting style information, word limit information, activity theme information, activity time information, activity content information, activity location information, combined element information, keyword information, greeting direction information, emotion orientation information, festival and solar term information, related topic information, category name information, creation mode information, and usage scenario information determined by the user in the second interactive interface as the copywriting demand information.
4. The method for generating text based on a large language model according to claim 1, It is characterized in that The generating of the copy content based on the copy requirement information and the trained large language model includes: Determine the copy content keywords based on the copy demand information, wherein the copy content keywords include text keywords and image keywords; Generate text content and / or image content based on the copy content keywords and the trained large language model.
5. The method for generating text based on a large language model according to claim 4, It is characterized in that The determining of the copy content keywords based on the copy requirement information includes: Generate keyword information based on the copywriting demand information; Determining whether the keyword information is a normal keyword; In the case where the keyword information is a normal keyword, using the keyword information as a copy content keyword; When the keyword information is an abnormal keyword, first abnormal reminder information is generated.
6. The method for generating text based on a large language model according to claim 5, It is characterized in that The determining whether the keyword information is a normal keyword includes: Calling a sensitive word library to match the keyword information, and if the match is successful, determining that the keyword information is an abnormal keyword; If the match fails, the keyword information is determined to be a normal keyword.
7. The method for generating text based on a large language model according to claim 4, It is characterized in that The large language model includes a text generation model; the text content is generated based on the copy content keywords and the trained large language model, including: Using a trained text generation model to process the text keywords to obtain a text to be detected; Calling a sensitive word library to match the text to be detected; If the match is successful, the text to be detected is determined to be an abnormal text, and a second abnormal reminder message is generated; If the match fails, the text to be detected is determined to be normal text, and the text to be detected is used as the text content.
8. The method for generating text based on a large language model according to claim 4, It is characterized in that The large language model includes an image generation model; the generating of image content based on the copy content keywords and the trained large language model includes: Get product images; Preprocessing the product image; Based on the image keywords, the preprocessed product images and the trained image generation model, the image content is obtained.
9. 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 method for generating text based on a large language model according to any one of claims 1 to 8.
10. An electronic device comprising at least one memory and at least one processor, It is characterized in that The memory stores a computer program, and the processor is configured to execute the method for generating a text based on a large language model according to any one of claims 1 to 8 through the computer program.
Citation Information
Cited By
Kindergarten teacher copywriting generation method and device, storage medium and equipment
CN121189500A
