Marketing copy iterative generation method and device based on latent semantic optimization and medium
By constructing creatively incremental partial order copy pairs and optimizing latent semantics, the problems of inaccurate creative capture and unstable convergence in marketing copy generation are solved, achieving efficient and robust iterative generation of marketing copy and improving the creativity and adaptability of the copy.
Patent Information
- Application Number
- CN202511294732.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-11
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-09-11
AI Technical Summary
Existing technologies cannot effectively capture creative differences at the sentence or paragraph level, resulting in marketing copy that is homogenous and lacks originality. Furthermore, reinforcement learning based on global scoring is difficult to consistently converge to high creative directions and lacks an iterative rewriting mechanism for the potential semantic space, making it difficult for the model to improve copy quality based on user feedback.
By acquiring marketing needs to generate an initial set of copy, receiving input from human experts on preferences to construct creatively incrementally ordered partial-order copy pairs, calculating loss using latent semantic vectors and updating language model parameters, until the distance between the latent semantic vectors of adjacent copy meets a threshold or the number of iterations is reached, candidate copy is generated and confidence is evaluated, and finally, highly creative marketing copy is output.
It enables the automatic iterative generation of highly creative, efficient, and robust marketing copy, improving the model's adaptability to marketing needs and the quality of the copy, thus meeting enterprises' demands for highly creative and efficient copy production.
Smart Images

