Marketing copywriting generation method and system
Acquire marketing hotspot data through web crawling technology and enhance generation technology to screen database data, and generate marketing copy with prompt words, solving the problem of lack of timeliness and targeted copy in the existing technology, achieving high-quality, professional and timely Marketing copy generation.
Patent Information
- Application Number
- CN202411261711.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-27
AI Technical Summary
The existing large language models are difficult to capture real-time market dynamics and in-depth industry knowledge when generating marketing copywriting, resulting in a lack of timeliness and targeted copywriting and cannot reflect the professionalism and depth of a specific industry.
Through web crawling technology, regularly crawl marketing hotspot data, build a marketing database, and use search enhancement generation technology to filter out data matching user needs from the database, combine preset prompt words to generate prompt text information, and input it into the language model to generate Marketing copy.
Ensure that the generated marketing copy is of high quality, professionalism and timeliness, highly conform to user needs and industry characteristics, and improves the pertinence and timeliness of copywriting.
Smart Images

Figure CN119203941A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a marketing copy generation method and system. Background Art
[0002] With the rapid development of information technology, marketing methods are also constantly evolving, and companies are increasingly demanding efficient and accurate marketing copywriting. Against this backdrop, copywriting generation tools based on artificial intelligence and natural language processing technologies have gradually become the focus of corporate attention. Large language models, such as ChatGPT, Wenxinyiyan, and Deepseek, have been widely used in various text generation tasks due to their outstanding performance in the field of content generation. However, these models still face a series of challenges in generating marketing copywriting.
[0003] The training data of the current mainstream large language model mainly comes from public data resources on the Internet, including books, articles, and social media content. These data provide the model with a rich language foundation and generalization ability, allowing the model to perform well in generating content on a wide range of topics. However, this training model still has the following limitations: lack of effective use of real-time market dynamics and in-depth industry knowledge. As a result, the generated copy often fails to quickly capture the pulse of the market, lacks timeliness and pertinence, and also fails to reflect the professionalism and depth of a specific industry.
[0004] The disclosure of the above background technology content is only used to assist in understanding the concept and technical solution of the present invention. It does not necessarily belong to the prior art of this patent application. In the absence of clear evidence that the above content has been disclosed on the filing date of this patent application, the above background technology should not be used to evaluate the novelty and creativity of the present application. Summary of the invention
[0005] The present application provides a marketing copy generation method and system, which can better utilize real-time market dynamics and in-depth industry knowledge, improve the timeliness and pertinence of marketing copy, and ensure that the marketing copy is highly consistent with the specific needs of users, the characteristics of the target industry, and real-time marketing hotspots.
[0006] To achieve the above objectives, the present application discloses the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a method for generating marketing copy, comprising the following steps:
[0008] Based on web crawler technology, multiple target websites are crawled regularly at preset time intervals to obtain marketing hotspot data for various industries;
[0009] Build a marketing database based on marketing hotspot data;
[0010] Obtain users' marketing copywriting needs;
[0011] According to the preset screening conditions, the data matching the marketing copy requirements are screened out from the marketing database using the search enhancement generation technology to obtain a first information set;
[0012] Convert the marketing copy requirements into the first prompt word, and convert the first information set into the second prompt word;
[0013] Generate prompt text information according to the first prompt word and the second prompt word;
[0014] Input the prompt text information into the preset language model to generate marketing copy.
[0015] In an embodiment of the present application, web crawler technology is used to regularly crawl multiple target websites at preset time intervals to obtain the latest marketing hotspot data in various industries, thereby ensuring the real-time nature of the data and enabling subsequent copywriting to be generated based on the latest market information, thereby solving the problem of lack of timeliness of the copywriting.
[0016] By using retrieval enhancement generation technology to filter out data that matches the needs from the marketing database, the generated second prompt word can be closely combined with the specific needs of the user, further improving the pertinence of the marketing copy.
[0017] In addition, since the first prompt word reflects the specific needs and goals of the user, the second prompt word is based on the key information obtained from real-time industry data mining. Therefore, by combining the first prompt word and the second prompt word to generate prompt text information, it can not only meet the personalized needs of users, but also embed the latest industry hot spots and professional knowledge, ensuring the high quality, professionalism and timeliness of the prompt text information. In this way, it can be ensured that the output marketing copy is not only of high quality, but also highly in line with the specific needs of users, the characteristics of the target industry and real-time marketing hot spots.
[0018] In some possible implementations of the first aspect, the marketing database is a vector database; and the step of constructing the marketing database according to the marketing hotspot data includes:
[0019] Preprocess marketing hot spot data, including data filtering, data compression and data formatting;
[0020] Build an external knowledge base based on pre-processed marketing hotspot data;
[0021] Using a latent Dirichlet allocation algorithm to perform topic modeling analysis on the marketing hot spot data in the external knowledge base to obtain a topic distribution result;
[0022] According to the topic distribution results, the pre-processed marketing hot spot data is divided into multiple text blocks according to the preset block conditions;
[0023] Each text block is vectorized by using a preset embedding model to obtain a plurality of first vectors, wherein the plurality of first vectors correspond to the plurality of text blocks one by one;
[0024] The plurality of first vectors and the plurality of text blocks are stored in a preset vector database to obtain a marketing database. The original marketing hotspot data can be purified and standardized by preprocessing, thereby reducing noise and redundant information, thereby reducing redundancy and errors in subsequent steps and improving the efficiency of data processing. The latent Dirichlet allocation (LDA) algorithm is used to perform topic modeling analysis, identify and extract topic information in the data, and provide a basis for subsequent text block segmentation, so that the data can be reasonably divided according to the topic.
[0025] In addition, each text block is vectorized using a preset embedding model to generate multiple first vectors, which converts text data into a numerical form that can be efficiently processed by computers, facilitating complex calculations and analyses, such as semantic similarity calculations, etc. Vectorization greatly enhances the processability and computational efficiency of data.
[0026] Finally, these vectors and text blocks are stored in a preset vector database to build a marketing database. The design of the vector database makes data retrieval faster and more efficient, especially when dealing with large-scale data sets, which can significantly improve retrieval performance and ensure that data that meets the requirements can be found quickly and accurately during the copywriting process.
[0027] In some possible implementations of the first aspect, the block conditions are: each text block includes one or two topics, and the semantic similarity score between the two topics in the text block is greater than a first preset value; the semantic similarity score between each text block is lower than a second preset value. The length of each text block is within a preset length range. In this way, each text block can be focused on one or two topics, and the content in each text block can be focused on the topic to avoid too many different topics in a single block; in addition, it can also ensure that the topics between different text blocks have a strong degree of distinction. Control the size of each text block to ensure that they are neither too large (affecting model processing and retrieval efficiency) nor too small (resulting in loss of contextual information).
[0028] In some possible implementations of the first aspect, according to preset screening conditions, the step of using the search enhancement generation technology to screen out data matching the marketing copy requirements from the marketing database to obtain the first information set includes:
[0029] The marketing copy requirement is vectorized using a preset embedding model to obtain a second vector; the second vector has the same dimension and representation as the first vector;
[0030] Using a cosine similarity algorithm to calculate a semantic similarity score between the second vector and each first vector stored in the vector database, and screening out top K first vectors with the highest scores to obtain a first vector set;
[0031] The text block corresponding to each first vector in the first vector set is obtained to form a first information set. After the requirements are vectorized using the embedding model, the cosine similarity between these vectors and the first vectors stored in the database is calculated, which can effectively measure the semantic relevance, more accurately capture the user's intention, reduce data interference irrelevant to the requirements, and ensure that the content of the filtered text blocks highly matches the user's requirements, thereby improving the quality and relevance of the generated copy. In addition, vectorization and cosine similarity calculation are efficient mathematical operations. When used in conjunction with the vector database, compared with the traditional text-by-text matching method, they greatly shorten the time for data screening and retrieval, and improve the system's response speed and user experience.
[0032] In some possible implementations of the first aspect, the step of generating prompt text information according to the first prompt word and the second prompt word includes:
[0033] Get a prompt text information template, which includes preset text and multiple placeholders;
[0034] The first prompt word and the second prompt word are filled into a plurality of placeholders to obtain prompt text information. Among them, by using a preset text information template to generate the prompt text information, the standardization and consistency of the generation process can be ensured. The text information template includes a fixed text structure and placeholder positions, and these placeholders specify the specific places where the prompt words need to be inserted. In this way, the generated prompt text information is consistent in structure and format, reducing the risk of confusion or information omission.
[0035] In some possible implementations of the first aspect, the marketing hot spot data includes at least one of the following information: hot topics, hot marketing copy, hot tags, hot search terms and hot brands.
[0036] In a second aspect, the present application embodiment provides a marketing copy generation system, including:
[0037] The crawling module is used to crawl multiple target websites regularly at preset time intervals based on web crawler technology to obtain marketing hotspot data of various industries;
[0038] A construction module is used to construct a marketing database based on marketing hotspot data;
[0039] Acquisition module, used to obtain users' marketing copy requirements;
[0040] A screening module, used to screen out data matching the marketing copy requirement from the marketing database using the search enhancement generation technology according to the preset screening conditions, and obtain a first information set;
[0041] A conversion module, used to convert the marketing copy requirement into a first prompt word, and convert the first information set into a second prompt word;
[0042] A first generating module, used for generating prompt text information according to the first prompt word and the second prompt word;
[0043] The second generation module is used to input the prompt text information into a preset language model to generate marketing copy.
[0044] In some possible implementations of the second aspect, the marketing database is a vector database; and the construction module is specifically used for:
[0045] Preprocess marketing hot spot data, including data filtering, data compression and data formatting;
[0046] Build an external knowledge base based on pre-processed marketing hotspot data;
[0047] Using a latent Dirichlet allocation algorithm to perform topic modeling analysis on the marketing hot spot data in the external knowledge base to obtain a topic distribution result;
[0048] According to the topic distribution results, the pre-processed marketing hot spot data is divided into multiple text blocks according to the preset block conditions;
[0049] Each text block is vectorized by using a preset embedding model to obtain a plurality of first vectors, wherein the plurality of first vectors correspond to the plurality of text blocks one by one;
[0050] The plurality of first vectors and the plurality of text blocks are stored in a preset vector database to obtain a marketing database.
[0051] In some possible implementations of the second aspect, the block segmentation conditions are: each text block includes one or two topics, and the semantic similarity score between the two topics in the text block is greater than a first preset value; the semantic similarity score between each text block is lower than a second preset value; and the length of each text block is within a preset length range.
[0052] In some possible implementations of the second aspect, the screening module is specifically used for:
[0053] The marketing copy requirement is vectorized using a preset embedding model to obtain a second vector; the second vector has the same dimension and representation as the first vector;
[0054] Using a cosine similarity algorithm to calculate a semantic similarity score between the second vector and each first vector stored in the vector database, and screening out top K first vectors with the highest scores to obtain a first vector set;
[0055] A text block corresponding to each first vector in the first vector set is obtained to form a first information set.
[0056] In some possible implementations of the second aspect, the first generating module is specifically used to:
[0057] Get a prompt text information template, which includes preset text and multiple placeholders;
[0058] The first prompt word and the second prompt word are filled into a plurality of placeholders to obtain prompt text information.
[0059] In some possible implementations of the second aspect, the marketing hot spot data includes at least one of the following information: hot topics, hot marketing copy, hot tags, hot search terms and hot brands.
[0060] In a third aspect, an embodiment of the present application provides an electronic device, comprising one or more processors; a storage device on which one or more programs are stored; when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any technical solution of the first aspect.
[0061] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processing device, the method described in any technical solution of the first aspect is implemented.
[0062] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processing device, implements the method described in any technical solution of the first aspect.
[0063] Among them, the technical effects brought about by any design method in the second to fifth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0065] Figure 1 A schematic diagram of a marketing copy generation method provided in some embodiments of the present application Figure 1 ;
[0066] Figure 2 A schematic diagram of a marketing copy generation method provided in some embodiments of the present application Figure 2 ;
[0067] Figure 3 A schematic diagram of a marketing copy generation method provided in some embodiments of the present application Figure 3 ;
[0068] Figure 4 A schematic diagram of the structure of a marketing copy generation system provided in some embodiments of the present application;
[0069] Figure 5 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present application. DETAILED DESCRIPTION
[0070] Specific embodiments of the present invention will now be mentioned in detail. Although the present invention is described in conjunction with these specific embodiments, it should be appreciated that it is not intended to limit the present invention to these specific embodiments. On the contrary, these embodiments are intended to cover substitutions, changes or equivalent embodiments that may be included in the spirit and scope of the invention defined by the claims. In the following description, a large number of specific details are set forth in order to provide a comprehensive understanding of the present invention. The present invention may be implemented without some or all of these specific details.
[0071] When used in conjunction with "including," "methods comprising," or similar language in this specification and the appended claims, the singular forms "a," "an," and "the" include plural references unless the context clearly dictates otherwise. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0072] With the rapid development of information technology, marketing methods are also constantly evolving, and companies are increasingly demanding efficient and accurate marketing copywriting. Against this backdrop, copywriting generation tools based on artificial intelligence and natural language processing technologies have gradually become the focus of corporate attention. Large language models, such as ChatGPT, Wenxinyiyan, and Deepseek, have been widely used in various text generation tasks due to their outstanding performance in the field of content generation. However, these models still face a series of challenges in generating marketing copywriting.
[0073] The training data of the current mainstream large language model mainly comes from public data resources on the Internet, including books, articles, and social media content. These data provide the model with a rich language foundation and generalization ability, allowing the model to perform well in generating content on a wide range of topics. However, this training model still has the following limitations: lack of effective use of real-time market dynamics and in-depth industry knowledge. As a result, the generated copy often fails to quickly capture the pulse of the market, lacks timeliness and pertinence, and also fails to reflect the professionalism and depth of a specific industry.
[0074] In response to the above technical problems, the overall idea of the technical solution provided by the present application is as follows: The embodiment of the present application provides a marketing copy generation method, including the following steps: based on web crawler technology, regularly crawling multiple target websites at preset time intervals to obtain marketing hotspot data of various industries; building a marketing database based on the marketing hotspot data; obtaining users' marketing copy needs; according to preset screening conditions, using retrieval enhancement generation technology to filter out data matching the marketing copy needs from the marketing database to obtain a first information set; converting the marketing copy needs into a first prompt word, and converting the first information set into a second prompt word; generating prompt text information based on the first prompt word and the second prompt word; inputting the prompt text information into a preset language model to generate marketing copy.
[0075] By using web crawler technology, multiple target websites are regularly crawled at preset time intervals to obtain the latest marketing hotspot data of various industries, ensuring the real-time nature of the data, so that the subsequent copywriting can be based on the latest market information, thereby solving the problem of lack of timeliness of the copywriting. By using retrieval enhancement generation technology to filter out data that matches the needs from the marketing database, the generated second prompt word can be closely combined with the specific needs of the user, further improving the pertinence of the marketing copy. In addition, since the first prompt word reflects the specific needs and goals of the user; the second prompt word is based on the key information obtained by real-time industry data mining. Therefore, by combining the first prompt word and the second prompt word to generate prompt text information, it can not only meet the personalized needs of the user, but also embed the latest industry hotspots and professional knowledge, ensuring the high quality, professionalism and timeliness of the prompt text information. In this way, it can be ensured that the output marketing copy is not only of high quality, but also highly fits the specific needs of the user, the characteristics of the target industry and the real-time marketing hotspots.
[0076] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application will be specifically described below in conjunction with the drawings in the specification.
[0077] See also Figure 1 Combined with Figure 2 and Figure 3The present application embodiment provides a method for generating marketing copy, comprising the following steps:
[0078] S101: Based on the web crawler technology, multiple target websites are regularly crawled at preset time intervals to obtain marketing hotspot data of various industries;
[0079] Specifically, in some embodiments, the execution subject (e.g., server) of the marketing copy generation method can crawl data from the target website URL through the necessary software and libraries installed thereon for writing and running crawlers. For example, Python language is often used to write crawler programs, and commonly used libraries include requests, BeautifulSoup, and Scrapy. Task scheduling tools, such as cron (on Linux) or Windows Task Scheduler, can be used to run crawler scripts on a regular basis. Among them, marketing hot data includes but is not limited to hot topics, hot marketing copy, hot tags, hot search terms, and hot brands.
[0080] S102: Building a marketing database based on marketing hotspot data;
[0081] Specifically, in some embodiments, the marketing database may be a vector database; the above execution entity may construct the marketing database according to the marketing hotspot data through the following steps:
[0082] The first step is to preprocess the marketing hotspot data, which includes data filtering, data compression and data formatting. Specifically: First, the crawled raw data is carefully screened to remove useless or redundant information, such as advertising content, web page footers and other data that are not directly related to marketing hotspots. This step is to purify the data source and ensure the effectiveness of subsequent analysis. Subsequently, the data is compressed to reduce the data volume, improve storage efficiency and processing speed. This includes removing unnecessary blank characters in the data, deleting duplicate rows or records, and other possible redundant information. Finally, the filtered and compressed data is uniformly formatted to ensure data consistency and convenience for subsequent processing. Formatting includes standardized character encoding (such as unified UTF-8), removal of special characters (such as non-text characters, control characters, etc.), and conversion of data into a specific text format suitable for subsequent analysis or application.
[0083] The second step is to build an external knowledge base based on the pre-processed marketing hot spot data;
[0084] The third step is to use the Latent Dirichlet Allocation (LDA) algorithm to perform topic modeling analysis on the marketing hot spot data in the external knowledge base to obtain topic distribution results;
[0085] Among them, the LDA algorithm learns the topic-word distribution and document-topic distribution through repeated iterations, and can eventually provide a topic distribution for each document (for example, telling us which industry topics this document is about), and a word distribution for each topic (for example, telling us which keywords each industry topic contains). Applying the LDA (Latent Dirichlet Allocation) topic model to the text chunking process of RAG can help to semantically segment the text and ensure that the content topic in each chunk is concentrated and relatively independent. This method is particularly suitable for long documents and multi-topic texts, and improves the coherence and relevance of content in generation and retrieval tasks.
[0086] For example: If we have a document about the electrical appliance industry, possible topics include "air conditioning", "television", "washing machine", etc. Each topic has its own vocabulary, such as "refrigeration", "liquid crystal", "cleaning", etc.
[0087] The specific process is as follows:
[0088] Use LDA to perform topic modeling on the preprocessed text:
[0089] Determine the number of topics: Determine the number of topics (K) in the LDA model based on different industries in the marketing field.
[0090] Training the LDA model: LDA generates a topic distribution for each document by iteratively estimating the document-topic distribution and topic-word distribution. The specific steps are as follows:
[0091] 1. Initialization:
[0092] Use Dirichlet distribution to initialize the topic distribution of each document and the word distribution of each topic. Dirichlet distribution is the conjugate prior distribution of multinomial distribution and is suitable for processing multivariate variables of probability distribution.
[0093] 2. Topic allocation (Gibbs sampling):
[0094] Conditional probability calculation: For each word in the document, calculate the conditional probability of it being assigned to each topic. This conditional probability depends on two parts:
[0095] Word-topic distribution: the probability of the current word in the topic.
[0096] Topic-document distribution: the distribution probability of topics in the document.
[0097] 3. Reassign topics: Reassign topics to words based on the above conditional probabilities. This process is implemented through Gibbs sampling, which gradually adjusts the topic label of each word.
[0098] 4. Parameter update:
[0099] Document-topic distribution update: Update the topic distribution of each document, which reflects the relative importance of each topic in the document.
[0100] Topic-word distribution update: Update the word distribution of each topic. This distribution represents the probability of occurrence of each word under the topic.
[0101] 5. Convergence detection:
[0102] Monitor changes: After each iteration, calculate the change in document-topic distribution and topic-word distribution. If the change is lower than the preset threshold, the model is considered to have converged.
[0103] Step 4: According to the topic distribution results, the pre-processed marketing hot spot data is divided into multiple text blocks according to the preset block conditions;
[0104] Specifically, the block conditions can be: each text block includes one or two topics, the semantic similarity score between the two topics in the text block is greater than a first preset value; the semantic similarity score between each text block is lower than a second preset value; the length of each text block is within a preset length range. In this way, each text block can focus on one or two topics, and ensure that the content in each text block is focused on the topic, avoiding too many different topics in a single block; in addition, it can also ensure that the topics between different text blocks have a strong degree of distinction. Control the size of each text block to ensure that they are neither too large (affecting model processing and retrieval efficiency) nor too small (causing contextual information to be lost).
[0105] The following is an example of chunking: Suppose we select three topics and use LDA to perform topic modeling on the documents:
[0106] Topic 1 (Smart Home Appliances): Smart refrigerators, smart washing machines, smart home appliances, home networks, Wi-Fi 6
[0107] Theme 2 (air conditioners and washing machines): air conditioners, energy saving and environmental protection, intelligent temperature control systems, drum washing machines, sterilization functions
[0108] Topic 3 (TV technology): OLED screen, TV technology, visual experience
[0109] After the LDA model is trained, the topic distribution of the documents may be as follows:
[0110] Paragraph 1: 70% Topic 1, 20% Topic 2, 10% Topic 3
[0111] Paragraph 2: 10% Topic 1, 80% Topic 2, 10% Topic 3
[0112] Section 3: 15% Topic 1, 70% Topic 2, 15% Topic 3
[0113] Paragraph 4: 80% Topic 1, 10% Topic 2, 10% Topic 3 ......
[0115] Analyze the topic distribution of the document and determine the main topic of each paragraph. Here we can set a threshold (for example, 60%). If the distribution of a paragraph on a topic exceeds this threshold, it is considered that the paragraph mainly belongs to this topic.
[0116] Paragraph 1: Mainly belongs to Topic 1 (smart home appliances)
[0117] Paragraph 2: Mainly belongs to Topic 2 (Air Conditioner and Washing Machine)
[0118] Paragraph 3: Mainly belongs to Topic 2 (air conditioners and washing machines)
[0119] Paragraph 4: Mainly belongs to Topic 1 (smart home appliances) ......
[0121] According to the topic distribution, the document is divided into multiple blocks. Each block focuses on one or two topics, and the topics between different blocks are highly distinguishable.
[0122] Block 1: contains paragraphs 1 and 4, mainly focusing on topic 1 (smart home appliances)
[0123] Block 2: contains paragraphs 2 and 3, mainly focusing on topic 2 (air conditioners and washing machines)
[0124] Block 3: contains paragraph 5, mainly focusing on Topic 3 (TV Technology)
[0125] Block 4: contains paragraph 6. Since the topics are evenly distributed, we can assign it to block 1, block 2, or block 3 based on the context. Here we assume that we assign it to block 1. ......
[0127] After segmentation, we get the following blocks:
[0128] Block 1 (smart home appliances):
[0129] Paragraph 1: Modern families are increasingly relying on smart home appliances, such as smart refrigerators and smart washing machines. These devices can be connected to the Internet for remote control and status monitoring, greatly facilitating users' lives.
[0130] Paragraph 4: The popularity of smart home appliances makes home networks increasingly important. The introduction of Wi-Fi 6 technology makes multi-device connections more stable and faster, and can meet the networking needs of many smart devices in the home.
[0131] Paragraph 6: The electrical appliance industry continues to innovate. For example, many companies are beginning to explore the application of artificial intelligence technology in home appliances to achieve smarter functions and higher levels of automation.
[0132] Block 2 (air conditioner and washing machine):......
[0133] Block 3 (TV Technology): ...
[0134] In this example, after LDA topic modeling and text block segmentation, we obtained three main blocks, and the content in each block is relatively concentrated and independent in terms of topic. Each block contains 1-3 paragraphs, and the block size is moderate, which can maintain the integrity of the context without being too large.
[0135] Step 5: vectorize each text block using a preset embedding model to obtain a plurality of first vectors, wherein the plurality of first vectors correspond to the plurality of text blocks one by one;
[0136] Specifically, a pre-trained LLM model can be used, that is, a model that learns the semantic representation of text from a large amount of corpus through deep learning.
[0137] For example, BERT, GanymedeNil / text2vec-large-chinese, etc. The preprocessed text is input into the embedding model, and a fixed-length vector representation (embeddings) is output. These vectors contain the semantic features of the text, so that the distance between semantically similar texts is shorter in the vector space.
[0138] In the sixth step, the plurality of first vectors and the plurality of text blocks are stored in a preset vector database to obtain a marketing database.
[0139] Specifically, in some embodiments, all vector data can be indexed using a selected index structure (such as FAISS (Facebook AI Similarity Search)). This process includes operations such as clustering and quantizing the vectors, which can enable efficient filtering and sorting during queries. The indexed vector data is stored in a vector database (such as Chroma, Milvus, etc.), and the vector database is defined as a retriever component. The database supports fast search for text blocks that are semantically similar to any string (such as a question).
[0140] In the above embodiment, by preprocessing the original marketing hot spot data, the original marketing hot spot data can be purified and standardized, reducing noise and redundant information, thereby reducing redundancy and errors in subsequent steps and improving the efficiency of data processing. The latent Dirichlet allocation (LDA) algorithm is used to perform topic modeling analysis, identify and extract topic information in the data, and provide a basis for subsequent text block segmentation, so that the data can be reasonably divided according to the topic.
[0141] In addition, each text block is vectorized using a preset embedding model to generate multiple first vectors, which converts text data into a numerical form that can be efficiently processed by computers, facilitating complex calculations and analyses, such as semantic similarity calculations, etc. Vectorization greatly enhances the processability and computational efficiency of data.
[0142] Finally, these vectors and text blocks are stored in a preset vector database to build a marketing database. The design of the vector database makes data retrieval faster and more efficient, especially when dealing with large-scale data sets, which can significantly improve retrieval performance and ensure that data that meets the requirements can be found quickly and accurately during the copywriting process.
[0143] S103: Obtaining the user's marketing copywriting needs;
[0144] In some embodiments, the execution subject can be connected to the terminal device via a wired connection or a wireless connection, and obtain the user's marketing copy requirements through the client (application) installed on the terminal device. Specifically, it can be obtained through natural language input, form filling, or voice input.
[0145] S104: According to preset screening conditions, data matching the marketing copy requirements are screened out from the marketing database using the search enhancement generation technology to obtain a first information set.
[0146] Specifically, in some embodiments, the execution subject may filter out data matching the marketing copy requirement from the marketing database using the search enhancement generation technology according to preset screening conditions to obtain the first information set through the following steps:
[0147] In the first step, the marketing copy requirements are vectorized using a preset embedding model to obtain a second vector; the second vector has the same dimension and representation as the first vector;
[0148] The second step is to use the cosine similarity algorithm to calculate the semantic similarity score between the second vector and each first vector stored in the vector database, and select the top K first vectors with the highest scores to obtain a first vector set;
[0149] Specifically, cosine similarity is used to calculate the similarity between the query vector and the vectors in the database. Cosine similarity measures the angle between two vectors, and the closer the value is to 1, the more similar the vectors are. Before searching, the vectors in the database are sorted according to similarity, and the most relevant content to the query is retrieved from them.
[0150] The third step is to obtain the text blocks corresponding to each first vector in the first vector set to form a first information set. Specifically, these text blocks may contain answers to questions, such as popular copywriting, hot topics, and hot tags related to children's toys. For example:
[0151] Text block 1: "This toy can not only improve children's hands-on ability, but also stimulate their creativity."
[0152] Text block 2: "Children's toys should focus on safety and fun. This product has passed multiple safety tests."
[0153] Text Block 3: "Our toys are uniquely designed and brightly colored, perfect for kids aged 3-6."
[0154] Text block 4: "XX brand is committed to providing children with high-quality toys to accompany them in their happy growth."
[0155] Text Block 5: "For a limited time only, buy this toy now and enjoy 20% off!"
[0156] In this embodiment, after vectorizing the requirements using the embedding model, the cosine similarity between these vectors and the first vector stored in the database is calculated, which can effectively measure the semantic relevance, more accurately capture the user's intention, reduce data interference irrelevant to the requirements, and ensure that the content of the filtered text blocks highly matches the user's requirements, thereby improving the quality and relevance of the generated copy. In addition, vectorization and cosine similarity calculation are efficient mathematical operations. When used in conjunction with the vector database, compared with the traditional text-by-text matching method, the time for data screening and retrieval is greatly shortened, and the system response speed and user experience are improved.
[0157] S105: converting the marketing copy requirement into a first prompt word, and converting the first information set into a second prompt word;
[0158] S106: Generate prompt text information according to the first prompt word and the second prompt word.
[0159] Specifically, in some embodiments, the execution subject may generate prompt text information according to the first prompt word and the second prompt word through the following steps:
[0160] The first step is to obtain a prompt text information template, which includes a preset text and multiple placeholders;
[0161] In the second step, the first prompt word and the second prompt word are filled into a plurality of placeholders to obtain prompt text information. Among them, by using a preset text information template to generate the prompt text information, the standardization and consistency of the generation process can be ensured. The text information template contains a fixed text structure and placeholder positions, which specify the specific places where the prompt words need to be inserted. In this way, the generated prompt text information is consistent in structure and format, reducing the risk of confusion or information omission.
[0162] For example: Prompt template: "Please write a promotional copy about [product], you can refer to the following content: ...Benefits: [benefits], [additional benefits]. Promotion: [promotion]..."
[0163] Insert "XX children's toys" as the product name into the [product] position in the template, and extract relevant features and advantages information from similar text blocks and fill them into the template to form prompt text information.
[0164] S107: Input the prompt text information into a preset language model to generate marketing copy.
[0165] Specifically, in some embodiments, the preset language model may be LLama3.
[0166] See also Figure 4 Based on the same inventive concept as the marketing copy generation method in the aforementioned embodiment, the present application embodiment provides a marketing copy generation system, including:
[0167] The crawling module 201 is used to crawl multiple target websites regularly at preset time intervals based on web crawler technology to obtain marketing hotspot data of various industries;
[0168] A construction module 202 is used to construct a marketing database based on marketing hotspot data;
[0169] Acquisition module 203, used to acquire the user's marketing copy requirements;
[0170] The screening module 204 is used to screen out data matching the marketing copy requirement from the marketing database using the search enhancement generation technology according to the preset screening conditions to obtain a first information set;
[0171] A conversion module 205, used to convert the marketing copy requirement into a first prompt word, and convert the first information set into a second prompt word;
[0172] A first generating module 206, configured to generate prompt text information according to the first prompt word and the second prompt word;
[0173] The second generating module 207 is used to input the prompt text information into a preset language model to generate a marketing copy.
[0174] In some embodiments, the marketing hot spot data includes at least one of the following information: hot topics, hot marketing copy, hot tags, hot search terms and hot brands.
[0175] In some embodiments, the marketing database is a vector database; the construction module 202 is specifically used to: preprocess the marketing hot spot data, the preprocessing includes data filtering, data compression and data formatting; construct an external knowledge base based on the preprocessed marketing hot spot data; use the latent Dirichlet allocation algorithm to perform topic modeling analysis on the marketing hot spot data in the external knowledge base to obtain topic distribution results; based on the topic distribution results, divide the preprocessed marketing hot spot data into multiple text blocks according to preset block conditions; use a preset embedding model to vectorize each text block to obtain multiple first vectors, and the multiple first vectors correspond one-to-one to the multiple text blocks; store the multiple first vectors and the multiple text blocks in a preset vector database to obtain a marketing database.
[0176] In some embodiments, the block segmentation conditions are: each text block includes one or two topics, and the semantic similarity score between the two topics in the text block is greater than a first preset value; the semantic similarity score between each text block is lower than a second preset value; and the length of each text block is within a preset length range.
[0177] In some embodiments, the screening module 204 is specifically used to: use a preset embedding model to vectorize the marketing copy requirements to obtain a second vector; the second vector has the same dimension and representation as the first vector; use a cosine similarity algorithm to calculate the semantic similarity score between the second vector and each first vector stored in the vector database, and screen out the top K first vectors with the highest scores to obtain a first vector set; obtain the text block corresponding to each first vector in the first vector set to form a first information set.
[0178] In some possible implementations of the second aspect, the first generating module 206 is specifically used to: obtain a prompt text information template, the prompt text information template includes preset text and multiple placeholders; fill the first prompt word and the second prompt word into the multiple placeholders to obtain prompt text information.
[0179] It is understandable that the modules and references recorded in the marketing copy generation system Figure 1Therefore, the operations, features and beneficial effects described above for the method are also applicable to the marketing copy generation system and the modules contained therein, and will not be described in detail here.
[0180] See also Figure 5 Based on the inventive concept of a marketing copy generation method in the above embodiment, the embodiment of the present application provides an electronic device. The electronic device may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), etc., and fixed terminals such as digital TVs, desktop computers, etc., as well as a separate server or server cluster.
[0181] The electronic device includes a processing device 301 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a ROM 302 (read-only memory) or a program loaded from a storage device 308 into a RAM 303 (random access memory). Various programs and data required for the operation of the electronic device are also stored in the RAM 303. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output interface (i.e., an I / O interface 305) is also connected to the bus 304.
[0182] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data.
[0183] In particular, according to some embodiments of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present application are executed.
[0184] It should be noted that the computer-readable medium recorded in some embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In some embodiments of the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0185] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0186] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the method steps of any of the above technical solutions may be implemented.
[0187] Computer program code for performing the operations of some embodiments of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0188] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0189] The modules described in some embodiments of the present application may be implemented in software or hardware, and the modules described may also be arranged in a processor.
[0190] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0191] Some embodiments of the present application also provide a computer program product, including a computer program, which implements any of the above-mentioned marketing copy generation methods when executed by a processor.
[0192] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the present invention can be implemented using a combination of hardware and software. When software is used, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. Storage media can be any available media that can be accessed by general or special-purpose computers.
[0193] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made on the basis of the present invention. Therefore, these modifications or improvements made on the basis of not departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.
Claims
1. A method for generating marketing copy, characterized in that: The following steps are involved: Based on web crawler technology, multiple target websites are crawled regularly at preset time intervals to obtain marketing hotspot data for various industries; Building a marketing database based on the marketing hotspot data; Obtain users' marketing copywriting needs; According to preset screening conditions, data matching the marketing copy requirement is screened out from the marketing database using search enhancement generation technology to obtain a first information set; Convert the marketing copy requirement into a first prompt word, and convert the first information set into a second prompt word; Generate prompt text information according to the first prompt word and the second prompt word; The prompt text information is input into a preset language model to generate a marketing copy.
2. The method for generating marketing copy according to claim 1, characterized in that: The marketing database is a vector database; the step of constructing the marketing database according to the marketing hotspot data includes: Preprocessing the marketing hotspot data, wherein the preprocessing includes data filtering, data compression, and data formatting; Build an external knowledge base based on pre-processed marketing hotspot data; Using a latent Dirichlet allocation algorithm to perform topic modeling analysis on the marketing hot spot data in the external knowledge base to obtain a topic distribution result; According to the topic distribution result, the pre-processed marketing hot spot data is divided into multiple text blocks according to preset block conditions; Performing vectorization processing on each of the text blocks using a preset embedding model to obtain a plurality of first vectors, wherein the plurality of first vectors correspond one-to-one to the plurality of text blocks; The plurality of the first vectors and the plurality of the text blocks are stored in a preset vector database to obtain the marketing database.
3. The method for generating marketing copy according to claim 2, characterized in that: The block division conditions are: each text block includes one or two topics, and the semantic similarity score between the two topics in the text block is greater than a first preset value; the semantic similarity score between each text block is lower than a second preset value, and the length of each text block is within a preset length range.
4. The method for generating marketing copy according to claim 3, characterized in that: The step of obtaining the first information set by filtering data matching the marketing copy requirement from the marketing database using the search enhancement generation technology according to the preset screening conditions comprises: Vectorizing the marketing copy requirement using a preset embedding model to obtain a second vector; the second vector has the same dimension and representation as the first vector; Calculate the semantic similarity score between the second vector and each of the first vectors stored in the vector database using a cosine similarity algorithm, and select top K first vectors with the highest scores to obtain a first vector set; A text block corresponding to each first vector in the first vector set is obtained to form the first information set.
5. The method for generating marketing copy according to any one of claims 1 to 4, characterized in that: The step of generating prompt text information according to the first prompt word and the second prompt word includes: Acquire a prompt text information template, wherein the prompt text information template includes a preset text and a plurality of placeholders; The first prompt word and the second prompt word are filled into the plurality of the placeholders to obtain the prompt text information.
6. The method for generating marketing copy according to claim 1, characterized in that: The marketing hot spot data includes at least one of the following information: hot topics, hot marketing copy, hot tags, hot search terms and hot brands.
7. A marketing copy generation system, characterized in that: include: The crawling module is used to crawl multiple target websites regularly at preset time intervals based on web crawler technology to obtain marketing hotspot data of various industries; A construction module, used to construct a marketing database according to the marketing hotspot data; Acquisition module, used to obtain users' marketing copy requirements; A screening module, configured to screen out data matching the marketing copy requirement from the marketing database using a search enhancement generation technology according to a preset screening condition, to obtain a first information set; A conversion module, used to convert the marketing copy requirement into a first prompt word, and convert the first information set into a second prompt word; A first generating module, used for generating prompt text information according to the first prompt word and the second prompt word; The second generating module is used to input the prompt text information into a preset language model to generate a marketing copy.
8. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processing device, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processing device, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Maternal and infant product emotion marketing strategy optimization method based on RAG technology
CN119884492A
Marketing document automatic generation method and device based on reinforcement learning and storage medium
CN120746646A
Marketing component library and construction method
CN121051091A
