Model generation method and device, marketing text generation method and device and network equipment
By acquiring a training dataset of historical marketing text generation and optimizing the generated marketing text using a diffusion model and dominance function, the problem of low accuracy and poor adaptability of marketing rhetoric in existing technologies is solved, achieving high accuracy and high adaptability in marketing text generation, and significantly improving marketing effectiveness.
Patent Information
- Application Number
- CN202511547435.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2026-01-06
AI Technical Summary
Marketing scripts generated by existing technologies are inaccurate and poorly adaptable, resulting in poor marketing effectiveness.
By acquiring historical marketing texts from multiple channels, a training dataset is generated. A diffusion model is then used for noise addition and denoising. Combined with a dominance function and a policy network, the diffusion model is gradually optimized to generate marketing texts.
It improved the accuracy and adaptability of marketing texts, significantly enhancing marketing effectiveness.
Smart Images

Figure CN121279366A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a model generation method, a marketing text generation method, an apparatus, and a network device. Background Technology
[0002] Marketing scripts, as a crucial tool for businesses to promote products and services, attract customers, and facilitate transactions, directly impact marketing effectiveness and customer purchasing decisions. High-quality marketing scripts accurately convey product value, stimulate customer interest, build trust, and ultimately increase sales; conversely, ineffective or inappropriate scripts can lead to customer churn. Therefore, generating effective and engaging marketing scripts is of paramount importance.
[0003] Current methods for generating marketing scripts include template-based and data-filling methods, deep learning-based text generation methods, and diffusion model-based content generation methods. However, template-based and data-filling methods suffer from limited semantic flexibility, deep learning-based text generation methods risk content homogenization, and diffusion model-based content generation methods, once the diffusion model is trained, have a relatively fixed generation pattern, making it difficult to quickly adjust according to real-time marketing scenarios and user feedback. The entire model needs to be retrained to optimize specific script dimensions. Therefore, marketing scripts generated using existing technologies have low accuracy and poor adaptability, resulting in unsatisfactory marketing performance. Summary of the Invention
[0004] The purpose of this invention is to provide a model generation method, a marketing text generation method, an apparatus, and a network device to solve the problems of low accuracy and poor adaptability of marketing scripts generated in the prior art, which lead to poor marketing results.
[0005] To address the aforementioned technical problems, embodiments of the present invention provide a model generation method for generating marketing text, comprising: Obtain historical marketing texts from multiple channels and generate a training dataset; Noise is added to the original data in the training dataset to generate the first data corresponding to the original data. Based on the dominance function, the first data is progressively denoised using a diffusion model. During the denoising process, the diffusion model is updated based on gradient calculation at intervals of a first number of diffusion steps until the diffusion model converges, thus obtaining a target model for generating marketing text. The diffusion model is used to perform diffusion denoising on the first data according to a policy network to generate the required marketing text. In each diffusion step, the dominance function is used to reduce the gradient estimation variance of the parameters of the policy network by evaluating the relative advantage of the denoising action in the current state.
[0006] Optionally, updating the diffusion model based on gradient calculation until the diffusion model converges, and generating a target model for generating marketing text, includes: Based on the policy gradient method and KL divergence constraints, the parameters of the policy network in the diffusion model are updated until the diffusion model converges, generating a target model for generating marketing text.
[0007] Optionally, the method further includes: Based on the Group Relative Policy Optimization (GRPO) algorithm, the advantage function is estimated. In each diffusion step, the advantage function is used to evaluate the relative advantage of each denoising action by comparing the weighted sum of the temporal difference errors of different denoising actions in the current state. The temporal difference error is calculated by a reward function and a value function. The reward function is used to quantify the immediate reward of the output data in the current diffusion step, and the value function is used to predict the reward of the current state.
[0008] Optionally, the method further includes: At each second number of diffusion steps, the parameters of the value function are updated based on gradient descent.
[0009] Optionally, the method further includes: A reward assessment is conducted on the text to be evaluated to obtain an assessment score for the text to be evaluated; The reward function is constructed by weighted summation of the evaluation scores; The evaluation score includes at least one of the following: A relevance score is used to assess the relevance between the text to be evaluated and the target product, which is the product served by the text to be evaluated. An attraction score is used to assess the emotional appeal of the text being evaluated. The compliance score is used to assess whether the text to be evaluated is compliant with the industry corresponding to the target product, based on a two-dimensional decision tree method. Feedback score, used to evaluate user conversion feedback for the text to be evaluated.
[0010] Optionally, the step of obtaining historical marketing texts from multiple channels to generate a training dataset includes: Obtain historical marketing texts from multiple channels; The historical marketing text is preprocessed to generate a second marketing text; The second marketing text is segmented into multiple words to construct a vocabulary list, wherein each word in the vocabulary list corresponds to a word index; The second marketing text is transformed into a first number sequence using the word index to represent the words in the second marketing text, thereby generating a training dataset, wherein the training dataset includes multiple first number sequences.
[0011] Optionally, the step of adding noise to the original data in the training dataset to generate the first data corresponding to the original data includes: The diffusion model is used to progressively diffuse and add noise to the original data in the training dataset to generate the first data corresponding to the original data.
[0012] This invention also provides a method for generating marketing text, including: Obtain initial marketing text; The initial marketing text is subjected to noise processing to generate second data corresponding to the initial marketing text; The second data is input into a pre-trained target model to obtain multiple candidate marketing texts output by the target model. The target model is used to perform diffusion denoising on the second data step by step through a policy network according to the advantage function to generate the candidate marketing texts. In each diffusion step, the advantage function is used to reduce the gradient estimation variance of the parameters of the policy network by evaluating the relative advantage of the denoising action in the current state. Each candidate marketing text is scored using a reward function to determine the desired target marketing text.
[0013] Optionally, the method further includes: The candidate marketing texts are evaluated for rewards to obtain an evaluation score. The reward function is constructed by weighted summation of the evaluation scores; The evaluation score includes at least one of the following: A relevance score is used to evaluate the relevance between the candidate marketing text and the target product, which is the product served by the candidate marketing text. An appeal score is used to assess the emotional appeal of the candidate marketing text. The compliance score is used to evaluate whether the candidate marketing text is compliant with the industry corresponding to the target product, based on a two-dimensional decision tree method. Feedback score, used to evaluate user conversion feedback for the candidate marketing text.
[0014] Optionally, the method further includes: Based on the Group Relative Policy Optimization (GRPO) algorithm, the advantage function is estimated. In each diffusion step, the advantage function is used to evaluate the relative advantage of each denoising action by comparing the weighted sum of the temporal difference errors of different denoising actions in the current state. The temporal difference error is calculated by a reward function and a value function. The reward function is used to quantify the immediate reward of the output data in the current diffusion step, and the value function is used to predict the reward of the current state.
[0015] Optionally, the step of adding noise to the initial marketing text to generate second data corresponding to the initial marketing text includes: The initial marketing text is preprocessed to generate a third marketing text; Based on the vocabulary in the vocabulary list and the word index corresponding to each vocabulary, the vocabulary in the third marketing text is represented by the word index, and the third marketing text is converted into a second numerical sequence, wherein the vocabulary list is constructed based on historical marketing texts; The second digital sequence is gradually subjected to diffusion and noise addition processing using the target model to generate the second data corresponding to the initial marketing text.
[0016] This invention also provides a model generation apparatus for generating marketing text, comprising: The first acquisition module is used to acquire historical marketing texts from multiple channels and generate a training dataset. The first processing module is used to add noise to the original data in the training dataset to generate the first data corresponding to the original data; The second processing module is used to perform diffusion denoising on the first data step by step using a diffusion model based on the dominance function. During the denoising process, the diffusion model is updated based on gradient calculation at every first number of diffusion steps until the diffusion model converges to obtain a target model for generating marketing text. The diffusion model is used to perform diffusion denoising on the first data according to the policy network to generate the required marketing text. In each diffusion step, the dominance function is used to reduce the gradient estimation variance of the parameters of the policy network by evaluating the relative advantage of the denoising action in the current state.
[0017] This invention also provides a marketing text generation device, comprising: The second acquisition module is used to acquire the initial marketing text; The third processing module is used to add noise to the initial marketing text and generate the second data corresponding to the initial marketing text. The fourth processing module is used to input the second data into a pre-trained target model to obtain multiple candidate marketing texts output by the target model. The target model is used to perform diffusion denoising on the second data step by step through a policy network according to the advantage function to generate the candidate marketing texts. In each diffusion step, the advantage function is used to reduce the gradient estimation variance of the parameters of the policy network by evaluating the relative advantage of the denoising action in the current state. The first scoring module is used to score each of the candidate marketing texts using a reward function to determine the required target marketing text.
[0018] This invention also provides a network device, including: a processor, a memory, and a program stored in the memory and executable on the processor. When executed by the processor, the program implements either the model generation method for generating marketing text as described in any of the preceding claims or the marketing text generation method as described in any of the preceding claims.
[0019] This invention also provides a readable storage medium, comprising: a program stored on the readable storage medium, wherein when the program is executed by a processor, it implements the steps of the model generation method for generating marketing text as described in any of the preceding claims, or implements the steps of the marketing text generation method as described in any of the preceding claims.
[0020] This invention also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the model generation method for generating marketing text as described in any of the preceding claims, or implement the steps of the marketing text generation method as described in any of the preceding claims.
[0021] At least one of the above technical solutions of the present invention has the following beneficial effects: The above scheme provides a model generation method for generating marketing text. First, historical marketing texts from multiple channels are acquired to generate a training dataset. Then, noise is added to the original data in the training dataset to generate the first data corresponding to the original data. Finally, in order to generate marketing text, the first data needs to be denoised. During the denoising process, the required model for generating marketing text is trained and generated. Specifically, it includes: using a diffusion model to progressively perform diffusion denoising on the first data according to the dominance function. During the denoising process, the diffusion model is updated based on gradient calculation at every first number of diffusion steps until the diffusion model converges, obtaining the target model for generating marketing text. The diffusion model is used to perform diffusion denoising on the first data according to the policy network to generate the required marketing text. In each diffusion step, the dominance function is used to reduce the gradient estimation variance of the parameters of the policy network by evaluating the relative advantage of the denoising action in the current state. The aforementioned denoising process defines the denoising steps of the diffusion model as a learnable policy network, introduces a dominance function based on a relative reward mechanism, and fuses the diffusion model with the dominance function to achieve dynamic optimization of the desired marketing text generation process. During denoising, the diffusion model is updated based on gradient calculation until it converges, yielding the target model for generating marketing text. Because the policy network of the target model is learnable and can dynamically optimize the marketing text generation process, the marketing text generated using the target model of this embodiment exhibits high accuracy and adaptability, resulting in significant marketing effectiveness.
[0022] The above solution also provides a marketing text generation method, implemented using a target model for generating marketing text obtained in this embodiment. First, an initial marketing text to be processed is acquired. Then, noise is added to the initial marketing text to generate second data corresponding to the initial marketing text. Second, the second data is input into a pre-trained target model to obtain multiple candidate marketing texts output by the target model. The target model is used to perform diffusion denoising on the second data step-by-step through a policy network based on a dominance function to generate the candidate marketing texts. In each diffusion step, the dominance function is used to reduce the gradient estimation variance of the policy network parameters by evaluating the relative advantage of the denoising action in the current state. Finally, a reward function is used to score each candidate marketing text to determine the desired target marketing text. The above marketing text generation process uses a learnable policy network as the denoising step of the diffusion model, introduces a dominance function with a relative reward mechanism, and integrates the diffusion model with the dominance function to achieve dynamic optimization of the desired marketing text generation process. Since the policy network of the target model is learnable and can dynamically optimize the marketing text generation process, the marketing text generated by the target model in the embodiments of the invention is highly accurate and adaptable, resulting in significant marketing effects. Attached Figure Description
[0023] Figure 1 This is a flowchart illustrating a model generation method for generating marketing text according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating the marketing text generation method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a model generation device for generating marketing text according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the marketing text generation device according to an embodiment of the present invention. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0026] like Figure 1 As shown, this embodiment of the invention provides a model generation method for generating marketing text, including: Step S101: Obtain historical marketing texts from multiple channels and generate a training dataset; In step S101, historical marketing texts from various marketing channels, such as advertising copy, product introductions, and promotional information, are collected to ensure the diversity and representativeness of the data, covering different types of products, target audiences, and marketing scenarios. Based on the historical marketing texts, a training dataset is generated.
[0027] Step S102: Add noise to the original data in the training dataset to generate the first data corresponding to the original data; In step S102, noise is gradually added to the original data in the training dataset. As the time step increases, more and more noise is added. In this process, the original structure of the original data is gradually destroyed, eventually reaching a state where noise dominates almost completely, thus generating the first data.
[0028] Step S103: Based on the dominance function, the first data is progressively denoised using a diffusion model. During the denoising process, the diffusion model is updated based on gradient calculation at every first number of diffusion steps until the diffusion model converges, thus obtaining a target model for generating marketing text. The diffusion model is used to perform diffusion denoising on the first data according to the policy network to generate the required marketing text. In each diffusion step, the dominance function is used to reduce the gradient estimation variance of the parameters of the policy network by evaluating the relative advantage of the denoising action in the current state.
[0029] In step S103, the diffusion model architecture is a Convolutional Network for Biomedical Image Segmentation (U-Net), which has an encoder-decoder structure and can effectively process image and text data. The diffusion model is used to perform diffusion denoising on the first data. The diffusion denoising process in the prior art specifically includes: according to a pre-set number of diffusion steps, for each piece of first data, the policy network of the diffusion model is used to denoise the first data through a back-diffusion process, generating the marketing text from the previous step. This process is repeated until the desired marketing text is obtained. Therefore, for each diffusion step, the purpose is to denoise the marketing text in the current state. Denoising is then performed to generate the marketing text from the previous step. Based on this, the marketing text from the previous step will be generated. The process is simplified into state-action pairs Describe it.
[0030] Based on the above, this embodiment of the invention introduces a dominance function with a relative reward mechanism, integrates the diffusion model with the dominance function, and progressively performs diffusion denoising processing on the first data. Furthermore, for each state-action pair during the denoising process... The advantage function evaluates the generation under the current state. The diffusion model's policy network generates the final diffusion step based on the relative advantages among candidate denoising actions generated during the process. In this process, the advantage function can reduce the variance of the gradient estimation of the policy network parameters.
[0031] Throughout the denoising process, at each first number of diffusion steps, the diffusion model is updated based on gradient calculation until the diffusion model converges, thus obtaining the target model for generating marketing text. The first number can be one or more, and this invention does not limit this; it can be set according to actual needs.
[0032] In this embodiment of the invention, firstly, historical marketing texts from multiple channels are acquired to generate a training dataset. Then, the original data in the training dataset is noise-added to generate first data corresponding to the original data. Finally, to generate marketing text, the first data needs to be denoised. During the denoising process, a model for generating marketing text is trained, specifically including: based on the dominance function, a diffusion model is used to progressively perform diffusion denoising on the first data. During the denoising process, at every first number of diffusion steps, the diffusion model is updated based on gradient calculation until the diffusion model converges, obtaining a target model for generating marketing text. The diffusion model is used to perform diffusion denoising on the first data according to a policy network to generate the required marketing text. In each diffusion step, the dominance function is used to reduce the gradient estimation variance of the parameters of the policy network by evaluating the relative advantage of the denoising action in the current state. Backpropagation optimizes computational efficiency, improving the generation quality and training efficiency of the diffusion model without adding an additional value network. The aforementioned denoising process defines the denoising steps of the diffusion model as a learnable policy network, introduces a dominance function based on a relative reward mechanism, and fuses the diffusion model with the dominance function to achieve dynamic optimization of the desired marketing text generation process. During denoising, the diffusion model is updated based on gradient calculation until it converges, resulting in a target model for generating marketing text. This strengthens high-dominance samples, avoiding the need to train a separate value model and reducing computational overhead. Because the policy network of the target model is learnable and can dynamically optimize the marketing text generation process, the marketing text generated using the target model in this embodiment exhibits high accuracy and adaptability, resulting in significant marketing effectiveness.
[0033] In one implementation, optionally, updating the diffusion model based on gradient calculation until the diffusion model converges, and generating a target model for generating marketing text, includes: Based on the policy gradient method and KL divergence constraints, the parameters of the policy network in the diffusion model are updated until the diffusion model converges, generating a target model for generating marketing text.
[0034] In this embodiment of the invention, to ensure the stability of the model update, a relative entropy (Kullback-Leibler Divergence, KL divergence) constraint is introduced when updating the diffusion model. Based on this, the gradient of the diffusion model is calculated according to the policy gradient method, as shown in the following formula: in, express Regarding network strategies The gradient is used to indicate the direction of parameter updates in the diffusion model. This represents the expectation operation. Representing network policy exist Generate in state The gradient of the logarithmic probability is used to reflect the influence of the parameters on the generated trajectory. Represents the dominance function. This indicates a state-action pair. The parameters of the policy network before the update. This represents the parameters of the updated policy network. This indicates the calculation of KL divergence constraints. These are the weighting coefficients of the KL divergence constraint.
[0035] This invention introduces KL divergence constraints and uses an adaptive KL coefficient adjustment mechanism to automatically adjust the constraint strength according to the training phase, thereby improving model computational efficiency while ensuring model stability.
[0036] In one embodiment, optionally, the method further includes: Based on the Group Relative Policy Optimization (GRPO) algorithm, the advantage function is estimated. In each diffusion step, the advantage function is used to evaluate the relative advantage of each denoising action by comparing the weighted sum of the temporal difference errors of different denoising actions in the current state. The temporal difference error is calculated by a reward function and a value function. The reward function is used to quantify the immediate reward of the output data in the current diffusion step, and the value function is used to predict the reward of the current state.
[0037] In this embodiment of the invention, the advantage function is estimated based on the Group Relative Policy Optimization (GRPO) algorithm. The formula for the advantage function is as follows: in, This represents the input data for the diffusion model in its current state. This indicates that the input data in the current state is In this case, the output data of the diffusion model, Representing state-action pairs The corresponding advantage function is used to evaluate the effect of the diffusion model on the distribution of the product. During the denoising process, the relative advantages of the denoising action in the current state are discussed. Indicates the discount factor. Indicates the mixed parameters, Used to represent state-action pairs The corresponding time series difference error, It is an integer greater than or equal to 0. This indicates that the reward function is used for calculation. Instant rewards Indicates the relationship based on the value function. The value estimate, Indicates the relationship based on the value function. Value estimate.
[0038] when hour, That is, single-step advantage estimation; when hour, Advantage estimation approaching infinity. By adjusting... The value of is weighed between single-step and multi-step estimation to obtain a more stable and effective advantage estimate.
[0039] In one embodiment, optionally, the method further includes: At each second number of diffusion steps, the parameters of the value function are updated based on gradient descent.
[0040] In this embodiment of the invention, during the denoising process using the diffusion model, it is also necessary to update the parameters of the value network (i.e., the value function). The role of the value network is to predict the expected cumulative reward in a certain state, and the loss function of the value network is the mean squared error loss. for: in, This indicates the expected calculation. This indicates that the reward function is used for calculation. Instant rewards Indicates the relationship based on the value function. The value estimate, Indicates the relationship based on the value function. Value estimate.
[0041] Then, the parameters of the value network are updated using gradient descent. : in, It is the learning rate of the value network.
[0042] It should be noted that the second quantity can be the same as or different from the first quantity. If the second quantity is different from the first quantity, then the value network and diffusion model are updated asynchronously.
[0043] In one embodiment, optionally, the method further includes: A reward assessment is conducted on the text to be evaluated to obtain an assessment score for the text to be evaluated; The reward function is constructed by weighted summation of the evaluation scores; The evaluation score includes at least one of the following: A relevance score is used to assess the relevance between the text to be evaluated and the target product, which is the product served by the text to be evaluated. An attraction score is used to assess the emotional appeal of the text being evaluated. The compliance score is used to assess whether the text to be evaluated is compliant with the industry corresponding to the target product, based on a two-dimensional decision tree method. Feedback score, used to evaluate user conversion feedback for the text to be evaluated.
[0044] In this embodiment of the invention, the reward function is used to evaluate the quality of the generated text to be evaluated, where the text to be evaluated refers to the marketing text that needs to be evaluated. The evaluation of the reward includes, but is not limited to, at least one of the following: Relevance: The relevance score between the generated text to be evaluated and the target product or service corresponding to the text to be evaluated, calculated using word vector similarity.
[0045] Attractiveness: Assess whether the language of the text being evaluated is attractive, and use sentiment analysis to determine whether the text is positive and vivid.
[0046] Compliance: A two-dimensional decision tree is used for filtering and weight calibration. The first dimension is used to determine the industry type, such as e-commerce, healthcare, and finance. The second dimension is used to assess the type of violation to adjust the deduction coefficient, such as legal risk and ethical risk. For example, in the healthcare industry, the word "cure" would have a violation deduction coefficient of ×2, while other industries would only have a base deduction. This process checks whether the text being evaluated complies with relevant marketing regulations and ethical standards.
[0047] Conversion Feedback: A conversion feedback score is obtained based on the click-through rate and conversion rate of customers after marketing to the target product or service.
[0048] For the construction of the reward function, assume that the generated text to be evaluated is The reward function can be expressed as: Correlation score Attraction Score Compliance score Conversion Feedback Score in It is a weighting coefficient, and .
[0049] The reward function in this invention overcomes the limitations of traditional single-index evaluation. It quantifies the semantic matching between the text to be evaluated and product features as a vector space cosine similarity, and uses a compliance-compliant two-dimensional decision tree to perform multi-dimensional filtering of the text to be evaluated, significantly improving the quality of content generation.
[0050] In one implementation method, optionally, the step of acquiring historical marketing texts from multiple channels and generating a training dataset includes: Obtain historical marketing texts from multiple channels; The historical marketing text is preprocessed to generate a second marketing text; The second marketing text is segmented into multiple words to construct a vocabulary list, wherein each word in the vocabulary list corresponds to a word index; The word index is used to represent the words in the second marketing text, and the second marketing text is converted into a first number sequence to generate a training dataset, wherein the training dataset includes multiple first number sequences.
[0051] In this embodiment of the invention, after obtaining historical marketing texts from multiple channels, the historical marketing texts are first preprocessed to remove special characters, punctuation marks, HyperText Markup Language (HTML) tags, and unify capitalization to generate second marketing texts. Then, the second marketing texts are segmented into individual words or tags, and all appearing words are counted to construct a vocabulary, and a unique index is assigned to each word. Finally, the words in the second marketing texts are represented by the word indexes, and the second marketing texts are converted into numerical sequences to generate a training dataset.
[0052] In one embodiment, optionally, the step of adding noise to the original data in the training dataset to generate the first data corresponding to the original data includes: The diffusion model is used to progressively diffuse and add noise to the original data in the training dataset to generate the first data corresponding to the original data.
[0053] In this embodiment of the invention, a diffusion model is used to progressively diffuse and add noise to the original data in the training dataset to generate the first data. Specific operations include: First, determine the diffusion step number T and the noise scheduling. ,in, Let represent the variance of the noise added in step T, defined from the original data in the training dataset to the first data. The diffusion process is used to represent the diffusion process in a diffusion model, given the previous diffusion step number (time step is...). The generated data Data generated at the current diffusion step (time step t) The conditional probability distribution of is given by the following formula: in, It is a conditional probability, representing that in Given the circumstances, The probability of occurrence, in the forward diffusion process of the diffusion model, characterizes the change from time step […]. The probability of data state transitioning to the data state at time step t; It represents a Gaussian distribution. This represents data at time step t. In marketing script generation applications, it is processed... The text vector obtained after step diffusion. Indicates time step as The data at that time is The previous state; It is the expectation of a Gaussian distribution. Wherein, It is a noise scheduling parameter associated with time step t, which controls the degree to which noise is added at each time step. This indicates that as the time step progresses, the mean of the current data is obtained by scaling the data from the previous time step according to a certain ratio. The scaling ratio is... Decide, The larger the value, the smaller the scaling ratio. It is the covariance matrix of a Gaussian distribution. It is an identity matrix, which means that the noise in each dimension is independent and identically distributed. This determines the magnitude of the noise variance. The larger the value, the greater the noise variance added to the data, and the closer the data is to a pure noise distribution.
[0054] In the forward diffusion process of the diffusion model, starting from the initial distribution of marketing script data, noise is gradually added to the data by repeatedly applying the above formula. As time progresses... The increase, As the noise gradually increases, the data becomes increasingly complex and complex. It gets closer and closer to a pure noise distribution During this process, the original structure of the data is gradually destroyed, eventually reaching a state where it is almost entirely dominated by noise. This forward diffusion process provides the basis for the subsequent recovery of the original data from the noise (the reverse diffusion process in step S103).
[0055] In summary, the model generation method for generating marketing text provided in this embodiment of the invention is implemented during the process of denoising noisy data using a diffusion model to generate the required marketing text. For the denoising process, the generation of marketing text is considered a Markov decision process, and the content generated by the diffusion model is seen as taking actions under different states. In actual business, this manifests as generating different text content based on different customer feedback and marketing stages. Through reinforcement learning, based on a set dominance function, the generation strategy is continuously adjusted to optimize the text content and obtain higher rewards, thereby generating text that better aligns with marketing objectives. The dominance function is set based on GRPO using the relative rewards of within-group samples to optimize the output of the diffusion model. This eliminates the need to rely on a value network, saving computational resources and improving stability. Furthermore, within-group comparisons reduce variance and improve stability, thereby enhancing the quality of generated marketing text.
[0056] For model updates, the diffusion model is updated during the diffusion denoising process. A model update strategy combined with KL constraints is used to ensure stability, preventing significant changes in the strategy caused by parameter updates in the GRPO policy network. This could lead to model instability, performance degradation, or divergence, ensuring stable convergence during training and more consistent quality of the generated marketing text. By appropriately adjusting the KL divergence weights, the model can fully utilize existing knowledge while continuously exploring new expressions, thereby improving the diversity and quality of the generated results.
[0057] like Figure 2 As shown, this embodiment of the invention also provides a marketing text generation method, including: Step S201: Obtain the initial marketing text; In step S201, the initial marketing text includes, but is not limited to, at least one of the following: promotional information, promotional conditions, and signature products, used to represent the initial content that needs to be marketed.
[0058] Step S202: Add noise to the initial marketing text to generate the second data corresponding to the initial marketing text; In step S202, noise is gradually added to the initial marketing text. As the time step increases, more and more noise is added. During this process, the original structure of the initial marketing text is gradually destroyed, eventually reaching a state where noise dominates almost entirely, thus generating the second data.
[0059] Step S203: Input the second data into the pre-trained target model to obtain multiple candidate marketing texts output by the target model. The target model is used to perform diffusion denoising on the second data step by step through the policy network according to the advantage function to generate the candidate marketing texts. In each diffusion step, the advantage function is used to reduce the gradient estimation variance of the parameters of the policy network by evaluating the relative advantage of the denoising action in the current state. In step S203, the target model is a pre-trained diffusion model. The diffusion model architecture is a convolutional network for biomedical image segmentation (U-Net), which has an encoder-decoder structure and can effectively process image and text data.
[0060] The second data is progressively diffused and denoised using the policy network in the target model to generate multiple candidate marketing texts. Specifically, the diffusion denoising process in the prior art includes: according to a pre-set number of diffusion steps, for each piece of second data, the policy network of the diffusion model is used to denoise the second data through a back-diffusion process, generating the marketing text from the previous step. This process is repeated until the desired candidate marketing text is obtained. Therefore, the purpose of each diffusion step is to denoise the marketing text in the current state. Denoising is then performed to generate the marketing text from the previous step. Based on this, the marketing text from the previous step will be generated. The process is simplified into state-action pairs Describe it.
[0061] Based on the above, this embodiment of the invention introduces a dominance function with a relative reward mechanism, integrates the diffusion model with the dominance function, and progressively performs diffusion denoising processing on the second data. Furthermore, for each state-action pair during the denoising process... The advantage function evaluates the generation under the current state. The diffusion model's policy network generates the final diffusion step based on the relative advantages among candidate denoising actions generated during the process. In this process, the advantage function can reduce the variance of the gradient estimation of the policy network parameters.
[0062] Step S204: Use a reward function to score each candidate marketing text to determine the required target marketing text.
[0063] In step S204, each candidate marketing text is scored using a reward function, and the candidate marketing text with the highest score is selected as the desired target marketing text.
[0064] In this embodiment of the invention, a pre-trained target model for generating marketing text is used. First, an initial marketing text to be processed is obtained. Then, noise is added to the initial marketing text to generate second data corresponding to the initial marketing text. Second, the second data is input into the pre-trained target model to obtain multiple candidate marketing texts output by the target model. The target model is used to perform diffusion denoising on the second data step by step through a policy network according to a dominance function to generate the candidate marketing texts. In each diffusion step, the dominance function is used to reduce the gradient estimation variance of the parameters of the policy network by evaluating the relative advantage of the denoising action in the current state. Finally, a reward function is used to score each candidate marketing text to determine the desired target marketing text. The above marketing text generation process uses a learnable policy network for the denoising step of the diffusion model, introduces a dominance function with a relative reward mechanism, and integrates the diffusion model with the dominance function to achieve dynamic optimization of the desired marketing text generation process. Since the policy network of the target model is learnable and can dynamically optimize the marketing text generation process, the marketing text generated by the target model of this embodiment has high accuracy and adaptability, resulting in significant marketing effects.
[0065] In one embodiment, optionally, the method further includes: The candidate marketing texts are evaluated for rewards to obtain an evaluation score. The reward function is constructed by weighted summation of the evaluation scores; The evaluation score includes at least one of the following: A relevance score is used to evaluate the relevance between the candidate marketing text and the target product, which is the product served by the candidate marketing text. An appeal score is used to assess the emotional appeal of the candidate marketing text. The compliance score is used to evaluate whether the candidate marketing text is compliant with the industry corresponding to the target product, based on a two-dimensional decision tree method. Feedback score, used to evaluate user conversion feedback for the candidate marketing text.
[0066] In this embodiment of the invention, the reward function is used to evaluate the quality of the generated candidate marketing text, and the evaluation of the reward includes, but is not limited to, at least one of the following: Relevance: The relevance score between the generated candidate marketing text and the target product or service corresponding to the candidate marketing text is calculated using word vector similarity.
[0067] Appeal: Assess the appeal of the language used in candidate marketing texts, and use sentiment analysis to determine whether the candidate marketing texts are positive and engaging.
[0068] Compliance: A two-dimensional decision tree is used for filtering and weight calibration. The first dimension is used to determine the industry type, such as e-commerce, healthcare, and finance. The second dimension is used to assess the type of violation to adjust the deduction coefficient, such as legal risk and ethical risk. For example, in the healthcare industry, the word "cure" would have a violation deduction coefficient of ×2, while other industries would only have a base deduction. This process checks whether the text being evaluated complies with relevant marketing regulations and ethical standards.
[0069] Conversion Feedback: A conversion feedback score is obtained based on the click-through rate and conversion rate of customers after marketing to the target product or service.
[0070] For the construction of the reward function, assume that the generated text to be evaluated is The reward function can be expressed as: Correlation score Attraction Score Compliance score Conversion feedback score in It is a weighting coefficient, and .
[0071] The reward function in this invention overcomes the limitations of traditional single-index evaluation. It quantifies the semantic matching between candidate marketing text and product features as a vector space cosine similarity, and uses a compliance-compliant two-dimensional decision tree to perform multi-dimensional filtering of candidate marketing text, significantly improving the quality of content generation.
[0072] In one embodiment, optionally, the method further includes: Based on the Group Relative Policy Optimization (GRPO) algorithm, the advantage function is estimated. In each diffusion step, the advantage function is used to evaluate the relative advantage of each denoising action by comparing the weighted sum of the temporal difference errors of different denoising actions in the current state. The temporal difference error is calculated by a reward function and a value function. The reward function is used to quantify the immediate reward of the output data in the current diffusion step, and the value function is used to predict the reward of the current state.
[0073] In this embodiment of the invention, the advantage function is estimated based on GRPO, and the formula for the advantage function is as follows: in, This represents the input data for the diffusion model in its current state. This indicates that the input data in the current state is In this case, the output data of the diffusion model, Representing state-action pairs The corresponding advantage function is used to evaluate the effect of the diffusion model on the distribution of the product. During the denoising process, the relative advantages of the denoising action in the current state are discussed. Indicates the discount factor. Indicates the mixed parameters, Used to represent state-action pairs The corresponding time series difference error, It is an integer greater than or equal to 0. This indicates that the reward function is used for calculation. Instant rewards Indicates the relationship based on the value function. The value estimate, Indicates the relationship based on the value function. Value estimate.
[0074] when hour, That is, single-step advantage estimation; when hour, Advantage estimation approaching infinity. By adjusting... The value of is weighed between single-step and multi-step estimation to obtain a more stable and effective advantage estimate.
[0075] In one embodiment, optionally, the step of adding noise to the initial marketing text to generate second data corresponding to the initial marketing text includes: The initial marketing text is preprocessed to generate a third marketing text; Based on the vocabulary in the vocabulary list and the word index corresponding to each vocabulary, the vocabulary in the third marketing text is represented by the word index, and the third marketing text is converted into a second numerical sequence, wherein the vocabulary list is constructed based on historical marketing texts; The second digital sequence is gradually subjected to diffusion and noise addition processing using the target model to generate the second data corresponding to the initial marketing text.
[0076] In this embodiment of the invention, the initial marketing text to be processed is preprocessed by removing special characters, punctuation marks, HTML tags, and unifying capitalization to generate a third marketing text. Then, the third marketing text is segmented into individual words or tags. Based on the words in the vocabulary list and the word index corresponding to each word, the third marketing text is converted into a numerical sequence. The vocabulary list is constructed based on the words in historical marketing texts from multiple channels, and each word in the vocabulary list is assigned a unique index.
[0077] The target model is a trained diffusion model, therefore it can be used to add noise to the data. In this embodiment of the invention, the target model is used to gradually perform diffusion and noise addition processing on the second digital sequence to generate the second data corresponding to the initial marketing text. The specific operations include: First, determine the diffusion step number T and the noise scheduling. ,in, Let T represent the variance of the noise added in step T, defined as the variance from the original data (i.e., the second number sequence) to the second data. The diffusion process is used to represent the diffusion process in a diffusion model, given the previous diffusion step number (time step is...). The generated data Data generated at the current diffusion step (time step t) The conditional probability distribution of is given by the following formula: in, It is a conditional probability, representing that in Given the circumstances, The probability of occurrence, in the forward diffusion process of the diffusion model, characterizes the change from time step […]. The probability of data state transitioning to the data state at time step t; It represents a Gaussian distribution. This represents data at time step t. In marketing script generation applications, it is processed... The text vector obtained after step diffusion. Indicates time step as The data at that time is The previous state; It is the expectation of a Gaussian distribution. Wherein, It is a noise scheduling parameter associated with time step t, which controls the degree to which noise is added at each time step. This indicates that as the time step progresses, the mean of the current data is obtained by scaling the data from the previous time step according to a certain ratio. The scaling ratio is... Decide, The larger the value, the smaller the scaling ratio. It is the covariance matrix of a Gaussian distribution. It is an identity matrix, which means that the noise in each dimension is independent and identically distributed. This determines the magnitude of the noise variance. The larger the value, the greater the noise variance added to the data, and the closer the data is to a pure noise distribution.
[0078] In the forward diffusion process of the diffusion model, starting from the initial distribution of marketing script data, noise is gradually added to the data by repeatedly applying the above formula. As time progresses... The increase, As the noise gradually increases, the data becomes increasingly complex and complex. It gets closer and closer to a pure noise distribution During this process, the original structure of the data is gradually destroyed, eventually reaching a state where it is almost entirely dominated by noise. This forward diffusion process provides the basis for the subsequent recovery of the original data from the noise (the reverse diffusion process in step S203).
[0079] like Figure 3 As shown, this embodiment of the invention also provides a model generation apparatus for generating marketing text, comprising: The first acquisition module 301 is used to acquire historical marketing texts from multiple channels and generate a training dataset. The first processing module 302 is used to add noise to the original data in the training dataset to generate the first data corresponding to the original data. The second processing module 303 is used to perform diffusion denoising on the first data step by step using a diffusion model based on the dominance function. During the denoising process, the diffusion model is updated based on gradient calculation at every first number of diffusion steps until the diffusion model converges to obtain a target model for generating marketing text. The diffusion model is used to perform diffusion denoising on the first data according to the policy network to generate the required marketing text. In each diffusion step, the dominance function is used to reduce the gradient estimation variance of the parameters of the policy network by evaluating the relative advantage of the denoising action in the current state.
[0080] Optionally, the second processing module 303 includes: The first update submodule is used to update the parameters of the policy network in the diffusion model based on the policy gradient method and KL divergence constraints until the diffusion model converges, thereby generating a target model for generating marketing text.
[0081] Optionally, the device further includes: The first estimation module is used to estimate the advantage function based on the Group Relative Policy Optimization (GRPO) algorithm. In each diffusion step, the advantage function is used to evaluate the relative advantage of each denoising action by comparing the weighted sum of the temporal difference errors of different denoising actions in the current state. The temporal difference error is calculated by a reward function and a value function. The reward function is used to quantify the immediate reward of the output data in the current diffusion step, and the value function is used to predict the reward of the current state.
[0082] Optionally, the device further includes: The first update module is used to update the parameters of the value function based on gradient descent at intervals of a second number of diffusion steps.
[0083] Optionally, the device further includes: The first evaluation module is used to perform reward evaluation on the text to be evaluated and obtain the evaluation score of the text to be evaluated; The first construction module is used to construct the reward function by weighted summation of the evaluation scores; The evaluation score includes at least one of the following: A relevance score is used to assess the relevance between the text to be evaluated and the target product, which is the product served by the text to be evaluated. An attraction score is used to assess the emotional appeal of the text being evaluated. The compliance score is used to assess whether the text to be evaluated is compliant with the industry corresponding to the target product, based on a two-dimensional decision tree method. Feedback score, used to evaluate user conversion feedback for the text to be evaluated.
[0084] Optionally, the first acquisition module 301 includes: The first acquisition submodule is used to acquire historical marketing texts from multiple channels; The first processing submodule is used to preprocess the historical marketing text to generate the second marketing text; The first construction submodule is used to segment the second marketing text into multiple words and construct a vocabulary list, wherein each word in the vocabulary list corresponds to a word index; The first conversion submodule is used to use the word index to represent the words in the second marketing text, convert the second marketing text into a first number sequence, and generate a training dataset, wherein the training dataset includes multiple first number sequences.
[0085] Optionally, the first processing module 302 includes: The second processing submodule is used to perform diffusion and noise addition processing on the original data in the training dataset step by step using the diffusion model to generate the first data corresponding to the original data.
[0086] It should be noted that the embodiments of this device are devices corresponding to the embodiments of the above methods. All implementations in the embodiments of the above methods are applicable to the embodiments of this device and can achieve the same technical effect.
[0087] like Figure 4 As shown, embodiments of the present invention also provide a marketing text generation device, comprising: The second acquisition module 401 is used to acquire the initial marketing text; The third processing module 402 is used to add noise to the initial marketing text and generate the second data corresponding to the initial marketing text. The fourth processing module 403 is used to input the second data into a pre-trained target model to obtain multiple candidate marketing texts output by the target model. The target model is used to perform diffusion denoising on the second data step by step through a policy network according to the advantage function to generate the candidate marketing texts. In each diffusion step, the advantage function is used to reduce the gradient estimation variance of the parameters of the policy network by evaluating the relative advantage of the denoising action in the current state. The first scoring module 404 is used to score each of the candidate marketing texts using a reward function to determine the required target marketing text.
[0088] Optionally, the device further includes: The second evaluation module is used to evaluate the candidate marketing texts and obtain an evaluation score for the candidate marketing texts. The second construction module is used to construct the reward function by weighted summation of the evaluation scores; The evaluation score includes at least one of the following: A relevance score is used to evaluate the relevance between the candidate marketing text and the target product, which is the product served by the candidate marketing text. An appeal score is used to assess the emotional appeal of the candidate marketing text. The compliance score is used to evaluate whether the candidate marketing text is compliant with the industry corresponding to the target product, based on a two-dimensional decision tree method. Feedback score, used to evaluate user conversion feedback for the candidate marketing text.
[0089] Optionally, the device further includes: The second estimation module is used to estimate the advantage function based on the Group Relative Policy Optimization (GRPO) algorithm. In each diffusion step, the advantage function is used to evaluate the relative advantage of each denoising action by comparing the weighted sum of the temporal difference errors of different denoising actions in the current state. The temporal difference error is calculated by a reward function and a value function. The reward function is used to quantify the immediate reward of the output data in the current diffusion step, and the value function is used to predict the reward of the current state.
[0090] Optionally, the third processing module 402 includes: The third processing submodule is used to preprocess the initial marketing text to generate a third marketing text; The second conversion submodule is used to convert the third marketing text into a second numerical sequence based on the vocabulary in the vocabulary list and the word index corresponding to each vocabulary, using the word index to represent the vocabulary in the third marketing text. The vocabulary list is constructed based on historical marketing texts. The fourth processing submodule is used to gradually perform diffusion and noise addition processing on the second digital sequence using the target model to generate the second data corresponding to the initial marketing text.
[0091] It should be noted that the embodiments of this device are devices corresponding to the embodiments of the above methods. All implementations in the embodiments of the above methods are applicable to the embodiments of this device and can achieve the same technical effect.
[0092] This invention also provides a network device, including: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the model generation method for generating marketing text as described in any of the preceding claims, or implements the marketing text generation method as described in any of the preceding claims, and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0093] This invention also provides a readable storage medium, comprising: a program stored on the readable storage medium, wherein when the program is executed by a processor, it implements the steps of the model generation method for generating marketing text as described in any of the preceding claims, or implements the steps of the marketing text generation method as described in any of the preceding claims, and achieves the same technical effect. To avoid repetition, further details are omitted here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0094] This invention also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, they implement the steps of the model generation method for generating marketing text as described in any of the preceding claims, or implement the steps of the marketing text generation method as described in any of the preceding claims, and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0095] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0096] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A model generation method for generating a marketing text, characterized by, The method comprises the following steps: acquiring historical marketing texts of multiple channels to generate a training data set; performing noise processing on original data in the training data set to generate first data corresponding to the original data; updating the diffusion model based on gradient calculation every first number of diffusion steps during the diffusion denoising process of the first data according to an advantage function, and until the diffusion model converges, obtaining a target model for generating marketing texts, wherein the diffusion model is used to perform diffusion denoising on the first data according to a policy network to generate the required marketing texts, and in each diffusion step, the advantage function is used to reduce the gradient estimation variance of the parameters of the policy network by evaluating the relative advantage of the denoising action in the current state. 2.The model generation method for generating a marketing text according to claim 1, wherein, The method further comprises: updating the parameters of the policy network in the diffusion model based on the policy gradient method and the KL divergence constraint until the diffusion model converges to generate the target model for generating marketing texts. 3.The model generation method for generating a marketing text according to claim 1, wherein, The method further comprises: estimating the advantage function based on a group relative policy optimization algorithm (GRPO), wherein in each diffusion step, the advantage function is used to evaluate the relative advantage of each denoising action by comparing the weighted sum of the temporal difference errors of different denoising actions in the current state, the temporal difference error being calculated by a reward function and a value function, the reward function being used to quantify the immediate reward of the output data of the current diffusion step, and the value function being used to predict the return of the current state. 4.The model generation method for generating a marketing text according to claim 3, characterized in that, The method further comprises: updating the parameters of the value function based on the gradient descent method every second number of diffusion steps. 5.The model generation method for generating a marketing text according to claim 3, characterized in that, The method further comprises: performing reward evaluation on the to-be-evaluated text to obtain an evaluation score of the to-be-evaluated text; performing weighted summation on the evaluation score to construct the reward function; wherein the evaluation score comprises at least one of the following: a relevance score for evaluating the relevance between the to-be-evaluated text and a target product, the target product being a product served by the to-be-evaluated text; an attraction score for evaluating the emotional attraction of the to-be-evaluated text; a compliance score for evaluating whether the to-be-evaluated text complies with the industry corresponding to the target product according to a two-dimensional decision tree method; a feedback score for evaluating the user conversion feedback of the to-be-evaluated text. 6.The model generation method for generating a marketing text according to claim 1, wherein, The method further comprises: acquiring historical marketing texts of multiple channels; performing preprocessing on the historical marketing texts to generate second marketing texts; segmenting the second marketing texts into multiple vocabularies to construct a vocabulary table, wherein each vocabulary in the vocabulary table corresponds to a word index; representing the vocabularies in the second marketing texts by using the word index to convert the second marketing texts into first digital sequences to generate a training data set, wherein the training data set comprises multiple first digital sequences. 7.The model generation method for generating a marketing text according to claim 1, wherein, The noise adding processing on the original data in the training data set generates first data corresponding to the original data. The diffusion model is used to gradually perform diffusion noise adding processing on the original data in the training data set to generate the first data corresponding to the original data.
8. A marketing text generation method characterized by, Comprise: Obtain an initial marketing text; Add noise to the initial marketing text to generate second data corresponding to the initial marketing text; Input the second data into a pre-trained target model to obtain a plurality of candidate marketing texts output by the target model, wherein the target model is used to perform diffusion denoising processing on the second data through a policy network according to an advantage function at each diffusion step, and the advantage function is used to reduce the gradient estimation variance of the parameters of the policy network by evaluating the relative advantage of the denoising action in the current state. Use a reward function to score each candidate marketing text to determine the target marketing text required.
9. The marketing text generation method of claim 8, wherein, The method further comprises: Reward evaluation of the candidate marketing text to obtain an evaluation score of the candidate marketing text; Weighted sum of the evaluation score to construct the reward function; Wherein the evaluation score comprises at least one of the following: A relevance score for evaluating the relevance between the candidate marketing text and a target product, the target product being the product served by the candidate marketing text; An attraction score for evaluating the emotional attraction of the candidate marketing text; A compliance score for evaluating whether the candidate marketing text complies with the industry corresponding to the target product according to a two-dimensional decision tree method; A feedback score for evaluating the user conversion feedback of the candidate marketing text. 10.The marketing text generation method of claim 8, wherein, The method further comprises: Estimate the advantage function based on a group relative policy optimization algorithm (GRPO), wherein in each diffusion step, the advantage function is used to evaluate the relative advantage of each denoising action by comparing the weighted sum of the time difference errors of different denoising actions in the current state, the time difference error being calculated by a reward function and a value function, the reward function being used to quantify the immediate reward of the output data of the current diffusion step, and the value function being used to predict the return of the current state.
11. The marketing text generation method of claim 8, wherein, The noise adding processing on the initial marketing text to generate second data corresponding to the initial marketing text comprises: Preprocess the initial marketing text to generate a third marketing text; According to the words in the word table and the word index corresponding to each word, the word index is used to represent the words in the third marketing text, and the third marketing text is converted into a second digital sequence, wherein the word table is constructed according to historical marketing texts; Use the target model to gradually perform diffusion noise adding processing on the second digital sequence to generate second data corresponding to the initial marketing text.
12. A model generation apparatus for generating a marketing text, characterized by, Comprise: A first acquisition module for acquiring historical marketing texts of various channels to generate a training data set; A first processing module for adding noise to the original data in the training data set to generate first data corresponding to the original data; The second processing module is configured to perform diffusion denoising processing on the first data gradually according to a diffusion model based on a utility function, and update the diffusion model based on a gradient calculation every first number of diffusion steps during the denoising processing until the diffusion model converges, to obtain a target model for generating a marketing text.
13. A marketing text generation apparatus characterized by comprising: The second obtaining module is configured to obtain an initial marketing text. The third processing module is configured to perform noise adding processing on the initial marketing text to generate second data corresponding to the initial marketing text. The fourth processing module is configured to input the second data into a pre-trained target model to obtain a plurality of candidate marketing texts output by the target model, wherein the target model is configured to perform diffusion denoising processing on the second data gradually according to a utility function through a policy network to generate the candidate marketing texts, and the utility function is configured to reduce the gradient estimation variance of the parameters of the policy network by evaluating the relative advantages of denoising actions in a current state in each diffusion step. The first scoring module is configured to score each of the candidate marketing texts using a reward function to determine a target marketing text. The processor, the memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the model generation method for generating a marketing text according to any one of claims 1 to 7 or the marketing text generation method according to any one of claims 8 to 11.
14. A network device, comprising: The readable storage medium has a program stored thereon, and the program, when executed by a processor, implements the steps of the model generation method for generating a marketing text according to any one of claims 1 to 7 or the steps of the marketing text generation method according to any one of claims 8 to 11. The readable storage medium has a program stored thereon, and the program, when executed by a processor, implements the steps of the model generation method for generating a marketing text according to any one of claims 1 to 7 or the steps of the marketing text generation method according to any one of claims 8 to 11.
15. A readable storage medium, characterized in that, The readable storage medium has a program stored thereon, and the program, when executed by a processor, implements the steps of the model generation method for generating a marketing text according to any one of claims 1 to 7 or the steps of the marketing text generation method according to any one of claims 8 to 11. 16. A computer program product, characterised in that,