Figure CN120805857B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular relates to a marketing copy iterative generation method and device based on latent semantic optimization and a medium. BACKGROUND
[0002] With the rapid development of e-commerce and social media, the demand for high-quality marketing copy by enterprises has surged. Large language models have been widely used in advertising creative, content operation and other automatic copy generation scenarios due to their large-scale corpus learning ability. Marketing copy not only needs to accurately convey product selling points and marketing goals, but also emphasizes "creativity" to attract audience attention and promote conversion. The evaluation of creativity usually depends on the comprehensive judgment of the whole sentence or even the context, which is difficult to measure directly through word-level indicators.
[0003] The current mainstream approach mainly adopts the following two types: one is based on supervised fine-tuning or instruction fine-tuning, which minimizes the cross-entropy loss at the word level to make the model reproduce the phrases with higher frequency in the training set; the other is based on reinforcement learning human preference optimization (RLHF), which uses overall scores or ranking to update the model strategy gradient. The former can improve grammar and semantic correctness, but has limited improvement on creativity; the latter usually compares different creative level copies and uses word-level hidden state differences as optimization basis, which can easily lead to excessive noise in gradient signals, and lacks consistency with the "step-by-step revision" process in subsequent deployment scenarios.
[0004] The existing technology still has the following problems: the word-level optimization target cannot effectively capture the creative differences at the sentence or paragraph level, resulting in the convergence of the model-generated copy and the lack of novelty; the reinforcement learning based on global scores simultaneously processes multiple levels of copy, which is easy to confuse and difficult to converge to the real high-creativity direction; the existing solutions generally lack an iterative rewriting mechanism for the latent semantic space, and the model is difficult to improve the quality of the copy step by step according to user feedback during the reasoning phase. The above defects collectively result in insufficient adaptation of the model to marketing needs, making it difficult to meet the actual needs of the industry for high-creativity and high-efficiency copy production. SUMMARY
[0005] Therefore, the embodiments of the present application provide a marketing copy iterative generation method and device based on latent semantic optimization and a medium to solve the problems of inaccurate creativity capture, unstable model convergence and low efficiency of iterative rewriting in the prior art.
[0006] In a first aspect, the embodiment of the present application provides a marketing copy iterative generation method based on latent semantic optimization, comprising: obtaining marketing demand containing product information, audience information and marketing target; generating a plurality of initial marketing copies based on the marketing demand by a pre-trained language model and storing the initial marketing copies as an initial copy set; receiving preference input of an artificial expert on the initial copy set, and constructing a partial order copy pair with increasing creativity for adjacent copies according to a preference order; for each partial order copy pair, calling a to-be-trained language model to extract a corresponding sentence-level latent semantic vector, calculating a preference discrimination loss and an iterative prediction loss according to the latent semantic vector, and jointly updating parameters of the to-be-trained language model to obtain a trained marketing copy model; inputting an actual marketing demand into the trained marketing copy model to generate a first draft copy and extract a latent semantic vector, feeding back the latent semantic vector to the marketing copy model for iterative generation until a distance between latent semantic vectors of adjacent two copies does not exceed a preset threshold or a preset iteration number is reached, and obtaining a candidate copy set; performing confidence evaluation on the candidate copy set based on the marketing copy model, and selecting a target marketing copy with the highest confidence as a final output.
[0007] In a second aspect, the embodiment of the present application provides a marketing copy iterative generation device based on latent semantic optimization, comprising: an obtaining module configured to obtain marketing demand containing product information, audience information and marketing target; a storage module configured to generate a plurality of initial marketing copies based on the marketing demand by a pre-trained language model and store the initial marketing copies as an initial copy set; a constructing module configured to receive preference input of an artificial expert on the initial copy set, and construct a partial order copy pair with increasing creativity for adjacent copies according to a preference order; a training module configured to, for each partial order copy pair, call a to-be-trained language model to extract a corresponding sentence-level latent semantic vector, calculate a preference discrimination loss and an iterative prediction loss according to the latent semantic vector, and jointly update parameters of the to-be-trained language model to obtain a trained marketing copy model; a generating module configured to input an actual marketing demand into the trained marketing copy model to generate a first draft copy and extract a latent semantic vector, feed back the latent semantic vector to the marketing copy model for iterative generation until a distance between latent semantic vectors of adjacent two copies does not exceed a preset threshold or a preset iteration number is reached, and obtain a candidate copy set; and an output module configured to perform confidence evaluation on the candidate copy set based on the marketing copy model, select a target marketing copy with the highest confidence as a final output.
[0008] In a third aspect, the embodiment of the present application provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0009] In a fourth aspect, the present application provides a computer readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above method.
[0010] The above at least one technical solution adopted by the embodiments of the present application can achieve the following beneficial effects:
[0011] By obtaining marketing demand containing product information, audience information and marketing target; generating a plurality of initial marketing scripts from a pre-trained language model based on the marketing demand and storing them as an initial script set; receiving preference input of artificial experts on the initial script set, and constructing a creative incremental partial order script pair for adjacent scripts according to the preference order; for each partial order script pair, calling a to-be-trained language model to extract a corresponding sentence-level latent semantic vector, calculating a preference discriminant loss and an iterative prediction loss according to the latent semantic vector, and jointly updating the to-be-trained language model parameters to obtain a trained marketing script model; inputting an actual marketing demand into the trained marketing script model to generate a first draft script and extract a latent semantic vector, and feeding the latent semantic vector back to the marketing script model for iterative generation until the latent semantic vector distance between adjacent two versions of scripts does not exceed a preset threshold or reaches a preset iteration number, obtaining a candidate script set; performing confidence evaluation on the candidate script set based on the marketing script model, and selecting a target marketing script with the highest confidence as the final output. The present application can realize automatic iterative generation of marketing scripts with high creativity, high efficiency and stable convergence. BRIEF DESCRIPTION OF DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0013] Figure 1 is a flowchart of the marketing script iterative generation method based on latent semantic optimization provided by the embodiments of the present application;
[0014] Figure 2 is a structural schematic diagram of the marketing script iterative generation device based on latent semantic optimization provided by the embodiments of the present application;
[0015] Figure 3 is a structural schematic diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0016] In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular architectures, technologies, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
[0017] Marketing copy usually needs to attract readers to watch through "creativity". On the one hand, the current language modeling optimizes the output of the model in units of tokens. On the other hand, creativity is a relatively coarse-grained fuzzy concept, and usually needs to be jointly analyzed with the context to evaluate the creativity. Therefore, it is difficult to train creativity through token-level optimization goals, and it is necessary to introduce more suitable algorithms to improve the ability of the language model in this regard, and thus improve its ability to generate marketing copy.
[0018] In view of the defects of the existing solutions, the technical scheme of the present application proposes the following solution ideas:
[0019] 1. For the marketing and promotion needs of specific scenarios, use a large language model to sample multiple copies for each scenario. Then, select the copy closest to the user's preference as the base copy by a marketing expert, and then rewrite it step by step, appropriately improving the creativity and alignment of human preferences of the copy each time, and finally accumulating multiple copies with gradually improved creativity for each scenario;
[0020] 2. According to the obtained copy partial order data, fine-tune the model in the latent semantic space based on reinforcement learning. During fine-tuning, the loss is calculated by comparing the adjacent creativity level of the copy, and the model is required to align the latent semantic vector at the sentence level, rather than the hidden space state (Hidden States) at the token level;
[0021] 3. In actual generation, the same iterative improvement generation scheme is adopted. The model first generates a most basic copy according to the user's required scenario, and then inputs the latent semantic vector of this copy into the language model for iteration until the representation distance of the latent semantic vectors of the two iterations is lower than the threshold value designed by the user, and the iteration is stopped and the final result is output.
[0022] The technical scheme of the present application has at least the following advantages:
[0023] 1. The reinforcement learning scheme for large language models in the past usually compares all creativity level copies jointly, which is easy to cause confusion. The reinforcement learning in the present scheme emphasizes the comparison of the relationship between adjacent creativity level copies, which is closer to the scenario of iterative generation of copies after model deployment, and makes the model make full use of existing data and expert preferences;
[0024] 2. The past large language model fine-tuning algorithm usually focuses on the alignment of the word-level latent space state, which does not conform to the real characteristics of creative evaluation. The fine-tuning scheme in this scheme requires the model to adapt to the sentence-level latent semantic vector, which is more suitable for creative copy generation scenarios and also helps to improve the efficiency and effectiveness of copy iteration generation after model deployment.
[0025] The technical solutions of the present application will be described in detail below in combination with the drawings and specific embodiments.
[0026] Figure 1 is the flowchart of the marketing copy iterative generation method based on latent semantic optimization provided by the embodiments of the present application. As Figure 1 shown, the marketing copy iterative generation method based on latent semantic optimization can specifically include:
[0027] S101, obtaining marketing demand containing product information, audience information and marketing target;
[0028] S102, generating a plurality of initial marketing copies based on the marketing demand by the pre-trained language model and storing them as an initial copy set;
[0029] S103, receiving the preference input of the initial copy set by the artificial expert, and constructing a creative incremental partial order copy pair for adjacent copies according to the preference order;
[0030] S104, for each partial order copy pair, calling the to-be-trained language model to extract the corresponding sentence-level latent semantic vector, calculating the preference discriminant loss and the iterative prediction loss according to the latent semantic vector, and jointly updating the to-be-trained language model parameters to obtain the trained marketing copy model;
[0031] S105, inputting the actual marketing demand to the trained marketing copy model, generating the first draft copy and extracting the latent semantic vector, feeding back the latent semantic vector to the marketing copy model for iterative generation until the latent semantic vector distance of adjacent two versions of the copy is not more than a preset threshold or reaches a preset iteration number, obtaining a candidate copy set;
[0032] S106, performing confidence evaluation on the candidate copy set based on the marketing copy model, selecting the target marketing copy with the highest confidence as the final output.
[0033] In some embodiments, generating a plurality of initial marketing copies based on the marketing demand by the pre-trained language model and storing them as an initial copy set includes:
[0034] parsing the marketing demand to form a model input prompt;
[0035] Based on different random seeds, the pre-trained language model is called multiple times for text sampling under the set temperature parameters, sampling strategy and maximum output length to obtain multiple candidate marketing texts;
[0036] Duplicate detection and format normalization are performed on the candidate marketing texts to obtain de-duplicated marketing texts.
[0037] The de-duplicated marketing texts are written into the preset storage area along with the corresponding generation probability or score to form an initial text set.
[0038] Specifically, in this embodiment, the system first receives marketing requirements containing product information, audience information and marketing goals, parses them into structured fields and concatenates them to generate model input prompts; then, based on multiple sets of random seeds, the pre-trained language model is called multiple times under the set generation control parameters such as temperature parameters, sampling strategy and maximum output length to obtain a corresponding number of candidate marketing texts; then, duplicate detection and format uniformity processing are performed on the candidate marketing texts using text similarity calculation and normalization rules, and highly repetitive or format-unconforming entries are deleted to obtain de-duplicated marketing texts; finally, the de-duplicated marketing texts are written into the preset storage area along with their respective generation probabilities or comprehensive scores to form an initial text set, laying a data foundation for subsequent artificial preference sorting and model reinforcement learning.
[0039] The important technical terms involved in this embodiment are explained as follows:
[0040] Temperature parameter: a real number that controls the entropy value of the language model output distribution. When the temperature increases, the generated results are more diverse and creative, and when the temperature decreases, the results are more deterministic.
[0041] Sampling strategy: a truncation or rearrangement method for probability distribution, including but not limited to kernel sampling, top-level sampling, etc., to balance creativity and readability.
[0042] Random seed: an initial value set for the model random number generator. Different random seeds can trigger different decoding paths under the same prompt, improving the diversity of candidate texts.
[0043] Duplicate detection: de-duplicate candidate texts based on edit distance, Tok-N intersection ratio score or sentence vector cosine similarity, and the threshold can be adjusted according to the scene.
[0044] Format normalization: unify punctuation, capitalization, line breaks and special symbols to a preset standard to ensure consistency in subsequent manual review and vectorization processing.
[0045] Generation probability or comprehensive score: the cumulative log probability of the model during the decoding process or the post-computed language fluency, emotional intensity and other indicators, used as an initial quantitative reference for text quality.
[0046] In one specific scenario example, take "smart fitness bracelet summer promotion" as a scenario example. The system first parses the marketing requirements, and embeds the fields such as "product name: smart fitness bracelet", "function highlights: 24-hour heart rate monitoring, real-time temperature recording", "target audience: urban white-collar workers", "marketing goal: improve the attention of new products and promote the conversion of the first batch of pre-sales" into a unified template to form the following model input prompt: "Please write a summer promotion copy for the smart fitness bracelet suitable for the urban white-collar group, emphasizing the 24-hour heart rate monitoring and real-time temperature recording functions, with a casual but professional and credible tone, and the word count is controlled within 50 words."
[0047] The system sets the temperature parameter to 0.9, adopts kernel sampling, and sets the top-p value to 0.92, and fixes the maximum output length to 80 characters; under random seeds 101, 204, 317, 423 and 566, the pre-trained language model is called to generate 5 candidate marketing texts. After obtaining the text, the system first removes two approximately repeated texts with a sentence vector cosine similarity threshold of less than 0.85, and then unifies the Chinese and English punctuation, removes extra spaces and ensures that the description is in simplified Chinese, finally obtains 3 de-duplicated marketing texts. For example:
[0048] "Wrist health assistant, 24-hour heart rate and temperature at your fingertips, let summer exercise more secure!"
[0049] "Urban rhythm fast, bracelet protection faster, real-time monitoring of heart rate and temperature, giving you professional health management."
[0050] "Lightweight bracelet, all-weather temperature and heart rate monitoring, accompany you to burn every step of summer!"
[0051] The system also retains the generation probability of each text, and writes it into the specified database table or vector repository in the form of text-probability key-value pairs, forming the initial text set of this scenario. This set will be directly called in the subsequent manual preference ordering step, realizing seamless connection with the subsequent training process.
[0052] In some embodiments, the preference input of the artificial expert for the initial text set is received, and the adjacent texts are constructed into a creative increasing partial order text pair according to the preference order, including:
[0053] Receiving the preference ordering information of the artificial expert for each marketing text in the initial text set, generating a preference order list;
[0054] According to the preference order list, the first marketing text and the second marketing text are paired to form a partial order text pair, and the preference relationship that the first marketing text is better than the second marketing text is recorded in the partial order text pair;
[0055] The pairing and recording operations are executed in a loop to construct all partial order pairs of the preference order list;
[0056] The all partial order pairs and the corresponding preference relations are written into a preset training data storage area for subsequent model training steps.
[0057] Specifically, the embodiment focuses on constructing partial order pairs of increasing creativity. First, the initial set of scripts is displayed to human experts through an interactive interface, and the overall ordering is completed in a drag-and-drop or numbered manner. The system receives and parses the preference ordering information given by the experts in real time, generating a unique preference order list. Then, the system extracts the first and second marketing scripts in order according to the adjacent relationship of the list, automatically labels the one-way preference relation of "first better than second", and generates partial order pairs one by one. When the list is traversed, the system serializes all partial order pairs and their corresponding preference relations into the training data storage area, providing complete data input for subsequent reinforcement learning training based on latent semantic vectors.
[0058] The important technical terms involved in the embodiment are explained as follows:
[0059] Preference ordering information: The order data formed after the human experts perform overall or partial ordering on the initial set of scripts, containing absolute position and relative superiority and inferiority relations.
[0060] Preference order list: The ordered script index sequence obtained by sorting the preference ordering information, which is the direct basis for constructing partial order pairs.
[0061] Partial order pair: An ordered pair derived from the adjacent two scripts in the preference order list, explicitly recording the one-way preference of the former script over the latter script.
[0062] Preference relation: The "better than" label added by the system to the partial order pair, used to guide the model to converge towards a higher level of creativity during training.
[0063] Training data storage area: A data structure dedicated to persisting partial order pairs and their preference relations, which can be a database table, a key-value store, or a vector repository, and needs to ensure high-speed retrieval for subsequent training processes.
[0064] In some examples, continuing the "smart fitness bracelet summer promotion" scenario of the previous embodiment, the initial set of scripts contains three de-duplicated scripts, and the system displays them in the form of a list in the expert workstation:
[0065] Number C1: "Wrist health assistant, 24-hour heart rate and body temperature in one palm, let summer exercise more secure!"
[0066] No. C2: "Urban rhythm is fast, bracelet protection is faster, real-time monitoring of heart rate and temperature, and professional health management for you."
[0067] No. C3: "Light bracelet, all-weather temperature and heart rate monitoring, accompany you to burn summer every step!"
[0068] After the experts read and considered that C2 is the best, C1 is the second, and C3 is relatively general, the preference order information "C2>C1>C3" is given. The system immediately parses this information and generates a preference order list [C2, C1, C3]. According to the adjacent pairing rule, the system first pairs C2 and C1 into the first group of partial order pairs 〈C2, C1〉, and marks "C2 is better than C1"; then pairs C1 and C3 into the second group of partial order pairs 〈C1, C3〉, and marks "C1 is better than C3". After traversing, two partial order pairs and the corresponding preference relations are obtained. The system generates a unique key for each pair and writes it to the training data storage area, for example, in JSON line storage:
[0069] {"pair_id":"P001","better_id":"C2","worse_id":"C1"}
[0070] {"pair_id":"P002","better_id":"C1","worse_id":"C3"}
[0071] After this storage process is completed, the partial order pairs can be directly called by the potential semantic reinforcement learning module to calculate the preference discrimination loss and the iterative prediction loss, thereby driving the model to continuously optimize in the creativity dimension.
[0072] In some embodiments, for each partial order pair, the to-be-trained language model is called to extract the corresponding sentence-level potential semantic vector, including:
[0073] Each marketing text in the partial order pair is input into the to-be-trained language model to obtain the word-level hidden state of the preset intermediate layer;
[0074] Perform a pooling operation on the word-level hidden state to obtain the corresponding sentence-level initial semantic embedding;
[0075] The sentence-level initial semantic embedding is transformed into a fixed-dimensional potential semantic vector via a trainable projection layer.
[0076] Specifically, in the present embodiment, the system performs the potential semantic vector extraction process on the partial order pair 〈C2, C1〉 and 〈C1, C3〉 for each piece of text. First, the text of the text is sent to the language model to be trained, and the complete word-level hidden state is intercepted at the output of the second-to-last transformation module; then the hidden state is pooled to obtain the sentence-level initial semantic embedding; finally, the sentence-level embedding is mapped to a uniform dimension potential semantic vector through a trainable projection layer, and the standardization cache is completed, providing input for subsequent double-loss calculation.
[0077] The important technical terms involved in the present embodiment are explained as follows:
[0078] Word-level hidden state: In the Transformer structure, after each layer of self-attention and feedforward network, each word will get a new vector representation. These hierarchical vectors are the word-level hidden state. The closer the hidden state is to the end of the network, the more abstract and complete the semantic information it represents.
[0079] Pooling operation: a simplified method of compressing a set of sequence-level vectors into a single vector. In the present embodiment, mean pooling is used to take the arithmetic mean of all word vectors of the same text by dimension, thereby forming a sentence-level initial semantic embedding, ensuring that the length difference of the sentence does not affect semantic alignment.
[0080] Sentence-level initial semantic embedding: the overall text representation obtained after pooling, which has a condensed representation of the intent and style of the entire sentence and is the basis for subsequent projection and distance calculation.
[0081] Trainable projection layer: a mapping layer, usually composed of one or more fully connected networks, responsible for converting high-dimensional embedding into a predetermined uniform dimension for direct comparison between different texts. The projection layer is updated together with the main model parameters, so that the potential semantic space is continuously optimized during the training process.
[0082] In some examples, for the partial order pair 〈C2, C1〉, the system first inputs the C2 text into the language model to be trained after word-by-word tokenization, and locates it to the 11th layer output to obtain a word-level hidden state matrix of size L×H, where L is the number of words and H is the hidden dimension; the average of the matrix along the word dimension is taken to obtain a sentence-level initial semantic embedding v1 of size 1×H; v2 is sent to a trainable projection layer with a dimension of H×256 to obtain a 256-dimensional potential semantic vector z2. The same process is performed on the C1 text to obtain the potential semantic vector z1. The system then writes z2, z1 into the cache and attaches the text identification and preference label for subsequent loss calculation. z1 and z3 are extracted in the same way for 〈C1, C3〉 and cached.
[0083] By pooling the word-level hidden states and uniformly mapping them through a projection layer, the system realizes cross-document semantic alignment of different lengths and different wording texts, ensures that the latent semantic vector not only retains the overall creative characteristics but also has consistent dimensions, and can be directly used for vector distance calculation and preference discrimination, thereby significantly improving the convergence speed and creative hierarchical recognition accuracy in the subsequent reinforcement learning stage.
[0084] In some embodiments, the preference discrimination loss and the iterative prediction loss are calculated according to the latent semantic vector, and are used together to update the parameters of the language model to be trained to obtain a trained marketing text model, comprising:
[0085] Based on the latent semantic vectors in the partial order text pair, the preference probability that the first marketing text is better than the second marketing text is output by the discriminator head, and compared with the artificial preference label to calculate the preference discrimination loss;
[0086] The latent semantic vector of the second marketing text and the corresponding text are input into the language model to be trained as conditional inputs to generate a predicted marketing text and extract the latent semantic vector of the predicted marketing text;
[0087] The iterative prediction loss is calculated according to the vector distance between the latent semantic vector of the predicted marketing text and the latent semantic vector of the first marketing text;
[0088] The preference discrimination loss and the iterative prediction loss are weighted and summed according to a preset weight to obtain a total loss, and the parameters of the language model to be trained are updated based on the total loss.
[0089] Specifically, in the present embodiment, the system performs double loss calculation using the cached latent semantic vectors z2, z1, z3 (corresponding to texts C2, C1, C3 respectively). First, the vector pair 〈z2, z1〉, 〈z1, z3〉 is received by the discriminator head, and the preference probability that the first text is better than the second text is output; then, the latent semantic vector z of the predicted text C is extracted by inputting the vector z1 and its original text C1 into the language model to be trained as conditional inputs to generate the predicted text C; finally, the system calculates the preference discrimination loss and the iterative prediction loss respectively, and combines the total loss according to the weight to update the model parameters.
[0090] The important technical terms involved in the present embodiment are explained as follows:
[0091] Discriminator head: a lightweight binary classification subnetwork attached to the top of the language model, which only accepts a pair of latent semantic vectors as input and outputs a probability score p that the first text is better than the second text, which is used to measure the consistency of the model in creative ranking.
[0092] Preference discrimination loss: the consistency of the model output and the artificial preference label is measured using the cross-entropy formula log p, and the smaller the loss is, the closer p is to 1.
[0093] Iterative prediction loss: measure the difference between predicted copy vector z and better copy vector z2 with cosine distance or Euclidean distance, the smaller the distance, the closer the model is to the target along the creative gradient.
[0094] Pre-set weight: used to balance the importance of the two types of loss, in this embodiment λ1=0.6 is assigned to the discriminant loss with higher weight, and λ2=0.4 is assigned to the iterative loss with the second highest weight.
[0095] Back propagation: calculate the gradient of the model parameters according to the total loss and perform gradient descent update, so that the model gradually improves the consistency of ranking and the ability of iterative improvement.
[0096] For example, in some examples, the system reads the partial order pair 〈C2, C1〉, inputs z2, z1 into the discriminant head to obtain the probability p=0.88, and the cross-entropy loss L_ce≈0.13 after comparing with the artificial label “C2 is better than C1”. Then z1 and the copy C1 are given to the model to generate the predicted copy C: “Wrist assistant guards the pace, heart rate and body temperature double monitoring helps you cool and burn fat”, and the latent vector z is extracted; the cosine distance d≈0.27 between z and z2 is calculated, and the iterative prediction loss L_iter≈0.27 is obtained. The system weights the total loss L_total=λ1L_ce+λ2L_iter≈0.19 according to the weight, and performs one back propagation and weight update on all trainable parameters of the model. Repeat the above process for the partial order pair 〈C1, C3〉 and accumulate the gradient to form a complete training batch. After multiple rounds of batch iteration, the model gradually forms a directional representation of “moving from suboptimal to better copy” in the sentence-level latent semantic space.
[0097] By simultaneously minimizing the preference discriminant loss and the iterative prediction loss, this embodiment enables the language model to not only accurately determine the creativity level, but also generate more creative rewritten texts along the latent semantic gradient, significantly improving the consistency of the model's creative ranking and the convergence speed of iterative optimization, laying a solid foundation for fast iteration of high-quality copy in the subsequent reasoning stage.
[0098] In some embodiments, the latent semantic vector is fed back to the marketing copy model for iterative generation until the distance between the latent semantic vectors of the adjacent two versions of the copy does not exceed a pre-set threshold or reaches a pre-set number of iterations, obtaining a candidate copy set, including:
[0099] The latent semantic vector of the first version of the draft copy and the actual marketing demand are jointly input as additional context into the marketing copy model to generate the second version of the marketing copy;
[0100] Extract the latent semantic vector of the second version of the marketing copy, and calculate the vector distance between the latent semantic vector and the latent semantic vector of the previous version of the marketing copy;
[0101] When the vector distance is greater than the preset threshold and the number of iterations performed is less than the preset number of iterations, the second version of the marketing copy and the potential semantic vector are taken as the new previous version of the data, and the aforementioned generation and distance calculation steps are repeated;
[0102] When the vector distance is not greater than the preset threshold or the number of iterations performed reaches the preset number of iterations, the versions of the marketing copy and the corresponding potential semantic vectors in the iteration process are collected and stored as a candidate copy set.
[0103] Specifically, the embodiment describes an automatic iteration mechanism in the deployment stage. The system first obtains a first version of the draft copy and its potential semantic vector, splices the vector and the structured marketing demand together as additional context to input into the marketing copy model to generate a second version of the copy; then extracts the potential semantic vector of the second version of the copy and calculates the distance with the previous version of the vector; if the distance is higher than the threshold and the maximum number of iterations is not reached, the second version of the copy is regarded as the new previous version to continue iteration; when any termination condition is triggered, the system summarizes all historical versions together with the vectors to form a candidate copy set, providing input for subsequent confidence evaluation.
[0104] The important technical terms involved in the embodiment are explained as follows:
[0105] Number of iterations: refers to the count of consecutive calls to the model to rewrite the draft, and the upper limit is set to 4 times in the embodiment to prevent the generation process from being too long.
[0106] Additional context: after the original marketing demand prompt, the potential semantic vector label of the previous version of the copy is attached to prompt the model to rewrite towards the new semantic target while keeping the scene consistent.
[0107] Vector distance threshold: a numerical boundary to measure the creative difference between two adjacent versions of the copy, and cosine distance 0.20 is used as the stopping standard, and if the distance is less than or equal to the threshold, it is determined that the rewriting tends to converge.
[0108] Candidate copy set: a dataset composed of all versions of the copy and their respective potential semantic vectors in the iteration process, which is a direct input for confidence evaluation and final draft screening.
[0109] For example, in a specific example, in the "smart fitness bracelet summer promotion" scenario, the user allows a maximum of 4 iterations and sets the convergence threshold to 0.20. The system first generates the first draft V0: "Wrist helper guards heart rate, summer fat burning more secure". After extracting the latent semantic vector z0, it is input into the model together with the marketing demand field as additional context to obtain the second version of the script V1: "Lightweight bracelet, 24-hour heart rate and body temperature monitoring, accompany you to enjoy the summer". Extract z1 and calculate d(z0, z1) = 0.34 > 0.20, iteration count is 1 < 4, continue the loop. With z1 and V1 as the new context, generate the third version V2: "Urban rhythm fast, bracelet real-time guardian, heart rate and body temperature at your fingertips", the distance d(z1, z2) = 0.26 is still greater than the threshold, and the iteration count is 2 < 4. Continue to generate the fourth version V3: "Bracelet on the wrist, 24-hour heart rate and body temperature double monitoring, let every step burn fat more efficiently", d(z2, z3) = 0.18 ≤ 0.20, which meets the convergence condition, and the loop ends. The system serializes and stores V0 to V3 and their respective vectors to form a candidate script set.
[0110] By quantifying the latent semantic vector distance in real time after each generation and comparing it with the threshold, this embodiment can automatically converge while ensuring the progress of creativity, avoiding resource waste caused by invalid iterations, and providing multiple version options for subsequent confidence screening, significantly improving the creativity level and generation efficiency of the final marketing script.
[0111] In some embodiments, the candidate script set is subjected to confidence evaluation based on the marketing script model, and the target marketing script with the highest confidence is selected, including:
[0112] The latent semantic vector of each marketing script in the candidate script set and the latent semantic vector of the actual marketing demand are input into the confidence evaluation submodule of the marketing script model to generate a corresponding confidence score;
[0113] The confidence scores are compared to determine the marketing script with the highest confidence score as the target marketing script.
[0114] Specifically, this embodiment describes the confidence evaluation mechanism in the candidate script screening stage. The system first extracts the latent semantic vector q of the actual marketing demand and inputs it together with the latent semantic vector zi of each marketing script in the candidate script set into the confidence evaluation submodule; the submodule generates a confidence score si based on vector similarity, language fluency, and emotional fit; the system then compares all si, selects the marketing script with the highest confidence as the target marketing script, and outputs it.
[0115] Important technical terms involved in this embodiment are explained as follows:
[0116] Confidence evaluation submodule: an index fusion component attached to the marketing copy model, which adopts a multi-layer perceptron structure to receive (q, zi) vector pairs and output a 0-1 interval confidence score to measure the matching degree and spreadability of the copy to the demand.
[0117] Similarity branch: based on cosine similarity to measure the fitting degree of the copy and the demand in the latent semantic space, which is the core contribution item of confidence evaluation.
[0118] Language fluency branch: use the perplexity or syntax score of the language model to evaluate the smoothness of the copy to ensure easy readability.
[0119] Emotional fit branch: detect the consistency of the emotional color of the copy and the expected marketing tone (such as motivation, warmth, professionalism) through a fine-grained sentiment classifier.
[0120] Comprehensive weight: the scores of the three branches are weighted and summed to form the final confidence score si with the weights α, β, γ, and the sum of the weights is 1.
[0121] For example, in some examples, continuing the candidate copy set {V0, V1, V2, V4} in the preceding embodiment, the system first performs homologous coding on the marketing demand prompt to obtain the latent semantic vector q. Then read the latent semantic vector zi of each version of the copy and input it together with q into the confidence evaluation submodule:
[0122] For V0, the cosine similarity is 0.76, the fluency score is 0.79, and the emotional fit is 0.74, with α=0.5, β=0.3, γ=0.2, the confidence score s0≈0.76;
[0123] For V1, the similarity is 0.82, the fluency is 0.83, and the emotional fit is 0.80, and the confidence score s1≈0.82;
[0124] For V2, the similarity is 0.78, the fluency is 0.81, and the emotional fit is 0.86, and the confidence score s2≈0.80;
[0125] For V3, the similarity is 0.85, the fluency is 0.86, and the emotional fit is 0.84, and the confidence score s3≈0.85.
[0126] The system compares s0 to s3 and finds that s3 is the highest, so it determines that V3: "Wristband, 24-hour heart rate and body temperature monitoring, make every step burn fat more efficiently" is the target marketing copy and pushes it to the user.
[0127] Through the confidence evaluation submodule, the similarity, language fluency, and emotional fit in the latent semantic space are fused, and this embodiment can quickly identify the text that best matches the demand and has the best reading experience among multiple versions of candidate copies, significantly improving the marketing effect and user satisfaction of the final output.
[0128] The application tunes the marketing model through "creative incremental partial order data construction + potential semantic optimization based on reinforcement learning + copywriting iterative generation based on potential semantic vector". By introducing sentence-level potential semantic alignment, the language model can more efficiently master the copywriting skills of creative progressive iteration. The scheme not only adapts to the quantitative evaluation characteristics of creativity, but also optimizes the model's progressive improvement ability based on potential semantics during training, making it more suitable for the actual marketing copywriting scenario. At the same time, this way can also facilitate users to supervise the model to adjust its copywriting iteration method in real time during reasoning through timely feedback to meet the user's copywriting production needs.
[0129] The following is an embodiment of the device of the application, which can be used to execute the method embodiments of the application. For details not disclosed in the device embodiments of the application, please refer to the method embodiments of the application.
[0130] Figure 2 is a structural schematic diagram of the marketing copywriting iterative generation device based on potential semantic optimization provided by an embodiment of the application. As shown in Figure 2 The marketing copywriting iterative generation device based on potential semantic optimization comprises:
[0131] The acquisition module 201 is configured to acquire marketing demand containing product information, audience information and marketing target;
[0132] The storage module 202 is configured to generate a plurality of initial marketing copywritings based on the marketing demand from a pre-trained language model and store them as an initial copywriting set;
[0133] The construction module 203 is configured to receive the preference input of the initial copywriting set by artificial experts, and construct a creative incremental partial order copywriting pair according to the preference order of adjacent copywritings;
[0134] The training module 204 is configured to call a to-be-trained language model to extract a corresponding sentence-level potential semantic vector for each partial order copywriting pair, calculate a preference discriminant loss and an iterative prediction loss according to the potential semantic vector, and jointly update the to-be-trained language model parameters to obtain a trained marketing copywriting model;
[0135] The generation module 205 is configured to input the actual marketing demand to the trained marketing copywriting model, generate a first draft copywriting and extract a potential semantic vector, feed the potential semantic vector back to the marketing copywriting model for iterative generation until the potential semantic vector distance of adjacent two versions of copywritings does not exceed a preset threshold or reaches a preset iteration number, and obtain a candidate copywriting set;
[0136] The output module 206 is configured to perform confidence evaluation on the candidate text set based on the marketing text model, and select a target marketing text with the highest confidence as the final output.
[0137] In some embodiments, Figure 2 The storage module 202 is configured to parse the marketing demand formation model input prompt, and based on different random seeds, call a pre-trained language model to perform multiple text sampling under preset temperature parameters, sampling strategies, and maximum output length, to obtain multiple candidate marketing texts. The storage module 202 is further configured to perform repetition detection and format standardization processing on the candidate marketing texts to obtain de-duplicated marketing texts, and write the de-duplicated marketing texts and corresponding generation probabilities or scores into a preset storage area to form an initial text set.
[0138] In some embodiments, Figure 2 The construction module 203 is configured to receive preference order information of artificial experts for each marketing text in the initial text set, and generate a preference order list. The construction module 203 is further configured to pair a first marketing text and a second marketing text adjacent in the ranking according to the preference order list to form a partial order text pair, and record a preference relationship that the first marketing text is better than the second marketing text in the partial order text pair. The construction module 203 is further configured to cyclically perform the pairing and recording operations to construct all partial order text pairs covering the preference order list, and write all partial order text pairs and corresponding preference relationships into a preset training data storage area for subsequent model training steps.
[0139] In some embodiments, Figure 2 The training module 204 is configured to input each marketing text in the partial order text pair into a language model to be trained to obtain a word-level hidden state of a preset intermediate layer. The training module 204 is further configured to perform a pooling operation on the word-level hidden state to obtain a corresponding sentence-level initial semantic embedding, and transform the sentence-level initial semantic embedding into a fixed-dimension latent semantic vector via a trainable projection layer.
[0140] In some embodiments, Figure 2 The training module 204 is configured to output, based on the latent semantic vectors in the partial order text pair, a preference probability that the first marketing text is better than the second marketing text via a discriminative head, and compare the preference probability with an artificial preference label to calculate a preference discriminative loss. The training module 204 is further configured to input, into the language model to be trained, the latent semantic vector of the second marketing text and a corresponding text as a condition to generate a predicted marketing text and extract a latent semantic vector of the predicted marketing text. The training module 204 is further configured to calculate an iterative prediction loss according to a vector distance between the latent semantic vector of the predicted marketing text and the latent semantic vector of the first marketing text. The training module 204 is further configured to weight-sum the preference discriminative loss and the iterative prediction loss according to a preset weight to obtain a total loss, and perform back propagation based on the total loss to update parameters of the language model to be trained.
[0141] In some embodiments, Figure 2The generation module 205 inputs the potential semantic vector of the first draft of the script and the actual marketing demand as additional context into the marketing script model to generate a second version of the marketing script; extracts the potential semantic vector of the second version of the marketing script and calculates the vector distance between the potential semantic vector and the potential semantic vector of the previous version of the marketing script; when the vector distance is greater than the preset threshold and the number of iterations performed is less than the preset number of iterations, takes the second version of the marketing script and the potential semantic vector as new previous version of data, and repeats the foregoing generation and distance calculation steps; when the vector distance is not greater than the preset threshold or the number of iterations performed reaches the preset number of iterations, collects each version of the marketing script and the corresponding potential semantic vector in the iteration process, and stores them as a candidate script set.
[0142] In some embodiments, Figure 2 The output module 206 inputs the potential semantic vector of each marketing script in the candidate script set and the potential semantic vector of the actual marketing demand into the confidence evaluation submodule of the marketing script model to generate a corresponding confidence score; compares the confidence scores to determine the marketing script with the highest confidence score as the target marketing script.
[0143] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0144] Figure 3 is a structural schematic diagram of an electronic device 3 provided by the embodiments of the present application. As shown in Figure 3 The electronic device 3 of the embodiment includes a processor 301, a memory 302, and a computer program 303 stored in the memory 302 and executable on the processor 301. The processor 301 implements the steps in each of the above method embodiments when executing the computer program 303. Alternatively, the processor 301 implements the functions of each module / unit in the above device embodiments when executing the computer program 303.
[0145] For example, the computer program 303 can be divided into one or more modules / units, which are stored in the memory 302 and executed by the processor 301 to complete the present application. One or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program 303 in the electronic device 3.
[0146] The electronic device 3 can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The electronic device 3 can include but is not limited to the processor 301 and the memory 302. Those skilled in the art can understand, Figure 3The electronic device 3 is merely an example and does not limit the electronic device 3, which can include more or fewer components than shown, or combine some components, or have different components, for example, the electronic device can also include an input / output device, a network access device, a bus, etc.
[0147] The processor 301 can be a central processing unit (CPU), or other general purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. The general purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0148] The memory 302 can be an internal storage unit of the electronic device 3, for example, a hard disk or a memory of the electronic device 3. The memory 302 can also be an external storage device of the electronic device 3, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 3. Further, the memory 302 can include both the internal storage unit and the external storage device of the electronic device 3. The memory 302 is used to store computer programs and other programs and data required by the electronic device. The memory 302 can also be used to temporarily store data that has been output or will be output.
[0149] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is exemplified, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit, and the integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the unit and module in the system can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0150] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0151] Those skilled in the art can appreciate that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0152] In the embodiments provided in the present application, it should be understood that the disclosed apparatus / computer device and method can be implemented in other ways. For example, the apparatus / computer device embodiments described above are only schematic, and the division of the modules or units is only a logical function division, and there can be another division in actual implementation, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0153] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.
[0154] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0155] The integrated modules / units, if implemented in the form of software functional units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. The computer program can be executed by a processor to implement the steps of the above-mentioned various method embodiments. The computer program can include computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electric carrier signal, telecommunication signal, and software distribution medium, etc.
[0156] The above embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the technical solutions of the present application are described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A marketing copy iterative generation method based on latent semantic optimization, characterized in that, The method comprises the following steps: obtaining marketing requirements including product information, audience information and marketing goals; generating a plurality of initial marketing scripts based on the marketing requirements by a pre-trained language model and storing them as an initial script set; receiving preference inputs of artificial experts on the initial script set, and constructing a partial order script pair with adjacent scripts in a creative increasing order according to the preference order; for each partial order script pair, calling a to-be-trained language model to extract a corresponding sentence-level latent semantic vector, calculating a preference discriminant loss and an iterative prediction loss according to the latent semantic vector, and updating the parameters of the to-be-trained language model to obtain a trained marketing script model; inputting actual marketing requirements into the trained marketing script model to generate a first draft script and extract a latent semantic vector, and feeding back the latent semantic vector to the marketing script model for iterative generation until the distance between the latent semantic vectors of adjacent two versions of scripts does not exceed a preset threshold or reaches a preset iteration number, thereby obtaining a candidate script set; based on the marketing script model, performing confidence evaluation on the candidate script set, selecting a target marketing script with the highest confidence as the final output; wherein the receiving of the preference inputs of the artificial experts on the initial script set and the construction of the partial order script pair with adjacent scripts in a creative increasing order according to the preference order comprise: receiving preference order information of the artificial experts on each marketing script in the initial script set to generate a preference order list; pairing a first marketing script and a second marketing script ranked adjacent to each other according to the preference order list to form a partial order script pair, and recording a preference relationship that the first marketing script is better than the second marketing script in the partial order script pair; performing the pairing and recording operations in a loop to construct all partial order script pairs covering the preference order list; writing the all partial order script pairs and the corresponding preference relationships into a preset training data storage area for subsequent model training steps.
2. The method of claim 1, wherein, The generating of a plurality of initial marketing scripts based on the marketing requirements by a pre-trained language model and the storing of them as an initial script set comprise: parsing the marketing requirements to form a model input prompt; based on different random seeds, calling the pre-trained language model to perform multiple text sampling under the set temperature parameters, sampling strategies and maximum output length to obtain a plurality of candidate marketing scripts; performing repetition detection and format standardization processing on the candidate marketing scripts to obtain de-duplicated marketing scripts; writing the de-duplicated marketing scripts together with the corresponding generation probabilities or scores into a preset storage area to constitute the initial script set.
3. The method of claim 1, wherein, The calling of a to-be-trained language model to extract a corresponding sentence-level latent semantic vector for each partial order script pair comprises: inputting each marketing script in the partial order script pair into the to-be-trained language model to obtain a word-level hidden state of a preset intermediate layer; performing a pooling operation on the word-level hidden state to obtain a sentence-level initial semantic embedding; transforming the sentence-level initial semantic embedding into a latent semantic vector with a fixed dimension through a trainable projection layer.
4. The method of claim 3, wherein, The preference discrimination loss and the iterative prediction loss are calculated according to the latent semantic vectors, and parameters of the language model to be trained are updated by using the preference discrimination loss and the iterative prediction loss together, so as to obtain a trained marketing copy model, including: Based on the latent semantic vectors of the partial order copy pair, a preference probability that a first marketing copy is better than a second marketing copy is output by a discrimination head, and the preference probability is compared with an artificial preference label to calculate a preference discrimination loss; The latent semantic vector of the second marketing copy and the corresponding text are input into the language model to be trained as a condition, a predicted marketing copy is generated, and a latent semantic vector of the predicted marketing copy is extracted; An iterative prediction loss is calculated according to a vector distance between the latent semantic vector of the predicted marketing copy and the latent semantic vector of the first marketing copy; The preference discrimination loss and the iterative prediction loss are weighted and summed according to a preset weight to obtain a total loss, and parameters of the language model to be trained are updated based on the total loss by back propagation. The discrimination head is a lightweight binary classification subnetwork attached to the top of the language model, accepts a pair of latent semantic vectors as input, and outputs a probability score that a first copy is better than a second copy, which is used to measure the consistency of the model in creative sorting.
5. The method of claim 1, wherein, The latent semantic vectors are fed back to the marketing copy model for iterative generation until the latent semantic vector distance between adjacent versions of the copy is not more than a preset threshold or a preset number of iterations is reached, and a candidate copy set is obtained, including: The latent semantic vector of the first draft copy and the actual marketing demand are jointly input into the marketing copy model as additional context to generate a second version of the marketing copy; The latent semantic vector of the second version of the marketing copy is extracted, and a vector distance between the latent semantic vector and the latent semantic vector of the previous version of the marketing copy is calculated; When the vector distance is greater than the preset threshold and the number of iterations performed is less than the preset number of iterations, the second version of the marketing copy and the latent semantic vector are taken as new previous version data, and the foregoing generation and distance calculation steps are repeated; When the vector distance is not greater than the preset threshold or the number of iterations performed reaches the preset number of iterations, each version of the marketing copy and the corresponding latent semantic vector in the iteration process are collected and stored as the candidate copy set.
6. The method of claim 1, wherein, The candidate copy set is evaluated based on the marketing copy model, and a target marketing copy with the highest confidence is selected, including: The latent semantic vector of each marketing copy in the candidate copy set and the latent semantic vector of the actual marketing demand are input into a confidence evaluation submodule of the marketing copy model to generate a corresponding confidence score; The confidence scores are compared to determine the marketing copy with the highest confidence score as the target marketing copy.
7. A marketing copy iterative generation device based on latent semantic optimization, characterized by, The method includes: An acquisition module is configured to acquire a marketing demand including product information, audience information and marketing targets; A storage module is configured to generate a plurality of initial marketing copies from a pre-trained language model based on the marketing demand and store the initial marketing copies as an initial copy set; The constructing module is configured to receive preference input of an artificial expert on the initial set of marketing scripts, and construct a partial order script pair with adjacent scripts in a preference order with increasing creativity; The training module is configured to, for each partial order script pair, call a language model to be trained to extract a corresponding sentence-level latent semantic vector, calculate a preference discrimination loss and an iterative prediction loss according to the latent semantic vector, and jointly update parameters of the language model to be trained to obtain a trained marketing script model; The generating module is configured to input an actual marketing demand into the trained marketing script model, generate a first draft script and extract a latent semantic vector, feed the latent semantic vector back to the marketing script model for iterative generation until a distance between latent semantic vectors of two adjacent scripts does not exceed a preset threshold or a preset number of iterations is reached, and obtain a candidate script set; The output module is configured to perform confidence evaluation on the candidate script set based on the marketing script model, select a target marketing script with the highest confidence as a final output, and output the target marketing script. The constructing module is configured to receive preference order information of the artificial expert on each marketing script in the initial set of marketing scripts, and generate a preference order list. According to the preference order list, a first marketing script and a second marketing script adjacent in ranking are paired to form a partial order script pair, and a preference relationship that the first marketing script is better than the second marketing script is recorded in the partial order script pair. The pairing and recording operations are repeatedly performed to construct all partial order script pairs covering the preference order list. The all partial order script pairs and the corresponding preference relationships are written into a preset training data storage area for subsequent model training steps.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor executes the computer program to implement the steps of the method of any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Sequence recommendation method and computer readable storage medium
CN112256971A
User preference modeling method for garment sequence recommendation
CN116127199A